/* =============================================
   888 Bet Casino Análise — style.css
   Paleta: #1A1A2E / #C9A84C / #F5F0E8
   ============================================= */

/* --- Reset & Box Model --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Custom Properties --- */
:root {
  --navy: #1A1A2E;
  --gold: #C9A84C;
  --cream: #F5F0E8;
  --text: #1A1A2E;
  --text-muted: #5a5a72;
  --bg: #F5F0E8;
  --border: #d8d2c4;
  --radius: 4px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-content: 720px;
  --max-wrap: 1140px;
}

/* --- Base --- */
html {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  overflow-x: hidden;
  min-width: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--gold);
}

/* --- Skip link --- */
.skip-wrap {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  position: static;
  left: auto;
  width: auto;
  height: auto;
  overflow: visible;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--navy);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  height: 60px;
  max-width: var(--max-wrap);
  margin: 0 auto;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 0;
}

.brand img {
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* CTA buttons in header */
.header-ctas {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
  min-height: 44px;
  padding: 0 0.75rem;
  transition: opacity 0.15s, background 0.15s;
}

.cta-signup {
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--gold);
}

.cta-signup:hover {
  background: #b8933e;
  border-color: #b8933e;
  color: var(--navy);
}

.cta-login {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream);
}

.cta-login:hover {
  background: rgba(255,255,255,0.1);
  color: var(--cream);
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--cream);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  color: var(--cream);
  margin-left: 0.5rem;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s;
}

.burger::before,
.burger::after {
  content: '';
  position: absolute;
  left: 0;
}

.burger::before { top: -6px; }
.burger::after  { top: 6px; }

/* Primary nav */
#primary-nav {
  background: var(--navy);
  border-top: 1px solid rgba(201,168,76,0.3);
}

#primary-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  max-width: var(--max-wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

#primary-nav ol li {
  display: flex;
}

#primary-nav ol li a {
  display: flex;
  align-items: center;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.55rem 0.6rem;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
  white-space: normal;
  word-break: break-word;
}

#primary-nav ol li a:hover,
#primary-nav ol li a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* =============================================
   MAIN LAYOUT — wrap / content / sidebar
   ============================================= */
main {
  min-height: 60vh;
  padding: 2rem 1rem 3rem;
  max-width: 100%;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--max-wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
  min-width: 0;
}

/* Content columns (article > div) */
.wrap > article {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* Page header */
.page-header {
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--gold);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  line-height: 1.25;
  color: var(--navy);
  margin-top: 0.4rem;
}

.page-header small {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

/* Byline */
.byline {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.byline .author-name {
  font-style: normal;
  font-weight: 600;
  color: var(--navy);
}

.byline time {
  font-style: normal;
}

/* Stage label */
.stage-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.stage-awareness  { background: #e8f4fd; color: #1a5f7a; }
.stage-consideration { background: #fdf3e8; color: #7a4a1a; }
.stage-decision   { background: #edf8ee; color: #1a7a2a; }

/* Body content */
.body-content {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: var(--max-content);
  overflow-x: hidden;
}

.body-content h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: var(--navy);
  font-family: var(--font-serif);
  line-height: 1.3;
}

.body-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--navy);
}

.body-content p {
  margin-bottom: 1rem;
}

.body-content ul,
.body-content ol {
  margin: 0.75rem 0 1rem 1.25rem;
}

.body-content li {
  margin-bottom: 0.35rem;
}

.body-content a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.body-content a:hover {
  color: var(--gold);
}

.body-content strong {
  font-weight: 700;
  color: var(--navy);
}

.body-content blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
  background: rgba(201,168,76,0.07);
  font-style: italic;
}

/* Tables — overflow scroll on mobile */
.body-content table,
.ranking-body table,
.compare-body table,
.faq-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-family: var(--font-sans);
}

.body-content th,
.body-content td,
.ranking-body th,
.ranking-body td,
.compare-body th,
.compare-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.body-content th,
.ranking-body th,
.compare-body th {
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* Wrap tables in scroll container */
.body-content table,
.ranking-body table,
.compare-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.ranking-body,
.compare-body {
  overflow-x: hidden;
  max-width: 100%;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 80px;
  min-width: 0;
}

.sidebar-inner small {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.sidebar-inner h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.sidebar-list {
  list-style: none;
  padding: 0;
}

.sidebar-list li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list li a {
  display: flex;
  align-items: center;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.55rem 0;
  min-height: 44px;
  line-height: 1.35;
  transition: color 0.15s;
}

.sidebar-list li a:hover {
  color: var(--gold);
}

.sidebar-cta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201,168,76,0.3);
}

.sidebar-cta small {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.cta-block {
  display: flex;
  width: 100%;
  text-align: center;
  justify-content: center;
  min-height: 44px;
}

/* =============================================
   HOME LAYOUT
   ============================================= */
.hero-wrap {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Child cards (dl) */
.child-cards {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.child-cards > small {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.child-cards > h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.card-list {
  display: grid;
  gap: 1rem;
}

.card-list dt {
  font-weight: 700;
  font-family: var(--font-sans);
}

.card-list dt a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
}

.card-list dt a:hover {
  color: var(--gold);
}

.card-list dd {
  margin: 0.2rem 0 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

/* =============================================
   AUTHOR PROFILE (About)
   ============================================= */
.author-profile {
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.author-profile small {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.author-profile h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.author-credentials {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.author-bio {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--cream);
}

/* =============================================
   RANKING
   ============================================= */
.ranking-body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

.ranking-body table {
  font-size: 0.88rem;
}

/* =============================================
   FAQ
   ============================================= */
.faq-body details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.faq-body summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  list-style: none;
  color: var(--navy);
}

.faq-body summary::-webkit-details-marker { display: none; }

.faq-body details[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--gold);
}

.faq-body details > *:not(summary) {
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 2.5rem 1rem 1.25rem;
  border-top: 3px solid var(--gold);
  overflow-x: hidden;
}

.footer-inner {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: var(--max-wrap);
  margin: 0 auto 1.5rem;
}

.footer-col {
  flex: 1 1 160px;
  min-width: 0;
}

.footer-col dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.footer-col dd {
  margin: 0 0 0.25rem 0;
}

.footer-col dd a {
  color: rgba(245,240,232,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
  transition: color 0.15s;
  line-height: 1.4;
}

.footer-col dd a:hover {
  color: var(--gold);
}

.responsible-gambling {
  font-size: 0.78rem;
  color: rgba(245,240,232,0.7);
  line-height: 1.55;
}

.footer-copy {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(245,240,232,0.5);
  max-width: var(--max-wrap);
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* =============================================
   MOBILE — ≤768px
   ============================================= */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  /* Header: brand + toggle + CTAs on one row, ≤120px tall */
  .header-inner {
    height: auto;
    min-height: 56px;
    padding: 0.5rem 0.75rem;
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .brand-name {
    max-width: 90px;
    font-size: 0.85rem;
  }

  .nav-toggle {
    display: inline-flex;
    order: 2;
    margin-left: 0;
  }

  .header-ctas {
    order: 3;
    margin-left: 0;
    gap: 0.3rem;
  }

  /* Smaller CTAs on mobile — still ≥44px tall */
  .cta {
    font-size: 0.72rem;
    padding: 0 0.5rem;
    min-height: 44px;
  }

  /* Nav: collapsed by default */
  #primary-nav {
    display: none;
    border-top: 1px solid rgba(201,168,76,0.3);
  }

  #primary-nav.is-open {
    display: block;
  }

  #primary-nav ol {
    flex-direction: column;
    padding: 0.25rem 0.75rem 0.75rem;
    gap: 0;
  }

  #primary-nav ol li {
    width: 100%;
  }

  #primary-nav ol li a {
    width: 100%;
    font-size: 0.9rem;
    padding: 0 0.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
  }

  /* Single-column layout */
  .wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  main {
    padding: 1.25rem 0.75rem 2.5rem;
    overflow-x: hidden;
  }

  .page-header h1 {
    font-size: 1.45rem;
  }

  .body-content {
    font-size: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Make all tables scrollable on mobile */
  .body-content table,
  .ranking-body table,
  .compare-body table,
  .faq-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    font-size: 0.82rem;
  }

  /* Prevent any wide child from causing scroll */
  .body-content *,
  .ranking-body *,
  .compare-body *,
  div,
  article {
    max-width: 100%;
    min-width: 0;
  }

  /* Sidebar goes below content on mobile */
  .sidebar {
    position: static;
    order: 10;
  }

  /* Footer links tap area */
  .footer-col dd a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.88rem;
  }

  .footer-inner {
    gap: 1.25rem;
  }

  .footer-col {
    flex: 1 1 140px;
  }
}

/* =============================================
   DESKTOP — >768px
   ============================================= */
@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }

  #primary-nav {
    display: block !important;
  }

  .brand-name {
    max-width: 220px;
  }

  .wrap {
    grid-template-columns: 1fr 280px;
  }
}

/* =============================================
   UTILITY
   ============================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Eyebrow + h2/h3 sibling pattern */
small + h2,
small + h3 {
  margin-top: 0;
}

/* Sensible pre/code */
pre, code {
  font-size: 0.88rem;
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
  padding: 0.15em 0.35em;
  overflow-x: auto;
  max-width: 100%;
}

pre {
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}.tbl-scroll{overflow-x:auto;max-width:100%}