/* Clínica Dental San Rafael — estilos */
:root {
  --navy: #0d1b36;
  --blue: #2751a3;
  --teal: #2fd3bf;
  --sky: #55d3f5;
  --green: #67bd31;
  --green-dark: #56a126;
  --text: #20303c;
  --muted: #5b6770;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 27, 54, 0.08);
  --max: 1160px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: "Roboto", Arial, sans-serif; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); color: var(--blue); font-weight: 700; }
h3 { font-size: 1.2rem; color: var(--navy); font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-family: "Roboto", Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  color: #fff;
  background: var(--green);
  border: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn--outline { background: transparent; border: 2px solid currentColor; color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(13,27,54,.08);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo img { height: 50px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; }
.nav a {
  font-family: "Roboto", Arial, sans-serif; font-size: .95rem; color: var(--navy);
  text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); border-color: var(--teal); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--navy); margin: 6px 0; transition: .3s; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav.open { max-height: 400px; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 20px 20px; }
  .nav a { display: block; padding: 12px 0; border-bottom: 1px solid #eef1f4; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff;
  background: var(--navy) url("../img/hero-clinica.webp") center / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,27,54,.55), rgba(13,27,54,.7)); }
.hero .container { position: relative; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; margin-bottom: .2em; }
.hero .tag { font-family: "Roboto", Arial, sans-serif; font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 300; letter-spacing: .04em; color: var(--sky); margin-bottom: 2em; }
.hero--small { min-height: 60vh; }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-text .block + .block { margin-top: 36px; padding-top: 36px; border-top: 1px solid #e3e8ee; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 36px; } }

/* Carrusel */
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--bg-soft); }
.carousel-track { display: flex; height: 100%; transition: transform .6s ease; }
.carousel-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.carousel-dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.6); cursor: pointer; }
.carousel-dots button[aria-current="true"] { background: #fff; transform: scale(1.2); }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--navy); font-size: 1.3rem; line-height: 1;
}
.carousel-arrow.prev { left: 12px; } .carousel-arrow.next { right: 12px; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.service {
  background: #fff; border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow);
  border-top: 4px solid var(--teal); transition: transform .2s;
}
.service:nth-child(even) { border-top-color: var(--sky); }
.service:hover { transform: translateY(-4px); }
.service .icon { width: 46px; height: 46px; border-radius: 12px; background: #e7f8fb; color: var(--blue); display: grid; place-items: center; margin-bottom: 16px; }
.service .icon svg { width: 26px; height: 26px; }
.service p { color: var(--muted); font-size: .95rem; margin: 0; }
.center { text-align: center; margin-top: 48px; }

/* ---------- Promoción ---------- */
.promo { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.promo img { border-radius: var(--radius); box-shadow: var(--shadow); }
.promo .price { font-family: "Roboto", Arial, sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--blue); margin: 0; }
.promo .old { color: var(--muted); text-decoration: line-through; margin-bottom: 1.4em; }
@media (max-width: 900px) { .promo { grid-template-columns: 1fr; } }

/* ---------- Redes ---------- */
.socials { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.social {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 200px; padding: 32px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
  text-decoration: none; color: var(--navy); font-family: "Roboto", Arial, sans-serif; font-weight: 500;
  transition: transform .2s;
}
.social:hover { transform: translateY(-4px); }
.social svg { width: 48px; height: 48px; }
.social small { color: var(--muted); font-weight: 400; font-family: "Lato", Arial, sans-serif; }

/* ---------- Horario y ubicación ---------- */
.location { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: stretch; }
.hours { list-style: none; padding: 0; margin: 0 0 24px; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #e3e8ee; }
.hours strong { color: var(--navy); }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 360px; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
@media (max-width: 900px) { .location { grid-template-columns: 1fr; } }

/* ---------- Página 404 ---------- */
.not-found { text-align: center; min-height: 60vh; display: flex; align-items: center; }
.not-found .container { max-width: 640px; }
.not-found .code { font-family: "Roboto", Arial, sans-serif; font-size: clamp(4rem, 14vw, 7rem); font-weight: 700; line-height: 1; color: var(--teal); margin: 0 0 .1em; }
.not-found h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--navy); }
.not-found p { color: var(--muted); }
.not-found .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.site-footer .copy:only-child { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d3e0; padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer a { color: #c9d3e0; text-decoration: none; }
.site-footer a:hover { color: var(--sky); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-logo { background: #fff; border-radius: 10px; padding: 10px 14px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 40px; width: auto; }
.copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; text-align: center; font-size: .85rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 34px; height: 34px; fill: #fff; }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .carousel-track { transition: none; }
}
