/* =========================================================
   Dra. Jessica Chasi · Sitio web
   Colores: #194167 (azul), #CECECE (gris), blanco
   Fuente: Montserrat
   ========================================================= */

:root {
  --blue: #194167;
  --blue-dark: #0f2b46;
  --blue-soft: #e8eef4;
  --grey: #cecece;
  --grey-light: #f4f5f7;
  --white: #ffffff;
  --text: #1c2a38;
  --muted: #5b6876;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(25, 65, 103, .10);
  --shadow-lg: 0 20px 50px rgba(25, 65, 103, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --nav-h: 100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--blue); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.ico { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .75rem;
  font-weight: 600; color: var(--blue); margin-bottom: .8em;
  display: inline-flex; align-items: center; gap: .7em;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--grey); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: .9em 1.6em; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--grey); outline-offset: 3px; }
.btn--sm { padding: .6em 1.2em; font-size: .88rem; }
.btn--primary { background: var(--blue); color: var(--white); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--blue-dark); box-shadow: var(--shadow-lg); }
.btn--light { background: var(--white); color: var(--blue); }
.btn--light:hover { box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.btn--ghost { color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn--outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: var(--white); }
.btn--blue { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn--blue:hover { background: var(--grey); border-color: var(--grey); color: var(--blue); }
.ico--chev { fill: none; transition: transform .3s var(--ease); }
[aria-expanded="true"] .ico--chev { transform: rotate(180deg); }

/* ---------- Menú ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  background: #ffffff;
  transition: box-shadow .3s, height .3s;
}
.nav.is-scrolled { box-shadow: 0 4px 20px rgba(25,65,103,.10); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo img { height: 80px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a:not(.btn) {
  text-decoration: none; color: var(--text); font-weight: 500; font-size: .93rem; position: relative;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:not(.btn):hover::after, .nav__links a.is-current::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--blue); margin: 5px 0; transition: transform .3s, opacity .3s; }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background: var(--blue);
  padding: calc(var(--nav-h) + 30px) 0 0;
}
.hero__bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1f4c78 0%, #194167 45%, #10304f 100%);
}

.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; }
.hero__text { padding-bottom: 90px; }
.hero h1 { color: var(--white); font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .15em; }
.hero__role { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 300; color: var(--grey); margin-bottom: 1.4em; }
.hero__lead { max-width: 34em; color: rgba(255,255,255,.88); font-size: 1.02rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 2em 0 1.6em; }
.hero__place { display: flex; align-items: center; gap: .5em; font-size: .9rem; color: var(--grey); margin: 0; }
.hero__photo { align-self: end; justify-self: center; position: relative; }
.hero__photo img { width: min(480px, 100%); height: auto;margin-bottom: 50px; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 20px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--white); border-radius: 2px; animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Confianza ---------- */
.trust { background: var(--grey-light); border-bottom: 1px solid #e3e6ea; }
.trust__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.trust__item {
  display: flex; gap: 14px; align-items: flex-start; padding: 30px 24px;
  border-right: 1px solid #dde1e6;
}
.trust__item:last-child { border-right: 0; }
.trust__item .ico { width: 34px; height: 34px; color: var(--white); padding: 6px; background: var(--blue); border-radius: 10px; box-sizing: content-box; }
.trust__item strong { display: block; color: var(--blue); font-size: .93rem; font-weight: 600; line-height: 1.35; }
.trust__item span { font-size: .83rem; color: var(--muted); }

/* ---------- Secciones ---------- */
.section { padding: 100px 0; }
.section--alt { background: var(--grey-light); }
.section__head { max-width: 680px; margin-bottom: 40px; }
.section__head p:last-child { color: var(--muted); }

/* ---------- Pestañas ---------- */
.tabs { display: inline-flex; gap: 6px; padding: 6px; background: var(--grey-light); border-radius: 999px; margin-bottom: 30px; flex-wrap: wrap; }
.tabs__btn {
  font: inherit; font-weight: 500; font-size: .9rem; color: var(--muted);
  background: transparent; border: 0; padding: .7em 1.4em; border-radius: 999px; cursor: pointer;
  transition: background .25s, color .25s, box-shadow .25s;
}
.tabs__btn:hover { color: var(--blue); }
.tabs__btn.is-active { background: var(--white); color: var(--blue); font-weight: 600; box-shadow: 0 4px 14px rgba(25,65,103,.12); }
.tabs__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tabs__panel.is-active { animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  position: relative; background: var(--blue); border: 0; border-radius: var(--radius);
  padding: 26px 22px 22px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--grey); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); background: var(--blue-dark); }
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: .4em; color: var(--white); }
.card p { font-size: .9rem; color: rgba(255,255,255,.78); margin: 0; }

/* ---------- Segunda opinión ---------- */
.second {
  margin-top: 50px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
  background: #eceef1; color: var(--blue); border-left: 6px solid var(--blue);
  border-radius: 20px; padding: 44px 48px; position: relative; overflow: hidden;
}
.second::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px;
  border: 40px solid rgba(25,65,103,.05); border-radius: 50%;
}
.second h3 { color: var(--blue); font-size: 1.45rem; margin-bottom: .5em; }
.second p { color: var(--muted); margin: 0; max-width: 40em; }
.second .btn { position: relative; z-index: 1; white-space: nowrap; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.gallery__item { aspect-ratio: 3 / 2; }
.gallery__item { margin: 0; overflow: hidden; position: relative; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(25,65,103,.35), transparent 50%); }
.gallery__item:hover img { transform: scale(1.05); }

/* ---------- Sobre mí ---------- */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.about__photo { position: relative; }
.about__photo::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 2px solid var(--grey); border-radius: 20px; z-index: 0;
}
.about__photo img { position: relative; z-index: 1; border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: 50% 20%; }
.about__text p { color: var(--muted); }
.about__text .btn { margin-top: 1em; }

/* ---------- Trayectoria (desplegable) ---------- */
.bio { overflow: hidden; transition: height .55s var(--ease); }
.bio > .container { padding-top: 70px; padding-bottom: 20px; }
.tabs--bio { background: var(--white); }
.bio__title { font-size: 1.25rem; margin-bottom: 1.2em; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 880px; }
.timeline::before { content: ""; position: absolute; left: 160px; top: 6px; bottom: 6px; width: 2px; background: var(--grey); }
.timeline li { display: grid; grid-template-columns: 160px 1fr; gap: 0 36px; padding: 0 0 26px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 154px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--blue);
}
.timeline time { font-weight: 600; font-size: .85rem; color: var(--blue); padding-right: 20px; padding-top: 2px; }
.timeline strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.timeline span { display: block; font-size: .9rem; color: var(--muted); }
.societies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 900px; }
.societies li { background: var(--white); border-radius: var(--radius); padding: 20px 22px; border-left: 3px solid var(--blue); }
.societies strong { display: block; font-weight: 600; font-size: .95rem; }
.societies span { font-size: .85rem; color: var(--muted); }
.bio__close { text-align: center; padding-top: 20px; }

/* ---------- Banner ---------- */
.banner { position: relative; padding: 110px 0; color: var(--white); text-align: center; overflow: hidden; }
.banner__bg {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(15,43,70,.82), rgba(25,65,103,.62)), url("../img/ecografia-banner.jpg") center 35% / cover no-repeat;
}
.banner__inner { position: relative; }
.banner h2 { color: var(--white); margin-bottom: .3em; }
.banner p { color: var(--grey); margin-bottom: 1.8em; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 60px; align-items: stretch; }
.contact__info > p { color: var(--muted); }
.contact__list { list-style: none; padding: 0; margin: 30px 0 34px; display: grid; gap: 22px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__ico { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.contact__list small { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.contact__list a, .contact__list span { font-weight: 600; color: var(--text); text-decoration: none; font-size: 1.02rem; }
.contact__list a:hover { color: var(--blue); }
.contact__map { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); min-height: 380px; background: var(--grey-light); }
.contact__map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Pie ---------- */
.footer { background: var(--blue-dark); color: var(--grey); font-size: .9rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-top: 50px; padding-bottom: 40px; flex-wrap: wrap; }
.footer__inner img { height: 64px; width: auto; }
.footer__info { margin: 0; text-align: right; line-height: 1.8; }
.footer a { color: var(--white); }
.footer__legal { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .82rem; text-align: center; color: rgba(206,206,206,.8); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 10px 25px rgba(0,0,0,.25);
  transition: transform .3s var(--ease);
}
.wa-float svg { width: 32px; height: 32px; fill: var(--white); }
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1;
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Animaciones al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal--right { transform: translateX(40px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about { gap: 50px; }
}

@media (max-width: 860px) {
  :root { --nav-h: 84px; }
  .nav__logo img { height: 64px; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--white); padding: 10px 24px 24px; box-shadow: 0 20px 30px rgba(0,0,0,.08);
    display: none; align-items: stretch;
  }
  .nav__links a:not(.btn) { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--grey-light); }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 16px; width: 100%; }
  .nav.is-open .nav__links { display: flex; animation: menuIn .3s var(--ease); }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 36px); }
  .hero__inner { grid-template-columns: 1fr; gap: 10px; }
  .hero__text { padding-bottom: 0; }
  .hero__photo img { width: min(340px, 85vw); }
  .hero__scroll { display: none; }

  .trust__grid { grid-template-columns: 1fr; }
  .trust__item { border-right: 0; border-bottom: 1px solid #dde1e6; padding: 20px 0; }
  .trust__item:last-child { border-bottom: 0; }

  .section { padding: 70px 0; }
  .cards--3 { grid-template-columns: 1fr; }
  .second { flex-direction: column; align-items: flex-start; padding: 34px 28px; }
  .second .btn { white-space: normal; }

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

  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 460px; margin-right: 24px; }

  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; padding-left: 32px; }
  .timeline li::before { left: 0; }
  .timeline time { padding: 0 0 4px; }
  .societies { grid-template-columns: 1fr; }

  .banner { padding: 80px 0; }
  .banner__bg { background-attachment: scroll; }

  .contact { grid-template-columns: 1fr; gap: 40px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__info { text-align: center; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .cards { grid-template-columns: 1fr; }
  .tabs { display: flex; border-radius: 16px; }
  .tabs__btn { flex: 1 1 auto; padding: .7em 1em; }
  .hero__ctas .btn { width: 100%; }
  .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}
