/*
Theme Name: los_uscomanos
Description: description
Version: 1.0.2
*/
[data-content="toc"] h2 {
  text-align: center;
}

/* ==========================================================================
   1. CSS VARIABLES AND RESET
   ========================================================================== */
:root {
  /* Backgrounds */
  --page-bg: #0d1117;
  --header-bg: #161b22;
  --footer-bg: #0d1117;
  --card-bg: #161b22;
  --surface: #21262d;
  
  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  
  /* Accents */
  --accent: #1cc88f;
  --accent-hover: #17a673;
  --secondary: #edbd2a;
  
  /* Borders */
  --border: #30363d;
  --border-light: #21262d;
  
  /* States */
  --success: #1cc88f;
  --warning: #edbd2a;
  --error: #f85149;
  --info: #58a6ff;
  
  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Layout */
  --content-width: 760px;
  --section-gap: 4rem;
  
  /* Sizes */
  --h1-size: clamp(2rem, 5vw, 3rem);
  --h2-size: clamp(1.5rem, 4vw, 2.25rem);
  --h3-size: clamp(1.25rem, 3vw, 1.75rem);
  --body-size: clamp(1rem, 2vw, 1.125rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. GENERAL TYPOGRAPHY
   ========================================================================== */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-align: left;
}

h1 {
  font-size: var(--h1-size);
}

h2 {
  font-size: var(--h2-size);
  margin-bottom: 1.5rem;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: var(--h3-size);
  margin-top: 2rem;
  margin-bottom: 1rem;
  scroll-margin-top: 2rem;
}

p {
  text-align: left;
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

ul, ol {
  text-align: left;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

blockquote {
  text-align: left;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--surface);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

thead {
  background-color: var(--surface);
}

th {
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

tbody tr:nth-child(even) {
  background-color: var(--card-bg);
}

tbody tr:hover {
  background-color: var(--surface);
}

/* Mono styling for odds and stats */
.mono, .odds, .stats {
  font-family: var(--font-mono);
  font-weight: 500;
}

td:nth-child(2),
td:nth-child(3) {
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ==========================================================================
   3. SECTION LAYOUT
   ========================================================================== */
main {
  width: 100%;
}

article {
  display: block;
}

[data-content] {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-top: var(--section-gap);
  padding-bottom: 0;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

[data-content]:last-of-type {
  padding-bottom: var(--section-gap);
}

/* Figures */
figure {
  margin: 1.5em auto;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

figcaption {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* Table container for mobile */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* ==========================================================================
   4. COMPONENTS
   ========================================================================== */

/* Info Box */
.info-box {
  background-color: rgba(28, 200, 143, 0.08);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.info-box p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* Callout */
.callout {
  background-color: rgba(237, 189, 42, 0.08);
  border-left: 3px solid var(--secondary);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.callout p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* Odds Example */
.odds-example {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.odds-example p {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.odds-example p:last-child {
  margin-bottom: 0;
}

.odds-example .odds-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card-grid > div {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.card-grid p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* Comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.comparison > div {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.comparison p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* TL;DR */
.tldr {
  background-color: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  border-radius: 0 6px 6px 0;
}

.tldr h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.tldr ul {
  margin-bottom: 0;
}

.tldr li {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.tldr li:last-child {
  margin-bottom: 0;
}

/* Key Takeaway */
.key-takeaway {
  border-top: 2px solid var(--accent);
  padding-top: 1.25rem;
  margin: 2rem 0;
}

.key-takeaway p {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0;
}

/* Fun Fact */
.fun-fact {
  position: relative;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.fun-fact::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 600;
}

.fun-fact p {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Glossary Term */
.glossary-term {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 1rem 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.glossary-term p {
  margin-bottom: 0;
}

.glossary-term strong {
  font-family: var(--font-mono);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
}

/* Dos and Don'ts */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.dos-donts > div:first-child {
  border-left: 3px solid var(--success);
  padding-left: 1rem;
}

.dos-donts > div:last-child {
  border-left: 3px solid var(--error);
  padding-left: 1rem;
}

.dos-donts h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.dos-donts > div:first-child h4 {
  color: var(--success);
}

.dos-donts > div:last-child h4 {
  color: var(--error);
}

.dos-donts ul {
  margin-bottom: 0;
  padding-left: 1rem;
}

.dos-donts li {
  color: var(--text-primary);
}

/* Pre-Bet Checklist */
.pre-bet-checklist {
  margin: 1.5rem 0;
}

.pre-bet-checklist h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.pre-bet-checklist ul {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
  margin-bottom: 0;
  list-style: none;
}

.pre-bet-checklist li {
  position: relative;
  padding-left: 0.5rem;
  color: var(--text-primary);
}

.pre-bet-checklist li::before {
  content: '☐';
  position: absolute;
  left: -1.25rem;
  color: var(--accent);
  background-color: var(--page-bg);
  padding: 0 0.15rem;
}

/* At a Glance */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.at-a-glance > div {
  padding: 1.25rem;
  text-align: center;
  border-right: 1px solid var(--border);
  background-color: var(--card-bg);
}

.at-a-glance > div:last-child {
  border-right: none;
}

.at-a-glance strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.at-a-glance p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Worked Example */
.worked-example {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.worked-example p {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.worked-example p:first-child {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.worked-example p:last-child {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

/* Section Bridge */
.section-bridge {
  text-align: center;
  margin: 2.5rem 0;
  position: relative;
}

.section-bridge::before,
.section-bridge::after {
  content: '·  ·  ·';
  color: var(--text-muted);
  font-size: 0.85rem;
  display: block;
}

.section-bridge::before {
  margin-bottom: 1rem;
}

.section-bridge::after {
  margin-top: 1rem;
}

.section-bridge p {
  text-align: center;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 0;
}

/* Author Bio */
.author-bio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2rem;
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */
header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.custom-logo {
  display: block;
  width: 180px;
  height: auto;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.trust-marker {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.date-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background-color: var(--surface);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */
[data-content="hero"] {
  max-width: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-top: 4rem;
  padding-bottom: 4rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  text-align: center;
  position: relative;
  background-color: var(--page-bg);
  background-image: radial-gradient(circle, var(--accent) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center;
}

[data-content="hero"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--page-bg) 70%);
  pointer-events: none;
}

[data-content="hero"] > * {
  position: relative;
  z-index: 1;
}

[data-content="hero"] h1 {
  text-align: center;
  max-width: var(--content-width);
  margin: 0 auto 1rem;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-byline {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

[data-content="hero"] figure {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

[data-content="hero"] figure img {
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   7. TOC (HORIZONTAL BAR)
   ========================================================================== */
[data-content="toc"] {
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.toc-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.toc-list a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.toc-list a:hover {
  color: var(--accent);
}

/* ==========================================================================
   8. FAQ ACCORDION
   ========================================================================== */
[data-content="faq"] details {
  border-bottom: 1px solid var(--border-light);
}

[data-content="faq"] details:last-of-type {
  border-bottom: none;
}

[data-content="faq"] summary {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s ease;
}

[data-content="faq"] summary::-webkit-details-marker {
  display: none;
}

[data-content="faq"] summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.3s ease;
}

[data-content="faq"] details[open] summary::after {
  content: '−';
}

[data-content="faq"] summary:hover {
  color: var(--accent);
}

[data-content="faq"] details > div {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

[data-content="faq"] details[open] > div {
  max-height: 500px;
  opacity: 1;
}

[data-content="faq"] details > div > p {
  padding-bottom: 1rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 0;
}

.footer-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
}

.footer-col p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1000px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Back to Top */
.back-to-top {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: var(--accent);
}

/* ==========================================================================
   10. MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --section-gap: 3rem;
  }
  
  [data-content] {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .header-meta {
    width: 100%;
    justify-content: center;
  }
  
  [data-content="hero"] {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .toc-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .toc-list a {
    padding: 0.35rem 0;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 0.5rem;
  }
  
  .comparison {
    grid-template-columns: 1fr;
  }
  
  .dos-donts {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .at-a-glance {
    grid-template-columns: 1fr 1fr;
  }
  
  .at-a-glance > div {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .at-a-glance > div:nth-child(odd) {
    border-right: 1px solid var(--border);
  }
  
  .at-a-glance > div:nth-last-child(-n+2) {
    border-bottom: none;
  }
  
  .glossary-term {
    flex-direction: column;
    gap: 4px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .custom-logo {
    width: 150px;
  }
  
  .at-a-glance {
    grid-template-columns: 1fr;
  }
  
  .at-a-glance > div {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .at-a-glance > div:last-child {
    border-bottom: none;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
  

/* ==========================================================================
   IMAGES-STYLES.CSS - Additional Styles for Article Images and Tables
   ========================================================================== */

/* Section Images - Centered */
[data-content] figure {
  margin: 0 auto 1.5rem auto;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
}

[data-content] figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 0 auto;
}

/* Hero Image Override - Centered */
[data-content="hero"] figure {
  margin: 1.5rem auto 0 auto;
  max-width: var(--content-width);
  text-align: center;
}

[data-content="hero"] .hero-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

/* Table Wrapper for Horizontal Scroll */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.table-wrap table {
  min-width: 500px;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  [data-content] figure {
    margin: 0 auto 1.5rem auto;
    border-radius: 6px;
  }
  
  [data-content] figure img {
    border-radius: 6px;
  }
  
  [data-content="hero"] figure {
    margin: 1rem auto 0 auto;
    padding: 0 1rem;
  }
  
  [data-content="hero"] .hero-image {
    border-radius: 6px;
  }
  
  /* Tables scroll horizontally on mobile */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  th, td {
    white-space: nowrap;
  }
}
