/* =========================================================================
   multipage.css — Capa de estilos para la arquitectura multipágina
   -------------------------------------------------------------------------
   Reutiliza los tokens y componentes de styles.css (variables --green,
   --black, .container, .button, .section, .eyebrow, .section-heading…).
   Aquí solo viven los componentes NUEVOS que el one-pager no necesitaba:
     1. Dropdown de "Servicios" en la navegación
     2. Breadcrumbs
     3. Page hero (cabecera compacta de páginas interiores)
     4. Prosa / contenido largo de páginas de servicio
     5. Rejillas de beneficios y "qué incluye"
     6. Banda CTA y bloque de servicios relacionados
     7. Rejilla del blog
   No se modifica styles.css.
   ========================================================================= */

/* 1. DROPDOWN DE NAVEGACIÓN ------------------------------------------------ */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #bbc6c1;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.25s ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger[aria-expanded="true"],
.nav-dropdown.is-active .nav-dropdown-trigger {
  color: var(--white);
}

.nav-caret {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.nav-dropdown-trigger[aria-expanded="true"] .nav-caret {
  transform: translateY(0) rotate(225deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  width: 248px;
  padding: 8px;
  transform: translateX(-50%) translateY(-8px);
  border: 1px solid rgba(100, 225, 162, 0.2);
  border-radius: 16px;
  background: rgba(5, 14, 11, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown-menu:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  color: #c8d4ce;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: rgba(34, 227, 148, 0.08);
  color: var(--white);
}

/* 2. BREADCRUMBS ----------------------------------------------------------- */
.breadcrumbs {
  padding: 116px 0 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--muted);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: rgba(145, 162, 154, 0.5);
}

.breadcrumbs a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--green);
}

.breadcrumbs [aria-current="page"] {
  color: var(--off-white);
}

/* 3. PAGE HERO (cabecera compacta de páginas interiores) ------------------- */
.page-hero {
  position: relative;
  padding: 40px 0 16px;
  overflow: hidden;
}

.breadcrumbs + .page-hero {
  padding-top: 28px;
}

.page-hero-inner {
  max-width: 760px;
}

.page-hero h1 {
  margin: 14px 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.page-hero h1 em {
  font-style: normal;
  color: var(--green);
}

.page-hero-lead {
  margin: 18px 0 0;
  max-width: 60ch;
  color: var(--off-white);
  font-size: 1.08rem;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* Cuando la primera sección de la página no es un page-hero sino una section,
   añade aire bajo el header fijo. */
.page-top {
  padding-top: 128px;
}

/* 4. PROSA / CONTENIDO LARGO ----------------------------------------------- */
.prose {
  max-width: 72ch;
}

.prose h2 {
  margin: 8px 0 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: 1.18rem;
  font-weight: 700;
}

.prose p {
  margin: 0 0 16px;
  color: var(--off-white);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--white);
}

.prose a:not(.button) {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 5. REJILLAS DE BENEFICIOS / "QUÉ INCLUYE" -------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.feature-card {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.feature-card .feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(34, 227, 148, 0.08);
  color: var(--green);
}

.feature-card .feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Lista de checks reutilizable */
.check-list {
  display: grid;
  gap: 12px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--off-white);
}

.check-list li svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--green);
}

/* Caja "precio orientativo" en páginas de servicio */
.price-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #0c1c15, #0f241b);
}

.price-callout .price-amount {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.1;
}

.price-callout .price-amount span {
  display: block;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 400;
}

/* 6. BANDA CTA + SERVICIOS RELACIONADOS ------------------------------------ */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 36px 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #0c1c15, #0f241b);
}

.cta-band h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.01em;
}

.cta-band p {
  margin: 8px 0 0;
  max-width: 50ch;
  color: var(--muted);
}

.related-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.related-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.related-card strong {
  font-size: 1.05rem;
}

.related-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.related-card .related-go {
  margin-top: auto;
  color: var(--green);
  font-weight: 700;
  font-size: 0.88rem;
}

/* 7. BLOG ------------------------------------------------------------------ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.blog-card .blog-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0d2118, #0a1611);
  border-bottom: 1px solid var(--line);
}

.blog-card .blog-body {
  padding: 22px 22px 24px;
}

.blog-card .blog-meta {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-card h3 {
  margin: 10px 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.blog-empty {
  margin-top: 24px;
  padding: 40px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

/* Espaciador entre secciones interiores que no usan la clase .section */
.stack {
  display: grid;
  gap: 28px;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: start;
}

/* 8. SECTORES (índice /sectores/) ------------------------------------------ */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.sector-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.sector-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.sector-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.sector-card-body {
  padding: 20px 20px 22px;
}

.sector-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.sector-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* /sectores/index.html usa la paleta --lynx-* en vez de la paleta antigua, sin tocar
   las reglas de .sector-card/.page-hero/.cta-band de arriba (compartidas con el resto
   del sitio) — solo se sobreescriben las variables dentro de este main concreto. */
main.lynx-sectors-main {
  --card: var(--lynx-card);
  --green: var(--lynx-accent);
  --muted: var(--lynx-muted);
  --line: var(--lynx-border);
  --line-strong: color-mix(in srgb, var(--lynx-accent) 30%, var(--lynx-border));
  --white: var(--lynx-ivory);
  /* Fase D.1 — mismos tokens de forma/espaciado que el hero y el grid de home */
  --radius: var(--lynx-radius-card);
}

main.lynx-sectors-main .section {
  padding: var(--lynx-space-section) 0;
}

main.lynx-sectors-main .sector-card-body {
  padding: var(--lynx-space-card-padding);
}

main.lynx-sectors-main .sector-grid {
  gap: calc(var(--lynx-space-element-gap) * 2);
}

/* Las 14 páginas individuales de sector (sectores/*/index.html) reciben el mismo
   patrón de override con scope, solo para forma/espaciado — mantienen la paleta
   estándar del sitio (var(--card)/var(--green)/etc. sin tocar), no la --lynx-*. */
main.lynx-sector-page {
  --radius: var(--lynx-radius-card);
}

main.lynx-sector-page .section {
  padding: var(--lynx-space-section) 0;
}

main.lynx-sector-page .related-card {
  padding: var(--lynx-space-card-padding);
}

main.lynx-sector-page .related-services {
  gap: calc(var(--lynx-space-element-gap) * 2);
}

/* 8b. PÁGINA INDIVIDUAL DE SECTOR (portada con foto) ------------------------ */
.sector-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 9. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 860px) {
  /* El dropdown pasa a ser una sección desplegada dentro del menú móvil */
  .nav-dropdown {
    display: block;
    width: 100%;
  }

  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
  }

  .nav-dropdown-menu {
    position: static;
    width: auto;
    padding: 0;
    transform: none;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, visibility 0.3s ease;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    visibility: visible;
    max-height: 320px;
  }

  /* En móvil no abrir por hover */
  .nav-dropdown:hover .nav-dropdown-menu {
    visibility: hidden;
    max-height: 0;
  }

  .nav-dropdown.open:hover .nav-dropdown-menu {
    visibility: visible;
    max-height: 320px;
  }

  .nav-dropdown-menu a {
    padding: 14px 36px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .section-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .breadcrumbs {
    padding-top: 96px;
  }

  .page-top {
    padding-top: 104px;
  }
}
