/* ==========================================================================
   Dr. Carlos Allende Castellanos — main.css
   Tokens: teal #1eb0b6, navy #3f5965, warm gold accent #d9a441
   ========================================================================== */

:root{
  --teal: #1eb0b6;
  --teal-dark: #128a90;
  --teal-tint: #e4f6f6;
  --navy: #3f5965;
  --navy-dark: #2a3e47;
  --bg: #f5f9f9;
  --bg-alt: #ffffff;
  --gold: #d9a441;
  --gold-dark: #b9832c;
  --ink: #223138;
  --ink-soft: #57707a;
  --border: #dbe7e8;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px -12px rgba(43, 63, 71, 0.18);
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 999;
}
.skip-link:focus{
  left: 16px;
  top: 16px;
}

:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3{
  font-family: var(--font-display);
  color: var(--navy-dark);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

.eyebrow{
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 0.6em;
}
.eyebrow.center{ text-align: center; }

.section-title{ font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-title.center{ text-align: center; }

.section-lead{
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 640px;
}
.section-lead.center{ text-align: center; margin: 0 auto 3rem; }

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-lg{ padding: 15px 28px; font-size: 1rem; }

.btn-primary{
  background: var(--gold);
  color: #2a2109;
  box-shadow: 0 8px 20px -6px rgba(217, 164, 65, 0.55);
}
.btn-primary:hover{ background: var(--gold-dark); }

.btn-outline{
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover{ background: var(--navy); color: #fff; }

.btn-ghost{
  color: var(--navy);
  padding: 12px 10px;
}

.btn-light{
  background: #fff;
  color: var(--teal-dark);
}
.btn-light:hover{ background: #eafafa; }

.btn-outline-light{
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline-light:hover{ background: rgba(255,255,255,0.15); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 249, 249, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border: 1px solid var(--border);
}
.brand-text{ display: flex; flex-direction: column; line-height: 1.2; }
.brand-name{ font-family: var(--font-display); font-weight: 600; color: var(--navy-dark); font-size: 1.05rem; }
.brand-role{ font-size: 0.78rem; color: var(--ink-soft); }

.main-nav{
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a{ color: var(--ink-soft); }
.main-nav a:hover{ color: var(--teal-dark); }

.header-actions{
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-phone{ display: none; }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 24px;
  height: 2px;
  background: var(--navy-dark);
  border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{ padding: 64px 0 40px; }

.hero-inner{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-title{
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 600;
}

.hero-lead{
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 52ch;
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 18px;
}
.hero-actions.center{ justify-content: center; }

.hero-fine{
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.hero-media{ position: relative; }
.hero-blob{
  position: absolute;
  inset: -6% -10%;
  background: radial-gradient(circle at 30% 30%, var(--teal-tint), transparent 70%),
              radial-gradient(circle at 70% 75%, rgba(63,89,101,0.12), transparent 65%);
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  z-index: 0;
}
.hero-photo{
  position: relative;
  z-index: 1;
  border-radius: 32px;
  box-shadow: var(--shadow);
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top;
}

/* Divider glyph (signature element, echoes logo motif) */
.divider{
  display: flex;
  justify-content: center;
  color: var(--teal);
  opacity: 0.55;
  padding: 8px 0 0;
}
.divider-glyph{ width: 160px; height: 32px; }

/* Surgery evidence band */
.surgery-band{
  background: var(--bg-alt);
}
.surgery-inner{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.surgery-photos{
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: end;
}
.surgery-photo{
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  width: 100%;
}
.surgery-photo-tall{
  aspect-ratio: 3/4;
}
.surgery-photo-short{
  aspect-ratio: 3/4;
  transform: translateY(28px);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section{ padding: 72px 0; }
.section-alt{ background: var(--bg-alt); }

/* About */
.about-inner{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 52px;
  align-items: center;
}
.about-photo{
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top;
}
.about-text{ color: var(--ink-soft); }

.credentials-list{
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.credentials-list li{
  padding-left: 0;
  border-left: 3px solid var(--teal);
  padding-left: 14px;
  font-size: 0.95rem;
  color: var(--ink);
}
.credential-year{
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-dark);
  margin-right: 8px;
}
.cedula{
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* Stats band */
.stats-band{
  background: var(--navy-dark);
  color: #fff;
  padding: 44px 0;
}
.stats-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-number{
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--teal);
}
.stat-label{
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

/* Services */
.services-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card{
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.service-icon{
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--teal-tint);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.service-icon svg{ width: 28px; height: 28px; }
.service-card h3{ font-size: 1.1rem; margin-bottom: 8px; }
.service-card p{ color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Locations */
.locations-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.location-card{
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.location-card h3{ font-size: 1.1rem; }
.location-address{ color: var(--ink-soft); margin-bottom: 16px; }
.map-embed{
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/10;
}
.map-embed iframe{
  width: 100%;
  height: 100%;
  border: 0;
}

/* Insurance */
.insurance-columns{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 820px;
  margin: 0 auto;
}
.insurance-col-title{
  font-size: 1rem;
  color: var(--teal-dark);
}
.insurance-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insurance-list li{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  border: 1px solid var(--border);
}
.insurer-badge{
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.insurance-note{
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.insurance-note a{
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: underline;
}

/* Testimonials */
.testimonials-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.testimonial-card{
  margin: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.testimonial-card p{ margin: 0 0 10px; }
.stars{ color: var(--gold); letter-spacing: 2px; font-size: 0.9rem; }
.testimonial-card footer{
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* CTA band */
.cta-band{
  background: linear-gradient(120deg, var(--teal), var(--teal-dark));
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta-band h2{ color: #fff; }
.cta-band p{ color: rgba(255,255,255,0.9); margin-bottom: 8px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  padding: 56px 0 24px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand{ display: flex; flex-direction: column; gap: 12px; }
.footer-logo-full{
  width: 100%;
  max-width: 220px;
  height: auto;
}
.footer-col h3{
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.footer-col p{ margin: 0 0 8px; font-size: 0.9rem; }
.footer-col a:hover{ color: var(--teal); }

.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

/* Floating WhatsApp button */
.whatsapp-float{
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.35);
  z-index: 40;
}
.whatsapp-float svg{ width: 28px; height: 28px; fill: #fff; }
.whatsapp-float:hover{ transform: scale(1.06); }

/* Legal pages (aviso de privacidad, etc.) */
.legal-content{
  max-width: 760px;
}
.legal-updated{
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.legal-content h2{
  font-size: 1.25rem;
  margin-top: 2.2em;
}
.legal-content p, .legal-content li{
  color: var(--ink-soft);
}
.legal-content ul{
  padding-left: 1.2em;
}
.legal-content li{
  margin-bottom: 0.4em;
}
.legal-content a{
  color: var(--teal-dark);
  text-decoration: underline;
  font-weight: 600;
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 861px){
  .header-phone{ display: inline-flex; }
}

@media (max-width: 960px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-grid{ grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px){
  .main-nav{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .main-nav.is-open{ display: flex; }
  .nav-toggle{ display: flex; }

  .hero-inner{ grid-template-columns: 1fr; }
  .hero-media{ order: -1; max-width: 360px; margin: 0 auto; }

  .about-inner{ grid-template-columns: 1fr; }
  .about-media{ max-width: 360px; margin: 0 auto; }

  .surgery-inner{ grid-template-columns: 1fr; }
  .surgery-photo-short{ transform: none; }

  .locations-grid{ grid-template-columns: 1fr; }
  .insurance-columns{ grid-template-columns: 1fr; }
  .testimonials-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 600px){
  .services-grid{ grid-template-columns: 1fr; }
  .stats-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
  .hero-actions{ flex-direction: column; align-items: stretch; }
  .hero-actions .btn{ width: 100%; }
}
