/* =========================================================
   Collazos Odontología Integral — Hoja de estilos
   Mobile-first · Estética médica (blanco, azul, gris claro)
   ========================================================= */

:root {
  --blue-900: #084b7d;
  --blue-700: #0a6ebd;
  --blue-600: #1480d6;
  --blue-500: #2b95e6;
  --blue-100: #e3f1fb;
  --blue-50:  #f2f8fd;

  --gray-900: #1f2a37;
  --gray-700: #46566b;
  --gray-500: #6b7a8d;
  --gray-300: #d4dce5;
  --gray-200: #e7edf3;
  --gray-100: #f4f7fa;
  --white: #ffffff;

  --green: #25d366; /* WhatsApp */

  --shadow-sm: 0 2px 8px rgba(16, 60, 100, .06);
  --shadow-md: 0 10px 30px rgba(16, 60, 100, .10);
  --shadow-lg: 0 20px 50px rgba(16, 60, 100, .16);

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1160px;

  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --header-h: 68px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--blue-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue-900); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--gray-900); line-height: 1.2; font-weight: 600; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, color .2s;
  text-align: center; line-height: 1.1;
}
.btn--primary { background: var(--blue-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--blue-900); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--blue-700); border-color: var(--blue-100); }
.btn--ghost:hover { background: var(--blue-50); color: var(--blue-900); }
.btn--white { background: #fff; color: var(--blue-700); }
.btn--white:hover { background: var(--blue-50); transform: translateY(-2px); }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Topbar ---------- */
.topbar { background: var(--blue-900); color: #cfe6f8; font-size: .82rem; }
.topbar__inner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 7px 20px; text-align: center; }
.topbar__item { color: #d4e9fa; white-space: nowrap; }
.topbar__sep { opacity: .5; }
.topbar__phone { font-weight: 600; color: #fff; }
.topbar__phone:hover { color: #fff; text-decoration: underline; }
.topbar__hours { display: none; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-200); transition: box-shadow .25s;
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__icon { font-size: 1.7rem; line-height: 1; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-family: var(--font-head); font-size: 1.18rem; color: var(--blue-900); font-weight: 700; letter-spacing: -.2px; }
.brand__text small { font-size: .68rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1.5px; }
.brand--light .brand__text strong { color: #fff; }
.brand--light .brand__text small { color: #9cc4e4; }

/* Nav */
.nav { display: flex; align-items: center; gap: 26px; }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__list a { color: var(--gray-700); font-weight: 500; font-size: .96rem; position: relative; }
.nav__list a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--blue-700); transition: width .25s; }
.nav__list a:hover { color: var(--blue-900); }
.nav__list a:hover::after { width: 100%; }
.nav__close, .nav__cta { display: none; }

.nav__toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; }
.nav__toggle span { display: block; height: 3px; width: 26px; background: var(--blue-900); border-radius: 3px; transition: .3s; }

@media (min-width: 901px) { .nav__toggle { display: none; } }

/* Mobile nav */
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(82%, 340px); height: 100vh;
    background: #fff; flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0; padding: 78px 28px 28px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .32s ease; z-index: 120;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--gray-200); }
  .nav__list a { display: block; padding: 15px 4px; font-size: 1.05rem; }
  .nav__list a::after { display: none; }
  .nav__cta { display: inline-flex; margin-top: 24px; }
  .nav__close { display: block; position: absolute; top: 18px; right: 22px; font-size: 2rem; line-height: 1; background: none; border: none; color: var(--gray-700); cursor: pointer; }
  body.nav-open { overflow: hidden; }
  /* Raise the header (and the drawer it contains) above the body-level backdrop,
     so the menu links sit on top of the overlay and remain tappable. */
  body.nav-open .header { z-index: 150; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(15,40,65,.45); z-index: 110; opacity: 0; visibility: hidden; transition: .3s; }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, var(--blue-50) 0%, #fff 60%); padding: 38px 0 56px; }
.hero__inner { display: grid; gap: 34px; align-items: center; }
.hero__badge { display: inline-block; background: var(--blue-100); color: var(--blue-900); font-weight: 600; font-size: .8rem; padding: 7px 15px; border-radius: 999px; margin-bottom: 16px; }
.hero__title { font-size: clamp(1.85rem, 6vw, 3rem); font-weight: 700; color: var(--gray-900); margin-bottom: 16px; letter-spacing: -.5px; }
.hero__text { font-size: 1.06rem; max-width: 560px; margin-bottom: 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero__points { display: grid; gap: 8px; }
.hero__points li { color: var(--gray-700); font-weight: 500; font-size: .95rem; }

.hero__media { position: relative; justify-self: center; max-width: 460px; width: 100%; }
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 1/1; width: 100%; }
.hero__floatcard {
  position: absolute; bottom: -16px; left: -8px; background: #fff; border-radius: var(--radius);
  padding: 12px 18px; box-shadow: var(--shadow-md); display: flex; flex-direction: column;
  border: 1px solid var(--gray-200);
}
.hero__floatcard strong { color: var(--blue-700); font-family: var(--font-head); font-size: 1.15rem; }
.hero__floatcard span { font-size: .8rem; color: var(--gray-500); }

/* ---------- Trust ---------- */
.trust { padding: 40px 0; background: #fff; }
.trust__grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.trust__item { background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 24px 20px; text-align: center; transition: transform .2s, box-shadow .2s; }
.trust__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.trust__icon { font-size: 2.1rem; display: block; margin-bottom: 10px; }
.trust__item h3 { font-size: 1.08rem; margin-bottom: 6px; color: var(--blue-900); }
.trust__item p { font-size: .9rem; color: var(--gray-500); }

/* ---------- Secciones genéricas ---------- */
.section { padding: 60px 0; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section__head--left { text-align: left; margin-inline: 0; }
.section__eyebrow { display: inline-block; color: var(--blue-700); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.section__title { font-size: clamp(1.55rem, 4.5vw, 2.3rem); color: var(--gray-900); margin-bottom: 14px; letter-spacing: -.4px; }
.section__sub { color: var(--gray-500); font-size: 1.02rem; }
.section__cta { text-align: center; margin-top: 36px; }

/* ---------- Servicios ---------- */
.services { background: linear-gradient(180deg, #fff, var(--blue-50)); }
.services__grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.service-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s; cursor: pointer;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card__media { position: relative; aspect-ratio: 16/11; overflow: hidden; background: var(--gray-100); }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.service-card:hover .service-card__media img { transform: scale(1.06); }
.service-card__count { position: absolute; top: 10px; right: 10px; background: rgba(8,75,125,.85); color: #fff; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.service-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.service-card__title { font-size: 1.12rem; color: var(--blue-900); margin-bottom: 8px; }
.service-card__text { font-size: .92rem; color: var(--gray-500); margin-bottom: 16px; flex: 1; }
.service-card__link { font-weight: 600; font-size: .9rem; color: var(--blue-700); display: inline-flex; align-items: center; gap: 6px; }
.service-card__link span { transition: transform .2s; }
.service-card:hover .service-card__link span { transform: translateX(4px); }
.services__note { text-align: center; color: var(--gray-500); margin-top: 30px; font-size: .95rem; }

/* ---------- Nosotros ---------- */
.about__inner { display: grid; gap: 34px; align-items: center; }
.about__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.about__content .section__title { margin-bottom: 16px; }
.about__content p { margin-bottom: 14px; }
.about__list { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 26px; }
.about__list li { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius); padding: 12px 16px; font-size: .9rem; color: var(--gray-700); }
.about__list strong { display: block; color: var(--blue-700); font-family: var(--font-head); font-size: 1.3rem; }

/* ---------- Proceso ---------- */
.process { background: var(--blue-900); color: #d7eaf8; }
.process .section__title { color: #fff; }
.process .section__eyebrow { color: #7ec0f0; }
.process__steps { display: grid; gap: 22px; grid-template-columns: 1fr; list-style: none; }
.process__step { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 26px 22px; position: relative; }
.process__num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue-600); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; }
.process__step h3 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.process__step p { color: #b8d4ea; font-size: .92rem; }

/* ---------- Galería ---------- */
.gallery__grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; aspect-ratio: 1/1; box-shadow: var(--shadow-sm); background: var(--gray-100); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item::after { content: "🔍"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: rgba(8,75,125,.35); opacity: 0; transition: opacity .25s; }
.gallery__item:hover::after { opacity: 1; }

/* ---------- Opiniones ---------- */
.reviews { background: var(--gray-100); }
.reviews__grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.review { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.review__stars { color: #f5b301; font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 12px; }
.review blockquote { font-size: .98rem; color: var(--gray-700); font-style: italic; margin-bottom: 14px; }
.review figcaption { font-weight: 600; color: var(--blue-900); font-size: .9rem; }
.reviews__note { text-align: center; margin-top: 28px; color: var(--gray-500); }

/* ---------- FAQ ---------- */
.faq__inner { max-width: 800px; margin-inline: auto; }
.faq__list { display: grid; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 4px 20px; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.faq__item[open] { box-shadow: var(--shadow-md); border-color: var(--blue-100); }
.faq__item summary { font-family: var(--font-head); font-weight: 600; color: var(--gray-900); cursor: pointer; padding: 16px 28px 16px 0; list-style: none; position: relative; font-size: 1rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--blue-700); font-weight: 400; transition: transform .25s; }
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { padding: 0 0 18px; color: var(--gray-500); font-size: .95rem; }

/* ---------- Contacto ---------- */
.contact { background: linear-gradient(180deg, var(--blue-50), #fff); }
.contact__grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.contact__info { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 28px 26px; box-shadow: var(--shadow-sm); }
.contact__list { display: grid; gap: 20px; margin-bottom: 26px; }
.contact__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact__ico { font-size: 1.4rem; flex-shrink: 0; }
.contact__list strong { color: var(--blue-900); font-family: var(--font-head); }
.contact__map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); min-height: 320px; border: 1px solid var(--gray-200); }
.contact__map iframe { display: block; min-height: 320px; }

/* ---------- CTA final ---------- */
.cta-final { background: linear-gradient(135deg, var(--blue-700), var(--blue-900)); color: #fff; padding: 56px 0; text-align: center; }
.cta-final h2 { color: #fff; font-size: clamp(1.5rem, 4.5vw, 2.2rem); margin-bottom: 12px; }
.cta-final p { color: #d6eaf9; margin-bottom: 26px; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.footer { background: #06314f; color: #b8d0e3; padding: 50px 0 0; font-size: .92rem; }
.footer__inner { display: grid; gap: 30px; grid-template-columns: 1fr; }
.footer__brand p { margin-top: 14px; color: #9fbcd3; max-width: 320px; }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer__col ul { display: grid; gap: 9px; }
.footer__col a { color: #b8d0e3; }
.footer__col a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding: 18px 0; }
.footer__bottom .container { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.footer__bottom p { color: #8fb0c8; font-size: .85rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(37,211,102,.45);
  animation: waPulse 2.4s infinite; transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5);} 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0);} 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0);} }

/* ---------- Pop-up ---------- */
.popup { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.popup[hidden] { display: none; }
.popup__overlay { position: absolute; inset: 0; background: rgba(10,30,50,.6); backdrop-filter: blur(2px); }
.popup__box {
  position: relative; background: #fff; border-radius: var(--radius-lg); max-width: 420px; width: 100%;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 1;
  animation: popIn .35s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(.96);} to { opacity: 1; transform: none;} }
.popup__close { position: absolute; top: 10px; right: 12px; z-index: 2; background: rgba(255,255,255,.9); border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--gray-700); cursor: pointer; box-shadow: var(--shadow-sm); }
.popup__close:hover { background: #fff; color: var(--gray-900); }
.popup__img-wrap img { width: 100%; max-height: 220px; object-fit: cover; }
.popup__body { padding: 26px 26px 28px; text-align: center; }
.popup__badge { display: inline-block; background: var(--blue-100); color: var(--blue-900); font-weight: 600; font-size: .75rem; padding: 5px 13px; border-radius: 999px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.popup__title { font-size: 1.35rem; color: var(--gray-900); margin-bottom: 10px; }
.popup__text { color: var(--gray-500); margin-bottom: 20px; }
.popup__cta { width: 100%; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 210; background: rgba(8,25,45,.92); display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox[hidden] { display: none; }
.lightbox__fig { max-width: 92vw; max-height: 86vh; text-align: center; }
.lightbox__fig img { max-width: 92vw; max-height: 78vh; border-radius: 10px; box-shadow: var(--shadow-lg); margin-inline: auto; }
.lightbox__fig figcaption { color: #cfe3f5; margin-top: 14px; font-size: .95rem; font-family: var(--font-head); }
.lightbox__close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; opacity: .85; }
.lightbox__close:hover { opacity: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: none; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; transition: background .2s; }
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

/* =========================================================
   Breakpoints
   ========================================================= */
@media (min-width: 560px) {
  .topbar__hours { display: inline; }
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
  .process__steps { grid-template-columns: repeat(2, 1fr); }
  .reviews__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .section { padding: 76px 0; }
  .hero { padding: 56px 0 70px; }
  .hero__inner { grid-template-columns: 1.05fr .95fr; }
  .about__inner { grid-template-columns: 1fr 1.05fr; }
  .contact__grid { grid-template-columns: 1fr 1.1fr; }
  .footer__inner { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
  .footer__bottom .container { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 992px) {
  .trust__grid { grid-template-columns: repeat(4, 1fr); }
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .gallery__grid { grid-template-columns: repeat(4, 1fr); }
  .process__steps { grid-template-columns: repeat(4, 1fr); }
  .reviews__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Accesibilidad / animaciones ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

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