@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ─── VARIABLES ──────────────────────────────────────────────────── */
:root {
  /* Oscuros (hero, footer, stats) */
  --black:     #0a0a0a;
  --dark:      #141414;
  --dark-card: #1e1e1e;

  /* Claros (cuerpo principal) */
  --bg:        #f7f4ef;
  --bg-alt:    #ffffff;
  --surface:   #efefeb;
  --border:    #e0ddd6;
  --border-dk: #2a2a2a;

  /* Texto */
  --text:      #1a1a1a;
  --text-sub:  #555550;
  --text-lt:   #888880;

  /* Dorado */
  --gold:      #c9a84c;
  --gold-lt:   #e8c96d;
  --gold-dk:   #a07830;

  /* Blancos (sobre fondos oscuros) */
  --white:     #f5f0e8;
  --white-dim: #999990;

  --serif: 'Playfair Display', Georgia, serif;
  --alt:   'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
  --nav-h: 72px;
  --ease:  cubic-bezier(.25,.46,.45,.94);
}

/* ─── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── SCROLLBAR ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--gold-dk); border-radius: 3px; }

/* ─── SELECTION ──────────────────────────────────────────────────── */
::selection { background: var(--gold); color: var(--black); }

/* ═══════════════════════════════════════════════════════════════════
   HEADER / NAV  (sobre fondo oscuro en hero, claro después)
═══════════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), box-shadow .4s;
}
/* Cuando el hero pasa → fondo blanco */
.site-header.scrolled {
  background: rgba(247,244,239,.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo { display: flex; align-items: center; }
.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter .4s;
}
.site-header.scrolled .logo-img {
  filter: none;
}

/* Links */
.nav-links { display: flex; align-items: center; gap: 2.2rem; }
.nav-links a {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(245,240,232,.7);
  position: relative;
  transition: color .3s;
}
.site-header.scrolled .nav-links a { color: var(--text-sub); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .35s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white) !important; }
.site-header.scrolled .nav-links a:hover,
.site-header.scrolled .nav-links a.active { color: var(--text) !important; }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Dropdown */
.nav-drop { position: relative; }
.nav-drop-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(245,240,232,.7);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: color .3s;
  position: relative;
}
.site-header.scrolled .nav-drop-trigger { color: var(--text-sub); }
.nav-drop:hover .nav-drop-trigger,
.nav-drop.is-open .nav-drop-trigger,
.nav-drop.active .nav-drop-trigger { color: var(--white); }
.site-header.scrolled .nav-drop:hover .nav-drop-trigger,
.site-header.scrolled .nav-drop.is-open .nav-drop-trigger,
.site-header.scrolled .nav-drop.active .nav-drop-trigger { color: var(--text); }
.nav-drop-trigger::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .35s var(--ease);
}
.nav-drop:hover .nav-drop-trigger::after,
.nav-drop.is-open .nav-drop-trigger::after,
.nav-drop.active .nav-drop-trigger::after { width: 100%; }
.nav-drop-caret {
  font-size: .7rem;
  transition: transform .25s var(--ease);
  display: inline-block;
}
.nav-drop:hover .nav-drop-caret,
.nav-drop.is-open .nav-drop-caret { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  padding: .4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 100;
}
.nav-drop-menu::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: #fff;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.nav-drop:hover .nav-drop-menu,
.nav-drop.is-open .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-drop-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text) !important;
  border-radius: 4px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-drop-menu a:hover {
  background: var(--gold);
  color: var(--black) !important;
}
.nav-drop-menu a::after { display: none !important; }
.nav-drop-ext { font-size: .9em; color: var(--gold-dk); }
.nav-drop-menu a:hover .nav-drop-ext { color: var(--black); }

/* Mobile sub-nav (dropdown flatten en mobile) */
.nav-mobile-group {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.nav-mobile-label {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-dk);
  font-weight: 600;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-sub {
  padding-left: .8rem;
  border-left: 2px solid var(--gold);
}

/* CTA */
.nav-cta {
  font-size: .76rem !important;
  font-weight: 500 !important;
  color: var(--black) !important;
  background: var(--gold);
  padding: .55rem 1.3rem;
  border-radius: 2px;
  letter-spacing: .12em !important;
  transition: background .3s, transform .2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--gold-lt) !important; transform: translateY(-1px); }

/* Login */
.nav-login {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .76rem !important;
  font-weight: 500 !important;
  color: var(--white) !important;
  border: 1px solid rgba(255,255,255,.35);
  padding: .52rem 1.1rem;
  border-radius: 2px;
  letter-spacing: .1em !important;
  transition: border-color .3s, color .3s, background .3s !important;
  white-space: nowrap;
}
.nav-login::after { display: none !important; }
.nav-login:hover {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  background: rgba(201,168,76,.08) !important;
}
.site-header.scrolled .nav-login {
  color: var(--text-sub) !important;
  border-color: var(--border) !important;
}
.site-header.scrolled .nav-login:hover {
  border-color: var(--gold-dk) !important;
  color: var(--gold-dk) !important;
  background: rgba(160,120,48,.06) !important;
}

/* Hamburger */
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-burger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--white);
  transition: transform .3s, opacity .3s, background .4s;
}
.site-header.scrolled .nav-burger span { background: var(--text); }
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(247,244,239,.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-sub);
  transition: color .3s;
}
.nav-mobile a:hover { color: var(--gold-dk); }

/* ═══════════════════════════════════════════════════════════════════
   HERO  (dos columnas: frases | puzzle)
═══════════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
  background: var(--black);
}

/* Patrón de tablero sutil de fondo */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-conic-gradient(#161616 0% 25%, #111 0% 50%) 0 0 / 64px 64px;
  opacity: .5;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(8,8,8,.9) 0%, rgba(8,8,8,.6) 100%);
  z-index: 1;
}

/* Columna izquierda: frases */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 3rem) 5% 4rem 6%;
}

/* Columna derecha: puzzle */
.hero-puzzle {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 6% 3rem 4%;
}

/* ── Puzzle UI ─────────────────────────────────────────────────── */
.puzzle-header {
  width: 100%;
  margin-bottom: 1rem;
}
.puzzle-eyebrow {
  font-family: var(--sans);
  font-size: .65rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .5rem;
  display: flex; align-items: center; gap: .6rem;
}
.puzzle-eyebrow::before {
  content: ''; display: block;
  width: 18px; height: 1px; background: var(--gold);
}
.puzzle-title {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 700;
  color: var(--white); line-height: 1.2;
}
.puzzle-difficulty {
  font-family: var(--sans);
  font-size: .72rem; color: var(--white-dim);
  margin-top: .25rem;
}

/* Tablero */
#puzzle-board {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
/* Sobreescribir bordes y colores de chessboard.js */
#puzzle-board .board-b72b1 {
  border: 2px solid var(--gold-dk) !important;
  border-radius: 3px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
/* Casillas — paleta clásica de Lichess (brown) */
#puzzle-board .white-1e1d7 { background: #f0d9b5 !important; color: #b58863 !important; }
#puzzle-board .black-3c85d { background: #b58863 !important; color: #f0d9b5 !important; }
/* Resaltado al seleccionar (tono olivo como Lichess) */
#puzzle-board .highlight1-32417,
#puzzle-board .highlight2-9c5d2 {
  background: #aaa23a !important;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.15) !important;
}
/* Que las piezas nunca sobresalgan de su casilla y siempre se vean encima */
#puzzle-board .piece-417db {
  max-width: 100%;
  max-height: 100%;
  z-index: 5;
  cursor: grab;
}
#puzzle-board .piece-417db:active { cursor: grabbing; }

/* ── Indicadores de movimiento (estilo Lichess) ──────────────── */
#puzzle-board .square-55d63 { position: relative; }

/* Casilla de origen seleccionada */
#puzzle-board .puzzle-selected {
  background: rgba(155, 199, 0, .41) !important;
}

/* Destino legal vacío — punto verde (debajo de las piezas) */
#puzzle-board .puzzle-dot::after {
  content: '';
  position: absolute;
  width: 28%; height: 28%;
  top: 36%; left: 36%;
  border-radius: 50%;
  background: rgba(20, 85, 30, .5);
  pointer-events: none;
  z-index: 1;
}

/* Destino con captura — anillo detrás de la pieza */
#puzzle-board .puzzle-capture::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(20, 85, 30, .45);
  pointer-events: none;
  z-index: 1;
}
/* Barra y status alineados al nuevo ancho */
.puzzle-progress-bar,
.puzzle-status,
.puzzle-actions { max-width: 460px; }

/* Barra de progreso */
.puzzle-progress-bar {
  width: 100%;
  max-width: 340px;
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  margin-top: .75rem;
  overflow: hidden;
}
.puzzle-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  width: 0%;
  transition: width .4s var(--ease);
}

/* Status */
.puzzle-status {
  width: 100%;
  max-width: 340px;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--white-dim);
  min-height: 1.4rem;
  margin-top: .6rem;
  text-align: center;
  transition: color .3s;
}
.puzzle-status.ps-success { color: #6fcf97; }
.puzzle-status.ps-error   { color: #eb5757; }
.puzzle-status.ps-ok      { color: var(--gold-lt); }
.puzzle-status.ps-loading { color: var(--white-dim); font-style: italic; }

/* Botones del puzzle */
.puzzle-actions {
  display: flex;
  gap: .6rem;
  margin-top: .85rem;
  width: 100%;
  max-width: 340px;
}
.btn-puzzle {
  flex: 1;
  font-family: var(--sans);
  font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .55rem .8rem;
  border-radius: 2px;
  transition: all .25s;
  text-align: center;
  cursor: pointer;
}
.btn-puzzle-outline {
  background: transparent;
  color: var(--white-dim);
  border: 1px solid rgba(255,255,255,.15);
}
.btn-puzzle-outline:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-puzzle-outline:disabled {
  opacity: .35; cursor: not-allowed;
}

/* Lichess attribution */
.puzzle-attribution {
  font-family: var(--sans);
  font-size: .6rem;
  color: rgba(255,255,255,.2);
  margin-top: .75rem;
  text-align: center;
}
.puzzle-attribution a { color: rgba(255,255,255,.35); text-decoration: underline; }

.hero-eyebrow {
  font-family: var(--sans);
  font-size: .7rem; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: center; gap: .75rem;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: ''; display: block;
  width: 28px; height: 1px; background: var(--gold);
}

/* Rotador de citas */
.quote-rotator { position: relative; min-height: 280px; }
.quote-slide {
  position: absolute; top: 0; left: 0;
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  pointer-events: none;
}
.quote-slide.active {
  opacity: 1; transform: translateY(0);
  pointer-events: auto; position: relative;
}
.quote-text {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 700; line-height: 1.22;
  color: var(--white); margin-bottom: 1.5rem;
}
.quote-text em { font-style: italic; color: var(--gold-lt); }
.quote-attr {
  font-family: var(--alt);
  font-size: 1rem; font-style: italic;
  color: var(--white-dim); letter-spacing: .04em;
}
.quote-attr span { color: var(--gold); font-style: normal; font-weight: 600; }

.quote-dots { display: flex; gap: .5rem; margin-top: 2.5rem; }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  transition: background .4s, transform .4s; cursor: pointer;
}
.dot.active { background: var(--gold); transform: scale(1.4); }

.hero-actions { margin-top: 3rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--sans); font-size: .65rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--white-dim);
  animation: fadeUp 1s 1.5s both;
}
.scroll-line {
  width: 40px; height: 1px;
  background: var(--border-dk); position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%; background: var(--gold);
  animation: slide 2s ease-in-out infinite;
}
@keyframes slide  { 0% { left: -100%; } 100% { left: 100%; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════════════
   BOTONES
═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: .82rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .9rem 2rem; border-radius: 2px;
  transition: all .3s var(--ease);
}
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover {
  background: var(--gold-lt); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,.25);
}
/* Outline claro (sobre héroe oscuro) */
.btn-outline {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,.3);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
/* Outline oscuro (sobre fondo claro) */
.btn-outline-dark {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline-dark:hover { border-color: var(--gold-dk); color: var(--gold-dk); transform: translateY(-2px); }

.btn-sm { font-size: .72rem; padding: .55rem 1.2rem; }

/* ═══════════════════════════════════════════════════════════════════
   TAGLINE BANNER  ("El Ajedrez nos impulsa...")
═══════════════════════════════════════════════════════════════════ */
.tagline-banner {
  background: var(--black);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--gold-dk);
  border-bottom: 3px solid var(--gold-dk);
}
.tagline-banner-bg { display: none; }
.tagline-inner {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto;
  padding: 4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}
.tagline-chess-img {
  width: clamp(120px, 18vw, 200px);
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.tagline-text-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.tagline-chevrons {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--gold);
  letter-spacing: -.1em;
  line-height: 1;
  font-weight: 900;
  flex-shrink: 0;
}
.tagline-text {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.tagline-text span {
  display: block;
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  font-weight: 400;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(245,240,232,.65);
  margin-top: .3rem;
}

/* ═══════════════════════════════════════════════════════════════════
   SECCIÓN COMMONS  (fondo claro)
═══════════════════════════════════════════════════════════════════ */
.section { padding: 6rem 2rem; }
.section-inner { max-width: 1320px; margin: 0 auto; }

.section-label {
  font-family: var(--sans); font-size: .68rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold-dk); margin-bottom: 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.section-label::before {
  content: ''; display: block; width: 20px; height: 1px; background: var(--gold-dk);
}
/* Versión clara de label para secciones oscuras */
.section-label.light { color: var(--gold); }
.section-label.light::before { background: var(--gold); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 700; line-height: 1.18;
  color: var(--text); margin-bottom: 1rem;
}
.section-title.light { color: var(--white); }

.section-sub {
  font-family: var(--sans); font-size: .93rem;
  color: var(--text-sub); max-width: 480px; margin-bottom: 3rem;
}

/* Fade-in scroll */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in.delay-1 { transition-delay: .1s; }
.fade-in.delay-2 { transition-delay: .2s; }
.fade-in.delay-3 { transition-delay: .3s; }
.fade-in.delay-4 { transition-delay: .4s; }

/* ═══════════════════════════════════════════════════════════════════
   NOVEDADES  (fondo blanco)
═══════════════════════════════════════════════════════════════════ */
.novedades { background: var(--bg-alt); border-top: 1px solid var(--border); }

.news-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
}

.news-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem;
  position: relative; overflow: hidden;
  transition: box-shadow .3s, transform .3s, border-color .3s;
  display: flex; flex-direction: column; gap: .85rem;
}
.news-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  transform: translateY(-3px);
  border-color: var(--gold);
}
.news-card.featured { padding: 2.25rem; }

.news-tag {
  font-family: var(--sans); font-size: .6rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-dk);
  padding: .28rem .75rem;
  border: 1px solid var(--gold);
  border-radius: 2px; display: inline-block; width: fit-content;
  background: rgba(201,168,76,.07);
}
.news-date {
  font-family: var(--sans); font-size: .72rem; color: var(--text-lt);
}
.news-title {
  font-family: var(--serif); font-size: 1.05rem;
  font-weight: 600; line-height: 1.35; color: var(--text);
  transition: color .3s;
}
.news-card.featured .news-title { font-size: 1.45rem; }
.news-card:hover .news-title { color: var(--gold-dk); }
.news-excerpt {
  font-family: var(--sans); font-size: .85rem;
  color: var(--text-sub); line-height: 1.7; flex: 1;
}
.news-link {
  font-family: var(--sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-dk);
  display: flex; align-items: center; gap: .4rem;
  transition: gap .3s; width: fit-content;
}
.news-link:hover { gap: .8rem; }
.news-link::after { content: '→'; }

.news-card.featured::before {
  content: '♜';
  position: absolute; bottom: -1rem; right: 1rem;
  font-size: 8rem; color: var(--gold); opacity: .05;
  pointer-events: none; line-height: 1;
}

/* Imagen de noticia */
.news-img {
  max-width: none;
  width: calc(100% + 3.5rem);
  margin: -1.75rem -1.75rem 0;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
.news-card.featured .news-img {
  max-width: none;
  width: calc(100% + 4.5rem);
  margin: -2.25rem -2.25rem 0;
  aspect-ratio: 16/7;
}
/* Placeholder cuando no hay imagen */
.news-img-placeholder {
  width: calc(100% + 3.5rem);
  margin: -1.75rem -1.75rem 0;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--surface) 0%, #e8e4dd 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: var(--gold); opacity: .5;
  user-select: none;
}
.news-card.featured .news-img-placeholder {
  width: calc(100% + 4.5rem);
  margin: -2.25rem -2.25rem 0;
  aspect-ratio: 16/7;
  font-size: 5rem;
}

/* ═══════════════════════════════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════════════════════════════ */
.divider {
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem; max-width: 1320px; margin: 0 auto;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.divider-piece { font-size: 1rem; color: var(--gold); opacity: .5; }

/* ═══════════════════════════════════════════════════════════════════
   TOP PLAYERS — 4 mini-carruseles, uno por categoría
═══════════════════════════════════════════════════════════════════ */
.top-players { background: var(--bg); }

.tp-header {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.tp-header-text { text-align: center; }
.tp-sys-label {
  display: inline-block;
  min-width: 6.5em;
  transition: opacity .25s var(--ease);
}
.tp-sys-label.is-swapping { opacity: 0; }

/* Flechas del header (toggle AAPP / FIDE) */
.tp-sys-nav {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--serif); font-size: 1.4rem; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), color .2s, border-color .2s, transform .2s;
  flex: none;
}
.tp-sys-nav:hover {
  background: var(--gold); color: var(--white);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.tp-sys-nav:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Contenedor de paneles: un panel por sistema, sólo uno visible a la vez */
.tp-sys-wrap { position: relative; }
.tp-sys-wrap .tp-sys-panel {
  display: none;
  animation: tpFadeIn .35s var(--ease);
}
.tp-sys-wrap .tp-sys-panel.is-active { display: grid; }
@keyframes tpFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* FIDE ID debajo del nombre (sólo en sistema FIDE) */
.tp-fide-id {
  font-family: var(--sans); font-size: .65rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-lt);
  margin-top: -.4rem; margin-bottom: .7rem;
}

.tp-card {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s;
  display: flex; flex-direction: column;
}

/* Flechas internas (izquierda/derecha sobre la foto) */
.tp-nav {
  position: absolute;
  top: calc(50% - 1.1rem);
  transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.88);
  color: var(--text); font-size: 1.2rem; font-family: var(--serif);
  line-height: 1; cursor: pointer; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: background .2s var(--ease), color .2s, transform .2s;
  opacity: 0;
}
.tp-card:hover .tp-nav,
.tp-nav:focus-visible { opacity: 1; }
.tp-nav:hover { background: var(--gold); color: var(--white); }
.tp-nav-prev { left: .6rem; }
.tp-nav-next { right: .6rem; }
@media (hover: none) { .tp-nav { opacity: 1; } }
.tp-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  transform: translateY(-3px);
  border-color: var(--gold);
}

.tp-card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.tp-cat-label {
  font-family: var(--sans); font-size: .62rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-dk); font-weight: 500;
}
.tp-pager {
  font-family: var(--sans); font-size: .72rem;
  color: var(--text-lt); font-variant-numeric: tabular-nums;
}

/* Slides apilados con fade */
.tp-slides {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tp-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.tp-slide.is-active {
  position: relative;
  opacity: 1; visibility: visible;
  pointer-events: auto;
}

.tp-photo-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  overflow: hidden;
}
.tp-photo {
  max-width: none;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tp-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 4rem; color: var(--gold); opacity: .4;
  background: linear-gradient(135deg, var(--surface) 0%, #e8e4dd 100%);
}

.tp-rank {
  position: absolute; left: .75rem; bottom: .75rem;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .7rem;
  background: rgba(10,10,10,.82);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--sans); font-weight: 500;
}
.tp-rank-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: var(--dark);
  font-size: .8rem; line-height: 1;
}
.tp-rank-num { font-size: .78rem; letter-spacing: .05em; }

.tp-body { padding: 1rem 1rem 1.1rem; }
.tp-name {
  font-family: var(--serif); font-size: .98rem;
  font-weight: 600; color: var(--text);
  margin-bottom: .7rem; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tp-name span { font-weight: 400; color: var(--text-sub); }

.tp-ratings-wrap {
  border-top: 1px solid var(--border);
  padding-top: .6rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.tp-ratings-group { display: flex; flex-direction: column; gap: .2rem; }
.tp-ratings-sys {
  font-family: var(--sans); font-size: .55rem;
  letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-dk);
}
.tp-ratings-sys-fide { color: var(--text-sub); }
.tp-ratings {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .3rem;
}
.tp-rating { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.tp-rating-label {
  font-family: var(--sans); font-size: .5rem;
  letter-spacing: .15em; color: var(--text-lt);
  text-transform: uppercase;
}
.tp-rating-val {
  font-family: var(--serif); font-size: .88rem;
  font-weight: 600; color: var(--gold-dk);
}
.tp-ratings-sys-fide ~ .tp-ratings .tp-rating-val { color: var(--text-sub); }

@media (max-width: 1024px) { .tp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  {
  .tp-grid { grid-template-columns: 1fr; gap: 1rem; }
  .tp-header { gap: .75rem; }
  .tp-sys-nav { width: 38px; height: 38px; font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   TORNEOS  (fondo superficie)
═══════════════════════════════════════════════════════════════════ */
.torneos {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.torneos-header {
  display: flex; justify-content: space-between;
  align-items: flex-end; margin-bottom: 2.5rem;
  gap: 1rem; flex-wrap: wrap;
}

.torneos-table { width: 100%; border-collapse: collapse; font-family: var(--sans); }
.torneos-table thead tr { border-bottom: 2px solid var(--border); }
.torneos-table th {
  font-size: .65rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-lt); padding: .75rem 1rem; text-align: left;
}
.torneos-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.torneos-table tbody tr:hover { background: var(--bg-alt); }
.torneos-table td { padding: 1.1rem 1rem; font-size: .88rem; color: var(--text); vertical-align: middle; }

.badge {
  display: inline-block; font-size: .6rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .7rem; border-radius: 2px;
}
.badge-open  { background: rgba(160,120,48,.1); color: var(--gold-dk); border: 1px solid rgba(160,120,48,.3); }
.badge-soon  { background: rgba(0,0,0,.05);     color: var(--text-sub); border: 1px solid var(--border); }
.badge-full  { background: rgba(200,60,60,.07); color: #c03030;         border: 1px solid rgba(200,60,60,.2); }

.btn-ghost {
  background: transparent; color: var(--text-sub);
  border: 1px solid var(--border); border-radius: 2px;
  font-family: var(--sans); font-size: .68rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .5rem 1.1rem; transition: all .25s; display: inline-block;
}
.btn-ghost:hover { border-color: var(--text-sub); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════
   QUIÉNES SOMOS  (fondo blanco)
═══════════════════════════════════════════════════════════════════ */
.quienes {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.quienes::before {
  content: '♛';
  position: absolute; right: -3rem; top: 50%;
  transform: translateY(-50%);
  font-size: 28rem; color: var(--gold); opacity: .04;
  pointer-events: none; line-height: 1;
}
.quienes-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6rem; align-items: center;
}
.quienes-text p {
  font-family: var(--sans); font-size: .93rem;
  color: var(--text-sub); line-height: 1.85; margin-bottom: 1.1rem;
}
.quienes-text p strong { color: var(--text); font-weight: 500; }

.pillars { display: flex; flex-direction: column; gap: 1.4rem; margin-top: 2rem; }
.pillar { display: flex; gap: 1.2rem; align-items: flex-start; }
.pillar-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: .1rem; }
.pillar-body h4 {
  font-family: var(--serif); font-size: 1rem; font-weight: 600;
  color: var(--text); margin-bottom: .2rem;
}
.pillar-body p {
  font-family: var(--sans); font-size: .83rem;
  color: var(--text-sub); line-height: 1.65; margin: 0 !important;
}

/* Mini tablero */
.mini-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.1), 0 0 0 1px var(--border);
}
.mini-board .mc {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; user-select: none;
}
.mini-board .mc.dark-sq  { background: #c8b89a; }
.mini-board .mc.light-sq { background: #f0e6d2; }
.mini-board .mc.gold-piece { color: #5c3d1e; }
.mini-board .mc.dim-piece  { color: #3a2510; }

/* ═══════════════════════════════════════════════════════════════════
   FAQ  (fondo superficie)
═══════════════════════════════════════════════════════════════════ */
.faq { background: var(--surface); border-top: 1px solid var(--border); }
.faq-grid {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 6rem; align-items: start;
}
.faq-intro p { font-family: var(--sans); font-size: .9rem; color: var(--text-sub); line-height: 1.75; margin-top: 1rem; }
.faq-contact { margin-top: 1.75rem; font-family: var(--sans); font-size: .82rem; color: var(--text-lt); }
.faq-contact a { color: var(--gold-dk); text-decoration: underline; text-decoration-color: var(--gold); }

.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-q {
  width: 100%; text-align: left; padding: 1.4rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
  color: var(--text); transition: color .3s;
}
.faq-q:hover { color: var(--gold-dk); }
.faq-icon {
  width: 28px; height: 28px;
  border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: .75rem; color: var(--gold-dk);
  transition: transform .4s var(--ease), background .3s, border-color .3s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--gold); color: var(--black); border-color: var(--gold);
}
.faq-a {
  font-family: var(--sans); font-size: .9rem; color: var(--text-sub);
  line-height: 1.8; max-height: 0; overflow: hidden;
  transition: max-height .5s var(--ease), padding .5s var(--ease);
}
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════════
   DONACIONES CTA  (oscuro con acento dorado)
═══════════════════════════════════════════════════════════════════ */
.cta-donacion {
  background: var(--dark);
  border-top: 3px solid var(--gold-dk);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   FORMULARIO DE CONTACTO  (blanco)
═══════════════════════════════════════════════════════════════════ */
.contacto-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label {
  font-family: var(--sans); font-size: .7rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-sub);
}
.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .85rem 1rem;
  color: var(--text);
  font-family: var(--sans); font-size: .9rem;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
  width: 100%;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.1);
}
.form-input::placeholder { color: var(--text-lt); }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER  (oscuro)
═══════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--dark);
  border-top: 3px solid var(--gold-dk);
  padding: 5rem 2rem 2rem;
}
.footer-inner { max-width: 1320px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.footer-brand .logo-abbr { font-size: 2rem; display: block; }
.footer-brand .logo-full { display: block; color: var(--white-dim); margin-bottom: 1.1rem; }
.footer-brand p {
  font-family: var(--sans); font-size: .83rem;
  color: var(--white-dim); line-height: 1.75; max-width: 280px; margin-bottom: 1.5rem;
}

.social-links { display: flex; gap: .65rem; }
.social-link {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--white-dim); transition: all .3s;
}
.social-link:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,.08); }

.footer-col h5 {
  font-family: var(--sans); font-size: .65rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--white); margin-bottom: 1.2rem;
}
.footer-col ul li { margin-bottom: .65rem; }
.footer-col ul a {
  font-family: var(--sans); font-size: .85rem;
  color: var(--white-dim); transition: color .3s;
}
.footer-col ul a:hover { color: var(--gold); }

.footer-bottom {
  padding-top: 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-family: var(--sans); font-size: .75rem; color: var(--white-dim); }
.footer-piece { font-size: 1.1rem; color: rgba(255,255,255,.12); letter-spacing: .3rem; user-select: none; }

/* ═══════════════════════════════════════════════════════════════════
   PÁGINAS INTERIORES (nosotros, contacto, donaciones, noticias)
═══════════════════════════════════════════════════════════════════ */
.pg-2col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}
.pg-form-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.news-grid-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}
@media (max-width: 768px) {
  .pg-2col { grid-template-columns: 1fr; }
  .pg-form-names { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .hero-content {
    padding: calc(var(--nav-h) + 3rem) 2rem 2rem;
  }
  .hero-puzzle {
    padding: 1.5rem 1.5rem 3rem;
  }
  .quote-rotator { min-height: 200px; }
  .tagline-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .tagline-text-block { flex-direction: column; gap: .75rem; }

  .news-grid { grid-template-columns: 1fr; }
  .quienes-grid { grid-template-columns: 1fr; gap: 3rem; }
  .mini-board { max-width: 360px; }
  .faq-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta, .nav-login { display: none; }
  .nav-burger { display: flex; }
}

/* Login en menú móvil */
.nav-mobile-login {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-dk) !important;
  border: 1px solid var(--gold);
  padding: .7rem 1.2rem;
  border-radius: 2px;
  margin-top: .5rem;
  transition: background .3s, color .3s;
}
.nav-mobile-login:hover {
  background: var(--gold);
  color: var(--black) !important;
}

@media (max-width: 640px) {
  /* Hero en móvil: más compacto y sin desbordes */
  .hero-content { padding: calc(var(--nav-h) + 1.5rem) 1rem 1.5rem; }
  .hero-eyebrow { font-size: .6rem; letter-spacing: .2em; margin-bottom: 1.25rem; gap: .5rem; }
  .hero-eyebrow::before, .hero-eyebrow::after { width: 18px; }
  .quote-text { font-size: clamp(1.25rem, 6vw, 1.75rem); line-height: 1.25; margin-bottom: 1rem; }
  .quote-attr { font-size: .85rem; }
  .quote-rotator { min-height: 220px; }
  .quote-dots { margin-top: 1.5rem; }
  .hero-actions { margin-top: 1.75rem; justify-content: center; width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }

  /* Puzzle adaptado al ancho de pantalla */
  .hero-puzzle { padding: 1.25rem 1rem 2.25rem; }
  .puzzle-header { text-align: center; }
  .puzzle-eyebrow { justify-content: center; }
  #puzzle-board { max-width: min(92vw, 420px); }
  .puzzle-progress-bar,
  .puzzle-status,
  .puzzle-actions { max-width: min(92vw, 420px); }
  .puzzle-actions { flex-wrap: wrap; }

  /* Resto de la página */
  .stats-inner { grid-template-columns: 1fr; }
  .stat-item::after { display: none; }
  .stat-item { border-bottom: 1px solid rgba(255,255,255,.06); }
  .stat-item:last-child { border: none; }
  .torneos-table th:nth-child(3), .torneos-table td:nth-child(3),
  .torneos-table th:nth-child(4), .torneos-table td:nth-child(4) { display: none; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
    padding-bottom: 2.5rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
════════════════════════════════════════════════════════════════ */
#pwa-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9000;
  background: #1c1d20;
  border-top: 2px solid var(--gold, #c9a84c);
  padding: .9rem 1.25rem env(safe-area-inset-bottom, 0);
  box-shadow: 0 -6px 28px rgba(0,0,0,.4);
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.22,.68,0,1.2);
}
#pwa-banner.pwa-visible { transform: translateY(0); }

.pwa-inner {
  display: flex;
  align-items: center;
  gap: .85rem;
  max-width: 560px;
  margin: 0 auto;
}
.pwa-icon {
  width: 48px; height: 48px;
  border-radius: 11px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.12);
  object-fit: cover;
}
.pwa-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.pwa-text strong { color: #fff; font-size: .9rem; }
.pwa-text span   { color: rgba(255,255,255,.58); font-size: .78rem; line-height: 1.35; }
.pwa-text b      { color: rgba(255,255,255,.85); }

.pwa-btn-install {
  flex-shrink: 0;
  padding: .52rem 1.1rem;
  background: var(--gold, #c9a84c);
  color: #000;
  font-weight: 700;
  font-size: .85rem;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.pwa-btn-install:hover { opacity: .82; }

.pwa-btn-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,.35);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: .3rem .2rem;
  transition: color .15s;
}
.pwa-btn-close:hover { color: #fff; }

@media (max-width: 400px) {
  .pwa-btn-install { padding: .5rem .75rem; font-size: .8rem; }
  .pwa-text strong { font-size: .84rem; }
}
