/* ============================================
   Estrabismo BA — rediseño dinámico
   ============================================ */

:root {
  --blue: #75aadb;
  --blue-dark: #3f6fb0;
  --blue-darker: #2a4d80;
  --blue-pale: #eaf2fb;
  --ink: #1c2733;
  --ink-soft: #4a5a6a;
  --bg: #f7f9fb;
  --white: #ffffff;
  --border: #e2e9f0;
  --shadow: 0 10px 30px rgba(42, 77, 128, 0.10);
  --shadow-sm: 0 4px 14px rgba(42, 77, 128, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --wa: #25d366;
  --maxw: 1120px;
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--ink);
}

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--blue-dark); text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-dark);
  background: var(--blue-pale);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.section {
  padding: 88px 0;
}
.section--alt { background: var(--white); }
.section--tight { padding: 56px 0; }

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  padding: 14px 26px;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(42,77,128,.22); }
.btn-whatsapp { background: var(--wa); color: #fff; box-shadow: 0 10px 24px rgba(37,211,102,.28); }
.btn-whatsapp:hover { box-shadow: 0 14px 32px rgba(37,211,102,.36); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { background: transparent; border-color: var(--blue); color: var(--blue-dark); }
.btn-outline:hover { background: var(--blue-pale); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-sm { padding: 10px 18px; font-size: .85rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease;
}
.nav.scrolled { box-shadow: 0 4px 20px rgba(28,39,51,.06); }
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Poppins', sans-serif; }
.brand img { height: 34px; width: auto; }
.brand-text { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand-text span { color: var(--blue-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-family: 'Poppins', sans-serif;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 2px;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; left:0; right:0; bottom: -2px;
  height: 2px; background: var(--blue-dark);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 22px; height: 2px; background: var(--ink);
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -7px; width: 22px; height: 2px; background: var(--ink); }
.nav-toggle span::after { position: absolute; top: 7px; width: 22px; height: 2px; background: var(--ink); }
.nav.open .nav-toggle span { background: transparent; }
.nav.open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: flex-start;
    gap: 4px; padding: 14px 24px 22px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
  }
  .nav-links a { width: 100%; padding: 12px 0; }
  .nav.open .nav-links { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-primary.btn-sm { padding: 10px 16px; font-size: .82rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: #10202f;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(15,32,49,.92) 10%, rgba(24,58,92,.72) 55%, rgba(117,170,219,.45) 100%);
}
.hero .container { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 60px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-size: .8rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  padding: 7px 16px; border-radius: 100px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); max-width: 720px; color: #fff; }
.hero .lede { font-size: 1.15rem; color: rgba(255,255,255,.88); max-width: 560px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-meta { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-meta div strong { display: block; font-family: 'Poppins', sans-serif; font-size: 1.4rem; }
.hero-meta div span { font-size: .8rem; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .06em; }

/* small page hero (sub pages) */
.page-hero {
  position: relative; color: #fff; overflow: hidden;
  padding: 150px 0 70px; background: linear-gradient(120deg, var(--blue-darker), var(--blue-dark) 60%, var(--blue));
}
.page-hero::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.18), transparent 55%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero .eyebrow { background: rgba(255,255,255,.16); color: #fff; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 2.9rem); max-width: 680px; }
.page-hero p { color: rgba(255,255,255,.86); max-width: 600px; font-size: 1.05rem; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,.9); }

/* ---------- Cards / grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.icon-badge {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-dark);
  margin-bottom: 16px;
}
.icon-badge svg { width: 24px; height: 24px; }

/* ---------- Doctora summary ---------- */
.doc-card { display: flex; gap: 24px; align-items: flex-start; }
.doc-photo {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; border: 3px solid var(--blue-pale); box-shadow: var(--shadow-sm);
  background: var(--blue-pale);
}
.doc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; }
.doc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.tag {
  font-size: .78rem; font-weight: 600; color: var(--blue-dark);
  background: var(--blue-pale); padding: 5px 12px; border-radius: 100px;
}

/* ---------- FAQ / accordion (native details) ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1rem;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-pale); color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: transform .22s ease, background .22s ease;
}
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--blue); color: #fff; }
.faq .faq-body { padding: 0 22px 22px; color: var(--ink-soft); }
.faq .faq-body ul { margin: 0; padding-left: 18px; }
.faq .faq-body li { margin-bottom: 8px; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: linear-gradient(135deg, var(--blue-darker), var(--blue-dark));
  color: #fff; border-radius: var(--radius);
  padding: 44px; position: relative; overflow: hidden;
}
.testimonial::before {
  content: '”'; position: absolute; top: -30px; right: 24px;
  font-family: Georgia, serif; font-size: 11rem; color: rgba(255,255,255,.08);
}
.testimonial p.quote { font-size: 1.25rem; color: #fff; position: relative; z-index: 1; margin-bottom: 26px; }
.testimonial .who strong { display: block; font-family: 'Poppins', sans-serif; }
.testimonial .who span { font-size: .85rem; color: rgba(255,255,255,.75); }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}
.stat {
  background: var(--white); padding: 42px 20px; text-align: center;
}
.stat strong {
  display: block; font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem); color: var(--blue-dark);
}
.stat span { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Contact quick ---------- */
.contact-panel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-sm);
}
.contact-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact-row:last-child { border-bottom: none; }
.contact-row .icon-badge { margin-bottom: 0; }
.contact-row strong { display: block; font-family: 'Poppins', sans-serif; font-size: .95rem; }
.contact-row span, .contact-row a { color: var(--ink-soft); font-size: .92rem; }

.map-frame {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); height: 100%; min-height: 260px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 260px; border: 0; }

/* ---------- CV accordion page ---------- */
.cv-toc {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px;
}
.cv-toc a {
  font-size: .82rem; font-weight: 600; font-family: 'Poppins', sans-serif;
  background: var(--blue-pale); color: var(--blue-dark);
  padding: 8px 14px; border-radius: 100px;
}
.cv-group { margin-bottom: 16px; }
.cv-group summary .cat {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--blue-dark); display: block; margin-bottom: 2px; font-weight: 600;
}
.cv-body p, .cv-body li { font-size: .95rem; }
.cv-body ul { padding-left: 20px; }
.cv-body li { margin-bottom: 10px; }
.cv-fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; margin-bottom: 8px; }
.cv-fact-grid div strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 2px; }
.cv-fact-grid div span { font-size: .98rem; }
@media (max-width: 600px) { .cv-fact-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ----------
   Hidden state only applies once JS confirms it's running (html.js) AND the
   browser hasn't asked for reduced motion. If JS fails to load, or the user
   prefers reduced motion, content is shown immediately — never trapped at
   opacity:0. */
html.js:not(.reduced-motion) .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js:not(.reduced-motion) .reveal.in { opacity: 1; transform: translateY(0); }
html.js:not(.reduced-motion) .reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
html.js:not(.reduced-motion) .reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
html.js:not(.reduced-motion) .reveal-stagger.in > *:nth-child(1){transition-delay:.05s}
html.js:not(.reduced-motion) .reveal-stagger.in > *:nth-child(2){transition-delay:.15s}
html.js:not(.reduced-motion) .reveal-stagger.in > *:nth-child(3){transition-delay:.25s}
html.js:not(.reduced-motion) .reveal-stagger.in > *:nth-child(4){transition-delay:.35s}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(37,211,102,.42);
  animation: pulse 2.4s infinite;
}
.wa-float svg { width: 30px; height: 30px; }
@keyframes pulse {
  0% { box-shadow: 0 10px 28px rgba(37,211,102,.42), 0 0 0 0 rgba(37,211,102,.45); }
  70% { box-shadow: 0 10px 28px rgba(37,211,102,.42), 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 10px 28px rgba(37,211,102,.42), 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- Footer ---------- */
footer {
  background: #0f1e2c; color: rgba(255,255,255,.7); padding: 56px 0 26px;
}
footer .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
footer a { color: rgba(255,255,255,.7); }
footer a:hover { color: #fff; }
footer .brand-text, footer .brand-text span { color: #fff; }
footer p { color: rgba(255,255,255,.6); font-size: .92rem; }
footer .foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .92rem; }
footer .foot-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .82rem; color: rgba(255,255,255,.5);
}
footer .social { display: flex; gap: 12px; }
footer .social a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
}
footer .social a svg { width: 18px; height: 18px; }
@media (max-width: 800px) { footer .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

.section-cta {
  background: linear-gradient(120deg, var(--blue-darker), var(--blue-dark));
  border-radius: var(--radius); padding: 56px; text-align: center; color: #fff;
}
.section-cta h2 { color: #fff; }
.section-cta p { color: rgba(255,255,255,.85); max-width: 520px; margin-left: auto; margin-right: auto; }
.section-cta .hero-cta { justify-content: center; margin-bottom: 0; }

.badge-list { display: flex; flex-wrap: wrap; gap: 10px; }
