/* ============================================================
   InnBridge V4 — pages/metodologia.css
   ============================================================ */

/* ── HERO INTERIOR ──────────────────────────────────────────── */
.page-hero {
  background: var(--off-white);
  padding: var(--space-16) 0;
  border-bottom: 1px solid rgba(26,127,114,0.1);
}

.page-hero__inner {
  max-width: 720px;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  margin: 0 auto;
}

.page-hero__eyebrow {
  margin-bottom: var(--space-3);
}

.page-hero__headline {
  margin-bottom: var(--space-5);
}

.page-hero__subtitle {
  font-size: var(--text-lg);
  color: var(--gray);
  max-width: 58ch;
}

/* ── MARCO CONCEPTUAL ───────────────────────────────────────── */
.marco-section {
  background: var(--white);
  padding: var(--space-20) 0;
}

.marco-section__inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.marco-section__inner p + p {
  margin-top: var(--space-5);
}

/* ── VALLES ACORDEÓN ────────────────────────────────────────── */
.valles-acordeon-section {
  background: var(--off-white);
  padding: var(--space-20) 0;
}

.valles-acordeon-section__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.valles-acordeon-section__intro {
  max-width: 680px;
  margin-bottom: var(--space-12);
}

.valles-acordeon-section__intro h2 {
  margin-bottom: var(--space-4);
}

.valles-acordeon-section__intro p {
  font-size: var(--text-base);
  color: var(--gray);
  line-height: 1.7;
}

/* ── Contenedor del acordeón (horizontal en desktop) ── */
.valles-acordeon {
  display: flex;
  height: 720px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ── Card individual ── */
.va-card {
  position: relative;
  flex: 1;
  cursor: pointer;
  transition: flex 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: var(--teal-dark);
  outline: none;
}

.va-card:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: -2px;
}

.va-card + .va-card {
  border-left: 1px solid rgba(255,255,255,0.12);
}

.va-card--active {
  flex: 4;
  cursor: default;
}

/* Hover on inactive strips */
.va-card:not(.va-card--active):hover {
  background: var(--teal);
}

/* ── Estado colapsado (tira vertical) ── */
.va-card__collapsed {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-4);
  opacity: 1;
  transition: opacity 0.2s ease;
  pointer-events: none;
  user-select: none;
}

.va-card--active .va-card__collapsed {
  opacity: 0;
  pointer-events: none;
}

.va-card__num-badge {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  line-height: 1;
  display: block;
  text-align: center;
}

.va-card__title-v {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Estado expandido ── */
.va-card__expanded {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  /* `visibility: hidden` es imprescindible, no decorativo.
     Antes los paneles cerrados solo tenían opacity:0, así que seguían en el
     orden de tabulación: un usuario de teclado tabulaba hacia el enlace
     "Conversa con nosotros" de un valle que no estaba viendo. Con visibility
     salen del tab order y del árbol de accesibilidad.
     El delay en la transición de visibility deja que el fundido termine. */
  visibility: hidden;
  transition: opacity 0.3s ease 0.15s, visibility 0s linear 0.45s;
  pointer-events: none;
  overflow: hidden;
}

.va-card--active .va-card__expanded {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease 0.15s, visibility 0s linear 0s;
}

/* ── Sin JavaScript: el acordeón no se puede abrir ──────────── */
/* Sin esta regla, si el JS falla el contenido de los tres valles queda
   inaccesible: nunca se añade .va-card--active y todo permanece colapsado.
   Aquí el acordeón se degrada a tres bloques apilados y legibles. */
html:not(.js) .valles-acordeon {
  display: block;
  height: auto;
}

html:not(.js) .va-card {
  cursor: default;
}

html:not(.js) .va-card__collapsed {
  display: none;
}

html:not(.js) .va-card__expanded {
  position: static;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Cabecera teal */
.va-card__head {
  background: var(--teal);
  padding: var(--space-8) var(--space-10);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.va-card__head::after {
  content: attr(data-num);
  position: absolute;
  right: var(--space-6);
  bottom: -1.5rem;
  font-family: var(--font-display);
  font-size: 9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.07);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.va-card__eyebrow-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  display: block;
  margin-bottom: var(--space-2);
}

.va-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--white);
  font-weight: 300;
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 1;
}

.va-card__quote {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.78);
  font-style: italic;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  max-width: 52ch;
  max-width: none;
}

/* Cuerpo blanco con scroll */
.va-card__body {
  background: var(--white);
  padding: var(--space-8) var(--space-10);
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(26,127,114,0.2) transparent;
}

.va-card__body::-webkit-scrollbar {
  width: 4px;
}
.va-card__body::-webkit-scrollbar-thumb {
  background: rgba(26,127,114,0.25);
  border-radius: 2px;
}

.va-card__body p {
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.75;
}

.va-card__body p + p {
  margin-top: var(--space-4);
}

.va-card__sintomas-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-dark);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  display: block;
}

.va-card__sintomas-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.va-card__sintomas-list li {
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.55;
  padding-left: var(--space-5);
  position: relative;
}

.va-card__sintomas-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.va-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
  transition: gap var(--transition-base), color var(--transition-base);
}

.va-card__cta::after {
  content: '→';
}

.va-card__cta:hover {
  gap: var(--space-3);
  color: var(--teal-dark);
}

/* ── Acordeón móvil (apilado vertical) ────────────────────────── */
@media (max-width: 1023px) {
  .valles-acordeon {
    flex-direction: column;
    height: auto;
    border-radius: var(--radius-xl);
  }

  .va-card {
    flex: none;
    height: 60px;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }

  .va-card--active {
    flex: none;
    height: 600px;
  }

  .va-card + .va-card {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  /* Collapsed: fila horizontal con número + título */
  .va-card__collapsed {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 0 var(--space-6);
    gap: var(--space-4);
  }

  .va-card__num-badge {
    font-size: var(--text-xl);
    color: rgba(255,255,255,0.35);
  }

  .va-card__title-v {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: var(--text-sm);
    letter-spacing: 0.04em;
  }

  .va-card__head {
    padding: var(--space-6) var(--space-6);
  }

  .va-card__body {
    padding: var(--space-6) var(--space-6);
  }
}

@media (max-width: 767px) {
  .va-card--active {
    height: 580px;
  }
}

/* ── CÓMO TRABAJAMOS ────────────────────────────────────────── */
.como-trabajamos {
  background: var(--white);
  padding: var(--space-20) 0;
}

.como-trabajamos__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-16);
  align-items: start;
}

.como-trabajamos__aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

.como-trabajamos__aside-card {
  background: var(--teal-pale);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border-left: 4px solid var(--teal);
  margin-bottom: var(--space-5);
}

.como-trabajamos__aside-card:last-child {
  margin-bottom: 0;
}

.como-trabajamos__aside-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--black);
  margin-bottom: var(--space-3);
}

.como-trabajamos__aside-desc {
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.65;
}

/* Etiqueta "Valle X" como eyebrow */
.como-trabajamos__aside-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  display: block;
  margin-bottom: var(--space-2);
}

/* Nombre del valle */
.como-trabajamos__aside-valle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--black);
  display: block;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(26,127,114,0.15);
}

/* Lista de servicios del valle */
.como-trabajamos__aside-lista {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.como-trabajamos__aside-lista li {
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.55;
  padding-left: var(--space-4);
  position: relative;
}

.como-trabajamos__aside-lista li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.6;
}

.como-trabajamos__content h2 {
  margin-bottom: var(--space-6);
}

.como-trabajamos__content p {
  font-size: var(--text-base);
  color: var(--gray);
  line-height: 1.75;
}

.como-trabajamos__content p + p {
  margin-top: var(--space-6);
}

@media (max-width: 1023px) {
  .como-trabajamos__inner {
    grid-template-columns: 1fr;
  }
  .como-trabajamos__aside {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  .como-trabajamos__aside-card {
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .como-trabajamos__aside {
    grid-template-columns: 1fr;
  }
}
