/* =========================================================
   Clínica Dental Sonrisa — hoja de estilos
   Paleta médica limpia (teal + navy + blanco). Diseño formal.
   ========================================================= */

/* ---------- 0. Tokens ---------- */
:root {
  /* Color */
  --teal:        #0e7c86;   /* acento principal */
  --teal-dark:   #0a5c64;
  --teal-soft:   #e3f2f3;
  --navy:        #0f2c3a;   /* texto fuerte / titulares */
  --ink:         #33454f;   /* texto de párrafo */
  --muted:       #6b7c85;
  --line:        #e2e9ec;
  --bg:          #ffffff;
  --bg-soft:     #f5fafb;
  --wa:          #25d366;

  /* Tipografía */
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Medidas */
  --wrap: 1160px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 30px -12px rgba(15, 44, 58, .18);
  --shadow-sm: 0 6px 18px -10px rgba(15, 44, 58, .22);
  --header-h: 72px;
}

/* ---------- 1. Reset ligero ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

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

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; font-weight: 600; }

.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

/* ---------- 2. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--lg { padding: .85rem 1.8rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--teal-dark); }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #1fbe5a; }

/* ---------- 3. Barra superior ---------- */
.topbar {
  background: var(--navy); color: #cfe3e6; font-size: .82rem;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 1rem; }
.topbar__items { display: flex; gap: 1.3rem; align-items: center; }
.topbar__item { color: #cfe3e6; }
.topbar a.topbar__item:hover { color: #fff; }

/* ---------- 4. Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand__mark { color: var(--teal); display: inline-flex; }
.brand__text { font-family: var(--font-head); font-weight: 500; color: var(--navy); font-size: 1.12rem; }
.brand__text strong { color: var(--teal); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav__list { display: flex; gap: 1.4rem; align-items: center; }
.nav__list a { color: var(--ink); font-weight: 500; font-size: .95rem; position: relative; padding: .3rem 0; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--teal); transition: width .2s ease;
}
.nav__list a:hover { color: var(--navy); }
.nav__list a:hover::after { width: 100%; }

/* botón hamburguesa */
.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Utilidades de sección ---------- */
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: .6rem;
}
.eyebrow--light { color: var(--teal); }
.section__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.section__sub { color: var(--muted); margin-top: .8rem; }

.pill {
  display: inline-block; background: var(--teal-soft); color: var(--teal-dark);
  font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.1rem;
}

/* ---------- 6. Portada ---------- */
.hero { padding: 64px 0 72px; background:
  radial-gradient(1200px 500px at 80% -10%, var(--teal-soft), transparent 60%); }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero__title { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; }
.hero__lead { color: var(--ink); font-size: 1.08rem; margin-top: 1.1rem; max-width: 42ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero__points { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.6rem; color: var(--navy); font-weight: 500; font-size: .92rem; }

.hero__media { position: relative; }
.hero__media img {
  width: 100%; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow);
  max-height: 520px;
}
.hero__badge {
  position: absolute; left: -14px; bottom: 28px; background: #fff; border-radius: var(--radius);
  padding: .8rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
  border: 1px solid var(--line);
}
.hero__badge strong { font-family: var(--font-head); color: var(--teal); font-size: 1.3rem; }
.hero__badge span { font-size: .78rem; color: var(--muted); }
.hero__badge em { font-style: normal; opacity: .7; }

/* ---------- 7. Tira de confianza ---------- */
.trust { border-block: 1px solid var(--line); background: #fff; }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding: 34px 20px; }
.trust__item { display: flex; gap: .8rem; align-items: flex-start; }
.trust__icon { font-size: 1.5rem; line-height: 1; }
.trust__item strong { font-family: var(--font-head); color: var(--navy); display: block; font-size: .98rem; }
.trust__item p { color: var(--muted); font-size: .86rem; margin-top: .15rem; }

/* ---------- 8. Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal-soft); }
.service__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; background: var(--teal-soft);
  font-size: 1.5rem; margin-bottom: 1rem;
}
.service h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.service p { color: var(--muted); font-size: .9rem; }
.service--accent { background: var(--teal); border-color: var(--teal); }
.service--accent h3, .service--accent p { color: #fff; }
.service--accent .service__icon { background: rgba(255,255,255,.2); }
.service--accent p { color: #e3f2f3; }

/* ---------- 9. Nosotros ---------- */
.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.about__media img { width: 100%; border-radius: 20px; box-shadow: var(--shadow); object-fit: cover; }
.about__content > p { margin-top: 1rem; color: var(--ink); }
.about__content .eyebrow { margin-top: 0; }
.about__list { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.2rem; margin: 1.4rem 0 1.8rem; }
.about__list li { position: relative; padding-left: 1.6rem; color: var(--navy); font-weight: 500; font-size: .95rem; }
.about__list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

/* ---------- 10. Por qué elegirnos ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.feature__num { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: var(--teal-soft); -webkit-text-stroke: 1px var(--teal); }
.feature h3 { font-size: 1.05rem; margin: .6rem 0 .4rem; }
.feature p { color: var(--muted); font-size: .9rem; }

/* ---------- 11. Métricas ---------- */
.stats { background: var(--navy); color: #fff; padding: 56px 0; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; }
.stat__suffix { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: #4bd0d8; }
.stat p { color: #a9c4c9; font-size: .9rem; margin-top: .3rem; }

/* ---------- 12. Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px; position: relative; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--teal); color: #fff; font-family: var(--font-head);
  font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .9rem; }

/* ---------- 13. Agendar cita ---------- */
.booking { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.booking__info .section__title { margin-top: .2rem; }
.booking__info > p { color: var(--ink); margin-top: 1rem; }
.booking__contact { margin: 1.4rem 0; display: grid; gap: .5rem; }
.booking__contact li { color: var(--navy); font-weight: 500; }
.booking__contact a:hover { color: var(--teal); }

.form { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: .35rem; font-family: var(--font-head); }
.field input, .field select, .field textarea {
  font: inherit; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
.field textarea { resize: vertical; }
.field__error { color: #d64545; font-size: .78rem; margin-top: .3rem; min-height: 1em; }
.field--invalid input, .field--invalid select { border-color: #d64545; }
.form__note { color: var(--muted); font-size: .82rem; margin-top: .8rem; text-align: center; }
.form__note.is-ok { color: var(--teal-dark); font-weight: 600; }

/* ---------- 14. Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: stretch; }
.contact__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact__icon { font-size: 1.5rem; }
.contact__card h3 { font-size: 1rem; margin: .5rem 0 .3rem; }
.contact__card p { color: var(--muted); font-size: .9rem; }
.contact__card a:hover { color: var(--teal); }
.contact__map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 320px; }
.contact__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- 15. Pie ---------- */
.footer { background: var(--navy); color: #b9d0d5; padding-top: 56px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.footer .brand__text { color: #fff; }
.footer .brand__text strong { color: #4bd0d8; }
.footer__brand p { margin-top: .8rem; font-size: .9rem; max-width: 34ch; }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer__col ul { display: grid; gap: .55rem; }
.footer__col a:hover { color: #fff; }
.footer__col li { font-size: .9rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem; color: #8fabb1; }
.footer__note { opacity: .8; }

/* ---------- 16. WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(37,211,102,.6); transition: transform .18s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* =========================================================
   17. Responsivo
   ========================================================= */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 480px; }
  .trust__grid { grid-template-columns: 1fr 1fr; }
  .services, .features, .steps, .stats__grid { grid-template-columns: 1fr 1fr; }
  .about, .booking, .contact { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  /* Nav móvil */
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0 16px;
    transform: translateY(-120%); transition: transform .28s ease; box-shadow: var(--shadow);
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list { flex-direction: column; width: 100%; gap: 0; }
  .nav__list li { width: 100%; }
  .nav__list a { display: block; padding: .9rem 20px; width: 100%; }
  .nav__list a::after { display: none; }
  .nav__cta { margin: 10px 20px 0; }
  .nav__toggle { display: flex; }
  .topbar__hide-sm { display: none; }
}

@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .trust__grid, .services, .features, .steps, .stats__grid,
  .about__list, .contact__cards, .form__row, .footer__inner { grid-template-columns: 1fr; }
  .hero__badge { left: 8px; }
  .form { padding: 22px; }
  .footer__bottom-inner { flex-direction: column; }
}

/* ---------- 18. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
