/* MCP Security TTPs Matrix View */

/* Matrix Navigation */
.matrix-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0 2rem 0;
  border: 1px solid #e1e4e8;
}

.nav-link {
  color: #1f4e79;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background: white;
  text-decoration: none;
  color: #1f4e79;
}

.matrix-description {
  color: #6c757d;
  font-size: 0.9rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .matrix-navigation {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

.matrix-container {
  width: 100%;
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

/* Category Header Cards within columns */
.category-header-card {
  background: #1f4e79;
  border-radius: 6px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(31, 78, 121, 0.2);
  transition: all 0.2s ease;
}

.category-header-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(31, 78, 121, 0.3);
}

.category-link {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: white;
  text-align: center;
}

.category-link:hover {
  text-decoration: none;
  color: white;
}

.category-link h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  color: white;
}

.technique-count {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

/* Techniques Grid */
.techniques-grid {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  min-height: 600px;
  background: #fafbfc;
}

.technique-column {
  min-width: 180px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.technique-column.active {
  background: rgba(31, 78, 121, 0.05);
  border-radius: 8px;
  padding: 0.5rem;
  margin: -0.5rem 0;
}

.technique-card {
  background: white;
  border: 1px solid #d1d5da;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  overflow: hidden;
}

.technique-card:hover {
  border-color: #1f4e79;
  box-shadow: 0 2px 8px rgba(31, 78, 121, 0.15);
  transform: translateX(2px);
}

.technique-link {
  display: block;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.technique-link:hover {
  text-decoration: none;
}

.technique-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #24292e;
  line-height: 1.3;
  word-wrap: break-word;
  padding: 0.25rem 0;
}

.technique-card:hover .technique-name {
  color: #1f4e79;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .matrix-container {
    overflow-x: scroll;
  }
  
  .category-header {
    width: 160px;
    min-height: 70px;
    padding: 0.75rem;
  }
  
  .technique-column {
    min-width: 160px;
  }
}

@media (max-width: 768px) {
  .matrix-container {
    margin: 1rem -1rem;
    border-radius: 0;
  }
  
  .category-header {
    width: 140px;
    min-height: 60px;
    padding: 0.5rem;
    margin: 0.25rem;
  }
  
  .category-header h3 {
    font-size: 0.8rem;
  }
  
  .technique-count {
    font-size: 0.7rem;
  }
  
  .technique-column {
    min-width: 140px;
  }
  
  .techniques-grid {
    padding: 0.5rem;
  }
}

/* Scrollbar Styling */
.matrix-container::-webkit-scrollbar,
.techniques-grid::-webkit-scrollbar {
  height: 8px;
}

.matrix-container::-webkit-scrollbar-track,
.techniques-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.matrix-container::-webkit-scrollbar-thumb,
.techniques-grid::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.matrix-container::-webkit-scrollbar-thumb:hover,
.techniques-grid::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Loading Animation */
.matrix-container {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}