:root {
  --navy: #000028;
  --navy-2: #00001e;
  --turquoise: #00e6d0;
  --turquoise-bright: #00ffe1;
  --ink: #15172f;
  --muted: #66708a;
  --soft: #f6f8fb;
  --line: #e6ebf2;
  --white: #ffffff;
  --radius-xl: 42px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 30px 80px rgba(0, 0, 40, 0.11);
  --max: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Averta", "Ciutadella Rounded", "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  /* `overflow-x: hidden` sin `overflow-y` explícito hace que Chromium
     compute overflow-y como hidden también, bloqueando el scroll vertical
     — bug real de la fuente, invisible hasta Home (H2, primera página con
     contenido más alto que el viewport). Ver docs/design-source.md. */
  overflow-y: auto;
  padding-top: 82px;
  transition: background-color 0.5s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Escapado a `div.page` (no bare `.page`): WordPress agrega la clase
   literal "page" al <body> de toda página estática vía body_class(), que
   choca con el nombre del div wrapper del tema. Como `.page` (specificity
   0,1,0) le gana a `body { overflow-y: auto }` (0,0,1), el <body> heredaba
   `overflow: hidden` y bloqueaba el scroll vertical — invisible hasta Home
   (H2, primera página más alta que el viewport). No es bug de la fuente
   (el sitio estático nunca tuvo body_class()) — es un choque de nombres
   propio del port a WordPress. Ver docs/design-source.md. */
div.page {
  position: relative;
  overflow: hidden;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.bg-shape.one {
  display: none;
}

.bg-shape.two {
  width: 1200px;
  height: 1200px;
  right: -500px;
  top: 10%;
  background-image: url("../img/gray.svg");
  opacity: 0.8;
}

.bg-shape.three {
  width: 1000px;
  height: 1000px;
  right: -300px;
  bottom: -400px;
  background-image: url("../img/gray2.svg");
  opacity: 0.8;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.88);
}

.nav-inner {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 42px;
}

.brand img {
  width: 132px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 14pt;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--navy);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 38px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #070743;
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
}

.btn-secondary::after {
  content: " →";
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--turquoise);
  color: var(--navy);
  border-color: var(--turquoise);
}

.btn-secondary:hover::after {
  opacity: 1;
}

.btn-light {
  background: var(--white);
  color: var(--navy);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-whatsapp {
  border-color: rgba(0, 230, 208, 0.7);
  color: var(--navy);
  background: rgba(0, 230, 208, 0.12);
}

.view {
  animation: fadeIn 0.28s ease both;
}

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

.section {
  padding: 84px 0;
}

.section-tight {
  padding: 60px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: var(--turquoise);
}

h1,
h2,
h3 {
  color: var(--navy);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

h1 {
  /* H13 (revisión del cliente): el tope de 84px quedaba "exagerado" frente
     al resto de la jerarquía (párrafo 21px, h2 hasta 62px) — bajado a 68px,
     sigue siendo el elemento más grande de la página sin el salto extremo. */
  font-size: clamp(40px, 5vw, 68px);
  max-width: 790px;
}

h2 {
  font-size: clamp(34px, 5vw, 62px);
  max-width: 760px;
}

h3 {
  font-size: 24px;
}

p {
  color: var(--muted);
  font-size: 17px;
}

.lead {
  font-size: 21px;
  color: #4c5570;
  max-width: 760px;
  margin-top: 22px;
}

.hero {
  padding: 78px 0 42px;
  min-height: calc(100vh - 82px);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  gap: 54px;
  align-items: center;
}

.hero-copy p {
  max-width: 590px;
  margin-top: 24px;
  font-size: 21px;
  color: #4c5570;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 32px;
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  max-width: 560px;
}

.hero-note span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--turquoise);
  font-weight: 900;
  flex: 0 0 auto;
}

.hero-media {
  position: relative;
  min-height: 600px;
}

.video-card {
  position: absolute;
  top: 28px;
  right: 0;
  width: min(650px, 100%);
  height: 390px;
  border-radius: 66px 66px 66px 10px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.video-card::before {
  content: "";
  position: absolute;
  inset: 0;
  /* H9: la URL ya no es un literal del zip — se resuelve desde PHP vía
     barter_media('banner') como custom property --banner-url (mismo patrón
     que .team-photo/.page-visual en page-about.php), porque la foto ahora
     vive en la Media Library, no en assets/img/. */
  background:
    linear-gradient(120deg, rgba(0, 0, 40, 0.28), rgba(0, 230, 208, 0.08)),
    var(--banner-url) center/cover;
  opacity: 0.95;
}

.video-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 40, 0.82), transparent);
}

.play {
  position: absolute;
  width: 76px;
  height: 76px;
  left: 42px;
  bottom: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--navy);
  box-shadow: 0 18px 60px rgba(0, 0, 40, 0.2);
}

.play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 17px solid var(--navy);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 5px;
}

.video-caption {
  position: absolute;
  right: 38px;
  bottom: 36px;
  z-index: 2;
  color: var(--white);
  max-width: 310px;
}

.video-caption strong {
  display: block;
  font-size: 21px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.video-caption small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.floating-card {
  position: absolute;
  left: 0;
  top: 440px;
  width: 330px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(18px);
  z-index: 3;
}

.floating-card strong {
  color: var(--navy);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.floating-card p {
  font-size: 15px;
  margin-top: 8px;
}

.signal {
  position: absolute;
  right: 28px;
  top: 0;
  width: 170px;
  height: 170px;
  border-radius: 42% 58% 62% 38% / 40% 44% 56% 60%;
  background: rgba(0, 230, 208, 0.12);
}

.trust {
  padding: 24px 0 64px;
}

.trust-row {
  padding: 30px 0;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 38px;
  align-items: center;
}

.carousel-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.carousel-container::before,
.carousel-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.carousel-container::before {
  display: none;
}
.carousel-container::after {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 40px;
  animation: scroll 40s linear infinite;
  width: max-content;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.carousel-item {
  width: 240px;
  height: 120px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.trust-title {
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.split {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 64px;
  align-items: start;
}

.value-panel {
  border-radius: var(--radius-xl);
  background: var(--navy);
  padding: 42px;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.value-panel::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -210px;
  top: -210px;
  background: rgba(0, 230, 208, 0.22);
  border-radius: 50%;
}

.value-panel h3,
.value-panel p {
  color: var(--white);
  position: relative;
  z-index: 1;
}

.value-panel p {
  color: rgba(255, 255, 255, 0.74);
  margin-top: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 34px;
  position: relative;
  z-index: 1;
}

.metric {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.metric strong {
  color: var(--turquoise-bright);
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 6px;
}

.metric span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin-bottom: 38px;
}

.section-head p {
  max-width: 430px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.service-card {
  width: 210px;
  height: 360px;
  border-radius: 34px;
  background: var(--navy);
  overflow: hidden;
  position: relative;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: 0.24s ease;
  isolation: isolate;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--image) center/cover;
  opacity: 0.52;
  filter: grayscale(0.25);
  z-index: -2;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 40, 0.1),
    rgba(0, 0, 40, 0.92)
  );
  z-index: -1;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 70px rgba(0, 0, 40, 0.18);
}

.service-card small {
  color: var(--turquoise-bright);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 11px;
  margin-bottom: 10px;
}

.service-card h3 {
  color: var(--white);
  font-size: 25px;
}

.service-card p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  margin-top: 12px;
}

.why {
  background: var(--soft);
  border-radius: 58px;
  padding: 58px;
  position: relative;
  overflow: hidden;
}

.why::after {
  content: "barter";
  position: absolute;
  right: -40px;
  bottom: -58px;
  font-size: 160px;
  font-weight: 900;
  letter-spacing: -0.08em;
  color: rgba(0, 0, 40, 0.035);
}

.why-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
}

.icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(0, 230, 208, 0.16);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 14px;
}

.feature h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.feature p {
  font-size: 14px;
}

.home-cases {
  background: var(--navy);
  color: var(--white);
  border-radius: 52px;
  padding: 58px 0;
  margin: 20px 0;
  overflow: hidden;
  position: relative;
}

.home-cases::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  right: -180px;
  top: -200px;
  background: rgba(0, 230, 208, 0.16);
}

.home-cases h2,
.home-cases h3 {
  color: var(--white);
}

.home-cases p {
  color: rgba(255, 255, 255, 0.72);
}

.compact-cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.case-mini {
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 50px rgba(0, 0, 40, 0.12);
}

.case-mini.light {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 16px 50px rgba(0, 0, 40, 0.05);
}

.case-mini-img {
  height: 165px;
  background: var(--image) center/cover;
}

.case-mini-body {
  padding: 22px;
}

.case-mini-body small,
.article-card small {
  display: block;
  color: var(--turquoise);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  margin-bottom: 10px;
  font-size: 11px;
}

.case-mini-body p {
  font-size: 14px;
  margin-top: 10px;
}

.page-hero .hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 40px 0;
}

.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
}

.hero-rotate {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 200px;
  animation: rotate 20s linear infinite;
  z-index: 0;
}

.hero-barterc {
  position: absolute;
  top: 50%;
  left: 45%;
  transform: translate(-50%, -50%);
  width: 60%;
  max-width: 250px;
  z-index: 1;
}

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

.page-hero {
  padding-bottom: 60px;
  margin-right: 0px;
  margin-top: 60px;
}
.page-hero-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 56px;
  align-items: center;
}

.page-visual {
  min-height: 380px;
  width: 570px;
  height: 390px;
  border-radius: 58px 58px 58px 12px;
  background: var(--image) center/cover;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.page-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 40, 0.12),
    rgba(0, 230, 208, 0.12)
  );
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  /* Bug real de la fuente encontrado en H4 (ver docs/design-source.md):
     `margin-left: 0px` pisaba solo el lado izquierdo del `margin: 0 auto`
     que centra `.container` (misma especificidad, `.content-grid` se
     declara después en la hoja de estilos) — el grid quedaba pegado al
     borde izquierdo del viewport en vez de centrado, con todo el espacio
     sobrante acumulado a la derecha. Confirmado en el sitio estático (misma
     regla, mismo bug) y por navegador en el tema. Eliminado: `.container`
     ya centra por sí solo. */
}

.content-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 30px;
}

.content-card h3 {
  margin-bottom: 12px;
}

.content-card p,
.content-card li {
  font-size: 15px;
  color: var(--muted);
}

.content-card ul {
  margin-top: 16px;
  padding-left: 18px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 38px;
}

.team-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: none;
}

.team-card:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 40, 0.15);
}

.team-photo {
  height: 350px;
  /* `center top`, no `center`: la tarjeta tiene una altura fija (350px) pero
     su ancho cambia mucho entre los cortes responsive del grid (4 → 2 → 1
     columnas), así que el aspect ratio real que `cover` tiene que encajar
     varía bastante (~0.79 en 4 columnas, hasta ~1.18 en el corte de 2
     columnas). Con `center` el recorte vertical necesario para llegar a un
     ratio tan ancho se repartía mitad arriba/mitad abajo y cortaba la frente
     o media cara en varios retratos — bug real encontrado en H3 (ver
     docs/design-source.md). Anclar arriba prioriza la cabeza y sacrifica
     hombros/torso, que es lo que se puede perder sin problema en un
     headshot. */
  background: var(--image) center top/cover;
}

.team-body {
  padding: 22px;
}

.team-card-actions {
  display: flex;
  gap: 12px;
  padding: 0 22px 22px;
}

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

.team-card-actions a:hover {
  color: var(--navy);
}

.team-body p {
  font-size: 14px;
  margin-top: 4px;
}

/* H5: en la fuente (cases.html) el filtro entero vive en `style=` inline y
   el script alterna `btn.style.background`/`.color` a mano — se porta a
   clases reales, alternadas por assets/js/cases.js con classList.toggle. */
.cases-filter {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 30px;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: rgba(0, 0, 40, 0.05);
}

.filter-btn.active {
  background: var(--navy);
  color: white;
}

.cases-list {
  display: grid;
  gap: 56px;
}

.case-row {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 42px;
  align-items: center;
  padding: 34px;
  border-radius: 42px;
  background: var(--soft);
  border: 1px solid var(--line);
  transition: transform 0.3s ease;
}

.case-row:hover {
  transform: translateY(-8px);
}

/* H5: era `.case-row:nth-child(even)` en la fuente — el filtro de
   categorías de cases.html oculta filas con `display: none`, y
   `:nth-child` sigue contando las ocultas, así que el zig-zag se
   desordenaba visualmente al filtrar (bug real, ver docs/design-source.md).
   Reescrito a una clase que assets/js/cases.js recalcula sobre las filas
   VISIBLES cada vez que cambia el filtro. */
.case-row.is-reversed {
  grid-template-columns: 1.05fr 0.95fr;
}

.case-row.is-reversed .case-row-img {
  order: 2;
}

.case-row-img {
  min-height: 290px;
  border-radius: 34px;
  background: var(--image) center/cover;
}

.method-panel {
  border-radius: 42px;
  background: var(--navy);
  padding: 42px;
  color: var(--white);
}

.method-panel h3,
.method-panel p {
  color: var(--white);
}

.method-panel p {
  color: rgba(255, 255, 255, 0.72);
}

/* H6: la definición real de `.blog-grid` vive más abajo (3 columnas, el
   grid de tarjetas de blog.html) — esta primera versión (1.1fr/0.9fr,
   align-items: start) no la usa ninguna página de la fuente, y su
   `align-items: start` se filtraba sin resetear a la definición real
   porque `.blog-grid` estaba declarada dos veces (ver docs/design-source.md). */

.article-featured,
.article-card {
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 16px 50px rgba(0, 0, 40, 0.05);
}

.article-img {
  height: 300px;
  background: var(--image) center/cover;
}

.article-body {
  padding: 30px;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-card {
  padding: 26px;
}

.blog-more {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.sustainability-strip {
  border-radius: 34px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 26px 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.biosphere-card {
  display: flex;
  gap: 38px;
  align-items: center;
  border-radius: 42px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 38px;
}

.biosphere-badge {
  min-height: 300px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 35% 30%, #ff4438, transparent 18%),
    radial-gradient(circle at 55% 25%, #ffd400, transparent 16%),
    radial-gradient(circle at 65% 45%, #00b050, transparent 17%),
    radial-gradient(circle at 45% 58%, #0084ff, transparent 18%), #ffffff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 50px rgba(0, 0, 40, 0.05);
  position: relative;
  overflow: hidden;
}

.biosphere-badge strong {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 20px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  text-align: center;
}

.prefooter {
  padding: 28px 0 76px;
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 48px;
  background: linear-gradient(135deg, var(--navy), #09094d);
  border-radius: 58px;
  padding: 68px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.contact-panel::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  right: -180px;
  top: -220px;
  background: rgba(0, 230, 208, 0.22);
}

.contact-panel h2,
.contact-panel p {
  color: var(--white);
  position: relative;
  z-index: 1;
}

.contact-panel p {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 20px;
}

form {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 34px;
  padding: 30px;
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  font: inherit;
  color: var(--navy);
  outline: none;
  background: #fbfcfd;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 4px rgba(0, 230, 208, 0.12);
}

.form-actions-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.cta-banner {
  border-radius: 42px;
  background: var(--navy);
  padding: 42px 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.cta-banner::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(0, 230, 208, 0.2);
}

.cta-banner h3,
.cta-banner p {
  color: var(--white);
  position: relative;
  z-index: 1;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
}

.cta-banner .btn {
  position: relative;
  z-index: 1;
}

.footer {
  background: var(--navy);
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col-1 p,
.footer-col-1 .address p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin-top: 5px;
}

.footer-col-1 .address {
  margin-top: 20px;
}

.footer-col-2 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.newsletter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--turquoise);
  color: var(--white);
  padding: 10px 40px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s ease;
}

.newsletter-btn:hover {
  background-color: var(--turquoise);
  color: var(--navy);
}

.footer-right-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.footer-legal-new {
  display: flex;
  gap: 15px;
}

.footer-legal-new a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.tagline {
  color: var(--turquoise);
  font-size: 32px;
  letter-spacing: -0.02em;
}

.social-icons {
  display: flex;
  gap: 20px;
  /* margin-top: 20px;  // removed */
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--white);
  text-decoration: none;
  transition: 0.2s ease;
}

.social-icons a:hover {
  color: var(--turquoise);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.footer-legal a {
  margin-left: 20px;
  color: rgba(255, 255, 255, 0.5);
}

.features {
  gap: 12px;
}

.feature {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 14px;
  align-items: start;
  padding: 16px;
  min-height: auto;
}

.feature .icon {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 11px;
  margin-bottom: 0;
}

.feature h3 {
  font-size: 18px;
  margin: 1px 0 6px;
}

.feature p {
  font-size: 13px;
  line-height: 1.45;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: stretch;
}

.quote-card {
  border-radius: 34px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.quote-card.dark {
  background: var(--navy);
}

.quote-card.dark h3,
.quote-card.dark p,
.quote-card.dark strong {
  color: var(--white);
}

.quote-card.dark p {
  color: rgba(255, 255, 255, 0.74);
}

.quote-mark {
  font-size: 64px;
  line-height: 0.8;
  color: var(--turquoise);
  font-weight: 900;
  margin-bottom: 12px;
}

.quote-author {
  margin-top: 22px;
  color: var(--navy);
  font-size: 14px;
}

.benefit-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.benefit-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.benefit-item span {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: rgba(0, 230, 208, 0.18);
  color: var(--turquoise-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.service-detail-card {
  transition: background 0.3s ease;
}

.service-detail-card:hover {
  background: url("../img/servicecards.png") center/cover;
}

.service-detail-card:hover h3,
.service-detail-card:hover p,
.service-detail-card:hover li {
  color: #fff;
}

/* Reescrito de un selector posicional (H4, ver docs/design-source.md): las
   reglas de layout de `.service-cycle` vivían enteramente en selectores
   `div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > ...`
   — nunca hubo una regla de clase base para `.service-cycle` en sí. Esa
   especificidad tan alta (varios tipos + pseudo-clases) hacía que el
   override móvil de más abajo (`@media (max-width:768px) { .service-cycle
   { grid-template-columns: 1fr } }`, sin !important) nunca ganara contra
   otro selector posicional posterior con !important (ver más abajo) —
   resultado: en mobile `.service-cycle` seguía forzado a 5 columnas con
   scroll horizontal, y el scroll arrancaba centrado (por el `justify-
   content: center` que quedaba vivo), mostrando los pasos 03/04 en vez del
   01. Reescrito íntegro por clase — `.service-cycle` es única de
   services.html, así que no hay riesgo de afectar otras páginas. */
.service-cycle {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 26px;
  width: 100%;
}

.cycle-step {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease;
}

.cycle-step:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-8px);
}

.cycle-step:hover h3 {
  color: var(--white);
}

.stats-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: stretch;
}

.testimonial-section {
  background: var(--navy);
  color: var(--white);
  padding: 80px 0;
  overflow: hidden;
  position: relative;
  /* Bug real de la fuente (presente igual en el sitio estático, reportado
     por el usuario): al tener `height: 413px` fijo (ver más abajo) pero no
     ser un contenedor flex/grid, cuando el testimonio activo mide menos que
     el alto disponible el espacio sobrante se acumulaba entero abajo (el
     testimonio quedaba pegado arriba, ~40px de aire arriba vs ~120px
     abajo, medido por navegador) en vez de repartirse parejo. `display:flex`
     + `align-items: center` centra verticalmente el contenido dentro de la
     altura fija, sin cambiar el ancho (`.container` sigue fijando su propio
     ancho como hijo flex). */
  display: flex;
  align-items: center;
}
.carousel {
  position: relative;
  width: 100%;
  /* Bug real de la fuente (presente igual en el sitio estático, ver
     docs/design-source.md): `.carousel` nunca tuvo `overflow: hidden`.
     `.carousel-inner` es un flex row de 3 `.testimonial-item` al 100% de
     ancho cada uno, desplazado con `translateX()` — sin recortar el
     viewport del carrusel, los testimonios anterior/siguiente quedaban
     visibles asomando por los bordes en vez de ocultos. Reportado por el
     usuario (fragmentos de texto del testimonio contiguo colándose por el
     borde izquierdo en mobile). Afecta tanto a Home como a Services, que
     comparten este mismo componente. */
  overflow: hidden;
}
.carousel-inner {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.testimonial-item {
  min-width: 100%;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin: 0 60px;
}
.testimonial-image img {
  width: 100%;
  border-radius: 20px;
}
.testimonial-content blockquote {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: 600;
}
.testimonial-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 30px;
}

.testimonial-quote-icon {
  width: 100%;
  max-width: 40px;
  height: auto;
  margin-bottom: 20px;
}

.testimonial-content .btn {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
}
.testimonial-content .btn:hover {
  background: var(--turquoise);
  color: var(--navy);
  border-color: var(--turquoise);
}
.stats-container {
  padding: 60px 0;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-value {
  color: #007bff; /* Similar blue */
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}
.stat-label {
  color: #66708a;
  font-size: 1rem;
}
.stat-line {
  background: #007bff;
  height: 2px;
  width: 100%;
  margin-top: 10px;
}

.cycle-step:hover p {
  color: rgba(255, 255, 255, 0.7);
}

.cycle-step:hover small {
  color: var(--turquoise);
}

.cycle-step small {
  color: var(--turquoise);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
}

.cycle-step h3 {
  font-size: 18px;
  margin-top: 8px;
}

.case-detail {
  background: var(--navy);
  border-radius: 52px;
  padding: 56px;
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.case-detail::after {
  content: "";
  position: absolute;
  right: -190px;
  top: -220px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: rgba(0, 230, 208, 0.18);
}

.case-detail h2,
.case-detail h3,
.case-detail p {
  color: var(--white);
  position: relative;
  z-index: 1;
}

.case-detail p {
  color: rgba(255, 255, 255, 0.74);
}

.case-detail-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 36px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.case-detail-image {
  min-height: 390px;
  border-radius: 36px;
  background: var(--image) center/cover;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

.rsr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.rsr-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px;
}

.rsr-card small {
  color: var(--turquoise-bright);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
}

.rsr-card h3 {
  font-size: 20px;
  margin: 10px 0 8px;
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card {
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 16px 50px rgba(0, 0, 40, 0.05);
  transition: 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 70px rgba(0, 0, 40, 0.1);
}

.blog-card.featured {
  grid-column: span 2;
}

.blog-thumb {
  height: 190px;
  background: var(--image) center/cover;
}

.blog-card.featured .blog-thumb {
  height: 260px;
}

.blog-card-body {
  padding: 26px;
}

.blog-card small {
  display: block;
  color: var(--turquoise);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  margin-bottom: 10px;
  font-size: 11px;
}

.blog-card p {
  margin-top: 10px;
  font-size: 15px;
}

#manifest-section {
  background: none;
}

.manifest-panel {
  display: flex;
  flex-direction: column;
  gap: 38px;
  border-radius: 66px 66px 66px 10px;
  background: var(--navy);
  padding: 48px;
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.manifest-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.manifest-carousel {
  overflow-x: auto;
  scrollbar-width: none;
}

.manifest-carousel::-webkit-scrollbar {
  display: none;
}

.manifest-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.manifest-item {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 30px;
  width: 100%;
  transition: background 0.3s ease;
}

.manifest-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.biosphere-logo-card {
  width: 300px;
  min-height: 300px;
  border-radius: 34px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 40, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  box-shadow: 0 16px 50px rgba(0, 0, 40, 0.05);
}

.biosphere-content {
  width: 800px;
}

.biosphere-logo-card img {
  width: min(330px, 100%);
  height: auto;
}

.cert-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.cert-pill {
  border-radius: 999px;
  background: var(--turquoise);
  border: none;
  color: var(--navy);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1050px) {
  /* H6: `.blog-grid` se saca de esta lista — a 992px hay una regla propia
     que lo pasa a 2 columnas (ver más abajo, junto al resto de reglas de
     `.blog-grid`), así que dejarlo aquí también producía un breakpoint no
     monótono: 1 columna a 1050px, 2 columnas otra vez a 992px
     (ver docs/design-source.md). */
  .hero-grid,
  .split,
  .why-grid,
  .page-hero-grid,
  .case-row,
  .case-row.is-reversed,
  .case-detail-grid,
  .manifest-panel,
  .biosphere-card,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  /* Cases (H5): el hero usa `.hero-grid` anidado dentro de `.page-hero`
     (única página que lo hace así — About/Services usan `.page-hero-grid`,
     que sí matchea el selector de una sola clase de arriba). La regla base
     `.page-hero .hero-grid` (dos clases) tiene más especificidad que
     `.hero-grid` sola de este breakpoint, así que ganaba en todos los
     viewports pese al orden en cascada — el grid nunca colapsaba a 1
     columna en mobile y el bloque de animación (.hero-image-container)
     quedaba apachurrado en su propia columna angosta, superpuesto al
     párrafo. Selector con la misma especificidad para que el `1fr` de acá
     sí gane. */
  .page-hero .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Blog Post Styles */
.post-header-section {
  background-color: #f6f7f9;
  padding-top: 100px;
  padding-bottom: 80px;
}

.post-header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 992px) {
  .post-header-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

.post-breadcrumb a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.post-breadcrumb a:hover {
  text-decoration: underline;
}

.post-date {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  display: block;
}

.post-author-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.post-author-box img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author-info {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
}

.post-author-role {
  color: var(--muted);
  font-size: 14px;
}

.post-featured-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
}

.post-content-section {
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--white);
}

.post-content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
}

@media (max-width: 992px) {
  .post-content-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* H6: `.post-sidebar` (position: sticky; top: 120px) sigue pegajoso tras
     apilarse bajo el cuerpo del artículo — un sidebar "sticky" ya no tiene
     sentido cuando ambos ocupan el mismo ancho de columna, y se solapa con
     el contenido al hacer scroll. */
  .post-sidebar {
    position: static;
  }
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 48px;
  position: sticky;
  top: 120px;
  align-self: start;
}

.post-share {
  display: flex;
  gap: 20px;
  align-items: center;
}

.post-share a {
  color: var(--muted);
  transition: 0.2s ease;
  display: inline-flex;
}

.post-share a:hover {
  color: var(--navy);
}

.post-toc h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.post-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-toc a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s ease;
}

.post-toc a:hover,
.post-toc a.active {
  color: var(--navy);
  font-weight: 600;
}

.post-cta-card {
  background-color: #f6f7f9;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.post-cta-card h4 {
  font-size: 18px;
  margin: 0;
  line-height: 1.3;
}

.post-cta-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.post-cta-card .btn {
  font-size: 11px;
  padding: 10px 20px;
  width: 100%;
  margin-top: 8px;
}

.post-body {
  font-size: 18px;
  line-height: 1.8;
  color: var(--navy);
}

.post-body p {
  margin-bottom: 24px;
  color: #444;
  font-size: 18px;
}

.post-body h2 {
  font-size: 28px;
  margin-top: 48px;
  margin-bottom: 24px;
}

.post-body h3 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 16px;
}

.post-body ul {
  padding-left: 24px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 1050px) {
  .case-row.is-reversed .case-row-img {
    order: 0;
  }

  .hero-media {
    min-height: 560px;
  }

  .services-grid,
  .compact-cases,
  .content-grid,
  .team-grid,
  .blog-more,
  .blog-cards,
  .service-cycle,
  .rsr-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .logos {
    grid-template-columns: repeat(2, 1fr);
  }

  .sustainability-strip,
  .cta-banner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-inner {
    height: auto;
    min-height: 82px;
    padding: 16px 0;
    align-items: flex-start;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 30px, var(--max));
  }

  .hero {
    padding-top: 52px;
  }

  .hero-media {
    min-height: 530px;
  }

  .video-card {
    height: 340px;
    border-radius: 42px 42px 42px 10px;
  }

  .floating-card {
    width: calc(100% - 24px);
    left: 12px;
    top: 370px;
  }

  .video-caption {
    left: 42px;
    right: 30px;
    bottom: 118px;
  }

  .play {
    bottom: 32px;
  }

  .trust-row,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .services-grid,
  .features,
  .metric-grid,
  .form-grid,
  .compact-cases,
  .content-grid,
  .team-grid,
  .blog-more,
  .blog-cards,
  .service-cycle,
  .rsr-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Bug real de la fuente encontrado en H4 (ver docs/design-source.md):
     `.transversal-card` lleva `grid-column: span 2` inline en el HTML. Con
     `.content-grid` ya colapsado a una sola columna explícita arriba, ese
     `span 2` no cabe y CSS Grid crea una columna implícita para acomodarlo
     — lo que además arrastra a las otras 4 tarjetas de servicio al
     auto-placement en 2 columnas, en vez de apilarse en 1. Confirmado por
     navegador a 390px: las tarjetas quedaban de ~178px de ancho en vez de
     ocupar el ancho completo. `!important` es necesario: un estilo inline
     siempre le gana a una regla de hoja de estilos sin él, sin importar la
     especificidad del selector. Se neutraliza el span en el mismo
     breakpoint donde el grid pasa a una columna. */
  .transversal-card {
    grid-column: span 1 !important;
  }

  .why,
  .contact-panel {
    padding: 36px 22px;
    border-radius: 34px;
  }

  .section,
  .section-tight {
    padding: 56px 0;
  }
}

/* Senior UX refinement overrides */
.features {
  gap: 14px !important;
  align-content: start !important;
}

.feature {
  display: grid !important;
  grid-template-columns: 34px 1fr !important;
  grid-auto-rows: auto !important;
  column-gap: 14px !important;
  align-items: start !important;
  align-content: start !important;
  padding: 18px !important;
  min-height: 0 !important;
  height: auto !important;
}

.feature .icon,
.icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  margin-bottom: 0 !important;
}

.feature h3 {
  font-size: 18px !important;
  margin: 2px 0 6px !important;
  line-height: 1.12 !important;
}

.feature p {
  grid-column: 2 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.faq {
  padding: 58px 0;
}

.proof-grid {
  display: grid;
  grid-template-columns: 2.33fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.proof-card {
  border-radius: 40px;
  padding: 34px;
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.proof-card.dark {
  background: var(--navy);
  color: var(--white);
}

.proof-card.light {
  background: var(--soft);
  border: 1px solid var(--line);
}

.proof-card.dark h3,
.proof-card.dark p,
.proof-card.dark strong,
.proof-card.dark .quote-author {
  color: var(--white);
}

.proof-card.dark p,
.proof-card.dark .quote-author {
  color: rgba(255, 255, 255, 0.78);
}

.proof-card.light .benefit-item {
  color: var(--muted);
}

.proof-card.light .benefit-item strong {
  color: var(--navy);
}

.proof-card .quote-mark {
  font-size: 64px;
  line-height: 0.65;
  color: var(--turquoise-bright);
  font-weight: 900;
  margin-bottom: 22px;
}

.proof-card h3 {
  font-size: clamp(26px, 3vw, 38px);
  max-width: 780px;
}

.proof-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.proof-card .benefit-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.proof-card .benefit-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--muted);
  font-size: 15px;
}

.proof-card .benefit-item span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(0, 230, 208, 0.18);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.delivery-intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: start;
  margin-bottom: 28px;
}

.delivery-intro p {
  max-width: 620px;
}

.cycle-step p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.case-cta {
  cursor: pointer;
}

.case-cta:hover h2,
.case-cta:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--turquoise);
}

.case-detail .rsr-grid {
  grid-template-columns: repeat(3, 1fr);
}

.manifest-panel h2 {
  max-width: 560px;
}

@media (max-width: 1050px) {
  .proof-grid,
  .delivery-intro,
  .case-detail-grid,
  .manifest-panel {
    grid-template-columns: 1fr !important;
  }

  .service-cycle,
  .case-detail .rsr-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 760px) {
  .proof-grid,
  .service-cycle,
  .case-detail .rsr-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Final refinements */
.why::after {
  display: none !important;
}

.work-panel {
  background: var(--soft);
  border-radius: 52px;
  padding: 54px;
  border: 1px solid var(--line);
}

.work-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 44px;
  align-items: start;
}

.work-grid h2 {
  font-size: clamp(34px, 4.2vw, 56px);
  max-width: 560px;
}

.work-grid .lead {
  font-size: 19px;
  max-width: 520px;
}

.work-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.work-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 10px 34px rgba(0, 0, 40, 0.035);
}

.work-card span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(0, 230, 208, 0.16);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}

.work-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.work-card p {
  font-size: 13px;
  line-height: 1.45;
}

.case-story-hero {
  padding: 54px;
  border-radius: 52px;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.case-story-hero::after {
  content: "";
  position: absolute;
  right: -160px;
  top: -190px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(0, 230, 208, 0.17);
}

.case-story-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 44px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.case-story-image {
  min-height: 420px;
  border-radius: 36px;
  background: var(--image) center/cover;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

.case-story-hero h2,
.case-story-hero h3,
.case-story-hero p {
  color: var(--white);
}

.case-story-hero p {
  color: rgba(255, 255, 255, 0.76);
}

.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.case-meta {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  padding: 18px;
}

.case-meta small,
.story-block small {
  color: var(--turquoise-bright);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 8px;
}

.case-meta strong {
  color: var(--white);
  font-size: 17px;
  line-height: 1.15;
  display: block;
}

.case-story-body {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 28px;
  margin-top: 28px;
}

.story-sidebar,
.story-content {
  border-radius: 34px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 16px 50px rgba(0, 0, 40, 0.045);
  padding: 30px;
}

.story-sidebar {
  align-self: start;
  position: sticky;
  top: 110px;
}

.story-sidebar h3,
.story-content h3 {
  margin-bottom: 12px;
}

.story-sidebar ul,
.story-content ul {
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.story-block {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.story-block:first-child {
  padding-top: 0;
}

.story-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.story-block p {
  margin-top: 10px;
}

@media (max-width: 1050px) {
  .work-grid,
  .case-story-grid,
  .case-story-body {
    grid-template-columns: 1fr !important;
  }

  .case-meta-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .story-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .work-panel,
  .case-story-hero {
    padding: 28px;
    border-radius: 34px;
  }

  .work-cards,
  .case-meta-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Home international section */
.home-international {
  padding: 60px 0;
}

.intl-panel {
  border-radius: 52px;
  background: linear-gradient(135deg, var(--navy) 0%, #070743 100%);
  padding: 58px;
  position: relative;
  overflow: hidden;
  color: var(--white);
  box-shadow: var(--shadow);
}

.intl-panel::before {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  right: -165px;
  top: -195px;
  background: rgba(0, 230, 208, 0.18);
}

.intl-panel::after {
  content: "Europe";
  position: absolute;
  left: 44px;
  bottom: -34px;
  font-size: 112px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.07em;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.intl-head {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 36px;
  align-items: end;
  position: relative;
  z-index: 1;
  margin-bottom: 34px;
}

.intl-panel .eyebrow,
.intl-head h2,
.intl-head p,
.intl-card h3,
.intl-card p {
  color: var(--white);
}

.intl-head p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
}

.intl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}

.intl-card {
  display: grid;
  gap: 20px;
  min-height: 270px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  padding: 26px;
  transition: 0.22s ease;
}

.intl-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(0, 230, 208, 0.45);
}

.intl-code {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 230, 208, 0.16);
  border: 1px solid rgba(0, 230, 208, 0.36);
  color: var(--turquoise-bright);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.intl-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.intl-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: var(--turquoise-bright);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.intl-link span {
  transition: 0.2s ease;
}

.intl-card:hover .intl-link span {
  transform: translateX(4px);
}

@media (max-width: 1050px) {
  .intl-head,
  .intl-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .intl-panel {
    padding: 34px 22px;
    border-radius: 34px;
  }

  .intl-panel::after {
    font-size: 68px;
  }
}

/* Blog Slider & Hero */
/* H6 fix: `.container` (regla global, ver más arriba) da `position: relative;
   z-index: 1` a CUALQUIER `.container` del sitio — así que el `.container`
   del hero (`.blog-header`) y el de cada sección siguiente (`.container
   py-16` del grid, la newsletter, etc.) quedan EMPATADOS en z-index:1. El
   empate lo rompe el orden del DOM (gana el que aparece después), así que
   la lupa/dropdown del hero (`.category-dropdown-content`/`.blog-search-form`,
   z-index:10) quedaban pintados DEBAJO de las tarjetas del grid sin importar
   cuánto se subiera ese z-index — estaban atrapados dentro del contexto de
   apilamiento aislado de su propio `.container`, que nunca podía ganarle al
   `.container` de una sección posterior. Se sube todo el `.blog-hero` (la
   sección completa, no solo su `.container`) a z-index:2, para que gane
   contra cualquier `.container` posterior del blog. */
.blog-hero {
  margin-top: 60px;
  position: relative;
  z-index: 2;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.blog-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.title-cyan-stripe {
  width: 24px;
  height: 4px;
  background-color: var(--turquoise);
  border-radius: 999px;
}

.blog-header h1 {
  font-size: 48px;
  letter-spacing: -0.03em;
  margin: 0;
}

.blog-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  transition: 0.2s ease;
}

.icon-btn:hover {
  background: #f5f5f5;
  border-color: var(--navy);
}

.category-dropdown {
  position: relative;
  display: inline-block;
}

.category-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border: 1px solid var(--line);
  z-index: 10;
  flex-direction: column;
}

.category-dropdown-content a {
  color: var(--navy);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.category-dropdown-content a:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.category-dropdown-content a:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.category-dropdown-content a:hover {
  background-color: #f6f7f9;
}

/* H6 fix: se reemplazó `:hover`/`:focus-within` puro por una clase
   `.is-open` controlada por JS (assets/js/blog.js, initCategoryDropdown()).
   El CSS-only `:hover` no tenía ningún margen: el hueco de 8px entre el
   botón y el panel (`top: calc(100% + 8px)` de arriba) es una zona muerta
   donde el cursor no está ni sobre `.category-dropdown` ni sobre
   `.category-dropdown-content` — al cruzarla, `display:none` se aplicaba
   al instante y el panel desaparecía antes de que el cursor pudiera
   llegar. `:focus-within` sí lo mantenía abierto (por eso solo con click
   "se pegaba"), pero eso es foco, no hover real. El JS da un pequeño
   margen de tiempo al salir con el mouse (para poder cruzar el hueco) y
   además soporta click para dejarlo abierto de forma persistente. */
.category-dropdown.is-open .category-dropdown-content {
  display: flex;
}

/* H6: utilidad estándar de WP Core (ausente en este tema 100% custom) —
   necesaria para el <label> del formulario de búsqueda (searchform.php). */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* H6: formulario de búsqueda del hero (searchform.php), oculto hasta que
   assets/js/blog.js alterna `.is-open` al pulsar `.search-btn`. Reusa el
   mismo tratamiento visual que `.category-dropdown-content`. */
.blog-search-form {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background-color: white;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border: 1px solid var(--line);
  z-index: 10;
  padding: 8px;
}

.blog-search-form.is-open {
  display: flex;
  gap: 8px;
}

.blog-search-form input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
}

/* H6: los 10 `onclick="location.href='blog-post.html'"` de la fuente no son
   accesibles por teclado ni rastreables por buscadores (ver
   docs/design-source.md) — se sustituyen por un <a> real sobre el título +
   un "stretched link" (::after) que estira el área de click a toda la
   tarjeta. */
.slider-card,
.grid-card {
  position: relative;
  cursor: pointer;
}

/* H6 fix: `.stretched-link` NO lleva `position: relative` — si lo tuviera,
   se convertiría en el propio contenedor de posicionamiento de su `::after`,
   estirando el área de click solo al tamaño del texto del título en vez de
   a toda la tarjeta (bug real: el área clickeable quedaba reducida al
   título, por eso el resto de la tarjeta —imagen, meta, autor— no
   respondía al click). El `::after` debe "escapar" hasta el ancestro
   posicionado real, `.slider-card`/`.grid-card` de arriba. */
.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* H6: paginación de category.php/search.php (the_posts_pagination()) —
   primera vez que el tema la necesita, con los tokens de color existentes. */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  margin: 0 4px 0 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
}

.page-numbers.current {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.page-numbers.dots {
  border: none;
}

.footer-logos {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding-top: 20px;
  padding-left: 0px;
}
.footer-logos img {
  height: 40px;
}
.footer-logos img:nth-child(3) {
  width: 110px;
  height: 50px;
}

.blog-slider-section {
  position: relative;
}

.blog-slider-wrapper {
  padding-left: max(20px, calc((100% - 1200px) / 2));
  width: 100%;
}

.blog-slider-track {
  display: flex;
  gap: 32px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-card {
  flex: 0 0 calc(80% - 32px);
  max-width: 800px;
  min-width: 300px;
  background: #f6f6f6;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.6s ease;
}

@media (max-width: 768px) {
  /* H6: `min-width: 300px` de la regla base fuerza el track a desbordar en
     horizontal por debajo de ~375px (300px / 80% = 375px) — mismo patrón de
     CSS Grid/Flexbox ya visto en `.hero-media` (H2) y `.case-row` (H5).
     `flex-basis` pasa de 80% a un ancho relativo al viewport (menos margen
     para dejar asomar la siguiente tarjeta), y `min-width: 0` deja de
     forzar un mínimo mayor al contenedor. */
  .slider-card {
    grid-template-columns: 1fr;
    flex: 0 0 calc(100% - 40px);
    min-width: 0;
  }

  /* H6 fix: los 100px de degradado a cada lado (pensados para insinuar más
     tarjetas fuera de pantalla en desktop) tapan buena parte de la tarjeta
     en mobile, donde ocupa casi todo el ancho del viewport — reportado por
     el usuario tras revisión visual. Se ocultan aquí: el swipe táctil ya
     comunica que hay más contenido, no hace falta el degradado. */
  .blog-slider-section::before,
  .blog-slider-section::after {
    display: none;
  }
}

.slider-card.active {
  opacity: 1;
}

.slider-card-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slider-card-content .meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.slider-card-content h2 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 40px 0;
}

/* H6: escapado a `div.author` (no bare `.author`) — mismo choque que
   `div.page` de arriba: WordPress agrega la clase literal "author" al
   <body> de los archivos de autor vía body_class(), que heredaría
   `display: flex; align-items: center; gap: 12px` del wrapper de la
   tarjeta de autor del slider. Ya señalado como pendiente de revisar en H6
   en docs/design-source.md. */
div.author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-info strong {
  font-size: 14px;
}

.author-info span {
  font-size: 12px;
  color: var(--muted);
}

.slider-card-image {
  background-size: cover;
  background-position: center;
  min-height: 300px;
}

.blog-slider-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
}

/* H6 fix: sin gap con las barras de progreso en mobile — la regla genérica
   `.container` (sitewide) fuerza `margin: 0 auto !important` por debajo de
   760px para centrar/anchar el contenedor, y esa shorthand zanjaba también
   `margin-top` (el markup es `class="container blog-slider-controls"`, así
   que ambas reglas compiten por la misma propiedad). Se reclama con más
   especificidad (las dos clases juntas) + !important, sin tocar la regla
   `.container` genérica que usa el resto del sitio. */
@media (max-width: 760px) {
  .container.blog-slider-controls {
    margin-top: 40px !important;
  }
}

.slider-progress-bars {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 400px;
}

.progress-bar {
  height: 2px;
  background: var(--line);
  flex: 1;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--navy);
  width: 0%;
}

.slider-arrows {
  display: flex;
  gap: 12px;
}

.arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
  color: var(--navy);
}

.arrow-btn:hover {
  background: var(--line);
}

/* H6 fix: las flechas prev/next son redundantes en mobile — el swipe con el
   dedo ya cumple esa función, y ocupan espacio junto a las barras de
   progreso (reportado por el usuario). Colocada aquí, DESPUÉS de la regla
   base `.slider-arrows { display: flex }` (misma especificidad, gana el
   orden de aparición) — puesta antes, como se intentó primero, la base
   la pisaba sin importar el viewport. */
@media (max-width: 768px) {
  .slider-arrows {
    display: none;
  }
}

/* Gradient corners for slider */
.blog-slider-section::before,
.blog-slider-section::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.blog-slider-section::before {
  left: 0;
  background: linear-gradient(to right, rgba(253, 253, 253, 1), transparent);
}

.blog-slider-section::after {
  right: 0;
  background: linear-gradient(to left, rgba(253, 253, 253, 1), transparent);
}

.py-16 {
  padding-top: 64px;
  padding-bottom: 64px;
}

/* H6 fix: `.blog-hero` usa `class="blog-hero pt-32 pb-8"` en la fuente, pero
   ninguna de las dos clases estaba definida en ningún `.html`/`.css` de la
   fuente (utilidad muerta, nunca llegó a generarse) — así que "Business
   insights" quedaba pegado al carrusel, sin respiro. Se define `.pb-8`
   siguiendo la misma escala ya establecida por `.py-16` de arriba (n × 4px:
   16 → 64px, 8 → 32px). `.pt-32` (128px) se deja sin definir: el espacio
   superior del hero ya lo resuelve `.blog-hero { margin-top: 60px }` y no
   fue parte del reporte de este bug. */
.pb-8 {
  padding-bottom: 32px;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.grid-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
}

.grid-card:hover .grid-card-img {
  opacity: 0.9;
}

.grid-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  transition: opacity 0.2s ease;
  border: 1px solid var(--line);
}

.grid-card-content .meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.grid-card-content h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 8px 0;
  color: var(--navy);
}

.grid-card-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Blog CTA Banner */
.blog-cta-banner {
  background-color: var(--navy);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  color: white;
  animation: fadeIn 0.8s ease-out forwards;
  gap: 32px;
}

@media (max-width: 768px) {
  .blog-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
}

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

.blog-cta-content {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.blog-cta-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font-size: 36px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .blog-cta-title {
    font-size: 28px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .blog-cta-content {
    align-items: center;
  }
}

.blog-cta-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.blog-cta-content p {
  color: #a0a5b5;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.btn-turquoise {
  background-color: var(--turquoise);
  color: var(--navy);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 12px 32px;
  text-decoration: none;
  border: none;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  cursor: pointer;
}

.btn-turquoise:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 230, 208, 0.3);
}

/* Recent List */
.section-title {
  font-size: 32px;
  margin-top: 0;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.recent-list {
  display: flex;
  flex-direction: column;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.recent-item:first-child {
  border-top: 1px solid var(--line);
}

.recent-item:hover {
  background-color: #f6f7f9;
}

.recent-item:hover .recent-arrow {
  opacity: 1;
}

.recent-img {
  width: 160px;
  height: 90px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.recent-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-content h3 {
  font-size: 18px;
  margin: 0;
  color: var(--navy);
  font-weight: 600;
}

.recent-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.recent-meta {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.recent-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: var(--navy);
}

@media (max-width: 768px) {
  .recent-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .recent-img {
    width: 100%;
    height: 180px;
  }
  .recent-meta {
    align-self: flex-end;
  }
}

/* End Blog Slider & Hero */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  margin: auto;
}

.close-modal {
  /* H13 (revisión del cliente): pasa de <span> a <button> para que el cierre
     del modal de video sea accesible por teclado — reset de estilos nativos
     de <button> para que se vea idéntico al <span> anterior. */
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s ease;
}

.close-modal:hover {
  color: var(--turquoise);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.case-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.company-tag {
  background: #e5e7eb;
  color: #4b5563;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.story-sidebar {
  background-color: #f3f4f6;
  padding: 30px;
  border-radius: 30px;
  position: sticky;
  top: 100px;
}

/* Navigation structural changes for Desktop and Mobile Support */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--navy);
  padding: 8px;
}

.mobile-toggle svg {
  display: block;
}

.mobile-toggle .icon-close {
  display: none;
}

/* On desktop, keep the exact original layout by making wrappers use display: contents */
@media (min-width: 992px) {
  .nav-header,
  .nav-menu {
    display: contents;
  }
}

@media (max-width: 991px) {
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    gap: 0;
  }

  .nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 82px;
  }

  .mobile-toggle {
    display: block;
    margin-right: -8px;
  }

  .nav-open .mobile-toggle .icon-menu {
    display: none;
  }

  .nav-open .mobile-toggle .icon-close {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-bottom: 30px;
    gap: 20px;
  }

  .nav-open .nav-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    width: 100%;
  }

  .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .nav-links a {
    font-size: 24px;
    padding: 16px 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
    display: block;
    color: var(--navy);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-actions {
    width: 100%;
    margin-top: 10px;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .nav-open .nav {
    background: var(--white);
    bottom: 0;
    overflow-y: auto;
  }
}

body.nav-open {
  overflow: hidden;
}

.intl-head-flex {
  display: flex;
  align-items: stretch;
}

.intl-head-image {
  flex-shrink: 0;
  max-width: 400px;
  width: 400px;
}
.intl-head-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proof-card-img {
  padding: 0 !important;
}

.proof-img {
  width: 520px;
  height: 360px;
}

.hero-media {
  height: 390px;
}

.intl-card-inner {
  background-color: #242751 !important;
  color: #fff !important;
  padding: 20px !important;
  border-radius: 20px !important;
}

.section-head-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 991px) {
  .intl-head-flex {
    flex-direction: column;
    align-items: flex-start;
  }
  .intl-head-image {
    max-width: 100%;
    margin-top: 20px;
  }
  .proof-img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
  }
  .hero-media {
    height: auto !important;
    aspect-ratio: 16/9;
  }
  .section-head-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 60px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Target 1: Hero media */
  div > main > section.hero > div.container > div.hero-media,
  .hero-media {
    width: 100% !important;
    min-height: 350px !important;
    height: auto !important;
    margin: 0 !important;
  }

  /* Target 2: Service cards */
  .service-card {
    width: 100% !important;
    height: auto !important;
    min-height: 280px !important;
  }

  /* Target 3: Testimonial items */
  .testimonial-grid {
    grid-template-columns: 1fr !important;
    margin: 0 !important;
    gap: 30px !important;
  }

  /* Bug real de la fuente (presente igual en el sitio estático, reportado
     por el usuario): `.testimonial-section { height: 413px; overflow:
     hidden }` es fijo para todos los viewports. En desktop el testimonio
     más largo cabe cómodo; en mobile el mismo texto envuelve en muchas más
     líneas (columna angosta) y necesita bastante más alto — confirmado por
     navegador: hasta ~762px de contenido contra 413px disponibles, con el
     resto invisible por el `overflow: hidden`. Se libera el alto a `auto`
     solo en este breakpoint. */
  .testimonial-section {
    height: auto !important;
    padding: 60px 0 !important;
  }

  /* La cita (`blockquote`, 26px inline en la fuente) es lo que más aporta
     a esos ~762px de alto necesarios en mobile. Bajarla a 20px reduce el
     alto real del bloque a ~500-550px sin achicarla hasta el tamaño de un
     párrafo normal del sitio (que perdería el énfasis de "cita") —
     decisión del usuario tras comparar altura resultante a distintos
     tamaños. `!important` necesario: el inline style de la fuente
     (`style="font-size: 26px"`) le gana a una regla de clase sin él. */
  .testimonial-content blockquote {
    font-size: 20px !important;
  }

  /* Target 4: Blog CTA banner */
  .blog-cta-banner {
    width: 100% !important;
    height: auto !important;
    padding: 30px !important;
    flex-direction: column !important;
    text-align: center !important;
  }
}

@media (max-width: 991px) {
  body.nav-open .nav-links {
    display: flex !important;
    flex-direction: column;
    width: 100%;
  }
}

/* Additional Mobile Adjustments */
@media (max-width: 760px) {
  /* Hero headers */
  .page-hero-grid h1,
  h1 {
    font-size: 40px !important;
    line-height: 1.1;
  }
  .page-hero-grid,
  .page-hero .hero-grid {
    gap: 30px !important;
    padding-bottom: 20px !important;
    margin-top: 20px !important;
  }
  /* Cases (H5): `.hero-image-container` en sí ya ocupa el 100% del ancho de
     fila en mobile (1 columna) y no necesita centrado de caja. El
     descentrado real está adentro: `.hero-rotate` está anclado con
     `right: 0` (pegado al borde derecho del contenedor) y `.hero-barterc`
     centrado en `left: 45%` — la combinación de ambos anclajes asimétricos
     desplaza el centro visual de la composición ~7.5% del ancho del
     contenedor hacia la derecha (calculado a partir de los anchos/anclajes
     reales de cada imagen), visible recién en mobile porque en desktop el
     contenedor comparte fila con el texto y ese corrimiento queda oculto
     dentro del padding lateral. Se compensa desplazando el contenedor
     completo (con sus hijos absolutos) el mismo % hacia la izquierda. */
  .page-hero .hero-image-container {
    transform: translateX(-7.5%);
  }
  .page-hero {
    margin-top: 20px !important;
    padding-bottom: 20px !important;
  }
  .container {
    width: calc(100% - 60px) !important;
    margin: 0 auto !important;
  }
  /* Cases (H8.2): el `margin: 0 auto !important` genérico de arriba pisa el
     margin-bottom inline de archive-case.php (bug real, presente también en
     la fuente estática) y deja los filtros pegados a la primera card. Una
     clase propia con mayor especificidad restaura el espacio solo acá, sin
     tocar `.container` en el resto del sitio. */
  .container.cases-filter-wrap {
    margin-bottom: 40px !important;
  }
  /* Case rows (H5) */
  .case-row {
    padding: 24px !important;
    border-radius: 28px !important;
    gap: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    /* .case-row es item de .cases-list (CSS Grid, 1 columna implícita); su
       min-width:auto por defecto respeta el min-content de sus hijos — acá
       el string sin espacios de .company-tag (p. ej. "www.smartcityexpo.com")
       no puede envolver línea, así que empujaba el track del grid más ancho
       que el contenedor real, igual que .hero-media en H2 (ver
       docs/design-source.md). Mismo fix estándar de CSS Grid. */
    min-width: 0 !important;
  }
  .case-row-img {
    min-height: 200px !important;
    width: 100% !important;
    order: -1 !important; /* Image on top */
  }
  .case-row .case-actions {
    flex-wrap: wrap;
  }

  /* Services Hero - Text out of screen fix */
  .lead {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  /* About and Sustainability */
  .mobile-flex-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }

  /* Bug real de la fuente encontrado en H3 (ver docs/design-source.md):
     `.biosphere-card` es flex, no grid, así que nunca tuvo un override móvil
     real — la única regla existente (`grid-template-columns: 1fr` más abajo
     en la fuente) es un no-op sobre un contenedor flex. `.mobile-flex-stack`,
     definida arriba, es exactamente el fix que falta aplicar, pero ningún
     HTML de la fuente la usa. Se aplica aquí directamente sobre
     `.biosphere-card`. Mismo defecto en `.manifest-header` (grid 1fr 1fr,
     sin override) y `.manifest-list` (el "carrusel" de 3 columnas encoge en
     vez de desbordar — nunca llega a hacer scroll). Confirmado por
     navegador a 390px: la imagen de Biosphere quedaba comprimida a ~72px de
     ancho y la del manifiesto a ~113px.
     `.biosphere-content` tiene `width: 800px` fijo (sin unidad relativa): al
     pasar `.biosphere-card` a columna, ese ancho fijo ya no se achica en el
     eje cruzado (`align-items: center`, sin stretch) y el texto desborda por
     los dos lados, centrado sobre una caja de 800px dentro de un viewport de
     390px. Necesita su propio `width: 100%` en mobile. */
  .biosphere-card {
    flex-direction: column !important;
  }

  .biosphere-content {
    width: 100% !important;
  }

  .manifest-header {
    grid-template-columns: 1fr !important;
  }

  .manifest-list {
    grid-template-columns: 1fr !important;
  }

  .work-panel,
  .manifest-panel,
  .biosphere-card,
  .contact-panel {
    padding: 28px !important;
    border-radius: 28px !important;
    gap: 24px !important;
  }

  .work-grid {
    gap: 24px !important;
  }

  .manifest-header h1,
  .manifest-header h2 {
    /* H13: el título de #manifest-section pasó de h2 a h1 al fusionarse con
       el hero de About (page-about.php) — se agrega el selector de h1 para
       no perder este ajuste mobile. */
    font-size: 28px !important;
  }

  .biosphere-logo-card img {
    height: 160px !important;
    object-fit: contain !important;
  }

  .blog-cta-banner {
    padding: 24px !important;
    flex-direction: column !important;
    text-align: center !important;
  }

  .blog-cta-content {
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

@media (max-width: 760px) {
  h1,
  h2,
  h3,
  p {
    word-break: break-word !important;
    max-width: 100% !important;
  }
  .page-visual {
    width: 100% !important;
    min-height: 250px !important;
    height: 250px !important;
    border-radius: 28px !important;
  }
  /* Blog (H8.2): sin esto, la lupa + "Explore categories" + el nuevo botón
     "Clear filters" (3 elementos, `.blog-header-actions` sin flex-wrap
     propio) se salen de una pantalla angosta en vez de bajar de línea. */
  .blog-header-actions {
    flex-wrap: wrap;
  }
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.faq-item {
  border-bottom: 1px solid #ddd;
}
.faq-question {
  width: 100%;
  padding: 15px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}
.faq-question:hover {
  background-color: #f3f4f6;
}
.faq-question span {
  font-size: 20px;
  font-weight: normal;
  display: inline-block;
  min-width: 20px;
  text-align: center;
}
.width-600 {
  width: 600px;
}
.blog-cta-title span {
  line-height: 43px;
}
.blog-cta-title img {
  width: 90px;
  height: 80px;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 15px;
}
.faq-item.active .faq-answer {
  /* 500px (valor original de la fuente) recortaba las respuestas más largas
     en mobile (H4): a 390px la columna del FAQ se angosta bastante tras el
     colapso de `.proof-grid` a una columna, así que el mismo texto ocupa
     mucha más altura — confirmado por navegador, las 5 respuestas superaban
     el techo hasta por ~340px. Subido a un valor holgado en vez de resolver
     con JS (`scrollHeight`): ninguna respuesta actual se acerca a 2000px ni
     en el viewport más angosto. Ver docs/design-source.md. */
  max-height: 2000px;
  padding-bottom: 15px;
}

/* Timeline component */
.timeline-section {
  position: relative;
  overflow: hidden;
}

.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: flex-start;
}

.timeline-intro {
  position: sticky;
  top: 100px;
}

.timeline-title {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.1;
  margin-bottom: 24px;
}

.timeline-title .text-navy {
  color: var(--navy);
}

.timeline-title .text-turquoise {
  color: var(--turquoise);
}

.timeline-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 400px;
}

.timeline-wrapper {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: flex;
  gap: 24px;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.timeline-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.timeline-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  z-index: 2;
}

.timeline-line {
  flex-grow: 1;
  width: 2px;
  background-color: var(--turquoise);
  margin-top: 8px;
  margin-bottom: 8px;
  min-height: 40px;
}

.timeline-content {
  padding-bottom: 48px;
  padding-top: 4px;
}

.timeline-content h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 12px;
  font-weight: 700;
}

.timeline-content p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .timeline-intro {
    position: relative;
    top: 0;
  }
}

/* Newsletter CTA component */
.newsletter-cta {
  background-color: rgba(0, 230, 208, 0.4);
  border-radius: 16px;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.newsletter-cta-text h2 {
  font-size: clamp(32px, 5vw, 42px);
  color: var(--navy);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.newsletter-cta-text p {
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 0;
  line-height: 1.6;
}

.newsletter-cta form {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}

.newsletter-cta form input {
  flex: 1;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,40,0.2);
  font-size: 16px;
  outline: none;
  background-color: var(--white);
  color: var(--navy);
  font-family: inherit;
}

.newsletter-cta form input:focus {
  border-color: var(--navy);
}

.newsletter-cta form .btn {
  border-radius: 8px;
  padding: 16px 32px;
  font-size: 16px;
  white-space: nowrap;
}

.newsletter-disclaimer {
  font-size: 13px !important;
  color: var(--navy) !important;
  opacity: 0.7;
  margin-bottom: 0 !important;
  line-height: 1.5 !important;
}

.newsletter-disclaimer a {
  text-decoration: underline;
  color: inherit;
}

@media (max-width: 768px) {
  .newsletter-cta {
    grid-template-columns: 1fr;
    padding: 40px 24px;
    text-align: center;
  }
  
  .newsletter-cta form {
    flex-direction: column;
  }
}

/* User targeted AI Focus Mode Selectors */
@media (max-width: 768px) {
  /* Selector 1: div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(1) */
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(1) .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(1) .hero-copy {
    text-align: center;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(1) .hero-copy p {
    max-width: 100% !important;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(1) .hero-actions {
    justify-content: center;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(1) .hero-media {
    width: 100% !important;
    /* .hero-media es item de .hero-grid (CSS Grid); su valor inicial
       min-width:auto respeta el ancho mínimo de sus hijos position:absolute
       de ancho porcentual (.video-card { width: min(650px, 100%) }), forzando
       el track del grid mucho más ancho que el contenedor real (622px vs
       330px a 390px de viewport) y cortando el texto del hero. Bug real de
       la fuente (mismo bloque "AI Focus Mode", nunca lo notaron porque
       probaron a otro ancho) — fix estándar de CSS Grid: min-width:0
       fuerza a respetar el ancho del track en vez del min-content de los
       hijos. Ver docs/design-source.md.*/
    min-width: 0 !important;
    min-height: 350px !important;
    height: auto !important;
  }

  /* Selector 2: div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(6) */
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(6) .testimonial-grid {
    grid-template-columns: 1fr !important;
    margin: 0 !important;
    gap: 30px !important;
  }

  /* Selector 3: div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) */
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) .proof-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) .blog-cta-banner {
    width: 100% !important;
    height: auto !important;
    padding: 30px !important;
    box-sizing: border-box !important;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) .blog-cta-title {
    flex-wrap: wrap !important;
    justify-content: center !important;
    text-align: center !important;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) .blog-cta-title span {
    width: 100% !important;
    font-size: 26px !important;
    line-height: 1.3 !important;
  }
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) .blog-cta-icon {
    display: none !important;
  }

  /* Selector 4: originalmente `div:nth-of-type(1) > main:nth-of-type(1) > footer:nth-of-type(1)`.
     La fuente nunca cierra <main>, así que el navegador anida <footer> dentro de <main> "por
     accidente" y estos selectores posicionales fueron generados contra esa jerarquía rota.
     header.php/footer.php del tema cierran </main> antes de <footer> (HTML bien formado,
     footer como hermano de main) — se reescribe a selectores por clase, agnósticos de
     anidamiento, para que el responsive del footer funcione en el DOM correcto. */
  .footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    margin-bottom: 30px !important;
    padding-bottom: 20px !important;
  }
  .footer .footer-col-2 {
    gap: 20px !important;
  }
  .footer .footer-newsletter-wrapper {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
  }
  .footer .social-icons {
    justify-content: flex-start !important;
  }
  .footer .footer-bottom {
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center !important;
  }
}

/* User targeted AI Focus Mode Selectors - Services Section (H4: eliminado el
   `repeat(3, 1fr)` posicional — quedaba muerto, el `repeat(5, 1fr)
   !important` de más abajo siempre ganaba igual; `width: 100%` ya se movió
   a la regla base de `.service-cycle` arriba). El override móvil se queda,
   pero sin `justify-content: center`: con `.service-cycle` desbordando
   horizontalmente (5 columnas anchas en un contenedor angosto), centrar el
   contenido del grid hacía que el navegador arrancara el scroll a la mitad
   del contenido en vez de al principio — el paso "01 Brief" quedaba fuera
   de vista. Confirmado por navegador. */
@media (max-width: 768px) {
  .service-cycle {
    grid-template-columns: 1fr;
  }
}

/* User targeted AI Focus Mode Selectors - International Section */
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(5) > div:nth-of-type(1) > .intl-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1050px) {
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(5) > div:nth-of-type(1) > .intl-grid {
    grid-template-columns: 1fr;
  }
}
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(6) > div#testimonialCarousel:nth-of-type(1) > div:nth-of-type(1) > div > div.testimonial-grid {
  grid-template-columns: 1fr;
  text-align: center;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(6) > div#testimonialCarousel:nth-of-type(1) > div:nth-of-type(1) > div > div.testimonial-grid .testimonial-quote-icon {
  margin: 0 auto 20px;
}

.testimonial-centered {
  grid-template-columns: 1fr;
  text-align: center;
}

.testimonial-centered .testimonial-quote-icon {
  margin: 0 auto 20px;
}

/* User targeted AI Focus Mode Selectors - Section 6 & 7 Paddings */
/* Reescrito de un selector posicional (H3, ver docs/design-source.md): el
   original era `div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(6)`,
   sin media query. En Home la sección 6 es `.testimonial-section` y 413px es
   deliberado, pero en About la sección 6 es `.timeline-section`
   (`overflow: hidden`, con más de 1000px de contenido) — la altura fija
   recortaba la línea de tiempo e invisibilizaba 3 de los 5 hitos. Reescrito
   por clase, mismo criterio que el "Selector 4" del footer en H1. No cambia
   nada en Home: `.testimonial-section` solo se declara una vez más (arriba,
   sin !important), así que esta regla sigue ganando por orden de fuente. */
.testimonial-section {
  height: 413px;
  padding-top: 40px;
  padding-bottom: 40px;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) > div:nth-of-type(1) {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* User targeted AI Focus Mode Selectors - Final Adjustments */
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(1) {
  padding-bottom: 10px !important;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) > div:nth-of-type(1) > article:nth-of-type(1) {
  padding-top: 2px !important;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(7) > div:nth-of-type(1) > article:nth-of-type(1) > div:nth-of-type(1) {
  height: 387px !important;
}

/* User targeted AI Focus Mode Selectors - Section 4 & 5 Paddings */
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) {
  padding-bottom: 0px !important;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(5) {
  padding-bottom: 40px !important;
}

/* H6: en la fuente, blog.html cierra `</main>` antes de tiempo (ver
   docs/design-source.md) y deja el newsletter/"Recently published" fuera de
   <main> — las dos reglas de arriba nunca los alcanzaban ahí. home.php
   corrige ese <main> sin cerrar (igual que ya se hizo con el resto de
   páginas del tema), así que la newsletter pasa a ser la sección 4 y
   "Recently published" la sección 5, y ambas empiezan a matchear. Se
   restituyen los valores correctos acotados a `.barter-blog` (mismo
   selector con más especificidad para ganarle al `!important` de arriba,
   sin tocar las reglas originales de las que dependen About/Services). */
body.barter-blog div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) {
  padding-bottom: 64px !important;
}

body.barter-blog div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(5) {
  padding-bottom: 120px !important;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(2) > div:nth-of-type(1) {
  padding-top: 4px;
}

/* User targeted AI Focus Mode Selectors - Footer & Intl Background */
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(5) .intl-panel::after {
  display: none !important;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 50% 50% !important;
  }
}

.footer-col-2 {
  align-items: flex-end;
  text-align: right;
}

.footer-logos {
  justify-content: flex-end;
}

.footer-col-2 h3.tagline {
  font-size: 24px; /* Making the text smaller per request */
}

/* User targeted AI Focus Mode Selectors - Section 2 Padding */
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(2) {
  padding-top: 10px !important;
}

/* User targeted AI Focus Mode Selectors - Service Cycle */
.service-cycle .cycle-step {
  position: relative;
  background: white; /* Make them white as per image */
}

.service-cycle .cycle-step[style*="background: #f3f4f6;"] {
  background: #f3f4f6 !important;
}

.service-cycle .cycle-step small {
  font-size: 14px;
  font-weight: 700;
  color: var(--turquoise);
  letter-spacing: normal;
  display: block;
  margin-bottom: 4px;
}

.service-cycle .cycle-step:not(:last-child)::after {
  content: '›';
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  font-size: 24px;
  color: #ccc;
  z-index: 10;
}

@media (max-width: 1050px) {
  .service-cycle .cycle-step:not(:last-child)::after {
    display: none;
  }
}

/* User targeted AI Focus Mode Selectors - Service Cycle Override */
/* Reescrito por clase (H4, ver docs/design-source.md): esta era la regla
   con más impacto de todo el bloque — su `!important` sobre
   `grid-template-columns` ganaba en TODOS los viewports por especificidad,
   incluida la del override móvil de más arriba (que no llevaba
   !important), así que `.service-cycle` nunca colapsaba a 1 columna en
   mobile: quedaba forzado a 5 columnas de 200px mínimo con scroll
   horizontal — y con `justify-content: center` (ya eliminado) el scroll
   arrancaba centrado, ocultando el paso 01. `.service-cycle` es única de
   services.html, así que reescribir por clase (sin !important; los
   selectores de dos clases `.service-cycle > .cycle-step` ya superan en
   especificidad a `.cycle-step` a secas) no afecta ninguna otra página. */
.service-cycle {
  overflow-x: auto;
  padding-bottom: 20px;
}

.service-cycle > .cycle-step {
  background: white;
  transform: none;
  min-width: 200px;
}

.service-cycle > .cycle-step:hover {
  background: #f3f4f6;
  color: var(--navy);
}

.service-cycle > .cycle-step:hover h3 {
  color: var(--navy);
}

.service-cycle > .cycle-step:hover p {
  color: var(--navy);
}

.service-cycle > .cycle-step:hover small {
  color: var(--turquoise);
}

/* Custom overrides for service detail cards from user request */
.service-detail-card {
  transition: all 0.3s ease;
}

.service-detail-card:hover {
  background: var(--navy) !important;
}

.service-detail-card:hover h3,
.service-detail-card:hover p,
.service-detail-card:hover li {
  color: #fff !important;
}

.transversal-card {
  border: 2px solid var(--turquoise) !important;
  display: flex !important;
  flex-direction: row;
  padding: 0 !important;
}


.transversal-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  padding: 30px 15px;
  color: var(--turquoise);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.transversal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 30px;
  flex: 1;
}

.transversal-col h4 {
  margin-bottom: 8px;
  font-size: 18px;
}

.transversal-col p {
  margin-bottom: 12px;
}

.transversal-col ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
}

.transversal-col ul li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 4px;
}
.transversal-col ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--turquoise);
}

/* Adjust standard card lists to use the em dash as well */
.content-card ul {
  list-style: none;
  padding-left: 0;
}
.content-card ul li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 8px;
}
.content-card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--turquoise);
}

@media (max-width: 768px) {
  .transversal-card {
    flex-direction: column !important;
  }
  .transversal-label {
    writing-mode: horizontal-tb;
    transform: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 15px;
  }
  .transversal-content {
    grid-template-columns: 1fr;
  }
}

/* User targeted AI Focus Mode Selectors - Index Services */
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  overflow-x: visible !important;
  padding-bottom: 0 !important;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid > article {
  width: 100% !important;
}

@media (max-width: 768px) {
  div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid {
    grid-template-columns: 1fr !important;
  }
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid > a {
  width: 100% !important;
  display: block;
}

/* User targeted AI Focus Mode Selectors - Section Padding Override */
div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(2) {
  padding-top: 40px !important;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid > div:nth-of-type(1) {
  background-color: var(--soft) !important;
  color: var(--navy) !important;
  border-radius: 34px !important;
  overflow: hidden;
  position: relative;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  text-align: left !important;
  isolation: isolate;
  height: 360px !important;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid > div:nth-of-type(1)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1200&q=80') center/cover;
  opacity: 0.3;
  filter: grayscale(0.25);
  z-index: -2;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid > div:nth-of-type(1)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(243, 244, 246, 0.1), rgba(243, 244, 246, 1));
  z-index: -1;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid > div:nth-of-type(1) span {
  position: relative;
  z-index: 1;
}

div:nth-of-type(1) > main:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(2).services-home-grid > div:nth-of-type(1) strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--navy);
}

/* User targeted AI Focus Mode Selectors */
/* Eliminado en H4 (ver docs/design-source.md): este selector posicional
   forzaba `height: 200px !important` al primer hijo de la sección 4. En
   Home (services-home-grid, artículos <a>) y en About (team-grid, artículos
   <article>) resultaba inerte por el tipo de nodo — pero en Services la
   sección 4 es `.service-cycle` (H4), cuyo primer hijo es
   `div.cycle-step "01 Brief"`, un <div> real: la regla SÍ pegaba ahí,
   fijando el primer paso a 200px mientras 02-05 medían su contenido. No
   hace falta reescribirla por clase: `.service-cycle` ya es
   `display: grid` con `align-items` por defecto (`stretch`), así que los 5
   pasos igualan su alto al del más alto de la fila sin ayuda de ningún
   selector — eliminar la regla basta. Verificado por navegador que los 5
   `.cycle-step` miden igual tras el cambio. */

/* ==========================================================================
   H7 — Formularios: variante completa de newsletter (signal.html) + modal
   de consentimiento de la variante compacta + antispam/feedback compartido.
   ========================================================================== */

/* Port literal de signal.html (líneas 91-160 de la fuente) — clases de la
   variante COMPLETA del formulario de newsletter, usada hoy por el popup
   de consentimiento (template-parts/newsletter-consent-modal.php) y en H8
   por signal.html real. Deliberadamente NO se porta `.newsletter-form`
   propia de la fuente (`max-width: 500px; margin: 0 auto`): esa clase ya
   tiene reglas en este archivo para la variante COMPACTA
   (`.newsletter-cta form`), y chocarían. H8 deberá acotar el layout de la
   variante completa bajo un selector propio (p. ej.
   `.newsletter-section .newsletter-form`), no redefiniendo `.newsletter-form`
   sola. */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #00e6d0;
  box-shadow: 0 0 0 3px rgba(0, 230, 208, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 12px;
}

.checkbox-group input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: #00e6d0;
}

.checkbox-text {
  font-size: 13px;
  color: var(--navy);
  line-height: 1.5;
}

.btn-submit {
  width: 100%;
  background-color: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  padding: 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  background-color: #070743;
}

/* Modal de consentimiento — mismo patrón estructural que `.archive-modal`
   (H5, case-styles.css: clase `.open` en vez de inline style, botón real
   de cierre, Escape), con dos mejoras sobre ese precedente: `visibility`
   además de `opacity` (el `.archive-modal` original queda enfocable/
   legible por lectores de pantalla estando "cerrado" — no se repite ese
   bug acá, sumado a `inert` en el propio markup) y
   `body.consent-modal-open` bloqueando el scroll de fondo, igual que
   `body.nav-open` (línea ~3864). Vive en este archivo global (no en
   case-styles.css/contact-styles.css) porque no es de una sola página:
   la usa el compacto de home.php hoy y podría reusarla cualquier otra
   variante futura del formulario. */
.consent-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 30, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(8px);
}

.consent-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.consent-modal-content {
  background: var(--white);
  border-radius: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 50, 0.25);
}

.consent-modal-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
}

.consent-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--soft);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.consent-modal-close:hover {
  background: var(--turquoise);
}

.consent-modal-error {
  color: #b3261e;
  font-size: 13px;
  margin-bottom: 16px;
}

body.consent-modal-open {
  overflow: hidden;
}

/* Honeypot antispam (inc/forms.php) — posicionado fuera de pantalla, NO
   `display: none`: un bot que respeta `display:none` saltea el campo y la
   trampa nunca se activa; posicionado afuera, un bot que rellena todo el
   DOM cae igual. */
.barter-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Feedback in-page de los dos formularios (contacto + newsletter),
   renderizado server-side por barter_form_render_feedback() —
   `:empty { display: none }` lo mantiene invisible hasta que haya un
   mensaje real que mostrar. */
.form-feedback {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  margin-top: 16px;
}

.form-feedback:empty {
  display: none;
  margin-top: 0;
}

.form-feedback.is-success {
  background: rgba(0, 230, 208, 0.12);
  color: var(--navy);
}

.form-feedback.is-error {
  background: rgba(179, 38, 30, 0.08);
  color: #b3261e;
}
