/* ========== 1. CSS Variables & Reset ========== */
:root {
  --color-bg: #0A0E27;
  --color-surface: #131835;
  --color-accent-1: #F7931A;
  --color-accent-2: #3B82F6;
  --color-accent-3: #10B981;
  --color-text: #E2E8F0;
  --color-text-secondary: #94A3B8;
  --color-danger: #EF4444;
  --color-border: #1E2A4A;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --section-gap: clamp(3rem, 6vw, 5rem);
  --content-max-width: 840px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.35);
}



*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

/* ========== 2. General Typography ========== */
h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-align: left;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
  text-align: left;
  scroll-margin-top: 2rem;
}

p {
  text-align: left;
  margin-bottom: 1.25em;
  color: var(--color-text);
}

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
  text-align: left;
}

li {
  margin-bottom: 0.5em;
  text-align: left;
}

strong { font-weight: 700; }
em { font-style: italic; }

a {
  color: var(--color-accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease, opacity .2s ease;
}
a:hover { opacity: 0.8; }
a:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
  border-radius: 2px;
}

blockquote {
  border-left: 3px solid var(--color-accent-2);
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  color: var(--color-text-secondary);
  text-align: left;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.925em;
}

th, td {
  padding: 0.75em 1em;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface);
}

hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 2em 0;
}

/* ========== 3. Layout — Sections ========== */
header {
  padding: 0;
  margin: 0;
}

main {
  width: 100%;
}

[data-content] {
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding: var(--section-gap) 1.25rem;
}

[data-content] h2 {
  margin-bottom: 1em;
}

[data-content] h3 {
  margin-top: 2em;
  margin-bottom: 0.75em;
}

[data-content] > p:last-child {
  margin-bottom: 0;
}

/* Nested subsections */
[data-content] [data-content] {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* ========== 4. Components ========== */

/* --- info-box --- */
.info-box {
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent-2);
  padding: 1.25em 1.5em;
  margin: 1.75em 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.info-box p {
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0.75em;
}
.info-box p:last-child { margin-bottom: 0; }
.info-box strong { color: var(--color-text); }

/* --- odds-example --- */
.odds-example {
  background: #0F172A;
  color: #E2E8F0;
  border-radius: var(--radius);
  padding: 1.5em;
  margin: 1.75em 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.odds-example p {
  text-align: center;
  color: #E2E8F0;
  background: transparent;
  margin-bottom: 0.75em;
}
.odds-example p:last-child { margin-bottom: 0; }
.odds-example strong { color: var(--color-accent-1); }


@media (prefers-color-scheme: dark) {
  .odds-example {
    background: #0F172A;
    color: #E2E8F0;
  }
  .odds-example p { color: #E2E8F0; }
}

/* --- callout / callout-warning --- */
.callout {
  border-left: 3px solid var(--color-danger);
  background: rgba(239,68,68,.06);
  padding: 1.25em 1.5em;
  margin: 1.75em 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.callout p {
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0.75em;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--color-danger); }

/* --- card-grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25em;
  margin: 1.75em 0;
}
.card-grid > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25em;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-grid > div:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-grid p {
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0.5em;
}
.card-grid p:last-child { margin-bottom: 0; }
.card-grid h3, .card-grid h4 { margin-top: 0; margin-bottom: 0.5em; }

/* --- comparison --- */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25em;
  margin: 1.75em 0;
}
.comparison > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25em;
  box-shadow: var(--shadow-sm);
}
.comparison p {
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0.5em;
}
.comparison p:last-child { margin-bottom: 0; }
.comparison h4 {
  color: var(--color-text);
  margin-bottom: 0.75em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-accent-1);
}

/* --- tldr --- */
.tldr {
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent-1);
  padding: 1.5em 1.75em;
  margin: 0 auto;
  border-radius: var(--radius);
}
.tldr h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 0.75em;
  color: var(--color-text);
}
.tldr ul { margin-bottom: 0; }
.tldr li {
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0.6em;
}
.tldr li:last-child { margin-bottom: 0; }

/* --- key-takeaway --- */
.key-takeaway {
  border-top: 2px solid var(--color-accent-1);
  padding-top: 1em;
  margin: 2em 0;
}
.key-takeaway p {
  font-family: var(--font-main);
  font-size: clamp(1.15rem, 2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0;
}

/* --- fun-fact --- */
.fun-fact {
  position: relative;
  padding-left: 1.5em;
  margin: 1.5em 0;
}
.fun-fact::before {
  content: '\2014';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent-1);
  font-weight: 700;
}
.fun-fact p {
  font-style: italic;
  color: var(--color-text-secondary);
  text-align: left;
  margin-bottom: 0;
}

/* --- glossary-term --- */
.glossary-term {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 1em 0;
}
.glossary-term dt {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-accent-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.glossary-term dd {
  font-family: var(--font-main);
  color: var(--color-text-secondary);
  margin: 0;
  text-align: left;
}

/* --- dos-donts --- */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25em;
  margin: 1.75em 0;
}
.dos-donts > div {
  padding: 1.25em;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.dos-donts > div:first-child {
  border-top: 3px solid var(--color-accent-3);
}
.dos-donts > div:last-child {
  border-top: 3px solid var(--color-danger);
}
.dos-donts h4 {
  margin-bottom: 0.75em;
}
.dos-donts > div:first-child h4 { color: var(--color-accent-3); }
.dos-donts > div:last-child h4 { color: var(--color-danger); }
.dos-donts p {
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0.5em;
}
.dos-donts li {
  text-align: left;
  color: var(--color-text);
}

/* --- pre-bet-checklist --- */
.pre-bet-checklist {
  margin: 2em 0;
}
.pre-bet-checklist h4 {
  font-family: var(--font-main);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-accent-1);
  margin-bottom: 1em;
}
.pre-bet-checklist ul {
  list-style: none;
  padding-left: 1.75em;
  border-left: 2px solid var(--color-border);
  margin-bottom: 0;
}
.pre-bet-checklist li {
  position: relative;
  padding: 0.4em 0;
  text-align: left;
  color: var(--color-text);
}
.pre-bet-checklist li::before {
  content: '\2610';
  position: absolute;
  left: -1.5em;
  color: var(--color-accent-1);
  background: var(--color-bg);
  padding: 0 2px;
}

/* --- at-a-glance --- */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1.75em 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.at-a-glance > div {
  padding: 1.25em;
  border-right: 1px solid var(--color-border);
}
.at-a-glance > div:last-child { border-right: none; }
.at-a-glance h4 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  margin-bottom: 0.5em;
  color: var(--color-text);
}
.at-a-glance p {
  text-align: left;
  color: var(--color-text-secondary);
  font-size: 0.9em;
  margin-bottom: 0;
}

/* --- worked-example --- */
.worked-example {
  background: var(--color-surface);
  padding: 1.75em;
  margin: 1.75em 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.worked-example p {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: left;
  color: var(--color-text);
  margin-bottom: 0.75em;
}
.worked-example p:last-child { margin-bottom: 0; }
.worked-example p:first-child {
  font-family: var(--font-main);
  font-weight: 700;
  margin-bottom: 1em;
}
.worked-example strong { color: var(--color-accent-1); }
.worked-example hr {
  margin: 1em 0;
  background: var(--color-border);
}

/* --- section-bridge --- */
.section-bridge {
  text-align: center;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--color-accent-2);
}
.section-bridge::before,
.section-bridge::after {
  content: '\2014\2014';
  margin: 0 0.75em;
  color: var(--color-border);
}

/* ========== 5. Hero Section ========== */
[data-content="hero"] {
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(4rem, 10vw, 8rem) 1.25rem clamp(3rem, 6vw, 5rem);
  background: linear-gradient(170deg, #0A0E27 0%, #131835 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

[data-content="hero"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(59,130,246,.04) 59px, rgba(59,130,246,.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(59,130,246,.04) 59px, rgba(59,130,246,.04) 60px);
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
}

[data-content="hero"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

[data-content="hero"] h1 {
  color: #FFFFFF;
  max-width: 800px;
  margin: 0 auto 0.5em;
  position: relative;
  z-index: 1;
}

[data-content="hero"] .hero-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-1);
  margin-bottom: 1.5em;
  position: relative;
  z-index: 1;
  text-align: center;
}

[data-content="hero"] .hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25em;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

[data-content="hero"] figure {
  max-width: 740px;
  margin: 2em auto 0;
  position: relative;
  z-index: 1;
}

[data-content="hero"] .hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius);
}

[data-content="hero"] figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 0.75em;
}


/* Date badge & trust marker */
.date-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  background: rgba(255,255,255,.06);
  padding: 0.3em 0.8em;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.1);
}

.trust-marker {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}


/* ========== 5b. TOC — Vertical ========== */
[data-content="table-of-contents"] {
  padding-top: calc(var(--section-gap) * 0.6);
  padding-bottom: calc(var(--section-gap) * 0.6);
}

.toc-nav {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5em 1.75em;
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin-bottom: 1em;
}

.toc-nav > ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.toc-nav > ol > li {
  margin-bottom: 0.4em;
}

.toc-nav > ol > li > a {
  font-weight: 600;
  font-size: 0.95em;
  color: var(--color-text);
  text-decoration: none;
  transition: color .2s ease;
}
.toc-nav > ol > li > a:hover { color: var(--color-accent-2); }

.toc-nav ol ol {
  list-style: none;
  padding-left: 1.25em;
  margin: 0.3em 0 0.3em;
}

.toc-nav ol ol li {
  margin-bottom: 0.25em;
}

.toc-nav ol ol a {
  font-size: 0.85em;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
}
.toc-nav ol ol a:hover { color: var(--color-accent-2); }

/* Start Reading button */
.btn-start {
  display: inline-block;
  margin-top: 1.25em;
  padding: 0.6em 1.5em;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0A0E27;
  background: var(--color-accent-1);
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.btn-start:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

/* ========== 6. FAQ Accordion ========== */
[data-content="faq"] details {
  border-bottom: 1px solid var(--color-border);
  interpolate-size: allow-keywords;
}

[data-content="faq"] summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
  color: var(--color-text);
  list-style: none;
  transition: color .2s ease;
}
[data-content="faq"] summary::-webkit-details-marker { display: none; }
[data-content="faq"] summary::marker { display: none; content: ''; }

[data-content="faq"] summary::after {
  content: '+';
  font-size: 1.25em;
  font-weight: 300;
  color: var(--color-accent-2);
  flex-shrink: 0;
  margin-left: 1em;
  transition: transform .3s ease;
}

[data-content="faq"] details[open] summary::after {
  transform: rotate(45deg);
}

[data-content="faq"] summary:hover { color: var(--color-accent-2); }

[data-content="faq"] summary:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
  border-radius: 2px;
}

[data-content="faq"] details::details-content {
  opacity: 0;
  block-size: 0;
  content-visibility: hidden;
  overflow: hidden;
  transition:
    opacity .3s ease,
    block-size .3s ease,
    content-visibility .3s ease allow-discrete;
}

[data-content="faq"] details[open]::details-content {
  opacity: 1;
  block-size: auto;
  content-visibility: visible;
}

[data-content="faq"] details > div {
  padding-bottom: 1em;
}
[data-content="faq"] details > div p {
  color: var(--color-text-secondary);
  text-align: left;
}

@supports not selector(::details-content) {
  @keyframes faq-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  [data-content="faq"] details[open] > *:not(summary) {
    animation: faq-fade .3s ease forwards;
  }
}

/* ========== 7. Images ========== */
.hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.article-image {
  max-width: 100%;
  height: auto;
  display: block;
  loading: lazy;
}

[data-content] figure {
  margin: 1.75em auto;
  max-width: 100%;
}

[data-content] figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 0.5em;
}


/* ========== 9. Media Queries ========== */
@media (max-width: 768px) {
  .comparison {
    grid-template-columns: 1fr;
  }
  .dos-donts {
    grid-template-columns: 1fr;
  }
  .at-a-glance {
    grid-template-columns: 1fr;
  }
  .at-a-glance > div {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .at-a-glance > div:last-child { border-bottom: none; }

  .glossary-term {
    flex-direction: column;
    gap: 4px;
  }

  [data-content="hero"] {
    padding: clamp(3rem, 8vw, 5rem) 1rem clamp(2rem, 4vw, 3rem);
  }
}

@media (max-width: 480px) {
  :root {
    --section-gap: 2.5rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   UNIVERSAL DESKTOP & MOBILE MENU + LOGO
   ========================================= */

/* Header Base */
.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border, #333);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Mobile defaults for navigation bar */
.top-navigation-bar {
    width: 100%;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- LOGO FIXES --- */
.site-logo img {
    max-height: 75px; /* Optimal height for most logos */
    width: auto !important; /* Prevents squishing */
    display: block;
    transition: transform 0.2s ease;
}

.site-logo img:hover {
    transform: scale(1.02);
}

/* --- DESKTOP MENU --- */
.site-nav--desktop {
    display: none; /* Hidden on mobile by default */
}

/* Desktop Grid Layout: Logo left, Menu center */
@media (min-width: 1024px) {
    .top-navigation-bar {
        max-width: 100%;
        padding: 15px 40px; /* Safe padding from screen edges */
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }
    
    .site-logo {
        grid-column: 1;
        justify-self: start; /* Locks logo to the left edge */
        margin: 0;
    }

    .site-nav--desktop {
        display: block;
        grid-column: 2;
        justify-self: center; /* Locks menu perfectly in the center */
    }

    .mobile-controls {
        display: none; /* Hide burger on desktop */
    }
    
    .menu-desktop {
        display: flex;
        gap: 30px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .menu-desktop a {
        text-decoration: none;
        color: var(--color-text);
        font-family: var(--font-body, sans-serif);
        font-weight: 500;
        font-size: 16px;
        transition: color 0.2s ease;
    }
    
    .menu-desktop a:hover {
        color: var(--color-accent);
    }
}

/* --- MOBILE BURGER BUTTON --- */
.burger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1000;
}

.burger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
}

/* Burger Animation to X */
.burger.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger.is-active span:nth-child(2) {
    opacity: 0;
}
.burger.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- MOBILE MENU SLIDER --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen */
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color-bg);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    padding: 60px 30px;
}

.mobile-menu.is-open {
    right: 0; /* Slide in */
}

.mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 36px;
    line-height: 1;
    color: var(--color-text);
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-menu__close:hover {
    color: var(--color-accent);
}

.menu-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.menu-mobile a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 20px;
    font-family: var(--font-display, sans-serif);
    font-weight: 600;
    display: block;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.menu-mobile a:hover {
    color: var(--color-accent);
    padding-left: 10px; /* Nice slide effect on hover */
}

/* --- OVERLAY --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px); /* Beautiful blur effect */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 998;
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   4-COLUMN FOOTER (Bonus Scommesse BTC)
   ========================================= */
.site-footer-4col {
    background-color: #0d111a; /* Deep navy background */
    color: #94a3b8;
    padding: 60px 20px 30px;
    margin-top: 80px;
    font-family: var(--font-body, sans-serif);
    border-top: 3px solid var(--color-accent, #2563eb); /* Royal Blue accent */
}

.footer-4col-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Disclaimer block */
.footer-disclaimers {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-disclaimers p {
    line-height: 1.6;
    text-align: left;
}

/* Grid Layout */
.footer-4col-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-4col-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-4col-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* Widget Styles */
.widget-title {
    color: var(--color-accent, #2563eb); 
    font-family: var(--font-display, sans-serif); 
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.widget-list a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget-list a:hover {
    color: var(--color-accent, #2563eb);
}

.bullet-list li {
    position: relative;
    padding-left: 16px;
}

.bullet-list li::before {
    content: '•';
    color: var(--color-accent, #2563eb); 
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 1.5rem;
}

.footer-4col-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    text-align: center;
}

.footer-4col-bottom p {
    font-size: 0.85rem;
    color: #475569;
    text-align: center;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-accent, #2563eb);
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body {
  overflow-x: clip;
}

@media (max-width: 900px) {
    html, body {
        overflow-x: hidden !important; 
        width: 100% !important;
        max-width: 100vw !important;
    }

    main {
        display: block !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    [data-content="hero"], 
    main:not(:has([data-content="toc"])) [data-content="hero"],
    .article-hero,
    .cl-hero {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1rem !important; 
        padding-right: 1rem !important;
        box-sizing: border-box !important;
    }
    
    .tldr, [data-content], article {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}