/* Dentista Don Raúl
   Suizo (rejilla, tipo enorme, esquinas rectas) + ventanas y stickers
   + palabra cinética. Manrope cuerpo/títulos. Source Serif 4 en stickers. */

:root {
  --bg: #111118;
  --bg-2: #1d1c26;
  --ink: #f5f5f5;
  --muted: #c1c0ce;
  --pri: #2c22b4;
  --pri-text: #a29df1;
  --sec: #8e5d29;
  --sec-text: #d3a069;
  --acc: #97ea3e;
  --line: #6c6996;
  --mx: 0px;
  --my: 0px;
  --sans: "Manrope", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ancho: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--pri-text); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; }
::selection { background: var(--acc); color: var(--bg); }
::placeholder { color: var(--muted); opacity: 1; }
[hidden] { display: none !important; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: 0.75rem; top: -4rem;
  background: var(--acc); color: var(--bg);
  padding: 0.55rem 0.8rem; z-index: 80; font-weight: 800;
  text-decoration: none;
}
.saltar:focus { top: 0.75rem; }
.envoltorio { width: min(var(--ancho), calc(100% - 2rem)); margin: 0 auto; }
body { padding-right: 4.25rem; }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.045em; line-height: 0.96; }
h1 {
  font-size: clamp(2.05rem, 4.8vw, 4.15rem);
  margin: 0.35rem 0 0.8rem;
  border-left: 8px solid var(--sec-text);
  padding-left: 0.8rem;
}
h2 { font-size: clamp(1.7rem, 3vw, 2.7rem); margin: 0; }
h3 { font-size: 1.25rem; margin: 0 0 0.35rem; letter-spacing: -0.03em; }
p { margin: 0 0 0.8rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.55rem 1rem;
  font-weight: 800; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; line-height: 1.2;
}
.btn-acc { background: var(--acc); color: var(--bg); }
.btn-acc:hover { color: var(--bg); box-shadow: 5px 5px 0 var(--pri-text); }
.btn-linea { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-linea:hover { background: var(--ink); color: var(--bg); }
.btn-sec { background: var(--sec); color: #fff; }
.btn-sec:hover { color: #fff; box-shadow: 5px 5px 0 var(--acc); }
.btn-acc:focus-visible, .btn-sec:focus-visible { outline-color: #fff; }

/* Cabecera: marca al centro, enlaces a los lados */
.masthead {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}
.util {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 1rem;
  background: var(--pri); color: #fff;
  padding: 0.4rem 1rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.util a { color: #fff; font-weight: 700; }
.masthead-centro {
  width: min(var(--ancho), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
}
.nav-izq, .nav-der {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-izq { justify-content: flex-end; }
.nav-der { justify-content: flex-start; }
.nav-izq a, .nav-der a, .menu-movil a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.92rem;
}
.nav-izq a[aria-current="page"], .nav-der a[aria-current="page"], .menu-movil a[aria-current="page"] {
  border-bottom: 2px solid var(--acc);
}
.marca {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  color: var(--ink); text-decoration: none; text-align: center; font-weight: 800;
  letter-spacing: -0.04em; line-height: 1;
}
.marca img { width: 36px; height: 36px; }
.marca span { font-size: 0.95rem; }
.hamburguesa {
  display: none; min-height: 48px; padding: 0 0.9rem;
  background: var(--acc); color: var(--bg); border: 0; font-weight: 800; cursor: pointer;
}
.menu-movil { border-top: 1px solid var(--line); background: var(--bg-2); }
.menu-movil a { display: block; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.busqueda-global {
  position: relative;
  display: flex; align-items: center; gap: 0.5rem;
  width: min(var(--ancho), calc(100% - 2rem));
  margin: 0 auto; padding: 0.35rem 0 0.55rem;
}
.busqueda-global label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.busqueda-global input {
  flex: 1; min-height: 44px; background: var(--bg-2); border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
}
.busqueda-global button { min-height: 44px; }
.buscador-resultados {
  position: absolute; left: 0; right: 0; top: calc(100% - 0.4rem);
  background: var(--bg-2); border: 1px solid var(--line); z-index: 35; max-height: 280px; overflow: auto;
}
.buscador-resultados a, .buscador-resultados p {
  display: block; padding: 0.65rem 0.8rem; margin: 0;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
}
.buscador-resultados a:hover { background: var(--pri); color: #fff; }
.buscador-resultados small { display: block; color: var(--muted); font-weight: 500; }

@media (min-width: 981px) {
  .masthead { position: sticky; top: 0; }
}
@media (max-width: 980px) {
  .nav-izq, .nav-der { display: none; }
  .masthead-centro { display: flex; justify-content: space-between; }
  .hamburguesa { display: inline-flex; align-items: center; }
  .marca { align-items: flex-start; }
}

/* Portada tipográfica. La imagen va en el bloque siguiente. */
.portada {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  min-height: calc(100svh - 9.2rem);
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(to right, rgba(108,105,150,0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(108,105,150,0.18) 1px, transparent 1px);
  background-size: 56px 56px;
}
.portada-grid { padding: 1.5rem 0 2rem; align-self: end; }
.eyebrow {
  margin: 0; letter-spacing: 0.16em; text-transform: uppercase;
  font-size: 0.75rem; color: var(--sec-text); font-weight: 700;
}
.nombre-gigante {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(4.6rem, 13vw, 9.2rem);
  font-weight: 800; letter-spacing: -0.07em; line-height: 0.78;
  transform: translate(calc(var(--mx) * -1), calc(var(--my) * -1));
}
.bajada { font-size: 1.25rem; max-width: 38rem; }
.portada-tel { color: var(--muted); }
.portada-tel a { color: var(--ink); font-weight: 800; }
.ctas { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.4rem 0 1rem; }
.sticker {
  display: inline-block; margin: 0;
  background: var(--acc); color: var(--bg);
  font-family: var(--serif); font-style: italic; font-weight: 600;
  padding: 0.35rem 0.75rem; transform: rotate(-7deg);
  box-shadow: 4px 4px 0 var(--sec-text);
}
.sticker-pulso { animation: pulso 4.8s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.cinetico-lateral {
  margin: 0; padding: 0 0.6rem 1rem 0;
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  font-weight: 800; letter-spacing: -0.08em; line-height: 0.8;
  color: transparent; -webkit-text-stroke: 2px var(--acc);
  transform: translate(var(--mx), var(--my));
  white-space: nowrap; align-self: center;
}
@supports not (-webkit-text-stroke: 1px #000) {
  .cinetico-lateral, .fondo-tipo, .bloque-num, .pie-gigante { color: var(--acc); }
}
.portada-foto { margin: 0; }
.portada-foto img, .figura img { width: 100%; height: auto; }
.portada-foto figcaption, .figura figcaption {
  width: min(var(--ancho), calc(100% - 2rem));
  margin: 0 auto; padding: 0.7rem 0;
  color: var(--muted); font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
}

.marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.marquee-track {
  display: flex; gap: 2rem; width: max-content;
  padding: 0.7rem 0; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  animation: cinta 42s linear infinite;
}
@keyframes cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.bloque { padding: 3.2rem 0; border-bottom: 1px solid var(--line); }
.bloque-encabezado {
  display: flex; align-items: flex-end; gap: 0.8rem; margin-bottom: 1.2rem;
}
.bloque-num {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 800; line-height: 0.8; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px var(--acc);
}
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
.c8 { grid-column: span 8; }
.c7 { grid-column: span 7; }
.c6 { grid-column: span 6; }
.c5 { grid-column: span 5; }
.c4 { grid-column: span 4; }
.c3 { grid-column: span 3; }

.fila-precio {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem; align-items: baseline;
  border-top: 1px solid var(--line); padding: 0.72rem 0;
}
.fila-precio span { color: var(--muted); font-size: 0.92rem; }
.precio-num { font-weight: 800; font-size: 1.15rem; color: var(--ink); white-space: nowrap; }

.ventana { border: 3px solid var(--acc); background: var(--bg); box-shadow: 10px 10px 0 var(--pri); }
.ventana-b { margin-top: 1.2rem; transform: rotate(1.5deg); box-shadow: 10px 10px 0 var(--sec); }
.ventana-barra {
  display: flex; justify-content: space-between; gap: 1rem;
  background: var(--sec); color: #fff;
  padding: 0.4rem 0.7rem; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.ventana-cuerpo { padding: 0.9rem 1rem 1rem; }
.ventana-cuerpo p:last-child { margin-bottom: 0; }
.pila { position: relative; }

.horario { width: 100%; border-collapse: collapse; }
.horario th, .horario td {
  text-align: left; padding: 0.75rem 0.4rem 0.75rem 0;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.horario th { color: var(--muted); font-weight: 700; width: 42%; }

.pasos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.paso { border-top: 4px solid var(--acc); padding-top: 0.7rem; }
.paso b { display: block; font-size: 2rem; letter-spacing: -0.05em; line-height: 1; }

.faq-lista { display: grid; gap: 0; }
.faq-item { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.faq-item h3 { font-size: 1.12rem; }

.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem;
  min-height: 150px; padding: 0.9rem; color: var(--ink); text-decoration: none;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.cat:hover { background: var(--pri); color: #fff; }
.cat small { color: var(--sec-text); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.cat:hover small { color: var(--acc); }
.anio-gigante {
  margin: 0; font-size: clamp(4.5rem, 14vw, 8.5rem);
  font-weight: 800; letter-spacing: -0.07em; line-height: 0.8;
}

.pagina { padding: 1.6rem 0 3rem; }
.pagina-hero { position: relative; overflow: hidden; margin-bottom: 1.4rem; min-height: 9rem; }
.fondo-tipo {
  position: absolute; right: -0.4rem; bottom: -0.8rem; margin: 0;
  font-size: clamp(3.6rem, 12vw, 8rem); font-weight: 800; letter-spacing: -0.07em; line-height: 0.8;
  color: transparent; -webkit-text-stroke: 1px var(--line);
  transform: translate(var(--mx), var(--my)); pointer-events: none; white-space: nowrap;
}
.ruta { position: relative; z-index: 1; color: var(--muted); margin: 0; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ruta a { color: var(--muted); }
.pagina-hero h1, .pagina-hero .bajada { position: relative; z-index: 1; }

.prosa { max-width: 74ch; }
.prosa h2 { font-size: 1.45rem; margin: 1.8rem 0 0.6rem; letter-spacing: -0.03em; }
.prosa li { margin: 0.3rem 0; }
.dato-fuente { border-left: 6px solid var(--acc); padding: 0.2rem 0 0.2rem 0.9rem; font-weight: 700; }
.nota { border: 1px solid var(--sec-text); padding: 0.8rem 1rem; margin: 1rem 0; }
.nota strong { color: var(--sec-text); }

.filtros { margin-bottom: 1rem; }
.campos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.7rem; }
.campo { grid-column: span 4; display: flex; flex-direction: column; gap: 0.25rem; }
.campo-ancho { grid-column: span 8; }
.campo label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.campo input, .campo select, .formulario input, .formulario textarea {
  min-height: 48px; background: var(--bg-2); border: 1px solid var(--line); padding: 0.55rem 0.7rem; width: 100%;
}
.formulario textarea { min-height: 140px; resize: vertical; }
.campo-error { border-color: var(--sec-text) !important; }
.msg-error { color: var(--sec-text); margin: 0.25rem 0 0; font-size: 0.92rem; }
.conteo { color: var(--muted); }

.tarjeta {
  display: grid; grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 0.9rem; align-items: center;
  border-top: 1px solid var(--line); padding: 0.9rem 0;
}
.tarjeta img { width: 128px; height: 92px; object-fit: cover; }
.tarjeta .precio-num { font-size: 1.35rem; }
.tarjeta h3 { font-size: 1.35rem; margin: 0.25rem 0; }
.tarjeta h3 a { color: var(--ink); text-decoration: none; }
.tarjeta h3 a:hover { text-decoration: underline; }
.fila-precio { color: inherit; text-decoration: none; }
.fila-precio:hover { background: var(--bg-2); }
.etiqueta {
  display: inline-block; border: 1px solid var(--line); padding: 0.1rem 0.4rem;
  font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 0.3rem;
}
.etiqueta-msi { border-color: var(--acc); color: var(--acc); }

.galeria { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.galeria-item { padding: 0; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: left; color: var(--ink); }
.galeria-item img { width: 100%; height: 180px; object-fit: cover; }
.galeria-item span { display: block; padding: 0.45rem 0.55rem; font-size: 0.85rem; }

.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(17,17,24,0.96);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.8rem;
}
.lightbox-bar { display: flex; justify-content: space-between; gap: 0.5rem; }
.lightbox img { max-height: 100%; max-width: min(1100px, 100%); margin: 0 auto; object-fit: contain; }
.lightbox p { margin: 0; color: var(--muted); }

.blog-lista { display: grid; gap: 1.2rem; }
.blog-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.blog-card img { width: 100%; height: 160px; object-fit: cover; }
.blog-card h2 { font-size: 1.55rem; }
.blog-card h2 a, .faq-item h2 { color: var(--ink); text-decoration: none; font-size: 1.35rem; }
.blog-card h2 a:hover { text-decoration: underline; }
.blog-card a { color: var(--ink); }

.formulario { display: grid; gap: 0.8rem; }
.mapa iframe { width: 100%; height: 360px; border: 1px solid var(--line); }

.ficha-precio { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.05em; margin: 0.2rem 0; }

.pie { padding: 2rem 0 6.5rem; background: var(--bg-2); border-top: 1px solid var(--line); }
.pie-gigante {
  margin: 0 0 0.4rem; font-size: clamp(3.2rem, 12vw, 7rem);
  font-weight: 800; letter-spacing: -0.07em; line-height: 0.8;
  color: transparent; -webkit-text-stroke: 1px var(--line); overflow: hidden;
}
.pie h2 {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin: 0 0 0.75rem; color: var(--ink); font-weight: 800;
}
.pie-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 0.9fr; gap: 1.5rem; }
.pie a { color: var(--ink); }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin: 0.28rem 0; }
.redes { display: flex; flex-direction: column; gap: 0.45rem; }
.redes a { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; min-height: 44px; }
.redes svg { width: 22px; height: 22px; }
.pie-legal { color: var(--muted); font-size: 0.88rem; margin-top: 1.4rem; }

.cookies {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.6rem; align-items: center;
  padding: 0.75rem 1rem; background: var(--bg-2); border-top: 3px solid var(--acc);
}
.cookies.visible { display: grid; }
.cookies p { margin: 0; font-size: 0.92rem; }

.flotantes {
  position: fixed; right: 12px; bottom: 12px; z-index: 45;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 8px;
}
.fab {
  min-height: 48px; padding: 0 0.85rem; display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 800; text-decoration: none; border: 0; cursor: pointer;
}
.fab svg { width: 18px; height: 18px; }
.fab-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.fab-wa { background: var(--acc); color: var(--bg); }
.fab-wa:hover { color: var(--bg); }
.fab-tel { background: var(--sec); color: #fff; }
.fab-tel:hover { color: #fff; }
.fab-chat { background: var(--pri); color: #fff; }
.chat { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.chat-panel { width: min(340px, calc(100vw - 24px)); background: var(--bg); border: 3px solid var(--acc); box-shadow: 8px 8px 0 var(--pri); }
.chat-log { max-height: 220px; overflow: auto; padding: 0.7rem; }
.burbuja { border: 1px solid var(--line); padding: 0.5rem 0.6rem; margin: 0 0 0.45rem; }
.burbuja-bot { border-color: var(--acc); }
.chat-qs { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0 0.7rem 0.7rem; }
.chat-qs button {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  min-height: 40px; padding: 0.3rem 0.5rem; cursor: pointer; text-align: left;
}
.chat-pie { padding: 0.7rem; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .c8, .c7, .c6, .c5, .c4, .c3, .campo, .campo-ancho { grid-column: 1 / -1; }
  .pasos, .cats, .galeria { grid-template-columns: 1fr 1fr; }
  .pie-grid, .blog-card, .tarjeta { grid-template-columns: 1fr; }
  .tarjeta img { width: 100%; height: 180px; }
  .portada { grid-template-columns: 1fr; min-height: 0; }
  .cinetico-lateral { padding: 0.4rem 0 0; font-size: 3.2rem; }
}
@media (max-width: 640px) {
  .pasos, .cats, .galeria, .cookies { grid-template-columns: 1fr; }
  .mapa iframe { height: 240px; }
  .fab-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .util { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .nombre-gigante, .cinetico-lateral, .fondo-tipo { transform: none !important; }
}
