/* ==========================================================================
   Bet Calculator Betmentor — main.css
   Design tokens, base layout, header, footer, buttons.
   Palette: deep green-black base, emerald (#23AE6D) + gold (#FFA800) accents.
   ========================================================================== */

:root {
  /* ---- Brand palette ---- */
  --ink:        #070E0C;      /* page base */
  --ink-2:      #0A110F;      /* subtle raise */
  --ink-3:      #0F1815;      /* alternating section */
  --deep:       #0A1F16;      /* deep green panel */
  --surface:    #1F2E29;      /* card surface */
  --surface-2:  #16211D;      /* card surface, quieter */
  --olive:      #1E200E;      /* gold-tinted card */
  --olive-2:    #2F3312;      /* gold-tinted card, raised */

  --emerald:    #23AE6D;      /* primary accent */
  --emerald-d:  #1B8A56;
  --emerald-l:  #3FD08A;
  --emerald-xl: #7CE9B4;
  --gold:       #FFA800;      /* secondary accent */
  --gold-d:     #E6970A;
  --gold-l:     #FFC44D;
  --red:        #FF4D4D;
  --red-soft:   #E85C5C;

  /* ---- Neutrals ---- */
  --white:      #ffffff;
  --text:       #F0F0F0;
  --text-soft:  #B7C8C0;
  --muted:      #8FA49A;
  --muted-dark: #8FA49A;

  /* ---- Semantic roles ---- */
  --bg:         var(--ink);
  --border:     #1E2C27;
  --border-2:   #2A3B35;
  --line-dark:  #1E2C27;
  --brand:      var(--emerald);

  /* ---- Type ---- */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* ---- Scale ---- */
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.35rem;
  --step-3: 1.7rem;
  --step-4: 2.15rem;
  --step-5: 2.75rem;
  --step-6: 3.4rem;

  /* ---- Spacing ---- */
  --sp-1: .375rem;
  --sp-2: .625rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2.25rem;
  --sp-6: 3.25rem;
  --sp-7: 4.5rem;
  --sp-8: 6rem;

  /* ---- Radii / shadow / motion ---- */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --shadow-glow: 0 10px 34px rgba(35,174,109,.32);
  --shadow-gold: 0 10px 34px rgba(255,168,0,.28);
  --ring: 0 0 0 3px rgba(35,174,109,.45);
  --t-fast: .16s ease;
  --t-med: .28s cubic-bezier(.2,.7,.2,1);

  --container: 1180px;
  --container-narrow: 760px;

  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html { overflow-x: hidden; background: var(--ink); }

/* `overflow-x: hidden` turns html/body into scroll containers, which silently
   disables position: sticky for every descendant. `clip` does the same
   clipping without establishing a scroll container, so sticky keeps working. */
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald-l); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; font-weight: 700; color: var(--white); margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
/* UA default is `margin: 1em 40px` — that 80px of side margin silently
   narrows every figure-based card and breaks flex/carousel measurements. */
figure, blockquote { margin: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: .3em 0; }
strong { font-weight: 700; color: #E9F1ED; }
::selection { background: rgba(35,174,109,.35); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* thin, on-brand scrollbar */
* { scrollbar-color: var(--border-2) var(--ink); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--emerald-d); }

/* ---------- helpers ---------- */
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2rem, var(--container-narrow)); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-140%);
  top: .5rem; z-index: 200; background: var(--emerald); color: #04140b; font-weight: 700;
  padding: .6rem 1.1rem; border-radius: var(--r-pill); transition: transform var(--t-fast);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); text-decoration: none; }

.section { padding: var(--sp-8) 0; position: relative; }
.section--tight { padding: var(--sp-6) 0; }
.section--dark { background: var(--ink-3); }
.section--deep {
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(35,174,109,.10), transparent 62%),
    radial-gradient(760px 400px at 92% 100%, rgba(255,168,0,.07), transparent 62%),
    var(--ink-3);
}
.section--glow::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(800px 320px at 50% -10%, rgba(35,174,109,.10), transparent 65%);
}
.section > .container { position: relative; z-index: 1; }

/* ---------- eyebrow pill ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--emerald-l); font-weight: 600; margin-bottom: .9rem;
  background: rgba(35,174,109,.12); border: 1px solid rgba(35,174,109,.28);
  padding: .4rem .85rem; border-radius: var(--r-pill); line-height: 1;
}
.eyebrow--gold { color: var(--gold-l); background: rgba(255,168,0,.12); border-color: rgba(255,168,0,.30); }

.section__head { max-width: 700px; margin-bottom: var(--sp-5); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__title { font-size: var(--step-4); margin-bottom: .5rem; }
.section__title .accent { color: var(--emerald-l); }
.section__title .accent-gold { color: var(--gold-l); }
.section__lead { color: var(--text-soft); font-size: var(--step-1); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--emerald); --btn-fg: #04140b;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: var(--r-pill); border: 1.5px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-med), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  text-decoration: none; line-height: 1;
}
.btn::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.btn:hover::after { transform: translateX(120%); }
.btn > * { position: relative; z-index: 1; }
.btn svg { position: relative; z-index: 1; }
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn:active { transform: translateY(0); }
.btn__icon, .btn > svg { width: 18px; height: 18px; flex: none; }
.btn--primary { --btn-bg: var(--emerald); --btn-fg: #04140b; }
.btn--primary:hover { background: var(--emerald-l); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: #241700; }
.btn--gold:hover { background: var(--gold-l); box-shadow: var(--shadow-gold); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--border-2);
}
.btn--ghost:hover { background: rgba(35,174,109,.10); border-color: var(--emerald); color: var(--emerald-l); box-shadow: none; }
.btn--ghost::after { display: none; }
.btn--sm { padding: .55rem 1rem; font-size: .88rem; }
.btn--lg { padding: 1rem 1.8rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,14,12,.86);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
/* Three zones: brand hard left, menu optically centred, action hard right. */
.nav {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem; min-height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; justify-self: start; }
.brand:hover { text-decoration: none; }
/* Un unico ancho de logotipo en cabecera, panel movil y pie. */
.brand__logo { width: 150px; height: auto; display: block; flex: none; transition: transform var(--t-med); }
.brand:hover .brand__logo { transform: scale(1.025); }
.brand__name {
  font-family: var(--font-display); letter-spacing: -.02em;
  display: flex; flex-direction: column; line-height: 1.08;
}
.brand__line1 { font-weight: 700; font-size: 1.02rem; color: var(--white); }
.brand__line1 em { font-style: normal; color: var(--gold); }
.brand__line2 {
  font-weight: 800; font-size: 1.02rem; color: var(--emerald-l);
}
.brand--sm .brand__logo { width: 150px; }

/* ---- centre panel ---- */
.nav__panel { justify-self: center; }
.nav__panel-head, .nav__panel-foot { display: none; }
.nav__menu { list-style: none; display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: .5rem .85rem; border-radius: var(--r-pill);
  color: var(--text-soft); font-weight: 500; font-size: .93rem; white-space: nowrap;
  background: rgba(255,255,255,.035);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav__link:hover { text-decoration: none; background: rgba(35,174,109,.16); color: var(--emerald-l); }
.nav__link[aria-current="page"], .nav__link.is-active { color: var(--emerald-l); background: rgba(35,174,109,.16); }
/* Con una seccion activa, Inicio vuelve a su estado normal: nunca dos a la vez. */
.nav__menu--spy .nav__link[aria-current="page"]:not(.is-active):not(:hover) {
  color: var(--text-soft); background: rgba(255,255,255,.035);
}

.nav__actions { display: flex; align-items: center; gap: .55rem; justify-self: end; }

/* ==========================================================================
   SELECTOR DE IDIOMA — mega desplegable 5 x 2
   ========================================================================== */
/* ==========================================================================
   Motor de traduccion — su interfaz propia se oculta por completo.
   El unico control visible es nuestro selector de banderas.
   ========================================================================== */
#google_translate_element { display: none !important; }
.goog-te-banner-frame, .goog-te-gadget, .skiptranslate iframe { display: none !important; }
body { top: 0 !important; }               /* el banner desplaza el body 40px */
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
/* la fuente inyectada por el motor no debe pisar la tipografia del sitio */
font { font: inherit !important; color: inherit !important; background: none !important; }

.lang { position: relative; }
/* While the panel is open the header must out-rank page content that owns a
   stacking context of its own (the hero container sits at z-index 1). */
body.lang-open .site-header { z-index: 150; }
.lang__btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .6rem .45rem .5rem; border-radius: var(--r-pill); cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-2); color: var(--text);
  font-family: var(--font-display); font-weight: 600; font-size: .86rem; line-height: 1;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.lang__btn:hover { background: rgba(35,174,109,.14); border-color: var(--emerald); color: var(--emerald-l); }
.lang.is-open .lang__btn { background: rgba(35,174,109,.16); border-color: var(--emerald); color: var(--emerald-l); }
.lang__btn-flag { display: block; width: 22px; height: 15px; flex: none; }
.lang__flag { display: block; width: 100%; height: 100%; border-radius: 3px; }
.lang__btn-code { letter-spacing: .04em; }
.lang__caret { width: 14px; height: 14px; flex: none; transition: transform var(--t-med); }
.lang.is-open .lang__caret { transform: rotate(180deg); }

.lang__menu {
  position: absolute; top: calc(100% + .6rem); right: 0; z-index: 140;
  width: min(92vw, 620px);
  background: var(--ink-3); border: 1px solid var(--border-2); border-radius: var(--r-lg);
  box-shadow: 0 26px 70px rgba(0,0,0,.6);
  padding: 1rem 1.1rem 1.15rem;
  /* Closed state. `visibility` is deliberately NOT in the transition list —
     transitioning it alongside opacity left the panel stuck hidden. */
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px) scale(.985);
  transform-origin: top right;
  transition: opacity var(--t-med), transform var(--t-med);
}
/* The class is set on the menu itself as well as the wrapper, so the open
   state never depends on a descendant match resolving. */
.lang__menu.is-open,
.lang.is-open .lang__menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
}
.lang__menu-title {
  margin: 0 0 .75rem; font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--emerald-l);
  padding-bottom: .55rem; border-bottom: 1px solid var(--border);
}
/* 5 columnas x 2 filas */
.lang__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem;
}
.lang__grid li { margin: 0; }
.lang__opt {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .7rem .4rem; border-radius: var(--r-md); cursor: pointer; text-align: center;
  background: rgba(255,255,255,.03); border: 1px solid transparent; color: var(--text);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.lang__opt:hover { background: rgba(35,174,109,.13); border-color: rgba(35,174,109,.4); transform: translateY(-2px); }
.lang__opt.is-active { background: rgba(35,174,109,.18); border-color: var(--emerald); }
.lang__opt .lang__flag { width: 34px; height: 23px; }
.lang__opt-text { display: block; min-width: 0; width: 100%; }
.lang__opt-name {
  display: block; font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  color: var(--white); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lang__opt.is-active .lang__opt-name { color: var(--emerald-l); }
.lang__opt-region {
  display: block; font-size: .68rem; color: var(--muted); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: rgba(255,255,255,.04); color: #fff;
  border: 1px solid var(--border-2); border-radius: 12px; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.nav__toggle:hover { background: rgba(35,174,109,.14); border-color: var(--emerald); }
.nav__toggle-bars { position: relative; width: 20px; height: 14px; }
.nav__toggle-bars span {
  position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px;
}
.nav__toggle-bars span:nth-child(1) { top: 0; }
.nav__toggle-bars span:nth-child(2) { top: 6px; }
.nav__toggle-bars span:nth-child(3) { top: 12px; }

.nav__close {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-2); border-radius: 12px;
  color: #fff; cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.nav__close:hover { background: rgba(232,92,92,.16); border-color: var(--red-soft); color: var(--red-soft); transform: rotate(90deg); }
.nav__close svg { width: 22px; height: 22px; }

.nav__backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); opacity: 0; visibility: hidden;
  transition: opacity var(--t-med), visibility var(--t-med); z-index: 110;
}
body.nav-open .nav__backdrop { opacity: 1; visibility: visible; }
/* Position-fixed lock keeps the page from scrolling behind the overlay on iOS. */
body.nav-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

/* reading progress bar */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  z-index: 130; transition: width .1s linear; pointer-events: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--ink-3); color: var(--text-soft);
  padding: var(--sp-6) 0 var(--sp-3); margin-top: var(--sp-7);
  border-top: 1px solid var(--border);
}
.footer__grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--sp-4) var(--sp-3);
}
.footer__brand .brand__logo { width: 150px; }
.footer__brand-desc { color: var(--muted); font-size: .88rem; margin-top: .7rem; max-width: 34ch; line-height: 1.6; }
.footer__heading { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--emerald-l); margin-bottom: .6rem; font-family: var(--font-mono); font-weight: 600; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .38rem; }
.footer__list li { margin: 0; }
.flink { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-soft); font-size: .89rem; transition: color var(--t-fast), transform var(--t-fast); }
.flink:hover { color: var(--emerald-l); text-decoration: none; transform: translateX(3px); }
.flink__icon { width: 15px; height: 15px; opacity: .7; }

/* Centred closing block: short disclaimer above, copyright beneath. */
.footer__bottom {
  border-top: 1px solid var(--border); margin-top: var(--sp-4); padding-top: var(--sp-3);
  display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center;
}
.footer__disclaimer {
  margin: 0; font-size: .78rem; color: #8A9C93; line-height: 1.65;
  max-width: 78ch;
}
.footer__copy { margin: 0; font-size: .85rem; color: var(--muted); }
.footer__brand-link { color: var(--emerald-l); font-weight: 600; }

/* scroll to top */
.scroll-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 80;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--emerald); color: #04140b; display: grid; place-items: center;
  box-shadow: var(--shadow-md); opacity: 0; transform: translateY(14px) scale(.9);
  transition: opacity var(--t-med), transform var(--t-med), background var(--t-fast);
  visibility: hidden;
}
.scroll-top svg { width: 22px; height: 22px; }
.scroll-top.is-visible { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }
.scroll-top:hover { background: var(--emerald-l); transform: translateY(-3px) scale(1.05); }

/* utility */
.glow-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border-2), transparent); border: 0; margin: 0; }

/* The calculator's print sheet is injected into <body> on demand and must
   never be visible on screen; print.css reveals it with !important. */
#print-sheet { display: none; }
