/* =========================================================
   Sanus Pharma — components.css
   Navbar, botones, tarjetas glass, secciones, formulario, toast
   ========================================================= */

/* ---- Utilidades de marca ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--primary-blue);
  font-weight: 500;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---- Barra de progreso ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient-brand);
  z-index: var(--z-progress);
  box-shadow: 0 0 12px rgba(20, 151, 212, .55);
  transition: width .08s linear;
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.7rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  letter-spacing: .01em;
  cursor: pointer;
  position: relative;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t), color var(--t);
  will-change: transform;
}

.btn--primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn--ghost {
  background: var(--glass-bg-strong);
  color: var(--deep-blue);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

.btn--block {
  width: 100%;
}

.btn--glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-brand);
  filter: blur(16px);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--t) var(--ease);
}

.btn--glow:hover::after {
  opacity: .55;
}

/* ---- Líneas de negocio en el hero ---- */
.hero__lines {
  margin-top: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  margin-inline: auto;
  width: 100%;
  max-width: 660px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.9rem, .6rem + 1.2vw, 1.5rem);
}

.line-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  text-align: left;
  border-radius: var(--radius);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}

.line-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-glow);
}

.line-card__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.line-card__icon svg {
  width: 24px;
  height: 24px;
}

.line-card__body {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.line-card__body strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--deep-blue);
}

.line-card__body span {
  font-size: .82rem;
  color: var(--text-soft);
}

.line-card__arrow {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--primary-blue);
  transition: transform var(--t) var(--ease);
}

.line-card__arrow svg {
  width: 20px;
  height: 20px;
}

.line-card:hover .line-card__arrow {
  transform: translateX(4px);
}

@media (max-width: 560px) {
  .hero__lines {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

/* ---- Control de calidad — tarjetas de certificación ---- */
.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem) clamp(1.2rem, 1rem + 1vw, 1.8rem);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-glow);
}

.cert-card__seal {
  position: relative;
  width: 70px;
  height: 70px;
  margin-bottom: 1.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.cert-card__seal::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .55);
}

.cert-card__seal svg {
  position: relative;
  width: 30px;
  height: 30px;
}

.cert-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--deep-blue);
  margin-bottom: .5rem;
}

.cert-card p {
  font-size: .88rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.cert-note {
  margin-top: clamp(1.8rem, 1.2rem + 2vw, 3rem);
  text-align: center;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Tarjetas de certificación: solo logo, centrado vertical y horizontalmente */
.cert-card {
  justify-content: center;
}

/* Logo real de certificación (reemplaza el sello con icono) */
.cert-card__logo {
  display: grid;
  place-items: center;
  width: 100%;
}

.cert-card__logo img {
  max-height: 120px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}

/* Bloque agrupado de aprobaciones regulatorias (FDA · CE · MFDS) */
.cert-approvals {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  width: 100%;
}

.cert-approvals li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
}

.cert-approvals li + li {
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-color);
}

.cert-approvals img {
  max-height: 40px;
  max-width: 175px;
  width: auto;
  object-fit: contain;
}

/* Campo trampa anti-spam (honeypot): oculto para usuarios, visible para bots */
.form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Sección Valores con imagen lateral ---- */
.values-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.25fr;
  gap: clamp(2rem, 1.4rem + 3vw, 4.5rem);
  align-items: start;
}

.values-photo {
  margin: 0 0 1.6rem;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.values-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.values-intro__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  letter-spacing: -.01em;
  margin-top: .5rem;
  text-wrap: balance;
}

.values-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.6rem, 1rem + 2.5vw, 2.8rem) clamp(1.4rem, 1rem + 2vw, 2.4rem);
}

.value-item__icon {
  display: block;
  width: 42px;
  height: 42px;
  color: var(--primary-blue);
  margin-bottom: .9rem;
}

.value-item__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-item h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--deep-blue);
  margin-bottom: .5rem;
}

.value-item p {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-soft);
}

@media (max-width: 900px) {
  .values-layout {
    grid-template-columns: 1fr;
  }

  .values-photo {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 560px) {
  .values-items {
    grid-template-columns: 1fr;
  }
}

/* ---- Tarjetas de producto (imagen + nombre + descripción) ---- */
.prod-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}

.prod-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-glow);
}

.prod-card__media {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(92, 184, 232, .2), transparent 70%),
    var(--gradient-soft);
  border-bottom: 1px solid var(--border-color);
  color: var(--primary-blue);
}

.prod-card__media svg {
  width: 58px;
  height: 58px;
}

/* Cuando se reemplace el placeholder por una foto real */
.prod-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prod-card__body {
  padding: clamp(1.2rem, 1rem + 1vw, 1.7rem);
}

.prod-card__body h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--deep-blue);
  margin-bottom: .5rem;
}

.prod-card__body p {
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.55;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
  border-bottom: 1px solid transparent;
}

.navbar.is-scrolled {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.navbar__logo {
  height: 42px;
  width: auto;
}

/* Texto de marca junto al escudo (barra y pie) */
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text__name {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: .2em;
  color: var(--primary-blue);
}

.brand-text__sub {
  font-weight: 600;
  font-size: .56rem;
  letter-spacing: .42em;
  color: var(--pharma-gray);
  margin-top: 3px;
}

.brand-text--light .brand-text__name {
  color: var(--white);
}

.brand-text--light .brand-text__sub {
  color: rgba(255, 255, 255, .7);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2vw, 1.9rem);
}

.navbar__links > li {
  position: relative;
}

.navbar__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: inherit;
  font-weight: 500;
  font-size: .96rem;
  color: var(--text-soft);
  padding-block: .4rem;
  transition: color var(--t-fast);
  cursor: pointer;
}

.navbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}

.navbar__link:hover {
  color: var(--deep-blue);
}

.navbar__link:hover::after {
  transform: scaleX(1);
}

/* Caret del desplegable */
.navbar__caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform var(--t) var(--ease);
  opacity: .7;
}

.navbar__item--has-menu:hover .navbar__caret,
.navbar__item--has-menu:focus-within .navbar__caret {
  transform: translateY(1px) rotate(-135deg);
}

/* Submenú Líneas de Negocio */
.navbar__submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 230px;
  margin-top: .35rem;
  padding: .5rem;
  display: grid;
  gap: .15rem;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
  z-index: 5;
}

/* Puente invisible para que el hover no se corte */
.navbar__submenu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.navbar__item--has-menu:hover .navbar__submenu,
.navbar__item--has-menu:focus-within .navbar__submenu,
.navbar__submenu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.navbar__submenu a {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .65rem .8rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: background var(--t-fast), color var(--t-fast);
}

.navbar__submenu a:hover {
  background: var(--gradient-soft);
  color: var(--deep-blue);
}

.navbar__submenu strong {
  font-weight: 600;
  font-size: .96rem;
  color: var(--deep-blue);
}

.navbar__submenu span {
  font-size: .8rem;
  color: var(--text-muted);
}

/* Acciones derechas: idioma + CTA */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Selector de idioma */
.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  overflow: hidden;
}

.lang__btn {
  padding: .42rem .7rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}

.lang__btn.is-active {
  background: var(--gradient-brand);
  color: var(--white);
}

.lang__btn:not(.is-active):hover {
  color: var(--deep-blue);
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  height: 30px;
  justify-content: center;
  align-items: center;
}

.navbar__toggle span {
  width: 24px;
  height: 2px;
  background: var(--deep-blue);
  border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t);
}

.navbar__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.navbar__mobile {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1rem var(--gutter) 1.6rem;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.navbar__mobile a:not(.btn) {
  padding: .85rem .4rem;
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border-color);
}

.navbar__mobile-group {
  padding: .85rem .4rem .4rem;
  border-bottom: 1px solid var(--border-color);
}

.navbar__mobile-group > span {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: .3rem;
}

.navbar__mobile-group a:not(.btn) {
  padding: .55rem .8rem;
  border-bottom: none;
  color: var(--deep-blue);
  font-weight: 500;
}

.navbar__mobile .lang {
  margin-top: 1rem;
  align-self: flex-start;
}

.navbar__mobile .btn {
  margin-top: .8rem;
}

/* ---- Hero ---- */
.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-top: 1.2rem;
  background: linear-gradient(120deg, var(--pharma-gray) 0%, var(--deep-blue) 50%, var(--primary-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  margin-top: 1.4rem;
  font-size: var(--fs-lead);
  color: var(--text-soft);
  max-width: 640px;
  margin-inline: auto;
}

.hero__actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.hero__scroll span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary-blue);
}

/* ---- Tarjetas: base hover premium ---- */
.about-card,
.feature-card,
.product-card,
.quality-card,
.why-card,
.testimonial {
  padding: clamp(1.4rem, 1rem + 1.4vw, 2.1rem);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
  position: relative;
  overflow: hidden;
}

.about-card:hover,
.feature-card:hover,
.product-card:hover,
.quality-card:hover,
.why-card:hover,
.testimonial:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(20, 151, 212, .3);
}

/* Brillo superior sutil al hover */
.feature-card::before,
.product-card::before,
.quality-card::before,
.why-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-slow) var(--ease);
}

.feature-card:hover::before,
.product-card:hover::before,
.quality-card:hover::before,
.why-card:hover::before {
  transform: scaleX(1);
}

/* Iconos */
.about-card__icon,
.why-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--gradient-soft);
  border: 1px solid var(--border-color);
  margin-bottom: 1.1rem;
}

.about-card__icon svg,
.why-card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--primary-blue);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-card h3,
.feature-card h3,
.product-card h3,
.quality-card h3,
.why-card h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  margin-bottom: .6rem;
}

.about-card p,
.feature-card p,
.product-card p,
.quality-card p,
.why-card p {
  color: var(--text-soft);
  font-size: .98rem;
}

.about-card__values {
  display: grid;
  gap: .55rem;
  margin-top: .3rem;
}

.about-card__values li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-soft);
  font-weight: 500;
}

.about-card__values li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

.about-card--values {
  background: var(--gradient-soft);
}

/* Feature / quality numbering */
.feature-card__tag,
.quality-card__num {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--primary-blue);
  font-weight: 600;
}

.quality-card__num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: .7rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .85;
}

.feature-card__tag {
  display: block;
  margin-bottom: .8rem;
}

/* Product card line accent */
.product-card__line {
  display: block;
  height: 2px;
  width: 38px;
  margin-top: 1.2rem;
  border-radius: 2px;
  background: var(--gradient-brand);
  transition: width var(--t-slow) var(--ease);
}

.product-card:hover .product-card__line {
  width: 100%;
}

/* ---- Banda estadísticas ---- */
.stats-band {
  position: relative;
}

.stats-band__grid {
  padding: clamp(2rem, 1.4rem + 3vw, 3.6rem) clamp(1.4rem, 1rem + 2vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--gradient-deep);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.stats-band__grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 60% at 85% 0%, rgba(92, 184, 232, .4), transparent 60%),
    radial-gradient(40% 60% at 10% 100%, rgba(20, 151, 212, .35), transparent 60%);
  pointer-events: none;
}

/* Estadísticas dentro de la columna del mapa (rejilla 2×2 compacta) */
.map-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.7rem, .5rem + .6vw, 1.1rem) clamp(1rem, .8rem + 1vw, 1.6rem);
  margin-top: clamp(1.4rem, 1rem + 1.3vw, 2rem);
  padding: clamp(1rem, .8rem + .9vw, 1.4rem) clamp(1.4rem, 1rem + 2vw, 2rem);
  border-radius: var(--radius);
  background: var(--gradient-deep);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.map-stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 60% at 85% 0%, rgba(92, 184, 232, .4), transparent 60%),
    radial-gradient(40% 60% at 10% 100%, rgba(20, 151, 212, .35), transparent 60%);
  pointer-events: none;
}

.map-stats .stat-big__value {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
}

.map-stats .stat-big__label {
  font-size: .68rem;
  margin-top: .35rem;
}

/* Botón CTA debajo de las estadísticas del mapa */
.map-cta {
  margin-top: clamp(1.1rem, .8rem + 1vw, 1.6rem);
}

.stat-big {
  text-align: center;
  position: relative;
}

.stat-big__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
}

.stat-big__label {
  display: block;
  margin-top: .7rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}

/* ---- Testimonios ---- */
.testimonial {
  display: flex;
  flex-direction: column;
}

.testimonial__quote {
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: .6;
  color: var(--secondary-blue);
  height: 2rem;
}

.testimonial blockquote {
  font-size: 1.05rem;
  color: var(--text-soft);
  font-style: italic;
  flex: 1;
  margin-bottom: 1.4rem;
}

.testimonial figcaption {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.testimonial__name {
  font-weight: 700;
  color: var(--deep-blue);
}

.testimonial__role {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---- FAQ ---- */
.faq {
  display: grid;
  gap: .9rem;
}

.faq__item {
  background: var(--glass-bg-strong);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t);
}

.faq__item[open] {
  border-color: rgba(20, 151, 212, .3);
  box-shadow: var(--shadow-sm);
}

.faq__question {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 1.4rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--deep-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--primary-blue);
  border-bottom: 2px solid var(--primary-blue);
  transform: rotate(45deg);
  transition: transform var(--t) var(--ease);
}

.faq__item[open] .faq__question::after {
  transform: rotate(-135deg);
}

.faq__answer {
  padding: 0 1.4rem 1.2rem;
  color: var(--text-soft);
}

/* ---- CTA ---- */
.cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem);
  margin-top: .6rem;
}

.cta__lead {
  margin-top: 1rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.cta__points {
  margin-top: 1.6rem;
  display: grid;
  gap: .75rem;
}

.cta__points li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--text-soft);
  font-weight: 500;
}

.cta__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / 13px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* ---- Formulario ---- */
.form {
  display: grid;
  gap: 1rem;
}

.form__field {
  display: grid;
  gap: .4rem;
}

.form__field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--deep-blue);
}

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, .85);
  color: var(--text-color);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--primary-blue-12);
}

.form__field.is-invalid input,
.form__field.is-invalid select,
.form__field.is-invalid textarea {
  border-color: #e0524b;
  box-shadow: 0 0 0 4px rgba(224, 82, 75, .12);
}

.form__error {
  font-size: .78rem;
  color: #d33c34;
  min-height: 1em;
}

.form__note {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: .2rem;
}

/* ---- Footer (azul profundo, texto blanco, detalles en azul claro) ---- */
.footer {
  position: relative;
  z-index: var(--z-base);
  background: var(--gradient-deep);
  color: rgba(255, 255, 255, .82);
  margin-top: var(--section-y);
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 60% at 88% 0%, rgba(92, 184, 232, .28), transparent 60%),
    radial-gradient(40% 55% at 6% 100%, rgba(20, 151, 212, .22), transparent 60%);
  pointer-events: none;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__brand p {
  color: rgba(255, 255, 255, .72);
  font-size: .95rem;
  max-width: 320px;
}

.footer__social {
  display: flex;
  gap: .7rem;
  margin-top: 1.3rem;
}

.footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  transition: transform var(--t) var(--ease), background var(--t), border-color var(--t);
}

.footer__social a:hover {
  transform: translateY(-3px);
  background: var(--secondary-blue);
  border-color: var(--secondary-blue);
}

.footer__social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--secondary-blue);
  margin-bottom: 1.1rem;
}

.footer__col ul {
  display: grid;
  gap: .7rem;
}

.footer__col a {
  color: rgba(255, 255, 255, .72);
  font-size: .95rem;
  transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer__col a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer__bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer__bottom p {
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.3rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  max-width: min(360px, calc(100vw - 40px));
}

.toast__icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
}

.toast__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast__text {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-color);
}

/* ---- Página interior: hero secundario y contenido ---- */
.page-hero {
  position: relative;
  z-index: var(--z-base);
  padding-top: calc(var(--nav-h) + clamp(3rem, 6vw, 5.5rem));
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
  text-align: center;
}

.page-hero__inner {
  max-width: 820px;
  margin-inline: auto;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.8rem);
  letter-spacing: -.02em;
  margin-top: 1rem;
  background: linear-gradient(120deg, var(--pharma-gray) 0%, var(--deep-blue) 50%, var(--primary-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero__subtitle {
  margin-top: 1.2rem;
  font-size: var(--fs-lead);
  color: var(--text-soft);
  max-width: 640px;
  margin-inline: auto;
}

.breadcrumb {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary-blue);
}

.breadcrumb span {
  color: var(--primary-blue);
}

/* Bloque texto + imagen/lista */
.content-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.6rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}

.content-split--reverse .content-split__media {
  order: -1;
}

.prose p {
  color: var(--text-soft);
  margin-bottom: 1rem;
}

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

.prose h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  margin: 1.6rem 0 .6rem;
}

.check-list {
  display: grid;
  gap: .8rem;
}

.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--text-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .1em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / 13px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Panel ilustrativo (sin foto): tarjeta con icono grande y degradado */
.media-panel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.5rem + 3vw, 3.4rem);
  background: var(--gradient-shield);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.media-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 55% at 80% 12%, rgba(255, 255, 255, .25), transparent 60%),
    radial-gradient(40% 50% at 12% 95%, rgba(20, 151, 212, .35), transparent 60%);
  pointer-events: none;
}

.media-panel__icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  margin-bottom: auto;
}

.media-panel__icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.media-panel h3 {
  position: relative;
  font-family: var(--font-display);
  color: var(--white);
  font-size: var(--fs-h3);
  margin-top: 1.4rem;
}

.media-panel p {
  position: relative;
  color: rgba(255, 255, 255, .82);
  margin-top: .5rem;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, .6rem + 1.4vw, 1.8rem);
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 1rem + 1.4vw, 2rem);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(20, 151, 212, .3);
}

.post-card__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary-blue);
  padding: .3rem .7rem;
  border-radius: var(--radius-pill);
  background: var(--primary-blue-08);
  margin-bottom: 1rem;
}

.post-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: .6rem;
}

.post-card p {
  color: var(--text-soft);
  font-size: .96rem;
  flex: 1;
}

.post-card__meta {
  display: flex;
  gap: .8rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: .82rem;
  color: var(--text-muted);
}

.post-card__more {
  color: var(--primary-blue);
  font-weight: 600;
}

/* Tabla de proceso (farmacovigilancia) */
.step-list {
  display: grid;
  gap: 1rem;
}

.step-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: start;
  padding: clamp(1.2rem, 1rem + 1vw, 1.8rem);
}

.step-item__num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step-item h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: .4rem;
}

.step-item p {
  color: var(--text-soft);
  font-size: .96rem;
}

/* ---- Mapa real de América con sedes ---- */
.map-split {
  align-items: center;
}

.map-hint {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map {
  position: relative;
  border-radius: var(--radius-lg);
}

.map__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  background: #e9f3fb;
  line-height: 0;
}

/* Capa que se acerca (zoom) al país seleccionado */
.map__zoom {
  transform-origin: 50% 50%;
  transition: transform .85s var(--ease);
  will-change: transform;
}

.map__img {
  width: 100%;
  height: auto;
  display: block;
}

/* Marcadores de sede */
.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  background: none;
  cursor: pointer;
  z-index: 4;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}

.map-marker--usa {
  left: 35.4%;
  top: 31.5%;
}

.map-marker--peru {
  left: 50.8%;
  top: 64.6%;
}

/* Al acercarse a un país, los marcadores se desvanecen (la info pasa al panel) */
.map[data-zoomed="true"] .map-marker {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.55);
}

.map-marker__dot {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 3px 10px rgba(10, 91, 133, .45);
  transition: transform var(--t) var(--ease);
}

/* Bandera circular dentro del marcador */
.map-marker__flag {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.map-marker:hover .map-marker__dot,
.map-marker:focus-visible .map-marker__dot {
  transform: scale(1.25);
}

.map-marker--hub .map-marker__dot {
  background: var(--deep-blue);
}

.map-marker--hub .map-marker__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--primary-blue);
  animation: marker-pulse 2.4s var(--ease-out) infinite;
}

@keyframes marker-pulse {
  0% { transform: scale(.7); opacity: .8; }
  100% { transform: scale(2.1); opacity: 0; }
}

.map-marker__name {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--deep-blue);
  background: rgba(255, 255, 255, .9);
  padding: .18rem .5rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.25;          /* evita que herede el line-height:0 del frame */
  box-shadow: var(--shadow-xs);
}

/* Botón para alejar de nuevo (visible solo con zoom) */
.map-reset {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .85rem .4rem .5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--deep-blue);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), background var(--t), color var(--t);
}

.map-reset svg {
  width: 15px;
  height: 15px;
  color: var(--primary-blue);
}

.map-reset:hover {
  background: #fff;
  color: var(--primary-blue);
}

.map[data-zoomed="true"] .map-reset {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Panel de información del país (aparece al acercarse) */
.map-info {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .25rem 1rem;
  padding: 1rem 1.15rem;
  text-align: left;
  line-height: 1.5;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ease) .2s, transform .5s var(--ease) .2s;
}

.map-info.is-active {
  opacity: 1;
  transform: translateY(0);
}

.map-info__flag {
  grid-row: 1 / span 2;
  align-self: center;
  width: 48px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(10, 91, 133, .28);
  line-height: 0;
}

.map-info__flag svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-info__badge {
  grid-column: 2;
  justify-self: start;
  align-self: end;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .56rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--gradient-brand);
  padding: .2rem .5rem;
  border-radius: var(--radius-pill);
}

.map-info__badge--alt {
  background: var(--deep-blue);
}

.map-info__title {
  grid-column: 2;
  align-self: start;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--deep-blue);
  margin: 0;
}

.map-info__text {
  grid-column: 1 / -1;
  font-size: .82rem;
  color: var(--text-soft);
  margin: .25rem 0 0;
}

.map-info__meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem 1rem;
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border-color);
}

.map-info__meta li {
  display: flex;
  flex-direction: column;
}

.map-info__meta span {
  font-family: var(--font-mono);
  font-size: .55rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map-info__meta strong {
  font-size: .82rem;
  line-height: 1.3;
  color: var(--deep-blue);
  font-weight: 600;
}

/* ---- Sección "Sobre Nosotros" (imagen + texto) ---- */
.about-intro {
  padding-top: calc(var(--nav-h) + clamp(.8rem, 2vw, 1.6rem));
}

.about-intro .content-split {
  align-items: start;
}

.about-intro .prose {
  padding-top: clamp(1rem, 1.5vw, 2.4rem);
}

.about-intro .page-hero__subtitle {
  margin-inline: 0;
  max-width: 100%;
  font-size: 1.02rem;
  line-height: 1.6;
}

.about-photo {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.about-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.about-photo__credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: right;
  font-size: .62rem;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .85);
  padding: .5rem .7rem;
  background: linear-gradient(transparent, rgba(13, 37, 64, .55));
}

/* ---- Línea de tiempo ---- */
.timeline-note {
  text-align: center;
  margin-top: .8rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  display: flex;
  gap: clamp(.6rem, 1.4vw, 1.3rem);
  padding-block: .5rem;
}

.timeline__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 380px;
}

/* Segmento de la línea central (continuo entre items) */
.timeline__item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(20, 151, 212, .45);
}

.timeline__marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(20, 151, 212, .15);
  z-index: 2;
}

.timeline__card {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  padding: 1.1rem 1rem;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
}

/* Alternar: impar arriba, par abajo */
.timeline__item:nth-child(odd) .timeline__card {
  bottom: calc(50% + 28px);
}

.timeline__item:nth-child(even) .timeline__card {
  top: calc(50% + 28px);
}

/* Conector entre la tarjeta y el punto */
.timeline__card::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 22px;
  background: rgba(20, 151, 212, .4);
}

.timeline__item:nth-child(odd) .timeline__card::after {
  bottom: -24px;
}

.timeline__item:nth-child(even) .timeline__card::after {
  top: -24px;
}

.timeline__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(20, 151, 212, .3);
}

.timeline__year {
  display: block;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--primary-blue);
}

.timeline__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--deep-blue);
  margin: .25rem 0 .45rem;
}

.timeline__card p {
  margin: 0;
  font-size: .9rem;
  color: var(--text-soft);
}

/* En móvil/tablet: línea de tiempo vertical (sin scroll horizontal) */
@media (max-width: 900px) {
  .timeline {
    flex-direction: column;
    gap: 0;
  }

  .timeline__item {
    width: 100%;
    min-height: auto;
    padding: .7rem 0 .7rem 2.4rem;
  }

  .timeline__item::before {
    top: 0;
    bottom: 0;
    left: 7px;
    right: auto;
    width: 2px;
    height: auto;
    transform: none;
  }

  .timeline__marker {
    top: 1.7rem;
    left: 7px;
    transform: translate(-50%, 0);
  }

  .timeline__card,
  .timeline__item:nth-child(odd) .timeline__card,
  .timeline__item:nth-child(even) .timeline__card {
    position: static;
    text-align: left;
  }

  .timeline__card::after {
    display: none;
  }
}

/* CTA centrada para páginas interiores */
.page-cta__card {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  padding: clamp(2rem, 1.5rem + 3vw, 3.6rem);
}

.page-cta__card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.4rem);
}

.page-cta__card p {
  color: var(--text-soft);
  margin: 1rem auto 1.7rem;
  max-width: 520px;
  font-size: var(--fs-lead);
}

/* ---- Responsive componentes ---- */
@media (max-width: 900px) {
  .navbar__nav,
  .navbar__actions {
    display: none;
  }

  .navbar__toggle {
    display: flex;
  }

  .content-split {
    grid-template-columns: 1fr;
  }

  .content-split--reverse .content-split__media {
    order: 0;
  }

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

@media (max-width: 500px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .btn {
    width: 100%;
  }

  .hero__actions {
    flex-direction: column;
  }

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

  .step-item {
    grid-template-columns: 1fr;
    gap: .4rem;
  }
}

/* =========================================================
   Marcas — ticker horizontal
   ========================================================= */
.section--brands {
  overflow: hidden;        /* el track desborda el viewport sin scroll horizontal */
}

.marquee {
  position: relative;
  width: 100%;
  margin-top: clamp(1.6rem, 1rem + 2vw, 2.8rem);
  padding-block: .4rem;
  /* desvanecido suave en ambos bordes */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  outline: none;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 42s linear infinite;
  will-change: transform;
}

/* Pausa al pasar el cursor o al enfocar con teclado */
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track,
.marquee:focus .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  flex: 0 0 auto;
  margin-right: clamp(1rem, .6rem + 1.4vw, 2rem);   /* el bucle se desplaza -50%: el margen va por ítem para un loop perfecto */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .95rem 2.1rem;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, .85rem + .95vw, 1.7rem);
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
  color: var(--slate-blue);
  transition:
    transform var(--t) var(--ease),
    color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    background var(--t) var(--ease);
}

.marquee__item:hover {
  transform: translateY(-5px);
  color: var(--primary-blue);
  border-color: var(--primary-blue);
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow-glow);
}

@media (max-width: 500px) {
  .marquee__item {
    padding: .8rem 1.5rem;
  }
}
