/* ============================================================
   IDental GL — sitio estático
   Reescritura limpia del diseño Divi (idental.jafetisaac.com).
   Mobile-first. Fuentes: Gilroy Light / ExtraBold.
   Paleta: teal #01a7bb, teal claro #04adbf, fondo #e4edf2,
   texto #666, oscuro #282828, footer #222 / #171717.
   ============================================================ */

@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../fonts/Gilroy-ExtraBold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #01a7bb;
  --teal-light: #04adbf;
  --teal-welcome: #2b95a0;
  --bg-light: #e4edf2;
  --text: #666;
  --dark: #282828;
  --card-border: #d9d9d9;
  --footer-bg: #222;
  --footer-bottom-bg: #171717;
  --header-h: 65px;
  --radius-card: 24px;
  --radius-pill: 40px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Gilroy', 'Gilroy light', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7em;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { opacity: .8; }

h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.4em; color: var(--dark); }

.container {
  width: 90%;
  max-width: 1080px;
  margin: 0 auto;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
  transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 0 7px rgba(0, 0, 0, .12); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.site-logo img { height: 42px; width: auto; }
.site-logo { line-height: 0; }

.main-nav ul { list-style: none; display: none; }
.main-nav a {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: rgba(0, 0, 0, .6);
  padding: 10px 0;
}
.main-nav a:hover, .main-nav a.is-current { color: #2ea3f2; opacity: 1; }

/* hamburguesa */
.nav-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 3px;
  background: rgba(0, 0, 0, .6);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 979px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .08);
    padding: 8px 0 16px;
  }
  .main-nav ul { display: block; }
  .nav-open .main-nav { display: block; }
  .main-nav a { padding: 12px 5%; }
}

@media (min-width: 980px) {
  :root { --header-h: 80px; }
  .nav-toggle { display: none; }
  .main-nav { display: block !important; }
  .main-nav ul { display: flex; gap: 22px; }
  .main-nav a { padding: 29px 0; }
}

main { padding-top: var(--header-h); }

/* ---------- Hero (home) ---------- */

.hero {
  background: var(--teal) url('../img/hero/at-dentist-with-smile.jpg') no-repeat right top / cover;
  padding: 14vw 0 12vw;
}
.hero .container { max-width: 1280px; }
.hero-logo { max-width: 190px; margin-bottom: 28px; }
.hero h1 {
  font-size: 25px;
  line-height: 1.25em;
  color: rgba(40, 40, 40, .75);
}
.hero .hero-sub {
  font-size: 20px;
  line-height: 1.6em;
  color: var(--teal-light);
  margin-top: 8px;
  max-width: 460px;
}

@media (min-width: 768px) {
  .hero { padding: 7vw 0; }
  .hero h1 { font-size: 35px; }
}
@media (min-width: 1200px) {
  .hero h1 { font-size: 50px; }
  .hero-logo { max-width: 230px; }
  /* en desktop el alto del hero es chico vs el ancho de la foto: centrada
     verticalmente para que se vea la sonrisa (right top sólo mostraba la frente) */
  .hero { background-position: right center; }
}

/* ---------- Secciones genéricas ---------- */

.section { padding: 56px 0; }
.section-light { background: var(--bg-light); }
.section-teal { background: var(--teal); }
.section-teal h1, .section-teal h2, .section-teal h3 { color: #fff; }

.section-title {
  font-size: 28px;
  text-align: center;
  margin-bottom: 28px;
}
@media (min-width: 980px) {
  .section { padding: 72px 0; }
  .section-title { font-size: 40px; margin-bottom: 48px; }
}

/* ---------- ¿Quiénes somos? ---------- */

.quienes-head { text-align: center; margin-bottom: 40px; }
.quienes-head h2 {
  color: #4d4d4d;
  font-weight: 700;
  letter-spacing: .35em;
  font-size: 18px;
  margin-bottom: 14px;
}
.quienes-head .bienvenida {
  color: var(--teal-welcome);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
}
.quienes-head .divider {
  width: 38px;
  border-top: 2px solid #999;
  margin: 26px auto 0;
}

.quienes-grid { display: grid; gap: 32px; align-items: center; }
.quienes-grid .col-logo { text-align: center; order: -1; }
.quienes-grid .col-logo img { max-width: 420px; width: 80%; margin: 0 auto; }
.quienes-grid p { font-size: 15px; line-height: 1.7; }

@media (min-width: 980px) {
  .quienes-head h2 { font-size: 26px; }
  .quienes-grid { grid-template-columns: 1fr 1.2fr 1fr; gap: 24px; }
  .quienes-grid .col-logo { order: 0; }
  .quienes-grid .col-izq { text-align: right; }
  .quienes-grid .col-der { text-align: left; }
}

/* ---------- No solo es estética ---------- */

.estetica-title {
  color: var(--teal-light);
  text-transform: uppercase;
  font-size: 26px;
  margin-bottom: 36px;
}

.estetica-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  justify-items: center;
  /* cajas del mismo alto: el grid estira, la caja centra su contenido */
}
.estetica-box {
  background: #c2c3c4;
  border-radius: var(--radius-card);
  padding: 22px 26px;
  width: 100%;
  max-width: 340px;
  display: flex;
  align-items: center;
}
.estetica-box p {
  color: #333;
  font-size: 16px;
  line-height: 2em;
}

.estetica-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 56px;
  margin-top: 56px;
}
.estetica-logos img { height: 110px; width: auto; }

@media (min-width: 768px) {
  .estetica-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .estetica-box { max-width: none; }
  .estetica-title { font-size: 34px; }
}
@media (min-width: 980px) {
  .estetica-title { font-size: 40px; }
  .estetica-logos { gap: 96px; }
  .estetica-logos img { height: 130px; }
}

/* ---------- Servicios (toggles) ---------- */

.servicios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  justify-items: center;
  align-items: start;
}
@media (min-width: 640px)  { .servicios-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px)  { .servicios-grid { grid-template-columns: repeat(3, 1fr); gap: 30px 26px; } }

.servicio { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 340px; }
@media (min-width: 980px) { .servicio { max-width: none; } }

/* tarjetas colapsadas del mismo alto (título hasta 2 líneas); al abrir,
   solo la tarjeta clickeada crece */
.toggle-head { min-height: 73px; }
@media (max-width: 979px) { .toggle-head { min-height: 0; } }

.servicio-icon {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
  width: 84px; height: 84px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.servicio-icon img { width: 52px; height: 52px; object-fit: contain; }

.toggle-item {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  width: 100%;
  overflow: hidden;
}
.toggle-head {
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font-family: inherit;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.4em;
  color: var(--text);
  padding: 14px 18px 14px 24px;
}
.toggle-head .toggle-mark {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #c9c9c9;
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  position: relative;
}
.toggle-head .toggle-mark::before { content: '+'; }
.toggle-item.open .toggle-mark::before { content: '\2212'; }

.toggle-body {
  display: none;
  padding: 2px 26px 20px;
  font-size: 15px;
  line-height: 1.8em;
  text-align: center;
}
.toggle-item.open .toggle-body { display: block; }
/* expansión en mouse-over (desktop; en táctil manda el click).
   .closed = el usuario la cerró a propósito: el hover no la re-abre */
@media (hover: hover) {
  .toggle-item:hover:not(.closed) .toggle-body { display: block; }
  .toggle-item:hover:not(.closed) .toggle-head .toggle-mark::before { content: '\2212'; }
  .toggle-item.closed .toggle-head .toggle-mark::before { content: '+'; }
}

.cta-row { text-align: center; margin-top: 48px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 16px;
  padding: .45em 1.4em;
  border-radius: 4px;
  transition: all .3s;
  line-height: 1.7em;
}
.btn-light {
  background: #fff;
  color: #000;
  font-size: 18px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .18);
}
.btn-teal {
  background: var(--teal);
  color: #fff !important;
  border-radius: 22px;
  font-weight: 300;
}
.btn-teal:hover { opacity: .9; }

@media (min-width: 980px) {
  .btn-light { font-size: 25px; }
}

/* ---------- Para tu comodidad (radiografía) ---------- */

.comodidad-grid { display: grid; gap: 32px; align-items: center; }
.comodidad-grid .radio-img { border-radius: var(--radius-card); overflow: hidden; max-width: 420px; margin: 0 auto; }
.comodidad-grid h2 { color: var(--teal-light); font-size: 28px; text-align: center; margin-bottom: 14px; }
.comodidad-grid p { text-align: center; }

@media (min-width: 980px) {
  .comodidad-grid { grid-template-columns: 1fr 1.6fr; gap: 48px; }
  .comodidad-grid .radio-img { margin: 0; }
  .comodidad-grid h2, .comodidad-grid p { text-align: left; }
  .comodidad-grid h2 { font-size: 40px; }
}

/* ---------- Sucursales ---------- */

.sucursales { background: var(--teal); color: #fff; padding: 56px 0 64px; }
.sucursales .section-title { color: #fff; }

.sucursales-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  justify-items: center;
}
@media (min-width: 768px) { .sucursales-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; } }

.sucursal { max-width: 380px; width: 100%; text-align: center; }
@media (min-width: 768px) { .sucursal { max-width: none; } }

.sucursal .mapa {
  display: block;
  border: 10px solid #fff;
  border-radius: 26px;
  overflow: hidden;
  margin-bottom: 18px;
}
.sucursal .mapa img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.sucursal .suc-nombre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 300;
  color: #fff;
  margin-bottom: 12px;
}
.sucursal .suc-nombre svg { flex: 0 0 auto; }

.sucursal .suc-dir {
  font-size: 15px;
  line-height: 1.9em;
  margin-bottom: 20px;
}

.suc-contacto { display: grid; gap: 12px; }
.suc-contacto a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-size: 16px;
}
.suc-contacto svg { flex: 0 0 auto; }

/* ---------- Footer ---------- */

.site-footer { background: var(--footer-bg); color: #fff; text-align: center; padding: 34px 0 30px; }
.site-footer .siguenos {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.site-footer .social a {
  display: inline-block;
  margin: 0 12px;
  color: #fff;
}
.footer-bottom {
  background: var(--footer-bottom-bg);
  color: #666;
  font-size: 13px;
  padding: 14px 0;
}
.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom a { color: #888; }

/* ---------- Página producto ---------- */

.prod-hero { padding: 56px 0; background: #fff; }
.prod-hero-grid { display: grid; gap: 36px; align-items: center; }
.prod-hero h1 { font-size: 26px; margin-bottom: 18px; }
.prod-hero .linners-logo { max-width: 300px; }
.prod-hero .foto { border-radius: var(--radius-card); overflow: hidden; }

.prod-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 56px;
}
.prod-feature img { width: 64px; margin-bottom: 14px; }
.prod-feature h2 { font-size: 22px; margin-bottom: 6px; }
@media (min-width: 768px) {
  .prod-feature h2 { font-size: 26px; }
}
.prod-feature p { max-width: 300px; }

.prod-cta {
  border-top: 3px solid #333;
  padding: 56px 0;
}
.prod-cta-grid { display: grid; gap: 36px; align-items: center; }
.prod-cta .card {
  background: url('../img/producto/ortodoncia-funcional.jpeg') center / cover no-repeat;
  border-radius: var(--radius-card);
  min-height: 320px;
}
.prod-cta h2 { font-size: 30px; text-align: center; font-weight: 700; margin-bottom: 10px; }
.prod-cta .oferta { font-size: 22px; text-align: center; line-height: 1.35em; margin-bottom: 28px; }
.prod-cta .cta-row { margin-top: 0; }

@media (min-width: 768px) {
  .prod-features { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .prod-feature p { max-width: none; }
}
@media (min-width: 980px) {
  .prod-hero { padding: 72px 0; }
  .prod-hero-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .prod-hero h1 { font-size: 34px; }
  .prod-cta-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; }
  .prod-cta .card { min-height: 420px; }
  .prod-cta h2 { font-size: 40px; }
  .prod-cta .oferta { font-size: 28px; }
}

/* ---------- Botones flotantes de WhatsApp ---------- */

.wa-fabs {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  display: grid;
  gap: 10px;
}
/* siempre visibles desde la carga (alonzo): sin gating por scroll */

.wa-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2em;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.wa-fab svg { flex: 0 0 auto; }
.wa-fab:hover { opacity: 1; background: #1fbe5a; }

@media (max-width: 575px) {
  .wa-fabs { right: 10px; bottom: 10px; }
  .wa-fab { font-size: 13px; padding: 9px 13px; }
}

/* ---------- 404 ---------- */

.error-page { text-align: center; padding: 90px 0; }
.error-page h1 { font-size: 40px; margin-bottom: 12px; }
.error-page p { margin-bottom: 28px; }
