/* ============================================================
   Bonodecasino · main.css (chrome only)
   ============================================================
   Carga en TODAS las páginas. Provee:
   - Reset/base mínimo
   - Decoración de fondo (.bg-decor blobs + casino-icons)
   - Header y footer del sitio (theme/header.php, theme/footer.php)
   - Skip link
   Componentes de página neon (hero, ops-list, info-box, author-byline,
   etc.) viven en theme-neon.css y se cargan solo donde corresponde.
   ============================================================ */

/* -------- RESET / BASE -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* NO usar overflow-x: hidden en html/body — rompe position: sticky del
 * .site-header. El overflow horizontal real es 0 verificado en mediciones;
 * el clipping de carousels se maneja en sus propios containers. */
body { margin: 0; padding: 0; line-height: 1.6; font-size: 15px; min-height: 100vh; width: 100%; }
img { max-width: 100%; height: auto; display: block; }

/* -------- ANTI-OVERFLOW DEFENSIVO (gana sobre los previews por especificidad body+selector) --------
   Texto largo: rompe en cualquier parte si no hay opción, con hyphens auto cuando aplica.
   Padding mobile: reduce de 24px → 16px en viewports <480px para ganar espacio. */
/* Permitir wrap natural en frontera de palabra. NO insertar guiones
 * automáticos (causaba "bienve-nida", "va-lidez", etc.). overflow-wrap
 * break-word solo rompe cuando una palabra completa no entra. Para texto
 * largo natural en español el wrap por espacios es suficiente. */
body .hero-content h1,
body main h1, body main h2, body main h3, body main p, body main li,
body .hero-lead,
body .site-hero p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: manual;
  hyphens: manual;
}
body .hero-content h1 { letter-spacing: -0.02em; }

@media (max-width: 480px) {
  /* Hero: sin padding lateral en .site-hero, lo maneja .hero-content */
  body .site-hero { padding-left: 0; padding-right: 0; }
  body main { padding-left: 16px; padding-right: 16px; }
  body .hero-content { padding-left: 12px; padding-right: 12px; width: 100%; max-width: 100%; }
  body .hero-content h1 {
    font-size: clamp(20px, 5.5vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  body .hero-eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  body .hero-content > p, body .hero-lead { font-size: clamp(14px, 4vw, 17px); }
}

@media (max-width: 360px) {
  body .hero-content h1 { font-size: 20px; }
  body .hero-eyebrow { font-size: 10px; letter-spacing: 0.06em; }
}

/* Stats-row: forzar columnas que pueden encogerse para evitar overflow
 * cuando contenido como "Mayo 2026" excede la fracción asignada. */
body .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body .stats-row .stat-num,
body .stats-row .stat-label { min-width: 0; overflow-wrap: break-word; word-break: break-word; }

@media (max-width: 420px) {
  body .stats-row .stat-num { font-size: clamp(16px, 5vw, 26px); line-height: 1.1; }
  body .stats-row .stat-label { font-size: 9px; letter-spacing: 0.04em; }
  body .stats-row .stat-item { padding: 14px 8px; }
}

/* -------- BUG 2 · HEADER FIXED en mobile como refuerzo del sticky --------
 * En viewports <768px usamos position:fixed para garantizar que el burger
 * permanezca accesible independientemente del scroll context (overflow,
 * iframes, embebidos). Body padding-top compensa el espacio que ocupaba
 * el header en flujo normal. */
@media (max-width: 768px) {
  /* Especificidad elevada `body .site-header` para ganar sobre reglas inline
   * de previews (que tienen `.site-header { position: sticky }` con misma
   * especificidad pero cargan después en cascade). */
  body .site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
  }
  body { padding-top: 64px; }
  /* Jump-nav: ahora abajo del header fixed. */
  body .jump-nav { top: 64px; }
}

/* -------- SKIP LINK (a11y) -------- */
.skip-link { position: absolute; left: -9999px; top: 0; padding: 10px 16px; background: #22D3EE; color: #0E1B2C; z-index: 1000; font-weight: 700; border-radius: 0 0 6px 0; }
.skip-link:focus { left: 0; }

/* -------- SITE-MAIN WRAPPER (theme/header.php) --------
   Markup: <main id="main" class="site-main">...post_content...</main>
   Tras el unwrap de los <main> internos de los previews (en
   bdc_extract_preview()), este `<main>` del theme ES el contenedor
   de layout. Las reglas `main { max-width: 1200px; padding: ... }`
   de los previews aplican aquí y dan el ancho/padding canónico.
   No imponemos max-width/padding/margin para no pisarlas. */
main.site-main { display: block; }

/* -------- REVIEW LAYOUT · columna de contenido --------
   En las reviews, el importer renombra el <main> interno del preview a
   <div class="review-main"> (no lo desenvuelve) para conservar las 2
   columnas del grid .review-layout. La regla `.review-layout > main` del
   preview ya no casa con ese div, así que replicamos su padding/min-width
   aquí (min-width:0 evita el desbordamiento del track del grid). */
.review-layout > .review-main { padding: 48px 0 80px; min-width: 0; }
@media (max-width: 768px) {
  .review-layout > .review-main { padding: 32px 18px 60px; }
}

/* -------- BG-DECOR (blobs + casino icons flotantes) --------
   position: fixed → si la página tiene body opaco (cream), queda oculto.
   Si el body es transparente/oscuro (neon), se ve detrás del contenido. */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-decor .blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }
.bg-decor .blob-1 { top: -120px; left: -120px; width: 380px; height: 380px; background: radial-gradient(circle, #22D3EE 0%, transparent 70%); }
.bg-decor .blob-2 { bottom: -160px; right: -160px; width: 420px; height: 420px; background: radial-gradient(circle, #A3E635 0%, transparent 70%); }
.bg-decor .blob-3 { display: none; }

.bg-decor .casino-icon { position: absolute; fill: none; stroke-width: 2; filter: drop-shadow(0 0 8px currentColor); }
.bg-decor .casino-icon.blue { color: #22D3EE; stroke: #22D3EE; }
.bg-decor .casino-icon.lime { color: #A3E635; stroke: #A3E635; }
.bg-decor .casino-icon.fade { opacity: 0.5; }
.bg-decor .casino-icon.fade-more { opacity: 0.35; }

.bg-decor .icon-pos-1 { top: 10%; left: 4%; width: 50px; height: 50px; animation: float 20s ease-in-out infinite alternate, spin 50s linear infinite; }
.bg-decor .icon-pos-2 { top: 6%; right: 6%; width: 40px; height: 40px; animation: float 18s ease-in-out 1s infinite alternate; }
.bg-decor .icon-pos-3, .bg-decor .icon-pos-4, .bg-decor .icon-pos-7, .bg-decor .icon-pos-8, .bg-decor .icon-pos-9, .bg-decor .icon-pos-10 { display: none; }
.bg-decor .icon-pos-5 { bottom: 30%; left: 4%; width: 44px; height: 44px; animation: float 19s ease-in-out 1.5s infinite alternate, spin 45s linear infinite; }
.bg-decor .icon-pos-6 { bottom: 14%; right: 6%; width: 44px; height: 44px; animation: float 21s ease-in-out 0.8s infinite alternate; }

@keyframes float { 0% { transform: translateY(-18px) rotate(-8deg); } 100% { transform: translateY(18px) rotate(8deg); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* -------- SITE HEADER (theme/header.php) --------
   Markup: <header class="site-header"><div class="site-header-inner">
   <a class="logo"><svg class="logo-icon"/><span class="logo-text">...</span></a>
   <input class="nav-toggle-input"><label class="nav-toggle">...</label>
   <nav class="site-nav">...flat anchors...</nav>
   </div></header> */
.site-header { position: sticky; top: 0; z-index: 100; padding: 12px 12px 0; background: transparent; border-bottom: 0; }
.site-header-inner { max-width: 1100px; margin: 0 auto; background: rgba(14, 27, 44, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(34, 211, 238, 0.22); border-radius: 999px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 30px rgba(34, 211, 238, 0.18); position: relative; }
.site-header .logo { display: flex; align-items: center; gap: 8px; color: #22D3EE; text-shadow: 0 0 12px rgba(34, 211, 238, 0.8); text-decoration: none; }
.site-header .logo-icon { width: 32px; height: 32px; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.5)); }
.site-header .logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-header .logo-text-main { font-weight: 800; font-size: 13px; letter-spacing: 0.18em; color: #22D3EE; }
.site-header .logo-text-main .gold { color: #A3E635; text-shadow: 0 0 10px rgba(163, 230, 53, 0.6); }
.site-header .logo-text-tagline { font-size: 10px; color: rgba(255, 255, 255, 0.5); font-weight: 500; letter-spacing: 0.08em; }
.site-header .nav-toggle-input { display: none; }
.site-header .nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; width: 36px; height: 36px; padding: 8px; cursor: pointer; align-items: center; justify-content: center; color: #22D3EE; }
.site-header .nav-toggle span { display: block; width: 18px; height: 2px; background: #22D3EE; border-radius: 2px; box-shadow: 0 0 4px rgba(34, 211, 238, 0.6); }
.site-header .site-nav { display: none; flex-direction: column; }
.site-header .nav-toggle-input:checked ~ .site-nav { display: flex; position: absolute; top: calc(100% + 10px); left: 12px; right: 12px; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: rgba(14, 27, 44, 0.96); backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px; padding: 8px 18px; }
.site-header .site-nav a { text-decoration: none; }
.site-header .nav-item { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.site-header .nav-item:last-child { border-bottom: 0; }
.site-header .nav-item > a { display: flex; align-items: center; gap: 5px; color: #FFFFFF; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: 12px 4px; }
.site-header .nav-item > a:hover { color: #A3E635; }
.site-header .nav-caret { font-size: 10px; line-height: 1; opacity: 0.7; transition: transform 0.2s ease; }
/* Submenú — base/móvil: indentado y siempre visible cuando el menú hamburguesa está abierto */
.site-header .nav-submenu { list-style: none; margin: 0; padding: 0 0 8px 14px; }
.site-header .nav-submenu a { display: block; color: rgba(255, 255, 255, 0.72); font-size: 12px; font-weight: 500; letter-spacing: 0.02em; text-transform: none; padding: 8px 4px; }
.site-header .nav-submenu a:hover { color: #A3E635; }

@media (min-width: 880px) {
  .site-header { padding: 16px 20px 0; }
  .site-header-inner { padding: 10px 20px; gap: 16px; }
  .site-header .nav-toggle { display: none; }
  .site-header .site-nav { display: flex; flex-direction: row; gap: 28px; position: static; background: transparent; backdrop-filter: none; border: 0; padding: 0; }
  .site-header .nav-item { position: relative; border-bottom: 0; }
  .site-header .nav-item > a { padding: 6px 4px; }
  .site-header .site-nav > .nav-item > a::after { content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background: #A3E635; border-radius: 2px; box-shadow: 0 0 14px rgba(163, 230, 53, 0.6); transition: width 0.25s; }
  .site-header .site-nav > .nav-item:hover > a::after,
  .site-header .site-nav > .nav-item:focus-within > a::after { width: 80%; }
  .site-header .nav-item:hover .nav-caret, .site-header .nav-item:focus-within .nav-caret { transform: rotate(180deg); }
  /* Dropdown desktop: panel oscuro glassy, oculto hasta hover/focus-within */
  .site-header .has-sub > a { padding-bottom: 14px; margin-bottom: -8px; }
  .site-header .nav-submenu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px); min-width: 230px; max-height: min(70vh, 460px); overflow-y: auto; margin: 0; padding: 8px; list-style: none; background: rgba(14, 27, 44, 0.97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(34, 211, 238, 0.22); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(34, 211, 238, 0.12); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; z-index: 110; }
  .site-header .nav-submenu::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
  .site-header .nav-item:hover > .nav-submenu, .site-header .nav-item:focus-within > .nav-submenu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(2px); }
  .site-header .nav-submenu a { display: block; padding: 9px 14px; border-radius: 9px; color: #FFFFFF; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; text-transform: none; white-space: nowrap; }
  .site-header .nav-submenu a::after { display: none; }
  .site-header .nav-submenu a:hover { background: rgba(163, 230, 53, 0.14); color: #A3E635; }
  .site-header .logo-text-main { font-size: 16px; letter-spacing: 0.2em; }
}

/* -------- SITE FOOTER (theme/footer.php) --------
   Markup: <footer class="site-footer"><div class="footer-inner">
   <div class="footer-grid"><nav class="footer-col">...</nav>...
   </div><div class="footer-bottom">...</div></div></footer> */
.site-footer { position: relative; z-index: 1; margin-top: 56px; padding: 40px 16px 24px; background: rgba(14, 27, 44, 0.6); backdrop-filter: blur(20px); border-top: 1px solid transparent; border-image: linear-gradient(90deg, #22D3EE, #A3E635) 1; }
.site-footer .footer-inner { max-width: 1100px; margin: 0 auto; }
.site-footer .footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
.site-footer .footer-col h3 { font-size: 12px; font-weight: 700; color: #22D3EE; margin: 0 0 12px; letter-spacing: 0.12em; text-transform: uppercase; text-shadow: 0 0 8px rgba(34, 211, 238, 0.3); }
.site-footer .footer-col ul { list-style: none; padding: 0; margin: 0; }
.site-footer .footer-col li { margin: 0 0 6px; }
.site-footer .footer-col a { color: rgba(255, 255, 255, 0.75); font-size: 13px; text-decoration: none; }
.site-footer .footer-col a:hover { color: #A3E635; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.site-footer .footer-disclaimer { font-size: 11px; color: rgba(255, 255, 255, 0.5); max-width: 720px; line-height: 1.55; margin: 0; }
.site-footer .footer-disclaimer .badge-18 { display: inline-block; padding: 3px 8px; background: #A3E635; color: #0E1B2C; border-radius: 4px; font-weight: 800; font-size: 10px; letter-spacing: 0.05em; margin-right: 6px; }
.site-footer .footer-disclaimer a { color: #A3E635; }
.site-footer .footer-copy { font-size: 11px; color: rgba(255, 255, 255, 0.5); margin: 0; }

@media (min-width: 600px) {
  .site-footer .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (min-width: 900px) {
  .site-footer { padding: 56px 32px 32px; margin-top: 80px; }
  .site-footer .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
  .site-footer .footer-col a { font-size: 14px; }
  .site-footer .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; padding-top: 24px; }
  .site-footer .footer-disclaimer { font-size: 12px; }
  .site-footer .footer-copy { font-size: 12px; }
}
