/* ===== Design tokens ===== */
:root {
  --navy-900: #101f30;
  --navy-800: #16324a;
  --navy-700: #1e4467;
  --navy-600: #294668; /* brand navy, sampled from clinic materials */
  --navy-100: #e8edf3;
  --gold: #e2ae00;      /* brand gold, sampled from clinic materials */
  --gold-dark: #b98c00;
  --ink: #1f2a37;
  --ink-soft: #55636f;
  --paper: #ffffff;
  --paper-alt: #f5f7fa;
  --border: #e3e8ee;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(16, 31, 48, 0.06);
  --shadow-md: 0 12px 30px rgba(16, 31, 48, 0.12);
  --header-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--navy-800); }
p { margin: 0 0 1em; }
.icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

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

section#inicio { scroll-margin-top: 0; }
section[id] { scroll-margin-top: var(--header-h); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-dark); box-shadow: var(--shadow-md); }
.btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--navy-600);
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { flex-shrink: 0; }
.brand-logo { height: 40px; width: auto; }

.main-nav { flex: 1; min-width: 0; }
.main-nav ul { display: flex; gap: 20px; justify-content: center; }
.nav-link {
  display: inline-block;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
  position: relative;
  padding: 6px 2px;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transition: right .2s ease;
}
.nav-link:hover { opacity: 1; }
.nav-link:hover::after { right: 0; }
.nav-link.active { opacity: 1; }
.nav-link.active::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.95;
}
.phone-pill .icon { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 0 auto; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 90px) 0 90px;
  background: radial-gradient(1100px 500px at 85% -10%, var(--navy-700) 0%, var(--navy-600) 45%, var(--navy-900) 100%);
  overflow: hidden;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: 0.6;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.7fr;
  align-items: center;
  gap: 40px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--gold); }
.hero-text h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  margin-bottom: 20px;
}
.hero-text h1 em { color: var(--gold); font-style: italic; }
.hero-lead {
  color: rgba(255,255,255,0.82);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.hero-badges li { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 0.9rem; font-weight: 500; opacity: 0.92; }
.hero-badges .icon { color: var(--gold); width: 18px; height: 18px; }

.hero-visual { display: flex; align-items: center; justify-content: center; }
.tooth-badge {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35), inset 0 0 0 12px rgba(255,255,255,0.03);
}
.tooth-badge img { width: 46%; opacity: 0.95; }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--paper-alt); }
.section-dark { background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #fff; }
.section-dark h2 { color: #fff; }

.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-lead { color: var(--ink-soft); font-size: 1.02rem; }
.section-dark .section-lead { color: rgba(255,255,255,0.75); }

/* ===== About / La Clínica ===== */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: start; }
.about-text p { color: var(--ink-soft); font-size: 1.02rem; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.feature-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--navy-100);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 24px; height: 24px; fill: var(--navy-600); }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ===== Tratamientos ===== */
.treatments-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.treatment-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.treatment-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.treatment-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy-600), var(--navy-800));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.treatment-icon svg { width: 26px; height: 26px; fill: #fff; }
.treatment-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.treatment-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* ===== Equipo ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 24px;
  justify-content: center;
  max-width: 620px;
  margin: 0 auto;
}
.team-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--paper);
  transition: transform .2s ease, box-shadow .2s ease;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-avatar {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.team-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.team-role { color: var(--navy-600); font-size: 0.82rem; font-weight: 600; margin-bottom: 14px; }
.team-quote { color: var(--ink-soft); font-size: 0.88rem; font-style: italic; margin: 0; }

/* ===== Promociones ===== */
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.promo-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.promo-card-gold { background: linear-gradient(160deg, var(--gold), var(--gold-dark)); border-color: transparent; }
.promo-card-gold h3, .promo-card-gold p, .promo-card-gold .promo-tag { color: var(--navy-900); }
.promo-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 12px;
}
.promo-card h3 { color: #fff; font-size: 1.15rem; margin-bottom: 10px; }
.promo-card p { color: rgba(255,255,255,0.75); margin: 0; font-size: 0.92rem; }

/* ===== Contacto ===== */
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 48px; align-items: start; }
.contact-form {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--paper-alt);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  background: #fff;
}
.checkbox-row { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }
.checkbox-row input { width: 16px; height: 16px; margin-top: 3px; flex-shrink: 0; }
.checkbox-row a { color: var(--navy-600); font-weight: 600; }
.form-note { font-size: 0.85rem; color: var(--navy-600); font-weight: 600; min-height: 1em; margin: 0; }

.contact-side { display: flex; flex-direction: column; gap: 24px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-item .icon { color: var(--gold-dark); background: var(--navy-100); padding: 8px; border-radius: 10px; width: 20px; height: 20px; box-sizing: content-box; color: var(--navy-600); }
.contact-info-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.contact-info-item p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.contact-info-item a:hover { color: var(--navy-600); }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.map-wrap iframe { display: block; }
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-600);
}
.map-link .icon { width: 16px; height: 16px; }
.map-link:hover { color: var(--gold-dark); }

/* ===== Footer ===== */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding: 64px 24px 48px;
}
.footer-logo { height: 34px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; max-width: 32ch; }
.footer-social { display: flex; gap: 12px; margin-top: 8px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.footer-social a:hover { background: var(--gold); }
.footer-social svg { width: 17px; height: 17px; fill: #fff; }
.footer-social a:hover svg { fill: var(--navy-900); }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; font-size: 0.82rem; }
.back-top {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
}
.back-top svg { width: 16px; height: 16px; fill: #fff; }
.back-top:hover { background: var(--gold); }
.back-top:hover svg { fill: var(--navy-900); }

/* ===== WhatsApp FAB ===== */
.whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  z-index: 900;
  transition: transform .2s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 30px; height: 30px; fill: #fff; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .main-nav ul { gap: 14px; }
  .nav-link { font-size: 0.85rem; }
  .header-actions { gap: 10px; }
  .phone-pill span { display: none; }
  .phone-pill { width: 38px; height: 38px; justify-content: center; background: rgba(255,255,255,0.1); border-radius: 50%; }
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .treatments-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--navy-600);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }
  .main-nav.is-open { max-height: 420px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .header-actions .phone-pill { display: none; }
  .nav-toggle { display: flex; }
  .brand-logo { height: 32px; }

  .hero { padding: calc(var(--header-h) + 50px) 0 60px; }
  .about-features { grid-template-columns: 1fr; }
  .treatments-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; padding: 48px 24px 32px; }
  .footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
}
