/* ============================================================
   888Games BR — style.css
   Energetic streetwear colour blocks, thick outlines, tilted
   sticker labels, humanist sans-serif, 100vh hero slanted edge
   ============================================================ */

/* --- Tokens --- */
:root {
  --orange: #FF3B00;
  --navy:   #1A1A2E;
  --yellow: #F5E642;
  --white:  #FFFFFF;
  --off-white: #F7F7F4;
  --text:   #1A1A2E;
  --muted:  #5A5A72;
  --border: 3px solid var(--navy);
  --radius: 4px;
  --font: system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --max-w: 1140px;
  --col-gap: 2rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--off-white);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

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

a { color: var(--orange); text-decoration: underline; }
a:hover { color: var(--navy); }

/* body copy links clearly distinct */
.page-body a, .faq-body a, .prose a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: underline;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -999px; left: -999px;
  background: var(--yellow);
  color: var(--navy);
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 9999;
}
.skip-link:focus { top: 0; left: 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--navy);
  border-bottom: 3px solid var(--orange);
}

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

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--yellow);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand img { width: 36px; height: 36px; object-fit: contain; }

/* Desktop nav */
.primary-nav { margin-left: auto; }
.nav-list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav-list li a {
  display: block;
  padding: 0.5rem 0.6rem;
  color: var(--white);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav-list li a:hover { background: var(--orange); color: var(--white); }

/* Menu toggle — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}
.burger,
.burger::before,
.burger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--yellow);
  border-radius: 2px;
  position: relative;
  transition: transform 0.25s;
}
.burger::before, .burger::after {
  content: '';
  position: absolute;
  left: 0;
}
.burger::before { top: -7px; }
.burger::after  { top:  7px; }

/* Header CTAs */
.header-ctas {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

/* CTA buttons */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.1rem;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.cta:active { transform: scale(0.97); }

.cta-signup {
  background: var(--orange);
  color: var(--white);
  border: 2px solid var(--orange);
}
.cta-signup:hover { opacity: 0.88; color: var(--white); }

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

/* ============================================================
   LAYOUT WRAPPER (sidebar left + main right)
   ============================================================ */
.layout-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  display: flex;
  gap: var(--col-gap);
  align-items: flex-start;
  /* sidebar LEFT, content RIGHT */
}

/* Sidebar */
.sidebar {
  flex: 0 0 220px;
  min-width: 0;
  order: -1; /* left */
  position: sticky;
  top: 80px;
}
.sidebar-inner {
  background: var(--navy);
  color: var(--white);
  border: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
}
.sidebar-heading {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}
.sidebar-links { list-style: none; }
.sidebar-links li { border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-links li:first-child { border-top: none; }
.sidebar-links li a {
  display: block;
  padding: 0.55rem 0;
  color: var(--white);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.4;
}
.sidebar-links li a:hover { color: var(--yellow); text-decoration: underline; }
.sidebar-cta-block { margin-top: 1rem; }
.sidebar-cta-block .cta { width: 100%; justify-content: center; }

/* Main content */
.content-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 720px;
}

/* ============================================================
   ARTICLE MARKUP (main > article > div)
   ============================================================ */
.page-article { /* direct child of main.content-main */ }
.page-section  { /* direct child of article.page-article */ }

/* --- Article banner / hero --- */
.article-banner {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 3rem 1rem 4rem;
  clip-path: polygon(0 0,100% 0,100% 88%,0 100%);
  margin-bottom: -2rem;
}
.article-banner-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  align-items: center;
}
.article-banner-img { flex: 0 0 260px; }
.article-banner-img img { border-radius: var(--radius); border: 3px solid var(--orange); }
.article-banner-text { flex: 1 1 0; min-width: 0; }
.article-banner-text h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  word-break: break-word;
}

/* Byline */
.byline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0;
}
.byline strong { color: var(--yellow); }
.byline time { color: var(--yellow); }

/* --- Stickers --- */
.sticker {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 2px solid var(--navy);
  border-radius: 2px;
  transform: rotate(-2deg);
  margin-bottom: 0.75rem;
}
.sticker-sm { font-size: 0.7rem; }
.sticker-orange { background: var(--orange); color: var(--white); }

/* --- Page body prose --- */
.page-body, .faq-body, .prose {
  font-size: 1rem;
  line-height: 1.7;
}
.page-body h2, .faq-body h2, .prose h2 {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 2rem 0 0.25rem;
  color: var(--navy);
}
.page-body h2 + .subtitle,
.faq-body h2 + .subtitle,
.prose h2 + .subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.page-body h3, .faq-body h3, .prose h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 1.5rem 0 0.4rem;
}
.page-body p, .faq-body p, .prose p { margin-bottom: 1rem; }
.page-body ul, .page-body ol,
.faq-body ul, .faq-body ol,
.prose ul, .prose ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.page-body li, .faq-body li, .prose li { margin-bottom: 0.4rem; }
.page-body table, .prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.page-body table th,
.page-body table td,
.prose table th,
.prose table td {
  border: 2px solid var(--navy);
  padding: 0.55rem 0.75rem;
  text-align: left;
  min-width: 80px;
}
.page-body table th, .prose table th {
  background: var(--navy);
  color: var(--yellow);
  font-weight: 800;
}

/* "Sobre este artigo" heading inside .page-body */
.page-body > h2:first-child {
  margin-top: 0;
}

/* ============================================================
   HOME LAYOUT
   ============================================================ */
.home-hero {
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0,100% 0,100% 90%,0 100%);
  padding: 5rem 1rem 8rem;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(255,59,0,0.06) 40px,
    rgba(255,59,0,0.06) 41px
  );
  pointer-events: none;
}
.home-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.home-hero .sticker { margin-bottom: 1rem; }
.home-hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 820px;
  margin-bottom: 1.25rem;
  word-break: break-word;
}
.home-hero .byline { font-size: 0.9rem; margin-bottom: 1.5rem; }
.home-hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.home-hero-ctas .cta { min-height: 50px; padding: 0 1.75rem; font-size: 0.9rem; }

/* Home content area */
.home-content {
  max-width: var(--max-w);
  margin: 3rem auto;
  padding: 0 1rem;
  display: flex;
  gap: var(--col-gap);
  align-items: flex-start;
}
.home-content .sidebar { order: -1; }

.home-main { flex: 1 1 0; min-width: 0; }

/* Home body prose div */
.home-body-section { margin-bottom: 3rem; }
.home-body-section h2 {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

/* Child pages table */
.section-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 0.5rem;
}
.child-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
}
.child-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 340px;
}
.child-table th {
  background: var(--navy);
  color: var(--yellow);
  font-weight: 800;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--navy);
}
.child-table td {
  border: 2px solid var(--navy);
  padding: 0.6rem 0.8rem;
  vertical-align: top;
}
.child-table td a {
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}
.child-table td a:hover { text-decoration: underline; }
.child-table tr:nth-child(even) td { background: rgba(26,26,46,0.04); }

/* ============================================================
   FAQ LAYOUT
   ============================================================ */
.faq-hero {
  background: var(--orange);
  color: var(--white);
  padding: 3.5rem 1rem 5rem;
  clip-path: polygon(0 0,100% 0,100% 88%,0 100%);
  margin-bottom: -1.5rem;
}
.faq-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.faq-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  word-break: break-word;
}
.faq-layout { display: flex; gap: var(--col-gap); align-items: flex-start; max-width: var(--max-w); margin: 3rem auto; padding: 0 1rem 3rem; }
.faq-layout .sidebar { order: -1; }
.faq-main { flex: 1 1 0; min-width: 0; }

/* ============================================================
   ABOUT LAYOUT
   ============================================================ */
.about-hero {
  background: var(--yellow);
  color: var(--navy);
  padding: 3rem 1rem 4.5rem;
  clip-path: polygon(0 0,100% 0,100% 88%,0 100%);
  margin-bottom: -1rem;
}
.about-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.about-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  word-break: break-word;
}
.about-layout { display: flex; gap: var(--col-gap); align-items: flex-start; max-width: var(--max-w); margin: 3rem auto; padding: 0 1rem 3rem; }
.about-layout .sidebar { order: -1; }
.about-main { flex: 1 1 0; min-width: 0; }

.author-card {
  background: var(--navy);
  color: var(--white);
  border: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0 2rem;
}
.author-card-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--yellow);
  margin-bottom: 0.25rem;
}
.author-card-cred {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--orange);
  margin-bottom: 0.75rem;
}
.author-card-bio { font-size: 0.95rem; line-height: 1.65; }

/* ============================================================
   CONTACT LAYOUT
   ============================================================ */
.contact-hero {
  background: var(--navy);
  color: var(--yellow);
  padding: 3rem 1rem 4.5rem;
  clip-path: polygon(0 0,100% 0,100% 88%,0 100%);
  margin-bottom: -1rem;
}
.contact-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.contact-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--yellow);
  word-break: break-word;
}
.contact-layout { display: flex; gap: var(--col-gap); align-items: flex-start; max-width: var(--max-w); margin: 3rem auto; padding: 0 1rem 3rem; }
.contact-layout .sidebar { order: -1; }
.contact-main { flex: 1 1 0; min-width: 0; }

/* ============================================================
   PRIVACY LAYOUT
   ============================================================ */
.privacy-hero {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 1rem 4.5rem;
  clip-path: polygon(0 0,100% 0,100% 88%,0 100%);
  margin-bottom: -1rem;
}
.privacy-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.privacy-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  word-break: break-word;
}
.privacy-layout { display: flex; gap: var(--col-gap); align-items: flex-start; max-width: var(--max-w); margin: 3rem auto; padding: 0 1rem 3rem; }
.privacy-layout .sidebar { order: -1; }
.privacy-main { flex: 1 1 0; min-width: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: var(--white);
  border-top: 4px solid var(--orange);
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem 1.5rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.footer-address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 0 0 200px;
}
.footer-address strong { color: var(--yellow); font-size: 1rem; }
.footer-address a { color: var(--yellow); }

/* Footer nav: dl + dt/dd */
.footer-nav { flex: 1 1 200px; }
.footer-dl { display: block; }
.footer-dl dt {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}
.footer-dl dd { margin: 0; }
.footer-dl dd a {
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  line-height: 1.4;
}
.footer-dl dd a:hover { color: var(--yellow); text-decoration: underline; }

/* Footer trust ul */
.footer-trust { flex: 0 0 180px; }
.footer-trust ul { list-style: none; }
.footer-trust ul li a {
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  min-height: 44px;
  line-height: 44px;
}
.footer-trust ul li a:hover { color: var(--yellow); text-decoration: underline; }

/* Responsible gambling strip */
.footer-rg {
  background: var(--orange);
  text-align: center;
  padding: 0.75rem 1rem;
}
.footer-rg p {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ============================================================
   MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Show menu toggle, hide desktop nav */
  .menu-toggle { display: inline-flex; }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-top: 2px solid var(--orange);
    z-index: 400;
  }
  .primary-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .nav-list li a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    white-space: normal;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  /* Header stays compact: brand + toggle + CTAs in one row */
  .header-inner {
    min-height: 60px;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .brand { font-size: 0.95rem; }
  .header-ctas { gap: 0.35rem; }
  .cta { font-size: 0.75rem; padding: 0 0.65rem; min-height: 44px; }

  /* Collapse layout to single column */
  .layout-wrap,
  .home-content,
  .faq-layout,
  .about-layout,
  .contact-layout,
  .privacy-layout {
    flex-direction: column;
    padding: 1.25rem 0.75rem 2rem;
    gap: 1.25rem;
  }

  /* Sidebar stacks on top (order -1 keeps it first) */
  .sidebar {
    flex: 0 0 auto;
    width: 100%;
    position: static;
  }
  .content-main,
  .home-main,
  .faq-main,
  .about-main,
  .contact-main,
  .privacy-main { max-width: 100%; }

  /* Hero adjustments */
  .article-banner {
    padding: 2rem 0.75rem 3.5rem;
    clip-path: polygon(0 0,100% 0,100% 93%,0 100%);
  }
  .article-banner-inner { flex-direction: column; gap: 1rem; }
  .article-banner-img { flex: 0 0 auto; width: 100%; max-height: 200px; overflow: hidden; }
  .article-banner-img img { width: 100%; max-height: 200px; object-fit: cover; }
  .article-banner-text h1 { font-size: 1.4rem; }

  .home-hero { padding: 4rem 0.75rem 6rem; clip-path: polygon(0 0,100% 0,100% 93%,0 100%); }
  .home-hero h1 { font-size: 1.75rem; }

  .faq-hero, .about-hero, .contact-hero, .privacy-hero {
    padding: 2rem 0.75rem 3.5rem;
    clip-path: polygon(0 0,100% 0,100% 93%,0 100%);
  }

  /* Tables scroll horizontally within their container */
  .page-body table,
  .prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .child-table-wrap { max-width: 100%; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 1.5rem; }
  .footer-trust ul li a { line-height: 1.4; min-height: 44px; display: flex; align-items: center; }
  /* tap targets ≥44px */
  .footer-nav a, .footer-dl dd a { min-height:44px; display:inline-flex; align-items:center; }
  .footer-address a, address a { min-height:44px; display:inline-flex; align-items:center; }
  .breadcrumb a { min-height:44px; display:inline-flex; align-items:center; }
  .brand { min-height:44px; display:inline-flex; align-items:center; }
}

/* ============================================================
   VERY NARROW (≤400px)
   ============================================================ */
@media (max-width: 400px) {
  body { font-size: 16px; }
  .home-hero h1 { font-size: 1.5rem; }
  .article-banner-text h1 { font-size: 1.25rem; }
  .header-ctas { gap: 0.25rem; }
  .cta { padding: 0 0.5rem; font-size: 0.72rem; }

  /* prevent any fixed-width element from causing overflow */
  .child-table { min-width: unset; width: 100%; }
  .sidebar-inner { word-break: break-word; }
}

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

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%}.footer-home a{display:inline-flex;align-items:center;min-height:44px}