/* Gallery Subcategories (overview mode) */
.gallery-subcategories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.subcategory-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--_news-panel, #121212);
  border: 1px solid var(--accent-color, #d4af37);
  border-radius: 14px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: white;
  overflow: hidden;
  min-height: 400px;
}

.subcategory-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color, #d4af37), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.subcategory-card:hover::before {
  opacity: 1;
}

.subcategory-card:hover {
  transform: translateY(-4px);
  background: var(--_news-panel, #141414);
  border-color: color-mix(in srgb, var(--accent-color, #d4af37) 30%, var(--accent-color-light, #f0d478) 70%);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px color-mix(in srgb, var(--accent-color, #d4af37) 20%, transparent);
}

/* Preview Images */
.subcategory-preview {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.subcategory-preview--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 280px;
  background: #000;
}

.preview-image {
  position: relative;
  overflow: hidden;
}

.preview-image--1 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.preview-image--2 {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.preview-image--3 {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

.preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.subcategory-card:hover .preview-image img {
  transform: scale(1.05);
}

.subcategory-preview--single {
  height: 280px;
  background: #000;
}

.subcategory-preview--single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.subcategory-card:hover .subcategory-preview--single img {
  transform: scale(1.05);
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

.subcategory-card:hover .preview-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.preview-overlay i {
  font-size: 4rem;
  color: white;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.subcategory-card:hover .preview-overlay i {
  transform: scale(1.15);
  color: var(--accent-color, #d4af37);
}

/* Fallback icon (when no images) */
.subcategory-icon {
  font-size: 3rem;
  color: var(--accent-color, #d4af37);
  margin: 2rem 0 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.subcategory-card:hover .subcategory-icon {
  transform: scale(1.1);
  color: var(--accent-color-light, #f0d478);
}

/* Content section */
.subcategory-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 2rem 2rem;
  position: relative;
}

.subcategory-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: white;
}

.subcategory-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-bottom: 0;
}

.subcategory-count {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color, #d4af37);
  color: black;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-subcategories {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .subcategory-card {
    min-height: 350px;
  }

  .subcategory-preview--grid,
  .subcategory-preview--single {
    height: 220px;
  }

  .subcategory-content {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .subcategory-icon {
    font-size: 2.5rem;
    margin: 1.5rem 0 1rem;
  }

  .subcategory-title {
    font-size: 1.25rem;
  }

  .subcategory-description {
    font-size: 0.9rem;
  }

  .preview-overlay i {
    font-size: 3rem;
  }
}
