:root {
  --color-bg: #121220;
  --color-text: #E8E6E1;
  --color-accent: #F07A4A;
  --color-secondary: #C4956A;
  --color-surface: #1E1E30;
  --color-text-secondary: #9A9AAE;
  --color-border: #2E2E42;
  
  --color-success: #2D8C4E;
  --color-danger: #C0392B;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'Fira Mono', monospace;
  --content-width: 920px;
  --component-width: 960px;
  --section-gap: clamp(64px, 8vw, 100px);
  --content-padding: clamp(20px, 5vw, 40px);
}


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


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. General Typography
   ============================================ */
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 36px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--color-text);
  text-align: left;
  scroll-margin-top: 2rem;
}

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

p {
  text-align: left;
  margin-bottom: 1.2em;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.75;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

blockquote {
  border-left: 3px solid var(--color-secondary);
  padding-left: 20px;
  margin: 1.5em 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

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

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

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

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

th {
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

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

figure {
  margin: 2em auto;
  max-width: 100%;
}

figcaption {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 8px;
}

/* ============================================
   3. Layout — data-content sections
   ============================================ */
header {
  padding: 0;
  margin: 0;
}

main {
  width: 100%;
}

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

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

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

[data-content] figure {
  max-width: 100%;
}

/* Images */
.hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.article-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

img[loading="lazy"] {
  max-width: 100%;
  height: auto;
}

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

/* --- info-box --- */
.info-box {
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  padding: 24px 28px;
  border-radius: 0 6px 6px 0;
  margin: 2em 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.info-box p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  text-align: left;
  margin-bottom: 0.8em;
  background: transparent;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.info-box p strong {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-text);
}

/* --- odds-example --- */
.odds-example {
  background: #1A1A2E;
  color: #FAF9F6;
  padding: 32px;
  border-radius: 8px;
  text-align: center;
  margin: 2em 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

@media (prefers-color-scheme: dark) {
  .odds-example {
    background: #0A0A18;
    color: #FAF9F6;
  }
}

.odds-example p {
  font-family: var(--font-body);
  font-size: 16px;
  color: #FAF9F6;
  background: transparent;
  text-align: center;
  margin-bottom: 0.7em;
  line-height: 1.6;
}

.odds-example p:last-child {
  margin-bottom: 0;
}

.odds-example p strong {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 24px;
  color: var(--color-accent);
}

.odds-example p:first-child strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: #FAF9F6;
}

/* --- callout --- */
.callout {
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 2em 0;
  background: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.callout p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  text-align: left;
  margin-bottom: 0.6em;
  background: transparent;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout p strong {
  color: var(--color-text);
}

/* --- comparison --- */
.comparison {
  margin: 2em 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comparison table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.comparison thead tr {
  background: var(--color-surface);
}

.comparison th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  color: var(--color-text);
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-secondary);
}

.comparison td {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  color: var(--color-text);
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.comparison tbody tr:nth-child(even) td {
  background: var(--color-surface);
}

.comparison tbody tr:nth-child(odd) td {
  background: var(--color-bg);
}

/* --- card-grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 2em 0;
  max-width: var(--component-width);
}

.card-grid > div {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card-grid > div:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card-grid p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  text-align: left;
  margin-bottom: 0.6em;
  background: transparent;
}

.card-grid p:last-child {
  margin-bottom: 0;
}

.card-grid p strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  display: block;
  margin-bottom: 8px;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* --- key-takeaway --- */
.key-takeaway {
  border-top: 3px solid var(--color-text);
  padding-top: 20px;
  margin: 40px 0;
}

.key-takeaway p {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(20px, 2.5vw, 22px);
  line-height: 1.5;
  color: var(--color-text);
  text-align: left;
  margin-bottom: 0;
  background: transparent;
}

/* --- fun-fact --- */
.fun-fact {
  position: relative;
  padding-left: 24px;
  margin: 1.5em 0;
}

.fun-fact::before {
  content: "\2014";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.fun-fact p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  text-align: left;
  margin-bottom: 0;
  background: transparent;
}

/* --- glossary-term --- */
.glossary-term {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 1em 0;
}

.glossary-term strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.glossary-term span {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-secondary);
}

@media (max-width: 600px) {
  .glossary-term {
    flex-direction: column;
    gap: 4px;
  }
}

/* --- dos-donts --- */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 2em 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dos-donts > div:first-child {
  background: var(--color-surface);
  padding: 24px;
  border-right: 1px solid var(--color-border);
}

.dos-donts > div:last-child {
  background: var(--color-surface);
  padding: 24px;
}

.dos-donts > div:first-child p strong {
  color: var(--color-success);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dos-donts > div:last-child p strong {
  color: var(--color-danger);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dos-donts ul {
  padding-left: 1.2em;
  margin-bottom: 0;
}

.dos-donts li {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  text-align: left;
  margin-bottom: 0.5em;
}

.dos-donts p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  text-align: left;
  background: transparent;
}

@media (max-width: 600px) {
  .dos-donts {
    grid-template-columns: 1fr;
  }
  .dos-donts > div:first-child {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
}

/* --- pre-bet-checklist --- */
.pre-bet-checklist {
  margin: 2em 0;
}

.pre-bet-checklist p strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  display: block;
  margin-bottom: 16px;
}

.pre-bet-checklist p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  text-align: left;
  background: transparent;
}

.pre-bet-checklist ul {
  list-style: none;
  padding-left: 28px;
  border-left: 2px solid var(--color-border);
  margin: 0;
}

.pre-bet-checklist li {
  position: relative;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  text-align: left;
  padding: 8px 0;
}

.pre-bet-checklist li::before {
  content: "\2610";
  position: absolute;
  left: -36px;
  top: 8px;
  font-size: 16px;
  color: var(--color-accent);
  background: var(--color-bg);
  padding: 0 4px;
}

/* --- at-a-glance --- */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--color-surface);
  border-radius: 6px;
  margin: 2em 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  max-width: var(--component-width);
}

.at-a-glance > div {
  padding: 20px;
  border-right: 1px solid var(--color-secondary);
}

.at-a-glance > div:last-child {
  border-right: none;
}

.at-a-glance p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 0.4em;
  background: transparent;
}

.at-a-glance p:last-child {
  margin-bottom: 0;
}

.at-a-glance p strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
}

@media (max-width: 600px) {
  .at-a-glance {
    grid-template-columns: 1fr;
  }
  .at-a-glance > div {
    border-right: none;
    border-bottom: 1px solid var(--color-secondary);
  }
  .at-a-glance > div:last-child {
    border-bottom: none;
  }
}

/* --- worked-example --- */
.worked-example {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 28px 32px;
  margin: 2em 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.worked-example p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  text-align: left;
  margin-bottom: 0.8em;
  background: transparent;
}

.worked-example p:last-child {
  margin-bottom: 0;
}

.worked-example p strong:first-child {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-accent);
}

.worked-example p:first-child strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--color-text);
}

/* Arrow divider between steps */
.worked-example p + p::before {
  content: none;
}

/* --- section-bridge --- */
.section-bridge {
  text-align: center;
  margin: 1.5em 0;
  color: var(--color-accent);
  font-style: italic;
  font-family: var(--font-body);
  font-size: 17px;
}

.section-bridge::before {
  content: "--- ";
  color: var(--color-secondary);
  letter-spacing: 0.2em;
}

.section-bridge::after {
  content: " ---";
  color: var(--color-secondary);
  letter-spacing: 0.2em;
}

/* ============================================
   5. Hero Section
   ============================================ */
[data-content="hero"] {
  max-width: 100%;
  padding: 0;
  margin-bottom: var(--section-gap);
  background: var(--color-bg);
}

.hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 120px) var(--content-padding) 0;
}

.hero-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-secondary);
  display: block;
  margin-bottom: 20px;
}

[data-content="hero"] h1 {
  margin-bottom: 16px;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-bottom: 24px;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border: none;
  margin-bottom: 20px;
}

.hero-meta {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}

.hero-meta time {
  display: inline;
}

[data-content="hero"] figure {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

[data-content="hero"] figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ============================================
   5b. TOC Section
   ============================================ */
[data-content="toc"] {
  max-width: var(--content-width);
  padding-top: 0;
}

.toc-nav {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 28px 32px;
  background: var(--color-surface);
}

.toc-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-nav > ul > li {
  margin-bottom: 8px;
}

.toc-nav > ul > li > a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc-nav > ul > li > a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.toc-nav > ul > li > a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.toc-nav ul ul {
  padding-left: 20px;
  margin-top: 4px;
}

.toc-nav ul ul li {
  margin-bottom: 4px;
}

.toc-nav ul ul a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc-nav ul ul a:hover {
  color: var(--color-accent);
  opacity: 1;
}

/* ============================================
   5c. Navigation buttons
   ============================================ */
.nav-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-bg);
  background: var(--color-accent);
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
  color: var(--color-bg);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 100;
  font-size: 12px;
  padding: 10px 16px;
  opacity: 0.7;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.back-to-top:hover {
  opacity: 1;
}

/* ============================================
   6. FAQ Accordion
   ============================================ */
details {
  border-bottom: 1px solid var(--color-border);
  padding: 0;
}

summary {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
  color: var(--color-text);
  transition: color 0.2s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

summary:hover {
  color: var(--color-accent);
}

summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Modern CSS accordion animation */
details {
  interpolate-size: allow-keywords;
}

::details-content {
  opacity: 0;
  block-size: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, block-size 0.3s ease, content-visibility 0.3s ease allow-discrete;
}

details[open]::details-content {
  opacity: 1;
  block-size: auto;
}

details div p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  text-align: left;
  padding-bottom: 18px;
  background: transparent;
}

/* Fallback for older browsers */
@supports not selector(::details-content) {
  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  details[open] > *:not(summary) {
    animation: fade-in 0.3s ease forwards;
  }
}

/* ============================================
   7. Footer
   ============================================ */
footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 32px var(--content-padding);
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================================
   8. Media Queries
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-gap: 56px;
  }

  h1 {
    font-size: clamp(32px, 8vw, 44px);
  }

  h2 {
    font-size: clamp(24px, 5vw, 30px);
  }

  body {
    font-size: 17px;
  }

  .hero-inner {
    padding-top: 48px;
  }

  .toc-nav {
    padding: 20px 24px;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 10px 12px;
  }

  .worked-example {
    padding: 20px 24px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

#crumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    text-align: center; 
}

#crumbs a {
    text-decoration: none;
    color: #0073aa; 
}

#crumbs a:hover {
    text-decoration: underline;
}

#crumbs .current {
    font-weight: bold;
    color: rgb(255, 255, 255);
}

/* ============================================
   Header & Desktop Navigation
   ============================================ */

/* Main header container */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--content-padding);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Inner wrapper for alignment */
.top-navigation-bar {
  display: flex;
  align-items: center;
  justify-content: center; /* Centers the menu items */
  max-width: var(--content-width);
  margin: 0 auto;
  min-height: 80px;
}

/* Hide mobile controls on desktop by default */
.mobile-controls {
  display: none;
}

/* --- Desktop Menu Styles --- */
.site-nav--desktop {
  width: 100%;
}

.menu-desktop {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: clamp(20px, 4vw, 40px); /* Responsive gap between items */
}

/* Reset default list item margins */
.menu-desktop li {
  margin: 0;
  padding: 0;
}

/* Link styling */
.menu-desktop a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
  opacity: 1; /* Overrides the global a:hover opacity you had */
}

/* Animated underline effect */
.menu-desktop a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

/* Hover and active states */
.menu-desktop a:hover,
.menu-desktop .current-menu-item > a {
  color: var(--color-accent);
}

.menu-desktop a:hover::after,
.menu-desktop .current-menu-item > a::after {
  width: 100%; /* Expands the underline */
}

/* ============================================
   Mobile Behavior (Basic Toggle Setup)
   ============================================ */
@media (max-width: 768px) {
  /* Hide desktop nav on small screens */
  .site-nav--desktop {
    display: none;
  }
  
  /* Show mobile burger icon */
  .mobile-controls {
    display: block;
    margin-left: auto; /* Pushes burger to the right */
  }
  
  .top-navigation-bar {
    justify-content: flex-end;
  }
}

/* ============================================
   Mobile Navigation & Burger Menu
   ============================================ */

/* --- Burger Icon --- */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: background-color 0.2s ease;
}

.burger:hover span,
.burger:focus-visible span {
  background-color: var(--color-accent);
}

/* --- Mobile Overlay --- */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px); /* Adds a nice blur effect to the background */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 998; /* Just below the menu */
}

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

/* --- Mobile Menu Panel --- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: clamp(280px, 80vw, 400px); /* Responsive width */
  height: 100vh;
  background-color: var(--color-bg);
  border-left: 1px solid var(--color-border);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  transform: translateX(100%); /* Hidden off-screen to the right by default */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Allow scrolling if menu is long */
}

.mobile-menu.is-open {
  transform: translateX(0); /* Slide in */
}

/* --- Close Button --- */
.mobile-menu__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 40px;
  line-height: 1;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-menu__close:hover,
.mobile-menu__close:focus-visible {
  color: var(--color-accent);
  transform: scale(1.1);
  outline: none;
}

/* --- Mobile Menu Layout & Links --- */
.mobile-menu__inner {
  padding: 80px 32px 40px; /* Top padding clears the close button */
}

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

.menu-mobile li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--color-border);
}

.menu-mobile li:last-child {
  border-bottom: none;
}

.menu-mobile a {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  text-decoration: none;
  padding: 16px 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

/* Interactive hover effect */
.menu-mobile a:hover,
.menu-mobile .current-menu-item > a {
  color: var(--color-accent);
  padding-left: 10px; /* Slight shift to the right on hover */
}

/* ============================================
   Footer Styles (Grid Layout)
   ============================================ */
.site-footer {
  background-color: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 60px 0 30px;
  margin-top: var(--section-gap);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.footer-title {
  font-family: var(--font-display);
  color: var(--color-secondary); /* Желтоватый/золотой цвет из вашей палитры */
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

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

.footer-list li {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Красные маркеры для первых трех колонок */
.custom-bullets li {
  position: relative;
  padding-left: 16px;
}

.custom-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-danger); /* Красный цвет */
  font-size: 20px;
  line-height: 1.2;
}

.footer-list a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: var(--color-accent); /* Оранжевый при наведении */
}

/* --- Нижняя часть футера (Копирайт и дисклеймер) --- */
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 30px;
  text-align: center;
}

.footer-disclaimer {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: justify;
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* --- Адаптивность футера --- */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-title {
    margin-bottom: 16px;
  }
}

/* ============================================
   9. 404 Error Page
   ============================================ */
.error-404 {
    padding: clamp(60px, 10vw, 100px) 0;
    text-align: center;
}

.error-code {
    font-family: var(--font-display);
    font-size: clamp(100px, 15vw, 180px);
    line-height: 1;
    font-weight: 700;
    color: var(--color-accent);
    opacity: 0.2;
    margin-bottom: -40px; /* Overlap with title */
}

.error-404 h1 {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.error-404 .page-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-actions {
    margin: 40px 0;
}

.error-search {
    margin-top: 60px;
    padding: 30px;
    background: var(--color-surface);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.error-search p {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

/* Style the WordPress search form */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex-grow: 1;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 12px 16px;
    color: var(--color-text);
    border-radius: 4px;
    font-family: var(--font-body);
}

.search-form button[type="submit"] {
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

.error-quick-links {
    margin-top: 60px;
}

.error-quick-links h2 {
    text-align: center;
    margin-bottom: 20px;
}

.error-quick-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.error-quick-links a {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 2px solid var(--color-secondary);
}

.error-quick-links a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}