/* ==========================================================================
   MYUU STUDIO — CATEGORY DETAIL PAGE
   Replicates the layout of the reference image with the Hatsune Miku palette
   ========================================================================== */

.category-page {
  background-color: var(--miku-dark);
  color: var(--text-primary);
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   1. Category Hero Section (Exacto a la imagen de referencia)
   -------------------------------------------------------------------------- */
.cat-hero-section {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 40px;
}

.cat-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform 0.6s ease;
}

.cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(16, 20, 27, 0.96) 0%,
    rgba(16, 20, 27, 0.82) 45%,
    rgba(16, 20, 27, 0.5) 100%
  ),
  radial-gradient(
    circle at 50% 50%,
    transparent 20%,
    rgba(16, 20, 27, 0.7) 100%
  );
}

.cat-hero-container {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cat-hero-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cat-hero-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(25, 33, 45, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.cat-badge-item.highlight {
  border-color: rgba(57, 197, 187, 0.5);
  color: var(--miku-teal);
  background: rgba(57, 197, 187, 0.1);
}

.cat-hero-title {
  font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.cat-hero-desc {
  font-size: 15.5px;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 620px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.cat-hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cat-cta-btn {
  background-color: var(--miku-teal);
  color: #0b1218;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(57, 197, 187, 0.4);
  transition: var(--transition-smooth);
}

.cat-cta-btn:hover {
  background-color: var(--miku-teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(57, 197, 187, 0.6);
}

.cat-link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  transition: var(--transition-smooth);
}

.cat-link-more span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.cat-link-more:hover {
  color: var(--miku-teal);
}

.cat-link-more:hover span {
  transform: translateY(3px);
}

/* Right Media Button Badge */
.cat-hero-media-cta {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-media-pill {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(16, 20, 27, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 10px 8px 22px;
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.cat-media-pill:hover {
  border-color: var(--miku-teal);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(57, 197, 187, 0.35);
}

.media-pill-text {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.media-pill-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--miku-teal);
  color: #0b1218;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding-left: 3px;
  box-shadow: 0 0 16px rgba(57, 197, 187, 0.4);
}

/* --------------------------------------------------------------------------
   2. Sub-Navigation Sticky Tabs Bar
   -------------------------------------------------------------------------- */
.cat-subnav-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(16, 20, 27, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 40px;
}

.cat-subnav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-subnav-container::-webkit-scrollbar {
  display: none;
}

.subnav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--miku-gray-text);
  white-space: nowrap;
  transition: var(--transition-smooth);
  padding: 4px 0;
  position: relative;
}

.subnav-link:hover,
.subnav-link.active {
  color: #ffffff;
}

.subnav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--miku-teal);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--miku-teal);
}

.subnav-link.highlight-link {
  color: var(--miku-teal);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   3. Section: Visión General (Exacta a la distribución de la imagen)
   -------------------------------------------------------------------------- */
.cat-overview-section {
  padding: 80px 40px;
  background-color: #0e1218;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-overview-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 60px;
}

.overview-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 90px;
  align-self: start;
}

.overview-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(25, 33, 45, 0.8);
  border: 1px solid rgba(57, 197, 187, 0.35);
  color: var(--miku-teal);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 9999px;
  width: fit-content;
}

.overview-heading {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.overview-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.overview-paragraph {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.7;
}

.overview-paragraph.secondary {
  color: #64748b;
}

.overview-inclusions {
  margin-top: 20px;
  background: rgba(25, 33, 45, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 30px;
}

.inclusions-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.inclusions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

.inc-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inc-icon {
  font-size: 16px;
  background: rgba(57, 197, 187, 0.12);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inc-text {
  font-size: 13.5px;
  color: #e2e8f0;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   4. Section: Proyectos de esta Rama (Notion Live Data)
   -------------------------------------------------------------------------- */
.cat-projects-section {
  padding: 80px 40px;
  background-color: var(--miku-dark);
}

.cat-projects-container {
  max-width: 1400px;
  margin: 0 auto;
}

.cat-projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.cat-projects-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-top: 8px;
}

.cat-projects-subtitle {
  font-size: 14px;
  color: var(--miku-gray-text);
  margin-top: 4px;
}

.btn-back-categories {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(25, 33, 45, 0.7);
  border: 1px solid rgba(57, 197, 187, 0.4);
  color: var(--miku-teal);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 9999px;
  transition: var(--transition-smooth);
}

.btn-back-categories:hover {
  background: var(--miku-teal);
  color: #0b1218;
  box-shadow: 0 4px 16px rgba(57, 197, 187, 0.4);
}

.cat-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Cards de Proyectos dentro de la Categoría */
.cat-project-card {
  background: rgba(20, 27, 37, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(57, 197, 187, 0.2);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.cat-project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(57, 197, 187, 0.6);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 25px rgba(57, 197, 187, 0.25);
}

.cat-card-media {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #10141b;
}

.cat-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cat-project-card:hover .cat-card-media img {
  transform: scale(1.06);
}

.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 27, 37, 0.9) 0%, transparent 60%);
}

.cat-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(16, 20, 27, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57, 197, 187, 0.45);
  color: var(--miku-teal);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.cat-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cat-card-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 8px;
}

.cat-card-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cat-tag {
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 9px;
  border-radius: 9999px;
}

.btn-card-preview {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(57, 197, 187, 0.1);
  border: 1px solid rgba(57, 197, 187, 0.35);
  color: var(--miku-teal);
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.cat-project-card:hover .btn-card-preview {
  background: var(--miku-teal);
  color: #0b1218;
  box-shadow: 0 4px 16px rgba(57, 197, 187, 0.4);
}

/* Loading & Empty states */
.loading-state,
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--miku-gray-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(57, 197, 187, 0.2);
  border-top-color: var(--miku-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   5. Contact CTA
   -------------------------------------------------------------------------- */
.cat-contact-section {
  padding: 90px 40px;
  background: linear-gradient(to bottom, #0e1218 0%, #080a0f 100%);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-contact-container {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.contact-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.contact-desc {
  font-size: 15px;
  color: var(--miku-gray-text);
  line-height: 1.6;
}

.contact-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Responsive */
@media (max-width: 992px) {
  .cat-hero-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cat-overview-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .overview-left {
    position: static;
  }

  .inclusions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cat-hero-section {
    padding: 40px 20px;
  }

  .cat-subnav-bar {
    padding: 12px 20px;
  }

  .cat-overview-section,
  .cat-projects-section,
  .cat-contact-section {
    padding: 60px 20px;
  }
}
