/* =====================================================
   CIUDAD DE CINE SÉNIOR — Sistema de estilos compartido
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500;1,6..72,600&display=swap');

:root {
  /* LIGHT (institucional) */
  --canvas: #ffffff;
  --surface-1: #f8fafc;
  --surface-2: #f1f5f9;
  --hairline: #e2e8f0;
  --hairline-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-subtle: #64748b;
  --blue: #1e3a5f;
  --blue-hover: #2c4d7a;
  --gold: #AB3448;
  --gold-soft: #C0455B;

  /* DARK (cinematográfico) */
  --canvas-dark: #0a0a0a;
  --surface-dark-1: #141414;
  --surface-dark-2: #1c1c1c;
  --hairline-dark: #262626;
  --ink-dark: #fafafa;
  --ink-dark-muted: #a3a3a3;
  --ink-dark-subtle: #737373;
  --gold-dark: #C0455B;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Focus styles (accesibilidad teclado) === */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
.section-dark :focus-visible,
.section-dark-2 :focus-visible {
  outline-color: var(--gold-dark);
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Skip to content (accesibilidad teclado) === */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.skip-to-content:focus {
  left: 8px;
}

/* === Mobile menu === */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}
@media (max-width: 767px) {
  .mobile-menu-btn { display: inline-flex; }
}
.mobile-menu-btn svg { width: 20px; height: 20px; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 85vw);
  background: var(--canvas);
  border-left: 1px solid var(--hairline);
  z-index: 50;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.4);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer .nav-link {
  padding: 12px 0;
  font-size: 1rem;
  border-bottom: 1px solid var(--hairline);
}

/* === DISPLAY: Newsreader serif === */
.display {
  font-family: 'Newsreader', 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.005em;
  font-variation-settings: "opsz" 60;
}
.display-italic {
  font-family: 'Newsreader', 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.015em;
  font-variation-settings: "opsz" 60;
}
.display-light {
  font-family: 'Newsreader', 'Fraunces', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  font-variation-settings: "opsz" 60;
}

/* === Tamaño mínimo: text-xs sube a 16px === */
.text-xs {
  font-size: 1rem !important;
  line-height: 1.55 !important;
}
/* === text-sm también sube un poco para coherencia === */
.text-sm {
  font-size: 1.0625rem !important;
  line-height: 1.55 !important;
}

/* === Eyebrow === */
.eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
}
.eyebrow-gold { color: var(--gold); }
.eyebrow-blue { color: var(--blue); }
.eyebrow-gold-dark { color: var(--gold-dark); }
.eyebrow-muted { color: var(--ink-subtle); }

/* === Buttons === */
.btn-primary {
  background: var(--gold);
  color: #ffffff;
  padding: 14px 28px;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 6px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-primary:hover { background: var(--gold-soft); }

/* Botón "Contacto" del header (granate Pantone) */
.btn-contact {
  background: var(--gold);
  color: #ffffff;
  padding: 14px 28px;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-contact:hover { background: var(--gold-soft); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  padding: 13px 28px;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 6px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--surface-1); border-color: var(--gold); }

.btn-gold {
  background: var(--gold-dark);
  color: var(--canvas-dark);
  padding: 14px 28px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-gold:hover { background: #D85C72; }

.btn-outline-dark {
  background: transparent;
  color: var(--ink-dark);
  border: 1px solid #404040;
  padding: 13px 28px;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 6px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-outline-dark:hover { border-color: var(--gold-dark); color: var(--gold-dark); }

.btn-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color .2s;
}
.btn-text:hover { color: var(--gold); }

/* === Cards === */
.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 32px;
  transition: border-color .2s;
}
.card:hover { border-color: var(--hairline-strong); }

.card-dark {
  background: var(--surface-dark-1);
  border: 1px solid var(--hairline-dark);
  border-radius: 12px;
  padding: 32px;
}

/* === Sections === */
.section-light { background: var(--canvas); color: var(--ink); }
.section-light-2 { background: var(--surface-1); color: var(--ink); }
.section-dark { background: var(--canvas-dark); color: var(--ink-dark); }
.section-dark-2 { background: var(--surface-dark-1); color: var(--ink-dark); }

/* === Stat number === */
.stat-num {
  font-family: 'Newsreader', 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 60;
}

/* === Pull quote === */
.pull-quote {
  font-family: 'Newsreader', 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  font-variation-settings: "opsz" 60;
}

/* === Hairlines === */
.hairline { border-color: var(--hairline); }
.hairline-strong { border-color: var(--hairline-strong); }
.hairline-dark { border-color: var(--hairline-dark); }

/* === Hero fade-in stagger === */
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-fade-1 { animation: hero-fade-in 0.9s ease-out 0.10s both; }
.hero-fade-2 { animation: hero-fade-in 0.9s ease-out 0.25s both; }
.hero-fade-3 { animation: hero-fade-in 0.9s ease-out 0.45s both; }
.hero-fade-4 { animation: hero-fade-in 0.9s ease-out 0.65s both; }
@media (prefers-reduced-motion: reduce) {
  .hero-fade-1, .hero-fade-2, .hero-fade-3, .hero-fade-4 { animation: none !important; }
}

/* === Scroll reveal (fade + slide desde la izquierda al entrar en viewport) === */
.scroll-reveal {
  opacity: 0;
  transform: translate3d(-32px, 0, 0);
  transition:
    opacity 1.4s cubic-bezier(0.32, 0.72, 0, 1),
    transform 1.4s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.scroll-reveal-d1 { transition-delay: 0.15s; }
.scroll-reveal-d2 { transition-delay: 0.32s; }
.scroll-reveal-d3 { transition-delay: 0.49s; }
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* === Lazy image fade-in === */
img.fade-img { opacity: 0; transition: opacity 0.6s ease-out; }
img.fade-img.loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  img.fade-img { opacity: 1; transition: none; }
}

/* === Ken Burns effect (zoom + pan suave en imágenes hero) === */
@keyframes ken-burns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -0.5%); }
}
.ken-burns {
  animation: ken-burns 28s ease-out infinite alternate;
  transform-origin: center center;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .ken-burns { animation: none !important; }
}

/* En desktop, .pan-logos hace barrido vertical: muestra primero el logo de arriba
   (Asociación de Maior Crea) y luego el de abajo (Animation Hub). En mobile la
   imagen cuadrada se ve completa, así que mantiene el ken-burns estático. */
/* === Logo lateral en heroes oscuros (somos, animation-hub):
   Frame anclado al contenedor del texto (max-w-7xl), alineado al borde derecho
   y al fondo igual que el titular. === */
.hero-side-frame {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
  width: 26%;
  max-width: 380px;
}

/* Frame cuadrado para mostrar el logo bombeando */
.hero-side-frame-square {
  aspect-ratio: 1 / 1;
}

/* Imagen del frame: logo completo, mantiene proporción */
.hero-side-img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* En móvil reducimos tamaño y centramos arriba del texto del hero */
@media (max-width: 767px) {
  .hero-side-frame {
    position: relative;
    bottom: auto;
    right: auto;
    width: 60%;
    max-width: 220px;
    margin: 0 auto 1.5rem;
  }
}

/* === Hero bombeo lento (Animation Hub) === */
@keyframes hero-bombeo {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
.hero-bombeo {
  animation: hero-bombeo 8s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .hero-bombeo { animation: none !important; }
}

/* === Banda marquee del logo De Maior Crea === */
.dmc-marquee-banner {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  height: 240px;
}
.dmc-marquee-logo {
  position: absolute;
  top: 50%;
  left: 0;
  height: 100%;
  width: auto;
  transform: translate(100vw, -50%);
  animation: dmc-marquee 18s linear infinite;
  will-change: transform;
}
@keyframes dmc-marquee {
  0%   { transform: translate(100vw, -50%); }   /* fuera por la derecha */
  100% { transform: translate(-100%, -50%); }   /* fuera por la izquierda */
}
@media (prefers-reduced-motion: reduce) {
  .dmc-marquee-logo {
    animation: none !important;
    transform: translate(0, -50%) !important;
    left: 50%;
    margin-left: -100px;
  }
}
@media (max-width: 767px) {
  .dmc-marquee-banner { height: 160px; }
}

@keyframes pan-logos {
  0%   { object-position: 50% 0%;   transform: scale(1.04); }
  15%  { object-position: 50% 0%;   transform: scale(1.05); }
  50%  { object-position: 50% 100%; transform: scale(1.05); }
  65%  { object-position: 50% 100%; transform: scale(1.05); }
  100% { object-position: 50% 0%;   transform: scale(1.04); }
}
@media (min-width: 768px) {
  .pan-logos {
    animation: pan-logos 14s ease-in-out infinite !important;
    will-change: transform, object-position;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pan-logos { animation: none !important; }
}

/* En mobile, .ken-burns-pan hace barrido lateral con zoom (en vez de Ken Burns estático)
   para que se aprecien todos los personajes de la foto horizontal.
   Empieza en 25% (ya se ve un personaje) y va lentamente hacia el otro lado. */
@keyframes ken-burns-pan-mobile {
  0%   { transform: scale(1.05); object-position: 25% center; }
  100% { transform: scale(1.16); object-position: 90% center; }
}
@media (max-width: 767px) {
  .ken-burns-pan {
    animation: ken-burns-pan-mobile 36s linear infinite alternate !important;
    object-position: 25% center;
  }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .ken-burns-pan { animation: none !important; }
}

/* === Hero gallery (crossfade entre 2+ imágenes con ken-burns continuo) === */
.hero-gallery { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  will-change: transform, opacity;
  z-index: 0;
}
/* 2 imágenes — ciclo total 24s, 12s por imagen con crossfade de ~2s */
.hero-gallery--2 .hero-gallery-img {
  animation:
    hero-gallery-fade-2 24s ease-in-out infinite,
    ken-burns 24s ease-out infinite alternate;
}
.hero-gallery--2 .hero-gallery-img:nth-child(1) { animation-delay: 0s, 0s; }
.hero-gallery--2 .hero-gallery-img:nth-child(2) { animation-delay: -12s, -12s; }

@keyframes hero-gallery-fade-2 {
  0%   { opacity: 1; }
  42%  { opacity: 1; }
  50%  { opacity: 0; }
  92%  { opacity: 0; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-gallery-img {
    animation: none !important;
    opacity: 1 !important;
  }
  .hero-gallery-img:nth-child(n+2) { display: none; }
}

/* === Hero overlay === */
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.55) 50%, rgba(10,10,10,0.15) 100%),
    linear-gradient(180deg, transparent 60%, rgba(10,10,10,1) 100%);
}

.hero-overlay-center {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.45) 50%, rgba(10,10,10,0.95) 100%);
}

/* === Decorative gold rule === */
.gold-rule {
  height: 1px;
  background: var(--gold);
  width: 32px;
  display: inline-block;
}
.gold-rule-dark {
  height: 1px;
  background: var(--gold-dark);
  width: 32px;
  display: inline-block;
}

/* === Nav (con underline animado) === */
.nav-link {
  font-size: 1rem;
  color: var(--ink);
  transition: color .15s;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.28s ease-out;
}
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--blue); font-weight: 500; }
.nav-link.active::after {
  width: 100%;
  background: var(--blue);
}
@media (prefers-reduced-motion: reduce) {
  .nav-link::after { transition: none; }
}
/* En el drawer móvil el underline no aplica (los items son block) */
.mobile-drawer .nav-link::after { display: none; }

/* === Stats grid (cuatro cifras) === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stats-grid > div {
  background: var(--canvas);
  padding: 32px;
}

/* Variante 6 cifras */
.stats-grid-6 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
@media (min-width: 768px) { .stats-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .stats-grid-6 { grid-template-columns: repeat(6, 1fr); } }
.stats-grid-6 > div {
  background: var(--canvas);
  padding: 28px;
}

/* === Header sticky === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

/* === Breadcrumb === */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-subtle);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--ink-subtle); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { margin: 0 0.5rem; color: var(--hairline-strong); }

/* === Process timeline === */
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--hairline);
}
.timeline-item:last-child { border-bottom: 0; }

/* === Accordion-like detail === */
.detail-item {
  border-bottom: 1px solid var(--hairline);
  padding: 1.75rem 0;
}
.detail-item:first-child { border-top: 1px solid var(--hairline); }

/* === Util === */
.text-balance { text-wrap: balance; }
.no-underline { text-decoration: none; }

/* === Language switcher (ES · GL · EN, vía Google Translate) === */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  user-select: none;
}
.lang-btn {
  background: transparent;
  border: 0;
  padding: 4px 5px;
  color: var(--ink-subtle);
  cursor: pointer;
  text-transform: uppercase;
  transition: color .2s;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: 1;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { color: var(--gold); font-weight: 600; }
.lang-sep { color: var(--hairline-strong); }

/* === Iconos sociales (footer) === */
.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.social-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  text-decoration: none;
  transition: all .2s;
}
.social-icon:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.social-icon svg { width: 18px; height: 18px; }

/* === Lightbox === */
.lightbox-trigger { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transition: opacity .3s ease;
}
.lightbox-overlay.open {
  display: flex;
  opacity: 1;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  cursor: zoom-out;
}
.lightbox-overlay.open .lightbox-img { transform: scale(1); }
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--ink-dark-muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0 32px;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); }

/* === Header shrink al hacer scroll === */
.site-header { transition: padding .25s ease, box-shadow .25s ease, background .25s ease; }
.site-header.shrunk {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
}
.site-header.shrunk > div {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  transition: padding .25s ease;
}
.site-header.shrunk .display.text-xl { font-size: 1.05rem; transition: font-size .25s ease; }

/* === Barra de progreso de lectura === */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--gold);
  z-index: 100;
  pointer-events: none;
  transition: width 80ms linear;
}

/* === Botón volver arriba === */
.back-to-top {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 44;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(171, 52, 72, 0.28);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s;
}
.back-to-top.visible {
  opacity: 0.92;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover { background: var(--gold-soft); opacity: 1; }
.back-to-top svg { width: 18px; height: 18px; }

/* === Banner de cookies (RGPD) === */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 560px;
  margin-left: auto;
  background: #ffffff;
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  transform: translateY(120%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.32,.72,0,1), opacity .35s;
}
.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
}
.cookie-banner-title {
  font-family: 'Newsreader', 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.cookie-banner-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.cookie-banner-text a {
  color: var(--gold);
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cookie-btn {
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.cookie-btn-accept {
  background: var(--gold);
  color: #fff;
}
.cookie-btn-accept:hover { background: var(--gold-soft); }
.cookie-btn-reject {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
}
.cookie-btn-reject:hover { background: var(--surface-1); border-color: var(--gold); }
.cookie-btn-config {
  background: transparent;
  color: var(--ink-muted);
  text-decoration: underline;
  padding: 10px 8px;
}
.cookie-btn-config:hover { color: var(--gold); }
@media (max-width: 480px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 18px 18px; }
}

/* Variante flotante: esquina inferior derecha, siempre accesible, fuera del flujo */
.lang-switcher-float {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 45;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  opacity: 0.7;
  transition: opacity .2s, box-shadow .2s;
}
.lang-switcher-float:hover {
  opacity: 1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

/* Ocultar la barra superior y tooltips de Google Translate */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget,
#google_translate_element { display: none !important; }
body { top: 0 !important; position: static !important; }
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font[style*="background-color"] { background: transparent !important; box-shadow: none !important; }

/* === Hover cards === */
.link-card {
  display: block;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 32px;
  transition: all .2s;
  text-decoration: none;
  color: inherit;
}
.link-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.link-card .arrow {
  transition: transform .2s;
  display: inline-block;
}
.link-card:hover .arrow {
  transform: translateX(4px);
}

/* =====================================================
   MOBILE RESPONSIVE REFINEMENTS (≤ 640px y ≤ 768px)
   Mantienen la jerarquía visual sin desbordes en 375px.
   ===================================================== */

/* Cifras grandes — cap por viewport para que nunca desborden */
@media (max-width: 640px) {
  .stat-num {
    font-size: clamp(1.9rem, 9vw, 2.75rem) !important;
    letter-spacing: -0.015em;
  }
}

/* Display headings — capear top size en móvil para que serif italic no rompa en 4 líneas */
@media (max-width: 640px) {
  .display.text-6xl,
  .display.text-7xl,
  .display.text-8xl,
  .display.text-9xl {
    font-size: clamp(1.85rem, 8.5vw, 2.6rem) !important;
    line-height: 1.1;
  }
  .display.text-5xl {
    font-size: clamp(1.7rem, 7.8vw, 2.3rem) !important;
  }
  .display.text-4xl {
    font-size: clamp(1.55rem, 7.2vw, 2.1rem) !important;
  }
  .pull-quote.text-5xl,
  .pull-quote.text-4xl,
  .pull-quote.text-3xl {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem) !important;
    line-height: 1.3;
  }
}

/* Cards — padding más respirado en móvil */
@media (max-width: 640px) {
  .card,
  .card-dark,
  .link-card {
    padding: 22px;
  }
  .stats-grid > div { padding: 22px 18px; }
  .stats-grid-6 > div { padding: 20px 14px; }
}

/* Sticky de la columna lateral en somos.html — relativo en móvil */
@media (max-width: 1023px) {
  .card-sticky-mobile-off {
    position: relative !important;
    top: auto !important;
  }
}

/* Detail items con labels w-20: gap más ajustado en móvil para no comer texto */
@media (max-width: 640px) {
  .detail-item { padding: 1.4rem 0; }
}

/* Ken Burns: en móvil reducir filtro/animación para batería */
@media (max-width: 640px) {
  .ken-burns { animation-duration: 36s; }
}

/* Hero side frame: en móvil ya está como relativo, pero asegurar margen superior */
@media (max-width: 640px) {
  .hero-side-frame {
    width: 50%;
    max-width: 180px;
    margin: 0 auto 1rem;
  }
}
