/* =====================================================
   AB Dental — Tema clínico sobre Bootstrap 5.3
   Fuente: DM Sans · Paleta: slate + sky-blue
   ===================================================== */

/* -------- Variables -------- */
:root {
  --ab-dark: #1e293b;
  --ab-text: #334155;
  --ab-muted: #64748b;
  --ab-soft: #94a3b8;
  --ab-line: #e2e8f0;
  --ab-bg: #f8fafc;
  --ab-sky: #0284c7;
  --ab-sky-light: #e0f2fe;
  --ab-sky-dark: #0369a1;
  --ab-font: "DM Sans", system-ui, -apple-system, sans-serif;
}

/* -------- Global -------- */
body {
  font-family: var(--ab-font);
  font-size: 15px;
  color: var(--ab-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ab-sky-dark); transition: color .2s; }
a:hover { color: var(--ab-sky); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(2,132,199,.15); }

/* -------- Tipografía -------- */
h1,h2,h3,h4,h5,h6 { font-family: var(--ab-font); color: var(--ab-dark); }
h1 { font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
h2 { font-weight: 300; letter-spacing: -.02em; line-height: 1.15; }
h3 { font-weight: 500; font-size: 1.15rem; line-height: 1.3; }
h4 { font-weight: 500; font-size: 1rem; }
.display-title { font-size: clamp(2.2rem,5vw,3.4rem); font-weight: 300; letter-spacing: -.03em; line-height: 1.08; }
.display-title strong { font-weight: 400; color: var(--ab-sky-dark); }
.section-title { font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 300; letter-spacing: -.02em; }
.lead { font-size: 1rem; color: var(--ab-muted); font-weight: 400; line-height: 1.7; }
.text-muted { color: var(--ab-muted) !important; }

/* -------- Topbar -------- */
.topbar {
  background: var(--ab-dark);
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  padding: .5rem 0;
}
.topbar a { color: rgba(255,255,255,.9); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .fa { color: #38bdf8; margin-right: .2rem; }

/* -------- Navbar -------- */
.navbar { padding-top: .75rem; padding-bottom: .75rem; }
.navbar-brand { display: flex; align-items: center; gap: .5rem; }
.navbar-brand img { height: 44px; width: auto; }
.navbar-brand .brand-text { display: none !important; }

.navbar-nav .nav-link {
  color: var(--ab-text);
  font-size: .88rem;
  font-weight: 400;
  padding: .5rem .8rem;
  border-radius: 8px;
  transition: background .2s, color .2s;
  position: relative;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus { background: var(--ab-sky-light); color: var(--ab-sky-dark); }
.navbar-nav .nav-link.active { color: var(--ab-sky-dark); font-weight: 500; }
.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: .8rem; right: .8rem;
  height: 2px;
  background: var(--ab-sky);
  border-radius: 2px;
}
.navbar .btn-cta {
  background: var(--ab-sky);
  color: #fff;
  border: 0;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 500;
  padding: .55rem 1.2rem;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.navbar .btn-cta:hover { background: var(--ab-sky-dark); color: #fff; transform: translateY(-1px); }

/* Toggler */
.navbar-toggler { border-color: var(--ab-line); border-radius: 8px; padding: .4rem .6rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(2,132,199,.2); }

/* -------- Botones -------- */
.btn-primary { background: var(--ab-sky); border-color: var(--ab-sky); border-radius: 50px; font-weight: 500; padding: .7rem 1.4rem; transition: all .2s; }
.btn-primary:hover { background: var(--ab-sky-dark); border-color: var(--ab-sky-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2,132,199,.25); }
.btn-outline-secondary { border-radius: 50px; border-color: var(--ab-line); color: var(--ab-text); font-weight: 500; padding: .7rem 1.4rem; }
.btn-outline-secondary:hover { border-color: var(--ab-sky); color: var(--ab-sky-dark); background: var(--ab-sky-light); }
.btn-success { background: #25d366; border-color: #25d366; border-radius: 50px; font-weight: 500; padding: .7rem 1.4rem; }
.btn-success:hover { background: #1fb855; border-color: #1fb855; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn .fa { margin-right: .3rem; }

/* -------- Secciones -------- */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-muted { background: var(--ab-bg); border-top: 1px solid var(--ab-line); border-bottom: 1px solid var(--ab-line); }
.section-dark { background: var(--ab-dark); color: rgba(255,255,255,.85); }
.section-dark h2,.section-dark h3,.section-dark h4,.section-dark strong { color: #fff; }

/* -------- Eyebrow -------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ab-sky-dark);
  background: var(--ab-sky-light);
  border: 1px solid rgba(2,132,199,.15);
  border-radius: 50px;
  padding: .35rem .8rem;
  margin-bottom: .75rem;
}

/* -------- Cards -------- */
.card { border: 1px solid var(--ab-line); border-radius: 14px; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(30,41,59,.08); border-color: #bae6fd; }
.card-body h3 { margin-bottom: .4rem; }
.card-body p { color: var(--ab-muted); font-size: .9rem; margin-bottom: .5rem; }
/* --- Card images: alturas fijas + fondo de respaldo --- */
.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: var(--ab-bg);
}
/* Especialidades grid (4 cols) */
.card-service .card-img-top { height: 170px; }
/* Team cards (retratos completos) */
.team-card .card-img-top {
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

/* Imágenes pequeñas/íconos: no estirar, centrar en contenedor */
.card-service .card-img-top[src$="endodoncia.webp"],
.card-service .card-img-top[src$="periodoncia.webp"],
.card-service .card-img-top[src$="rehabilitacion.webp"],
.card-service .card-img-top[src$="esteticafacial.webp"],
.card-service .card-img-top[src$="odontologia.webp"] {
  object-fit: contain;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--ab-sky-light), var(--ab-bg));
}

/* Responsive */
@media(max-width:575.98px) {
  .card-img-top { height: 160px; }
  .card-service .card-img-top { height: 140px; }
  .team-card .card-img-top { aspect-ratio: 4 / 5; }
}

.card .badge { font-size: .7rem; font-weight: 500; letter-spacing: .03em; }
.bg-sky-light { background: var(--ab-sky-light) !important; color: var(--ab-sky-dark) !important; }

.team-card .badge { margin-bottom: .5rem; }

/* Feature card */
.feature-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ab-sky-light); color: var(--ab-sky-dark);
  border-radius: 12px; font-size: 1.1rem; margin-bottom: .75rem;
}

/* -------- Hero -------- */
.hero { padding: 3.5rem 0; background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%); }
.hero .display-title { margin-bottom: 1rem; }
.hero .lead { margin-bottom: 1.5rem; max-width: 32rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin-top: 1.5rem; font-size: .88rem; color: var(--ab-text); }
.hero-points .fa { color: var(--ab-sky); margin-right: .25rem; }
.hero-img { border-radius: 18px; overflow: hidden; box-shadow: 0 12px 40px rgba(30,41,59,.1); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; min-height: 380px; }

/* Carousel dentro del hero */
.hero-img .carousel-item img { width: 100%; height: 480px; object-fit: cover; }
@media(max-width:767.98px){ .hero-img .carousel-item img { height: 320px; } }
.hero-img .carousel-indicators [data-bs-target] { width: 8px; height: 8px; border-radius: 50%; }
.hero-img .carousel-indicators .active { width: 20px; border-radius: 10px; }

/* -------- Trust bar -------- */
.trust-bar { padding: 1.5rem 0; background: var(--ab-bg); border-top: 1px solid var(--ab-line); border-bottom: 1px solid var(--ab-line); }
.trust-item { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--ab-text); }
.trust-item .fa { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--ab-sky-light); color: var(--ab-sky); border-radius: 50%; font-size: .95rem; flex-shrink: 0; }

/* -------- CTA panel -------- */
.cta-panel {
  background: var(--ab-dark);
  color: rgba(255,255,255,.85);
  border-radius: 16px;
  padding: 2rem;
}
.cta-panel h2,.cta-panel h3 { color: #fff; }
.cta-panel p { color: rgba(255,255,255,.7); }
.cta-panel .eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #7dd3fc; }

/* -------- FAQ -------- */
.faq-section .accordion-item { border: 1px solid var(--ab-line); border-radius: 10px !important; margin-bottom: .5rem; overflow: hidden; }
.faq-section .accordion-button { font-size: .95rem; font-weight: 500; color: var(--ab-dark); background: #fff; padding: 1rem 1.25rem; }
.faq-section .accordion-button:not(.collapsed) { background: var(--ab-sky-light); color: var(--ab-sky-dark); box-shadow: none; }
.faq-section .accordion-button:focus { box-shadow: none; border-color: var(--ab-sky); }
.faq-section .accordion-body { font-size: .9rem; color: var(--ab-muted); padding: .5rem 1.25rem 1rem; }

/* -------- Breadcrumb -------- */
.breadcrumb { font-size: .82rem; margin-bottom: 1rem; }
.breadcrumb-item a { color: var(--ab-muted); }
.breadcrumb-item.active { color: var(--ab-text); }

/* -------- Forms -------- */
.form-label { font-size: .85rem; font-weight: 500; color: var(--ab-dark); }
.form-control,.form-select {
  border-radius: 10px; border-color: var(--ab-line); font-size: .92rem;
  padding: .65rem .9rem; transition: border-color .2s, box-shadow .2s;
}
.form-control:focus,.form-select:focus {
  border-color: var(--ab-sky);
  box-shadow: 0 0 0 3px rgba(2,132,199,.12);
}
textarea.form-control { min-height: 120px; }

/* -------- Check list -------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.5rem; margin-bottom: .5rem; font-size: .92rem; color: var(--ab-muted); }
.check-list li::before { content: '\f00c'; font-family: FontAwesome; position: absolute; left: 0; top: .15rem; color: var(--ab-sky); font-size: .8rem; }

/* -------- Pill / tag -------- */
.pill { display: inline-block; font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; padding: .3rem .7rem; border-radius: 50px; background: var(--ab-sky-light); color: var(--ab-sky-dark); border: 1px solid rgba(2,132,199,.12); text-decoration: none; }
.pill:hover { background: var(--ab-sky); color: #fff; text-decoration: none; }

/* -------- Map -------- */
.map-frame { width: 100%; min-height: 300px; border: 0; border-radius: 12px; }

/* -------- Footer -------- */
.site-footer {
  background: var(--ab-dark);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 1.5rem;
  margin-top: 3rem;
}
.site-footer h5 { color: #fff; font-size: .95rem; font-weight: 500; margin-bottom: .8rem; }
.site-footer a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .88rem; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-links { display: flex; flex-direction: column; gap: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.2rem; margin-top: 2rem; font-size: .8rem; color: rgba(255,255,255,.5); }
.footer-brand { font-size: 1.4rem; font-weight: 400; color: #fff; margin-bottom: .4rem; letter-spacing: -.01em; }

/* Social */
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; transition: background .2s; }
.social-link:hover { background: var(--ab-sky); color: #fff; }

/* -------- WhatsApp float -------- */
.wa-float {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 1050;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(37,211,102,.45); color: #fff; }

/* -------- Mobile CTA bar -------- */
.mobile-cta {
  display: none;
  position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 1045;
  background: rgba(30,41,59,.95); backdrop-filter: blur(10px);
  border-radius: 14px; padding: .5rem; gap: .4rem;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 32px rgba(15,23,42,.2);
}
.mobile-cta a { flex: 1; display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .65rem .3rem; border-radius: 10px; font-size: .78rem; font-weight: 500; color: #fff; text-decoration: none; }
.mobile-cta .mc-call { background: rgba(255,255,255,.08); }
.mobile-cta .mc-wa { background: #25d366; }
.mobile-cta .mc-book { background: var(--ab-sky); }
@media(max-width:767.98px){
  .mobile-cta { display: flex; }
  .wa-float { bottom: 5rem; }
  body { padding-bottom: 4.5rem; }
}

/* -------- 404 -------- */
.error-page { min-height: 60vh; display: flex; align-items: center; }
.error-code { font-size: clamp(5rem,15vw,9rem); font-weight: 300; color: var(--ab-dark); line-height: .85; }

/* -------- Legal -------- */
.legal-content h2 { font-size: 1.15rem; font-weight: 500; margin-top: 1.8rem; }
.legal-content p,.legal-content li { font-size: .92rem; color: var(--ab-text); line-height: 1.75; }

/* -------- Reveal -------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media(prefers-reduced-motion:reduce){ .reveal { opacity: 1; transform: none; transition: none; } }

/* -------- Utilities -------- */
.gap-3 { gap: 1rem !important; }
.rounded-4 { border-radius: 14px !important; }
