/* ==========================================================
   RUBIO CLÍNICA DENTAL — styles.css
   Arquetipo: Glassmorphism Modern (paleta turquesa de marca)
   ========================================================== */

/* ---------- Tipografías auto-alojadas ----------
   Antes se cargaban desde fonts.googleapis.com / fonts.gstatic.com. Se han
   traído aquí (assets/fonts/) para no enviar la IP de cada visitante a Google
   sin su consentimiento. Mismos ficheros, mismo aspecto, sin ese aviso. */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/outfit-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/outfit-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/outfit-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }

@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #f1f8f7;
  --bg-2: #e2f1ee;
  --ink: #0d2126;
  --ink-soft: #33484d;
  --ink-mute: #5b7176;
  --teal: #3bb0a2;
  --teal-d: #17796f;
  --teal-dd: #0f5f58;
  --mint: #c9efe8;
  --sky: #d3eaf5;
  --sand: #f7ead8;
  --glass: rgba(255, 255, 255, .58);
  --glass-2: rgba(255, 255, 255, .36);
  --glass-line: rgba(255, 255, 255, .8);
  --line: rgba(13, 33, 38, .10);
  --shadow: 0 10px 40px -12px rgba(15, 95, 88, .28);
  --shadow-lg: 0 40px 80px -30px rgba(15, 95, 88, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --f-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --r: 24px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--teal-dd); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal-d); outline-offset: 3px; border-radius: 8px; }
address { font-style: normal; }
section[id] { scroll-margin-top: 90px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.center { display: flex; justify-content: center; margin-top: 40px; }
.small { font-size: 14px; color: var(--ink-mute); margin-top: 12px; }
.small a { text-decoration: underline; text-underline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
}

/* ---------- Tipografía de sección ---------- */
.kicker {
  font-family: var(--f-display);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-dd); margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--teal); border-radius: 2px; }
h2 { font-size: clamp(34px, 5.2vw, 60px); }
h2 em { font-size: 1.08em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 560px; margin-top: 22px; }
.sec-head { max-width: 720px; margin-bottom: 56px; }
.note { margin-top: 36px; text-align: center; color: var(--ink-mute); font-size: 15px; }

/* ---------- Botones ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--f-display); font-weight: 500; font-size: 16px; line-height: 1;
  cursor: pointer; white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--ease), background .25s, color .25s, box-shadow .3s, border-color .25s;
}
.btn-lg { padding: 17px 30px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 10px 30px -10px rgba(13, 33, 38, .55); }
.btn-primary:hover { background: var(--teal-d); box-shadow: 0 14px 34px -10px rgba(23, 121, 111, .6); }
.btn-glass { background: var(--glass); border-color: var(--glass-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn-glass:hover { background: rgba(255, 255, 255, .9); }

/* ---------- Mesh gradient ---------- */
.mesh { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.mesh i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .85; will-change: transform; }
.mesh i:nth-child(1) { width: 52vw; height: 52vw; max-width: 720px; max-height: 720px; left: -12%; top: -20%; background: radial-gradient(circle, #a8e6dc 0%, transparent 68%); animation: drift1 24s ease-in-out infinite alternate; }
.mesh i:nth-child(2) { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; right: -10%; top: 4%; background: radial-gradient(circle, #cfe8f7 0%, transparent 68%); animation: drift2 28s ease-in-out infinite alternate; }
.mesh i:nth-child(3) { width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; left: 34%; bottom: -24%; background: radial-gradient(circle, #f8e6cf 0%, transparent 68%); animation: drift3 32s ease-in-out infinite alternate; }
.mesh-soft i:nth-child(1) { left: -8%; top: 10%; }
.mesh-soft i:nth-child(2) { right: -8%; top: auto; bottom: 0; }
@keyframes drift1 { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vw, 14vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-16vw, -8vh) scale(1.2); } }

/* ---------- Nav ---------- */
.nav-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; padding: 0 16px; pointer-events: none; }
.nav {
  pointer-events: auto;
  width: min(1120px, 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 10px 12px 10px 20px; border-radius: 999px;
  transition: background .3s, box-shadow .3s;
}
.nav.is-scrolled { background: rgba(255, 255, 255, .78); box-shadow: 0 12px 40px -14px rgba(13, 33, 38, .28); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--teal); font-family: var(--f-display); font-weight: 600; font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: .22em; text-transform: uppercase; }
.brand-text small { font-family: var(--f-display); font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }
.nav-links-wrap { position: relative; display: flex; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { display: block; padding: 8px 14px; font-family: var(--f-display); font-size: 15px; font-weight: 500; color: var(--ink-soft); border-radius: 999px; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-indicator {
  position: absolute; left: 0; bottom: 2px; height: 2px; width: 0; border-radius: 2px; background: var(--teal);
  opacity: 0; transition: transform .35s var(--ease), width .35s var(--ease), opacity .2s;
}
.nav-cta { padding: 11px 22px; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; position: relative; cursor: pointer; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }
.mobile-menu {
  pointer-events: auto; width: min(1120px, 100%); margin-top: 10px; padding: 18px; border-radius: 28px;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 14px 16px; font-family: var(--f-display); font-size: 20px; font-weight: 500; border-radius: 14px; }
.mobile-menu a:not(.btn):hover { background: var(--mint); }
.mobile-menu .btn { margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 130px 0 80px; overflow: hidden; background: linear-gradient(180deg, #eef8f6 0%, var(--bg) 100%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-family: var(--f-display); font-size: 14px; font-weight: 500; color: var(--ink-soft); margin-bottom: 28px; }
.eyebrow-link { cursor: pointer; transition: background .25s, border-color .25s, transform .3s var(--ease); }
.eyebrow-link:hover { background: rgba(255, 255, 255, .92); border-color: var(--teal); transform: translateY(-1px); }
.eyebrow-link:hover #liveText { text-decoration: underline; text-underline-offset: 3px; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(59, 176, 162, .6); animation: pulse 2.4s ease-out infinite; }
.live.is-closed { background: #c98b3c; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(59, 176, 162, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 176, 162, 0); } }
.hero-title { font-size: clamp(46px, 7.4vw, 96px); letter-spacing: -.035em; line-height: 1; }
.hero-title span { display: block; }
.hero-title em { font-size: 1.04em; }
.hero-sub { font-size: clamp(17px, 1.7vw, 20px); color: var(--ink-soft); max-width: 520px; margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 30px; font-size: 15px; color: var(--ink-soft); }
.hero-points li { position: relative; padding-left: 24px; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 14px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M4 7.200l2 2 4-4.400' fill='none' stroke='%2317796f' stroke-width='1.600' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/14px no-repeat; }

/* entrada del hero: solo CSS, así nunca depende de JS */
.hero-in { opacity: 0; transform: translateY(22px); animation: heroIn .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes heroIn { to { opacity: 1; transform: none; } }

.hero-visual { position: relative; justify-self: center; width: min(100%, 470px); }
.arch { border-radius: 50% 50% 32px 32px / 18% 18% 32px 32px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow-lg); border: 8px solid rgba(255, 255, 255, .75); animation: bob 9s ease-in-out infinite; will-change: transform; }
.arch img { width: 100%; height: 106%; object-fit: cover; object-position: top; }
@keyframes bob { 50% { transform: translateY(-12px); } }
.float-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 20px; font-family: var(--f-display); }
.fc-1 { left: -40px; bottom: 60px; animation: bob 7s ease-in-out -2s infinite; }
.fc-2 { right: -34px; bottom: 150px; animation: bob 8s ease-in-out -4s infinite; color: var(--teal-dd); }
.fc-big { font-size: 42px; font-weight: 600; line-height: 1; color: var(--teal-dd); }
.fc-txt { font-size: 14px; line-height: 1.3; font-weight: 500; color: var(--ink); }
.fc-txt small { color: var(--ink-mute); font-weight: 400; font-size: 12px; }

/* ---------- Confianza ---------- */
.trust { padding-top: 0; margin-top: -20px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { border-radius: var(--r); padding: 32px; }
.tile-n { font-family: var(--f-serif); font-style: italic; font-size: 30px; color: var(--teal-d); }
.tile h2 { font-size: 23px; margin: 12px 0 10px; font-weight: 600; }
.tile p { color: var(--ink-soft); font-size: 16px; }

/* ---------- Tratamientos ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.tcard {
  position: relative; border-radius: var(--r); padding: 30px 28px 26px; display: flex; flex-direction: column;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .3s;
}
.tcard:hover { transform: translateY(-6px); background: rgba(255, 255, 255, .88); box-shadow: 0 30px 60px -24px rgba(23, 121, 111, .5); }
.tcard-num { position: absolute; top: 24px; right: 26px; font-family: var(--f-display); font-size: 13px; color: var(--ink-mute); letter-spacing: .08em; }
.tcard-ico { width: 60px; height: 60px; border-radius: 18px; background: var(--mint); color: var(--teal-dd); display: grid; place-items: center; margin-bottom: 22px; transition: background .3s, color .3s, transform .45s var(--ease); }
.tcard:hover .tcard-ico { background: var(--ink); color: var(--teal); transform: rotate(-6deg) scale(1.05); }
.ico { width: 30px; height: 30px; }
.tcard h3 { font-size: 21px; letter-spacing: -.01em; }
.tcard p { color: var(--ink-soft); font-size: 15.5px; margin-top: 10px; flex: 1; }
.tcard-link { margin-top: 20px; font-family: var(--f-display); font-weight: 500; font-size: 15px; color: var(--teal-dd); display: inline-flex; gap: 8px; align-items: center; align-self: flex-start; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); padding-bottom: 2px; }
.tcard:hover .tcard-link, .tcard-link:hover { background-size: 100% 1.5px; }

/* ---------- La clínica ---------- */
.clinic-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.clinic-photo { margin: 0; border-radius: 36px; overflow: hidden; box-shadow: var(--shadow-lg); border: 8px solid rgba(255, 255, 255, .75); }
.clinic-photo img { width: 100%; height: auto; }
.steps { margin-top: 34px; display: grid; gap: 4px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 16px 0 16px 62px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 16px; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--mint); color: var(--teal-dd); display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; }
.steps b { color: var(--ink); font-family: var(--f-display); font-weight: 600; }

/* enlace dentro de un texto */
.inline-link { color: var(--ink); background: linear-gradient(var(--teal), var(--teal)) 0 100% / 100% 2px no-repeat; transition: background-size .3s var(--ease), color .2s; padding-bottom: 1px; }
.inline-link:hover { color: var(--teal-dd); background-size: 100% 100%; background-image: linear-gradient(var(--mint), var(--mint)); }

/* ---------- Cita ---------- */
.booking { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); overflow: hidden; }
.booking-grid { position: relative; z-index: 1; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-list { display: grid; gap: 12px; margin-top: 36px; max-width: 380px; }
.contact-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 20px; transition: transform .35s var(--ease), background .25s; }
.contact-row:hover { transform: translateX(6px); background: rgba(255, 255, 255, .92); }
.contact-row[hidden] { display: none; }
.cr-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--teal); display: grid; place-items: center; flex: none; }
.contact-row small { display: block; font-size: 13px; color: var(--ink-mute); line-height: 1.2; }
.contact-row b { font-family: var(--f-display); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.booking-photo { margin: 32px 0 0; max-width: 320px; border-radius: 32px; overflow: hidden; box-shadow: var(--shadow-lg); border: 8px solid rgba(255, 255, 255, .75); }
.booking-photo img { width: 100%; height: auto; display: block; }
.booking-card { border-radius: 32px; padding: clamp(24px, 3.4vw, 40px); background: rgba(255, 255, 255, .7); box-shadow: var(--shadow-lg); }
.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-family: var(--f-display); font-weight: 500; font-size: 15px; margin-bottom: 8px; padding: 0; }
.field small { color: var(--ink-mute); font-weight: 400; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .9);
  font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 88px; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M3 5l4 4 4-4' fill='none' stroke='%230d2126' stroke-width='1.600' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-d); box-shadow: 0 0 0 4px rgba(59, 176, 162, .22); }
.field.has-error input, .field.has-error select { border-color: #c0532f; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { position: relative; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-opt span { display: block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85); font-family: var(--f-display); font-size: 15px; font-weight: 500; transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease); line-height: 1.15; text-align: center; }
.chip-opt span small { display: block; font-size: 11px; opacity: .65; text-transform: uppercase; letter-spacing: .08em; }
.chip-opt:hover span { border-color: var(--teal-d); }
.chip-opt input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--teal-d); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); margin: 4px 0 22px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal-d); flex: none; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.form-msg { min-height: 22px; margin-top: 14px; font-size: 14px; text-align: center; color: #b04a26; }
.success { text-align: center; padding: 30px 8px; display: grid; justify-items: center; gap: 14px; color: var(--teal-d); }
.success[hidden] { display: none; }
.success h3 { font-size: 30px; color: var(--ink); }
.success p { color: var(--ink-soft); max-width: 360px; }
.ok-c { stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw 1s var(--ease) forwards; }
.ok-p { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .55s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.is-loading .btn-label::after { content: "…"; }

/* ---------- Horario ---------- */
.hours-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hours-card { border-radius: 32px; padding: 14px clamp(20px, 3vw, 36px); }
.hours li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 8px; border-bottom: 1px solid var(--line); font-size: 17px; transition: background .3s; }
.hours li:last-child { border-bottom: 0; }
.hours span { font-family: var(--f-display); font-weight: 500; }
.hours b { font-weight: 400; color: var(--ink-soft); text-align: right; }
.hours .is-closed b { color: var(--ink-mute); }
.hours li.is-today { background: linear-gradient(90deg, var(--mint), transparent); border-radius: 14px; }
.hours li.is-today span::after { content: "Hoy"; margin-left: 10px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 3px 9px; border-radius: 999px; vertical-align: 2px; }

/* ---------- Opiniones ---------- */
.rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rcard { margin: 0; border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 14px; color: inherit; transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .3s; }
.rc-head { display: flex; align-items: center; gap: 12px; }
.rc-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--teal); font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.rc-who { display: flex; flex-direction: column; min-width: 0; }
.rc-who b { font-family: var(--f-display); font-weight: 600; font-size: 15.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-who small { font-size: 12.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-rating { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rc-when { font-size: 12.5px; color: var(--ink-mute); }

.rcard:hover { transform: translateY(-6px); background: rgba(255, 255, 255, .9); box-shadow: 0 30px 60px -24px rgba(23, 121, 111, .5); }
.rc-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--ink-mute); }
.rc-go { font-family: var(--f-display); font-weight: 500; color: var(--teal-dd); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); padding-bottom: 2px; }
.rcard:hover .rc-go { background-size: 100% 1.5px; }
.stars { display: inline-block; color: #e0a72c; letter-spacing: 2px; font-size: 16px; }
.rcard blockquote { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); flex: 1; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.chip { align-self: flex-start; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-family: var(--f-display); font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.chip-demo { background: #fff2cf; color: #7a5a06; border: 1px dashed #d8b64d; }

/* ---------- Mapa ---------- */
.map-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.addr { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; line-height: 1.35; margin-top: 8px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.map-frame { border-radius: 32px; overflow: hidden; padding: 8px; position: relative; }
.map-frame iframe { display: block; width: 100%; height: clamp(320px, 42vw, 460px); border: 0; border-radius: 26px; filter: saturate(.9) contrast(1.02); }
.map-frame iframe[hidden] { display: none; }
.map-gate {
  height: clamp(320px, 42vw, 460px); border-radius: 26px; background: var(--mint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 32px; color: var(--ink-soft);
}
.map-gate svg { color: var(--teal-d); }
.map-gate p { max-width: 320px; font-size: 14.5px; }

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin: 0 auto;
  background: rgba(13, 33, 38, .96); color: #fff; border-radius: 20px; padding: 18px 20px;
  box-shadow: var(--shadow-lg); display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  animation: proactiveIn .4s var(--ease) both;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1 1 260px; font-size: 13.5px; line-height: 1.5; margin: 0; color: rgba(255, 255, 255, .85); }
.cookie-banner a { color: var(--teal); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex: none; }
.cookie-actions .btn { padding: 9px 16px; font-size: 13.5px; }
.cookie-actions .btn-glass { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .22); }
.cookie-actions .btn-glass:hover { background: rgba(255, 255, 255, .18); }
@media (max-width: 500px) { .cookie-banner { flex-direction: column; align-items: stretch; } .cookie-actions { justify-content: flex-end; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #dcecea; padding: 64px 0 40px; margin-top: 40px; }
.footer .brand-mark { background: var(--teal); color: var(--ink); }
.footer .brand-text small { color: #8fb0ac; }
.footer .small { color: #8fb0ac; margin-top: 18px; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 36px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; font-family: var(--f-display); }
.footer-links a { color: #dcecea; opacity: .85; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease), opacity .2s; padding-bottom: 2px; }
.footer-links a:hover { opacity: 1; background-size: 100% 1px; }
.social-row { display: inline-flex; gap: 8px; margin-left: 4px; }
.social-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #dcecea; transition: background .25s, transform .3s var(--ease), color .25s; }
.social-btn:hover { background: var(--teal); color: var(--ink); transform: translateY(-2px); }
.social-btn[hidden] { display: none; }
.legal { border-top: 1px solid rgba(255, 255, 255, .12); padding: 22px 0; font-size: 14px; color: #b7cfcc; }
.legal summary { cursor: pointer; font-family: var(--f-display); font-weight: 500; color: #dcecea; }
.legal-body { display: grid; gap: 12px; margin-top: 16px; max-width: 760px; }
.copy { font-size: 13px; color: #8fb0ac; }

/* ---------- Barra móvil ---------- */
.mbar { display: none; }

/* ---------- Reveal (solo si hay JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }   /* defensa contra el bug A.4.5 */
.js .tcard.reveal.is-visible { transition: opacity .9s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease), background .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav-links-wrap { display: none; }
  .burger { display: block; }
  .nav-cta { margin-left: auto; }
  .hero-grid, .clinic-grid, .booking-grid, .hours-grid, .map-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .hero-visual { width: min(100%, 400px); margin-top: 20px; }
  .fc-1 { left: -10px; }
  .fc-2 { right: -8px; }
  .clinic-grid .clinic-photo { order: 2; }
  .trust-grid, .rgrid { grid-template-columns: 1fr; }
  .rgrid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: -24px; padding-inline: 24px; scrollbar-width: none; }
  .rgrid::-webkit-scrollbar { display: none; }
  .rgrid .rcard { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .wrap { width: calc(100% - 36px); }
  .nav { padding-left: 14px; }
  .brand-text b { font-size: 16px; }
  .nav-cta { display: none; }
  .burger { margin-left: auto; }
  .hero { min-height: auto; padding: 108px 0 56px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .float-card { padding: 10px 14px; border-radius: 16px; }
  .fc-big { font-size: 32px; }
  .fc-2 { bottom: 140px; right: -6px; }
  .fc-1 { bottom: 34px; }
  .mbar { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; padding: 10px; border-radius: 26px; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--glass-line); box-shadow: 0 16px 40px -12px rgba(13, 33, 38, .4); }
  .mbar.has-whatsapp { grid-template-columns: 52px 1fr 1.4fr; }
  .mbar .btn { padding: 14px 12px; }
  .btn-icon { padding: 0 !important; width: 52px; aspect-ratio: 1; color: #1da851; }
  .btn-lg { padding: 16px 22px; font-size: 16px; white-space: normal; text-align: center; }
  .hours li { font-size: 15px; flex-wrap: wrap; }
  .hours li.is-today span::after { margin-left: 6px; }
  .tgrid { grid-template-columns: 1fr; gap: 14px; }
  .tcard { display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; padding: 20px 18px; align-items: start; }
  .tcard-num { display: none; }
  .tcard-ico { width: 52px; height: 52px; margin: 0; grid-row: 1 / span 3; border-radius: 16px; }
  .tcard h3, .tcard p, .tcard-link { grid-column: 2; }
  .tcard h3 { font-size: 19px; }
  .tcard p { margin-top: 6px; font-size: 15px; }
  .tcard-link { margin-top: 12px; }
  .rgrid { margin-inline: -18px; padding-inline: 18px; }
  .booking-card { padding: 22px 18px; border-radius: 26px; }
}

/* Solo se atenúa lo realmente intrusivo (ver guía Windows) */
@media (prefers-reduced-motion: reduce) {
  .live { animation: none; }
  .arch, .float-card { animation: none; }
}
@media (max-width: 1020px) { .booking-photo { display: none; } }
@media (hover: none) { .btn { transform: none; } }

/* ---------- Chatbot ---------- */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 72;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(155deg, var(--ink) 0%, #143b39 100%); color: var(--teal);
  display: grid; place-items: center;
  box-shadow: 0 16px 36px -10px rgba(13, 33, 38, .55), 0 0 0 6px rgba(59, 176, 162, .12);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.chat-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 20px 40px -10px rgba(13, 33, 38, .6), 0 0 0 8px rgba(59, 176, 162, .16); }
.chat-fab[hidden] { display: none; }
.chat-fab-close { display: none; }
.chat-fab.is-open .chat-fab-open { display: none; }
.chat-fab.is-open .chat-fab-close { display: block; }
.chat-fab-dot { position: absolute; top: 4px; right: 4px; width: 13px; height: 13px; border-radius: 50%; background: #e0523f; border: 2.5px solid var(--bg); }
.chat-fab-dot[hidden] { display: none; }

/* Burbuja proactiva */
.chat-proactive {
  position: fixed; right: 20px; bottom: 92px; z-index: 71; max-width: 240px;
  background: #fff; color: var(--ink); padding: 14px 18px; border-radius: 18px 18px 4px 18px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; line-height: 1.4;
  animation: proactiveIn .5s var(--ease) both;
}
.chat-proactive[hidden] { display: none; }
.chat-proactive p { margin: 0; }
.chat-proactive-close { position: absolute; top: -9px; left: -9px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--ink); color: #fff; font-size: 10px; cursor: pointer; box-shadow: 0 4px 10px -3px rgba(13, 33, 38, .4); display: grid; place-items: center; }
@keyframes proactiveIn { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }

.chat-panel {
  position: fixed; right: 20px; bottom: 92px; z-index: 72;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 150px));
  border-radius: 28px; display: flex; flex-direction: column; overflow: hidden;
  background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .8);
  opacity: 0; transform: translateY(18px) scale(.97); pointer-events: none; transform-origin: bottom right;
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}
.chat-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.chat-panel[hidden] { display: flex; }

.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 10px 16px 16px; flex: none;
  background: linear-gradient(135deg, var(--ink) 0%, #143b39 100%); color: #fff;
}
.chat-head-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--teal); display: grid; place-items: center; flex: none; }
.chat-head-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.chat-head-txt b { font-family: var(--f-display); font-size: 15px; font-weight: 600; }
.chat-head-txt small { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .72); font-size: 11.5px; }
.chat-head-live { width: 6px; height: 6px; border-radius: 50%; background: #5fe0a8; box-shadow: 0 0 0 0 rgba(95, 224, 168, .6); animation: pulse 2.4s ease-out infinite; }
.chat-reset, .chat-close { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: rgba(255, 255, 255, .8); cursor: pointer; font-size: 14px; transition: background .2s, color .2s; display: grid; place-items: center; flex: none; }
.chat-reset { margin-left: auto; }
.chat-reset:hover, .chat-close:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #f6fbfa 0%, #fff 140px); }
.chat-empty { margin: auto; text-align: center; color: var(--ink-mute); font-size: 13.5px; padding: 0 20px; }
.chat-msg { max-width: 86%; padding: 10px 14px; border-radius: 17px; font-size: 14.5px; line-height: 1.48; white-space: pre-wrap; animation: msgIn .3s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-bot { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: 0 2px 10px -4px rgba(13, 33, 38, .12); }
.chat-user { align-self: flex-end; background: linear-gradient(135deg, var(--ink) 0%, #143b39 100%); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.is-streaming::after { content: ""; display: inline-block; width: 2px; height: 13px; margin-left: 2px; vertical-align: -2px; background: var(--teal-d); animation: caretBlink .85s step-end infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: 17px; border-bottom-left-radius: 4px; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); opacity: .5; animation: chatDot 1.1s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 10px; flex: none; }
.chat-quick[hidden] { display: none; }
.chat-chip {
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-soft); font-family: var(--f-display); font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .2s, border-color .2s, transform .25s var(--ease);
}
.chat-chip:hover { background: var(--mint); border-color: var(--teal); transform: translateY(-1px); }

.chat-form { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); flex: none; }
.chat-form input { flex: 1; padding: 11px 15px; border-radius: 999px; border: 1px solid var(--line); background: #f6fbfa; font-size: 14.5px; transition: background .2s, border-color .2s; }
.chat-form input:focus { outline: none; background: #fff; border-color: var(--teal-d); box-shadow: 0 0 0 3px rgba(59, 176, 162, .16); }
.chat-send { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: var(--teal); display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .2s; }
.chat-send:hover { background: var(--teal-d); color: #fff; }
.chat-send:disabled { opacity: .5; cursor: default; }
.chat-note { margin: 0; padding: 0 16px 12px; font-size: 11px; color: var(--ink-mute); text-align: center; flex: none; }

/* Destello al llegar solo a una sección desde el chatbot */
.section-flash { animation: sectionFlash 1.6s ease-out; }
@keyframes sectionFlash {
  0% { background-color: rgba(59, 176, 162, .14); }
  100% { background-color: transparent; }
}

@media (max-width: 640px) {
  .chat-fab { right: 14px; bottom: 92px; width: 54px; height: 54px; }
  .chat-proactive { right: 14px; bottom: 156px; max-width: 200px; }
  .chat-panel { right: 12px; left: 12px; width: auto; bottom: 152px; height: min(62vh, 500px); }
  .chat-quick { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 12px; }
  .chat-chip { flex: none; }
}
