/* ===========================================================================
  Renacia Clinic's — hoja de estilo compartida por las 11 páginas del sitio.

  FUENTE ÚNICA de: tokens de marca, tipografía base, cabecera, menú móvil,
  pie, banner de cookies, botones y botones flotantes.
  Lo específico de cada página vive en el <style> de esa página; el layout
  de blog y legales, en assets/article.css.

  La home lleva los modificadores .nav--fixed y .mobile-nav--overlay porque
  su cabecera flota sobre el hero. El resto de páginas la llevan en flujo
  normal, que es el comportamiento por defecto de estas clases.
  =========================================================================== */

:root{
 --bg: #0d0b09;
 --bg-2: #151210;
 --surface: #1a1613;
 --line: #332c22;
 --ink: #f2ece0;
 --ink-soft: #b6ab97;
 --ink-faint: #8a7d6a;
 --gold: #e8d0a8;
 --gold-dim: rgba(232,208,168,0.18);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: auto; }
body{
 margin: 0;
 background: var(--bg);
 color: var(--ink);
 font-family: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
 line-height: 1.6;
 -webkit-font-smoothing: antialiased;
 overflow-x: hidden;
}
h1,h2,h3{
 font-family: 'Fraunces', Georgia, serif;
 font-weight: 500;
 margin: 0;
 text-wrap: balance;
}
p{ margin: 0; }
a{ color: inherit; }
img{ max-width: 100%; display: block; }

/* barra de progreso de scroll — solo la home la usa */
.page-progress{ position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 600; background: transparent; }
.page-progress i{ display: block; height: 100%; width: 0%; background: var(--gold); }

/* --- CABECERA ------------------------------------------------------------ */
.nav{
 display: flex; align-items: center; justify-content: space-between;
 padding: 22px clamp(20px, 5vw, 64px);
 border-bottom: 1px solid var(--line);
 transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
}
.nav--fixed{
 position: fixed; top: 0; left: 0; right: 0; z-index: 100;
 border-bottom: none;
}
.nav--fixed.scrolled{
 background: rgba(13,11,9,0.86);
 backdrop-filter: blur(10px);
 padding-top: 14px; padding-bottom: 14px;
 border-bottom: 1px solid var(--line);
}
.nav-mark{ display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex-shrink: 0; text-decoration: none; }
/* El JPG del logo trae fondo negro puro: "lighten" lo funde con el fondo (casi negro o degradado)
  y deja solo el dorado, sin el recuadro. */
.nav-mark img{ height: 34px; width: auto; display: block; transition: height 0.3s ease; }
.nav--fixed.scrolled .nav-mark img{ height: 28px; }
.nav-mark .clinics{
 font-family: 'Fraunces', serif; font-style: italic; font-size: 0.64rem; letter-spacing: 0.14em;
 text-transform: uppercase; color: var(--ink-soft); margin-left: 2px; transition: font-size 0.3s ease;
}
.nav--fixed.scrolled .nav-mark .clinics{ font-size: 0.58rem; }

.nav-ig{
 display: flex; align-items: center; justify-content: center; flex-shrink: 0;
 width: 36px; height: 36px; color: var(--gold);
 transition: width 0.3s ease, height 0.3s ease, transform 0.25s ease, color 0.25s ease;
}
.nav--fixed.scrolled .nav-ig{ width: 30px; height: 30px; }
.nav-ig svg{ width: 100%; height: 100%; }
.nav-ig:hover{ color: var(--ink); transform: scale(1.08); }

.nav-links{ display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav-link{
 font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500;
 color: var(--ink-soft); text-decoration: none; position: relative; padding: 4px 0;
 transition: color 0.25s ease;
}
.nav-link::after{
 content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: var(--gold);
 transition: right 0.3s ease;
}
.nav-link:hover{ color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after{ right: 0; }
.nav-link.active{ color: var(--gold); }
@media (max-width: 880px){ .nav-links{ display: none; } }

.nav-cta{
 font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
 color: var(--bg); background: var(--gold); flex-shrink: 0;
 padding: 10px 20px; border-radius: 2px; text-decoration: none;
 border: 1px solid var(--gold);
 transition: background 0.25s ease, color 0.25s ease;
}
.nav-cta:hover{ background: transparent; color: var(--gold); }
@media (max-width: 880px){ .nav-cta{ display: none; } }

.nav-burger{
 display: none; flex-direction: column; justify-content: center; gap: 5px;
 /* 44×44 para el dedo; el margen negativo mantiene las rayas donde estaban. */
 width: 44px; height: 44px; margin: -10px -7px; padding: 10px 7px; box-sizing: border-box;
 background: none; border: none; cursor: pointer; flex-shrink: 0;
}
.nav-burger span{ display: block; height: 1.5px; background: var(--ink); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 880px){ .nav-burger{ display: flex; } }

/* --- MENÚ MÓVIL ---------------------------------------------------------- */
.mobile-nav{
 max-height: 0; overflow: hidden; background: var(--bg-2);
 display: flex; flex-direction: column;
 transition: max-height 0.35s ease;
}
.mobile-nav-inner{ padding: 8px 24px 18px; display: flex; flex-direction: column; }
.mobile-nav a{
 color: var(--ink-soft); text-decoration: none; font-size: 1rem; padding: 15px 0;
 border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500;
}
.mobile-nav a.active{ color: var(--gold); }
/* variante de la home: panel superpuesto, animado por GSAP con height */
.mobile-nav--overlay{
 position: fixed; top: 0; left: 0; right: 0; z-index: 90;
 max-height: none; height: 0;
 border-bottom: 1px solid var(--line);
 transition: none;
}
.mobile-nav--overlay .mobile-nav-inner{ padding: 88px 24px 20px; }
@media (min-width: 881px){ .mobile-nav{ display: none; } }

/* --- BOTONES ------------------------------------------------------------- */
.btn{
 font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
 padding: 14px 28px; border-radius: 2px; text-decoration: none; display: inline-block;
 transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color .25s ease;
}
.btn-primary{ background: var(--gold); color: #17130c; border: 1px solid var(--gold); }
.btn-primary:hover{ transform: translateY(-2px); }
.btn-ghost{ background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover{ border-color: var(--gold); color: var(--gold); }

/* --- PIE ----------------------------------------------------------------- */
footer{ background: var(--bg); border-top: 1px solid var(--line); padding: 72px 24px 28px; }
.footer-inner{
 max-width: 1080px; margin: 0 auto;
 display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px;
 padding-bottom: 40px; border-bottom: 1px solid var(--line);
}
@media (max-width: 720px){ .footer-inner{ grid-template-columns: 1fr; gap: 32px; text-align: center; } }
.footer-brand{ display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
@media (max-width: 720px){ .footer-brand{ align-items: center; } }
.footer-brand img{ height: 30px; width: auto; }
.footer-brand .clinics{
 font-family: 'Fraunces', serif; font-style: italic; font-size: 0.8rem; letter-spacing: 0.12em;
 text-transform: uppercase; color: var(--ink-soft); margin-top: -2px;
}
.footer-brand .tag{ font-size: 0.88rem; color: var(--ink-faint); max-width: 32ch; margin-top: 4px; }
.footer-col{ display: flex; flex-direction: column; }
.footer-col h2{
 font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
 font-family: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
 color: var(--ink-faint); margin: 0 0 16px;
}
.footer-col a{
 color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; padding: 6px 0;
 transition: color 0.2s ease;
}
.footer-col a:hover{ color: var(--gold); }
.footer-bottom{
 max-width: 1080px; margin: 0 auto; padding-top: 24px;
 display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
 font-size: 0.78rem; color: var(--ink-faint);
}
@media (max-width: 720px){ .footer-bottom{ justify-content: center; text-align: center; } }
.footer-legal{ display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a{ display: inline-block; padding-block: 12px; color: var(--ink-faint); text-decoration: none; transition: color 0.2s ease; }
.footer-legal a:hover{ color: var(--gold); }

/* --- BANNER DE COOKIES --------------------------------------------------- */
.cookie-banner{
 position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 700; max-width: 640px; margin: 0 auto;
 background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
 padding: 18px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
 box-shadow: 0 12px 40px rgba(0,0,0,0.4);
 transform: translateY(140%); transition: transform 0.4s ease;
}
.cookie-banner.visible{ transform: translateY(0); }
.cookie-banner p{ color: var(--ink-soft); font-size: 0.86rem; flex: 1 1 320px; }
.cookie-banner a{ color: var(--gold); }
.cookie-actions{ flex-shrink: 0; display: flex; gap: 10px; flex-wrap: wrap; }
/* Rechazar tiene el mismo tamaño y peso que Aceptar: la normativa pide que sea igual de fácil. */
.cookie-btn.cookie-reject{ background: transparent; color: var(--gold); }
.cookie-btn.cookie-reject:hover{ background: rgba(232,208,168,0.08); }
.footer-legal button{
 display: inline-block; padding-block: 12px; background: none; border: 0; cursor: pointer;
 font: inherit; color: var(--ink-faint); transition: color 0.2s ease;
}
.footer-legal button:hover{ color: var(--gold); }
.cookie-btn{
 font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600;
 padding: 10px 20px; border-radius: 2px; cursor: pointer;
 background: var(--gold); color: #17130c; border: 1px solid var(--gold);
}

/* --- BOTONES FLOTANTES (WhatsApp + volver arriba) ------------------------- */
.floating-actions{
 position: fixed; right: 20px; bottom: 20px; z-index: 750;
 display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.fab{
 display: flex; align-items: center; justify-content: center;
 border-radius: 50%; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
 transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}
.fab:hover{ transform: translateY(-3px); }
.fab-top{
 width: 44px; height: 44px; background: var(--surface); border: 1px solid var(--line); color: var(--gold);
 opacity: 0; visibility: hidden; cursor: pointer;
}
.fab-top.visible{ opacity: 1; visibility: visible; }
.fab-top svg{ width: 18px; height: 18px; }
.fab-wa{ width: 56px; height: 56px; background: #25d366; color: #fff; }
.fab-wa svg{ width: 30px; height: 30px; }
@media (max-width: 600px){ .floating-actions{ right: 16px; bottom: 16px; } }
/* En pantallas estrechas el aviso de cookies ocupa todo el ancho: los botones flotantes
  esperan a que se acepte para no tapar su texto. */
.floating-actions{ transition: opacity 0.25s ease, visibility 0.25s ease; }
@media (max-width: 780px){
 body:has(.cookie-banner.visible) .floating-actions{ opacity: 0; visibility: hidden; pointer-events: none; }
}

/* --- FOCO VISIBLE Y MOVIMIENTO REDUCIDO ---------------------------------- */
.btn:focus-visible, .nav-cta:focus-visible, .nav-link:focus-visible, .nav-mark:focus-visible,
.nav-ig:focus-visible, .faq-q:focus-visible, .nav-burger:focus-visible, .mobile-nav a:focus-visible,
.cookie-btn:focus-visible, .footer-col a:focus-visible, .footer-legal a:focus-visible, .fab:focus-visible{
 outline: 2px solid var(--gold); outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce){
 *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
