/* ==========================================================================
   IGAMING AFFILIATE TEMPLATE — STYLESHEET
   ==========================================================================
   HOW TO RE-SKIN THIS TEMPLATE FOR A NEW DOMAIN:
   1. Edit the CSS custom properties in the :root block below (colors, fonts,
      radii, spacing). That is almost always all you need to change.
   2. Swap /assets/images/placeholder-logo.svg for the real site logo.
   3. Do NOT edit component rules unless you are a developer — the layout is
      shared across ~400 sites and changes here ripple everywhere it is used.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. THEME VARIABLES — edit these per-domain to re-skin the site
   -------------------------------------------------------------------------- */
:root {
  /* Dark theme — gold + teal on charcoal, Australia-flavoured */
  --color-accent: #f4c150;          /* gold — brand mark, headings accent, CTA */
  --color-accent-dark: #d9a53d;     /* gold hover state */
  --color-accent-2: #2ec4a6;        /* teal — primary "Get Bonus"/"Play" CTA */
  --color-accent-2-dark: #25a68c;   /* teal hover state */
  --color-primary: #12161f;         /* dark surface — header/footer/table-head fills */

  /* Semantic colors (unused by default dark theme, kept for re-skins) */
  --color-success: #1a7f4e;
  --color-success-bg: #e9f7ef;
  --color-warning: #a15c00;
  --color-warning-bg: #fff4e0;
  --color-danger: #b3261e;
  --color-danger-bg: #fdecea;
  --color-info: #1c5f9e;
  --color-info-bg: #e8f2fb;

  /* Neutral / surface colors */
  --color-bg: #0e1117;
  --color-bg-alt: #161b24;         /* elevated sections, table head, mobile nav */
  --color-surface: #1b2230;        /* card/box background */
  --color-border: #29313f;
  --color-border-strong: #3a4354;
  --color-text: #e7ecf3;
  --color-text-muted: #9aa6b6;
  --color-text-inverse: #1a1205;   /* dark text on gold/teal buttons */

  /* Star rating color */
  --color-star: #f4c150;
  --color-star-empty: #3a4354;

  /* Typography — system font stack: zero external requests, no FOUT/FOIT */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-base: 16px;
  --lh-base: 1.6;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Layout */
  --container-width: 1100px;
  --container-padding: 1.25rem;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --header-height: 72px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE ELEMENTS
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-bottom: 68px; /* clearance for the fixed .sticky-cta bar */
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-accent-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #ffffff;
  line-height: 1.25;
  margin: 0 0 var(--space-4);
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: var(--space-7); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin-top: var(--space-6); }
h4 { font-size: 1.05rem; margin-top: var(--space-5); }

p { margin: 0 0 var(--space-4); }

ul, ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.4rem;
}

li { margin-bottom: var(--space-2); }

table { border-collapse: collapse; width: 100%; }

button { font-family: inherit; }

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-4);
  z-index: 1000;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* --------------------------------------------------------------------------
   3. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-2);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto var(--space-6);
}

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

/* --------------------------------------------------------------------------
   4. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(14, 17, 23, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition-base), height var(--transition-base);
}

/* Added by script.js once the page scrolls — see script.js "sticky header" */
.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-logo img {
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.site-logo__text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.main-nav {
  display: none;
}

.main-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
}

.main-nav__list a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav__list a:hover,
.main-nav__list a[aria-current="page"] {
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform var(--transition-fast);
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

/* Mobile nav panel — toggled by script.js via [data-nav-open] on <body> */
@media (max-width: 959px) {
  .main-nav {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-alt);
    padding: var(--space-6) var(--container-padding);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 400;
  }
  body[data-nav-open="true"] .main-nav {
    transform: translateX(0);
  }
  .main-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }
}

@media (min-width: 960px) {
  .main-nav {
    display: block;
  }
  .nav-toggle {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7em 1.4em;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-text-inverse);
}

/* Teal variant — used for the main "Get Bonus"/"Play" conversion buttons */
.btn--teal {
  background: var(--color-accent-2);
  color: #04211b;
}
.btn--teal:hover {
  background: var(--color-accent-2-dark);
  color: #04211b;
}

.btn--outline {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-accent);
}
.btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.btn--small {
  padding: 0.5em 1em;
  font-size: 0.85rem;
}

.btn--block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
  background: var(--color-bg);
  padding: var(--space-6) 0;
}

.hero__grid {
  display: block;
}

.hero__content {
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(244, 193, 80, 0.14), transparent 70%),
    linear-gradient(160deg, #1b2230 0%, #0e1117 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-md);
}

.hero__title {
  color: #ffffff;
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: var(--space-4);
  max-width: 640px;
}

.hero__meta {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
}

.hero__meta-item {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero__meta-item strong {
  color: #ffffff;
  font-weight: 600;
}

.hero__cta {
  margin-top: var(--space-5);
}

/* --------------------------------------------------------------------------
   8. COMPACT RANKING LIST
   Lean single-row layout: rank number, logo, name+stars, bonus, CTA.
   -------------------------------------------------------------------------- */
.rank-list {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.rank-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.rank-row:hover {
  border-color: rgba(244, 193, 80, 0.45);
  transform: translateY(-2px);
}

.rank-row__logo-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}

.rank-row__num {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-text-inverse);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.rank-row__logo {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
}

.rank-row__name {
  margin: 0 0 var(--space-1);
  font-size: 1rem;
}

.rank-row__bonus {
  display: none;
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.9rem;
  text-align: right;
  padding-right: var(--space-4);
  border-right: 1px solid var(--color-border);
}

.rank-row__cta {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .rank-row {
    grid-template-columns: 64px 1fr 170px 150px;
  }
  .rank-row__bonus {
    display: block;
  }
  .rank-row__cta {
    grid-column: auto;
    width: 100%;
  }
}

.star-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.star-rating__stars {
  color: var(--color-star);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.star-rating__value {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   12. COMPARISON TABLE
   -------------------------------------------------------------------------- */
.table-scroll {
  margin: var(--space-5) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.comparison-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.92rem;
}

.comparison-table caption {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

.comparison-table thead th {
  background: var(--color-bg-alt);
  color: #ffffff;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
  word-break: break-word;
}

/* data-sortable="true" columns get a pointer cursor + indicator; wired in script.js */
.comparison-table thead th[data-sortable="true"] {
  cursor: pointer;
  user-select: none;
}
.comparison-table thead th[data-sortable="true"]::after {
  content: "\21C5";
  margin-left: var(--space-2);
  opacity: 0.6;
  font-size: 0.8em;
}

.comparison-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  word-break: break-word;
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}

.comparison-table tbody tr:hover {
  background: rgba(244, 193, 80, 0.06);
}

.comparison-table .cell-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
}

/* Narrow viewports: tighten padding/font so wide tables read without side-scrolling */
@media (max-width: 640px) {
  .comparison-table {
    font-size: 0.78rem;
  }
  .comparison-table thead th,
  .comparison-table tbody td {
    padding: var(--space-2);
  }
}

.comparison-table .cell-brand img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   15. FAQ ACCORDION
   -------------------------------------------------------------------------- */
.faq-list {
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: transparent;
  border: none;
  padding: var(--space-5) var(--space-2);
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  cursor: pointer;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
}
.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--color-accent);
  transition: transform var(--transition-fast);
}
.faq-item__icon::before {
  top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%);
}
.faq-item__icon::after {
  top: 0; left: 50%; width: 2px; height: 100%; transform: translateX(-50%);
}
.faq-item__question[aria-expanded="true"] .faq-item__icon::after {
  transform: translateX(-50%) scaleY(0);
}

.faq-item__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-base) ease;
}

.faq-item__answer-inner {
  padding: 0 var(--space-2) var(--space-5);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   16. TRUST / REGULATORY BADGE STRIP
   -------------------------------------------------------------------------- */
.badge-strip {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}

.badge-strip__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-5);
}

.badge-strip__row img {
  max-height: 48px;
  width: auto;
  filter: grayscale(20%);
}

/* --------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: #0a0d12;
  color: #cbd6e6;
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.site-footer a {
  color: #cbd6e6;
  text-decoration: none;
}
.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-col__title {
  color: #ffffff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3);
}

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

.footer-col li { margin-bottom: var(--space-2); font-size: 0.9rem; }

.footer-about p {
  font-size: 0.88rem;
  color: #b7c3d6;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  font-size: 0.8rem;
  color: #9fadc3;
}

.footer-legal-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   19. BACK-TO-TOP BUTTON
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: var(--space-5);
  bottom: calc(var(--space-5) + 60px);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 300;
}

/* Shown by script.js once the user scrolls past the hero */
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   20. STICKY BOTTOM CTA BAR
   Shown by script.js once the user scrolls past the hero (same behavior as
   .back-to-top). Sits above .back-to-top so the two never overlap.
   -------------------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
  padding: var(--space-3) 0;
  transform: translateY(100%);
  transition: transform var(--transition-base);
  z-index: 350;
}

.sticky-cta.is-visible {
  transform: translateY(0);
}

.sticky-cta__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.sticky-cta__text {
  display: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .sticky-cta__text {
    display: block;
  }
}

.sticky-cta__btn {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   21. ARTICLE PROSE WRAPPER
   -------------------------------------------------------------------------- */

.article-body > *:first-child {
  margin-top: 0;
}


/* --------------------------------------------------------------------------
   22. UTILITIES
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
