/* ==========================================================================
   SECCIONES
   header · hero · tech · criteria · about · process · lenses · specialties ·
   pricing · faq · contact · footer · whatsapp
   ========================================================================== */

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-block: 20px;
  background: var(--c-header-bg);
  border-bottom: 1px solid var(--c-primary-8);
  box-shadow: var(--sh-header);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  transition: padding var(--t-base), transform 0.45s var(--ease-out), background-color var(--t-base);
}
.header.is-compact { padding-block: 8px; }
.header.is-hidden { transform: translateY(-100%); }
.header__inner {
  min-height: 78px;
  display: flex; align-items: center; gap: var(--space-26);
  transition: min-height var(--t-base);
}
.header.is-compact .header__inner { min-height: 62px; }
.header__logo { flex: none; }
.header__logo img { width: 122px; height: auto; margin-block: -3px; transition: width var(--t-base); }
.header.is-compact .header__logo img { width: 92px; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 24px; }
.nav__link {
  position: relative;
  font: var(--fw-regular) var(--fs-nav)/1.7 var(--ff-body);
  color: var(--c-heading); text-decoration: none;
  transition: color var(--t-fast);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px;
  background: var(--c-primary); transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-base);
}
.nav__link:hover, .nav__link.is-active { color: var(--c-primary); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta-mobile { display: none; }

.burger {
  display: none;
  width: 46px; height: 46px; margin-left: auto; padding: 0;
  border: var(--b-hairline); border-radius: 50%;
  background: var(--c-white); cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute; left: 50%; width: 18px; height: 1.8px; border-radius: 2px;
  background: var(--c-heading);
  transition: transform var(--t-base), opacity var(--t-fast), top var(--t-base);
  transform: translateX(-50%);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.header.is-menu-open .burger span:nth-child(1) { top: 22px; transform: translateX(-50%) rotate(45deg); }
.header.is-menu-open .burger span:nth-child(2) { opacity: 0; }
.header.is-menu-open .burger span:nth-child(3) { top: 22px; transform: translateX(-50%) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 621.92px; height: 726px;
  display: flex; align-items: flex-end;
  padding: 150px 0 72px;
  background: #3d5163;
  color: var(--c-white);
}
/* En desktop la foto arranca bajo el header, como en el diseño */
.hero__media { position: absolute; inset: 118px 0 0; z-index: -1; overflow: hidden; }
.hero__media img {
  width: 100%; height: 112%;
  object-fit: cover; object-position: 50% 0;
  transform: translate3d(0, var(--parallax, 0px), 0) scale(1.06);
  animation: heroZoom 2.4s var(--ease-out) both;
}
/* El overlay #173E63 al 50% ya viene aplicado en hero.webp */
.hero__content { width: 100%; max-width: 740px; padding-right: 20px; }
.hero__title { padding-top: 15px; color: var(--c-white); max-width: 720px; }
.hero__text {
  max-width: 650px; padding-top: 26px;
  font-size: 16px; line-height: 1.62; color: var(--c-white-86);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-12); padding-top: var(--space-28); }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 27px; }

/* Entrada del hero (no depende de scroll) */
.js .hero-in { opacity: 0; animation: fadeUp 0.9s var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
@keyframes heroZoom { from { transform: scale(1.14); } to { transform: translate3d(0, var(--parallax, 0px), 0) scale(1.06); } }

/* ==========================================================================
   TECNOLOGÍA Y RESPALDO
   ========================================================================== */
.tech__grid { display: grid; gap: var(--space-14); padding-top: 12px; }
.tech__box { padding: 18px 20px; border-radius: var(--r-md); background: var(--c-surface); }
.tech__box--logos { min-height: 104px; display: grid; place-content: center; text-align: center; }
.tech__logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 37px; }
.tech__logos img { height: 27.5px; width: auto; }
.tech__logos .tech__logo--bausch { height: 21px; }
.tech__logos-caption { padding: 7px 0 0 20px; font-size: var(--fs-lead-xl); line-height: 1.7; }
.tech__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-14); }
.tech__bene { width: 95px; height: auto; margin-bottom: 2px; }
.tech__title { font: var(--fw-semibold) var(--fs-card-lg)/22.4px var(--ff-heading); font-size: clamp(1.25rem, 1.08rem + 0.72vw, 1.625rem); color: var(--c-heading); }
.tech__desc { max-width: 360px; padding-top: 18px; }
.tech__pair .tech__box { padding: 17px 18px 14px; }
.tech__pair .tech__box p { font-size: var(--fs-lead-card); line-height: 24.48px; }
.tech__pair .tech__box p.tech__bene-text { line-height: 1.7; }

/* ==========================================================================
   CRITERIO MÉDICO
   ========================================================================== */
.criteria .card__title { font-size: var(--fs-h3); }
.criteria .card__text { font-size: 15.5px; line-height: 1.75; }
.criteria .card { padding-bottom: 26px; }
/* La pregunta queda siempre al pie de la tarjeta */
.criteria .card__text { margin-bottom: 16px; }
.criteria .card__footer { margin-top: auto; }

/* ==========================================================================
   SOBRE EL DR. JAIRO
   ========================================================================== */
.about__grid {
  display: grid; grid-template-columns: 412px 1fr; gap: var(--gap-cols);
  align-items: center;
}
.about__media {
  aspect-ratio: 412 / 513; border-radius: var(--r-xl); overflow: hidden;
  background: var(--c-surface); box-shadow: var(--sh-elevated);
}
.about__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.about__media:hover img { transform: scale(1.04); }
.about__body .eyebrow { margin-bottom: 17px; }
.about__body .lead { padding-top: 21px; }
.about__body .check-list { padding-top: 28px; }
.about__body .btn { margin-top: 30px; }

/* ==========================================================================
   PROCESO
   ========================================================================== */
.process .step { display: flex; flex-direction: column; justify-content: center; min-height: 353px; }
.process__cta { margin-top: 37px; }

/* ==========================================================================
   LENTES
   ========================================================================== */
.lenses .section-head { max-width: 930px; }
.lenses .section-head h2 { max-width: 800px; }
.lenses .section-head .lead { padding-top: 22px; }
.lenses .section-head .lead { max-width: 920px; }
.lenses__cta { margin-top: 18px; }
.lenses .slider { margin-top: 44px; }
.lens-card { padding: 33px 30px 27px; }
.lens-card .eyebrow { font-size: var(--fs-eyebrow); margin-bottom: 13px; }
.lens-card .card__title { margin-bottom: 21px; }
.lens-card .bullets { color: var(--c-body); }
.lens-card.card--featured .bullets { color: var(--c-white); }

/* ==========================================================================
   ESPECIALIDADES
   ========================================================================== */
.specialties__grid {
  width: min(686px, 100%); margin-inline: auto;
}
.specialties .slider:not(.swiper-initialized) .swiper-wrapper { --cols: 2; gap: 18px; }
.specialty-card { padding: 30px 30px 30px; }
.specialty-card .card__title { margin-right: -8px; margin-bottom: 11px; }
.specialty-card .card__link { padding-top: 34px; }
.specialty-card .card__text { max-width: 252px; font-size: 15.5px; line-height: 1.75; }

/* ==========================================================================
   PRECIO
   ========================================================================== */
.pricing { padding-block: 0; background: var(--c-navy); }
.pricing__card {
  display: grid; grid-template-columns: 342fr 263fr 234fr; gap: clamp(24px, 4vw, 47px);
  align-items: center;
  min-height: 427.5px;
  padding: clamp(48px, 4.6vw, 54px) clamp(0px, 4.6vw, 54px);
  border-radius: var(--r-xl);
  background: var(--c-navy-card);
  box-shadow: var(--sh-card);
}
.pricing__price {
  padding-top: 17px;
  font: var(--fw-semibold) var(--fs-h2)/1.08 var(--ff-heading); letter-spacing: var(--ls-h2);
  color: var(--c-white);
}
.pricing__desc { padding-top: 24px; max-width: 348px; color: var(--c-white); }
.pricing__aside .btn { margin-bottom: 17px; }
/* Desktop: posiciones verticales exactas del diseño */
@media (min-width: 1025px) {
  .pricing__card { align-items: start; padding-block: 0; }
  .pricing__card > :nth-child(1) { margin-top: 108px; margin-right: -6px; }
  .pricing__card > :nth-child(2) { margin-top: 81px; }
  .pricing__card > :nth-child(3) { margin-top: 119px; }
}
.pricing__note { font-size: var(--fs-note); line-height: 23.39px; color: var(--c-white); max-width: 234px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq__grid { display: grid; grid-template-columns: 1fr 606px; gap: var(--gap-cols); align-items: start; }
.faq__head { position: sticky; top: calc(var(--header-h-compact) + 40px); }
.faq__head h2 { padding-top: var(--space-17); max-width: 340px; }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact { background: var(--g-form-section); }
.contact__grid { display: grid; grid-template-columns: 1fr 523.84px; gap: var(--gap-cols); align-items: start; }
.contact__info h2 { padding-top: var(--space-17); max-width: 440px; }
.contact__info .lead { padding-top: 24px; max-width: 430px; font-size: 16px; }
.contact__info .check-list { padding-top: 26px; }
.contact__image {
  width: min(360px, 100%); aspect-ratio: 360 / 210; margin-top: 25px;
  border-radius: var(--r-lg); overflow: hidden; background: var(--c-surface);
}
.contact__image img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { padding-top: 66px; background: var(--c-navy); color: var(--c-white-78); }
.footer__grid {
  display: grid; grid-template-columns: 330px 207px 207px 1fr; gap: 0;
  padding-bottom: 59px;
}
.footer__brand img { width: 122px; height: auto; margin-bottom: 1px; }
.footer__brand p + p { margin-top: 16px; }
.footer__title {
  margin-bottom: 15px;
  font: var(--fw-semibold) 16px/1.08 var(--ff-heading); letter-spacing: -0.04em;
  color: var(--c-white);
}
.footer a { color: var(--c-white-78); text-decoration: none; transition: color var(--t-fast); }
.footer a:hover { color: var(--c-white); }
.footer__links { display: grid; row-gap: 1px; }
.footer__sedes { max-width: 290px; }
.footer__bottom { padding: 21px 16px 20px; border-top: 1px solid var(--c-white-10); text-align: center; font-size: 16px; }
.footer__bottom strong { font-weight: var(--fw-semibold); color: var(--c-white); }

/* ==========================================================================
   WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
  position: fixed; right: 26px; bottom: 26px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-primary); color: var(--c-white);
  box-shadow: var(--sh-whatsapp);
  transition: transform var(--t-base), background-color var(--t-fast);
}
.whatsapp-float svg { width: 27px; height: 27px; }
.whatsapp-float:hover { transform: scale(1.08); background: var(--c-primary-hover); }
.whatsapp-float::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--c-primary);
  animation: waPulse 2.6s var(--ease-out) infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .nav__list { gap: 18px; }
  .header__cta { display: none; }
}

@media (max-width: 1024px) {
  /* Header → menú móvil */
  .burger { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    margin: 0; padding: 12px var(--gutter-x) 28px;
    background: var(--c-white);
    border-bottom: var(--b-hairline);
    box-shadow: var(--sh-header);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity var(--t-base), transform var(--t-base), visibility 0s linear 0.3s;
  }
  .header.is-menu-open .nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: var(--b-hairline); }
  .nav__link { display: block; padding: 14px 0; font-size: 17px; }
  .nav__link::after { display: none; }
  .nav__cta-mobile { display: flex; margin-top: 20px; }

  .about__grid { grid-template-columns: minmax(0, 0.8fr) 1fr; }
  .faq__grid { grid-template-columns: 1fr; gap: 28px; }
  .faq__head { position: static; }
  .faq__head h2 { max-width: none; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .contact__info .lead, .contact__info h2 { max-width: 600px; }
  .pricing__card { grid-template-columns: 1fr 1fr; }
  .pricing__aside { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
  .pricing__aside .btn { margin: 0; }
  .pricing__note { max-width: 440px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
}

@media (max-width: 767px) {
  :root { --header-h-compact: 64px; }

  .header { padding-block: 10px; }
  .header.is-compact { padding-block: 6px; }
  .header__inner, .header.is-compact .header__inner { min-height: 56px; }
  .header__logo img, .header.is-compact .header__logo img { width: 84px; }

  .hero {
    height: auto; min-height: 100svh; max-height: 860px;
    padding: 120px 0 44px;
  }
  .hero__media { inset: 0; }
  .hero__media img { object-position: 64% 0; }
  .hero__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6, 55, 92, 0.1) 0%, rgba(6, 55, 92, 0.35) 45%, rgba(6, 55, 92, 0.82) 100%);
  }
  .hero__content { padding-right: 0; }
  .hero__text { font-size: 15.5px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__chips { gap: 8px; }
  .chip { min-height: 34px; padding: 6px 11px; font-size: 12.5px; }

  .tech__logos { gap: 16px 28px; }
  .tech__logos img { height: 20px; }
  .tech__logos .tech__logo--bausch { height: 15px; }
  .tech__pair { grid-template-columns: 1fr; }

  .about__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__media { aspect-ratio: 4 / 4.3; }
  .about__body .btn { width: 100%; }

  .slider__pagination.swiper-pagination { display: block; }
  .slider .swiper-slide { transition-property: transform, opacity; }

  .process .step { min-height: 300px; justify-content: flex-start; }
  .process__cta .btn,
  .lenses__cta { width: 100%; }

  .pricing__card { grid-template-columns: 1fr; }
  .pricing__aside { flex-direction: column; align-items: stretch; }
  .pricing__aside .btn { width: 100%; }
  .pricing__note { max-width: none; }

  .accordion__trigger { min-height: 64px; font-size: 18px; }

  .contact__image { width: 100%; }

  .footer { padding-top: 48px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-bottom: 40px; }
  .footer__brand, .footer__col--sedes { grid-column: 1 / -1; }

  .whatsapp-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
}

/* Solo el parallax del hero respeta reduced-motion (efecto intrusivo). */
@media (prefers-reduced-motion: reduce) {
  .hero__media img { animation: none; transform: scale(1.06); }
  .whatsapp-float::after { animation: none; display: none; }
}
