/* =========================================================
   UK Casino Comparison — Shared Stylesheet
   ========================================================= */

/* ---------- Custom Properties ---------- */
:root {
  /* Colours */
  --c-dark: #1e2023;        /* header / hero / logo strip */
  --c-white: #ffffff;       /* content area */
  --c-gold: #e6b93c;        /* nav links, TOC toggle */
  --c-navy: #2c5f8d;        /* H2s, rating ring */
  --c-cta: #2b6f9b;         /* CTA button */
  --c-text: #222426;        /* body text */
  --c-muted: #6b6f76;       /* muted text */
  --c-border: #e2e4e8;      /* borders */
  --c-pill: #f3f4f6;        /* pill backgrounds */
  --c-hero-intro: #c8cacf;  /* hero intro text */
  --c-hero-chip: #9ea1a7;   /* hero chips */
  --c-dark-border: #3a3d42; /* thin borders on dark */
  --c-cta-hover: #24608a;
  --c-green: #2e9e5b;
  --c-red: #d14343;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Type */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --fs-base: 17px;
  --fs-h1: 52px;
  --fs-h1-mobile: 32px;
  --fs-h2: 32px;
  --fs-bonus: 22px;
  --fs-small: 13px;

  /* Layout */
  --max-content: 1080px;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-white);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--s-4);
}

h2 {
  font-size: var(--fs-h2);
  color: var(--c-navy);
}

a { color: var(--c-cta); }

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

ul { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  background: var(--c-dark);
  height: 64px;
  position: relative;
}
.site-header .container {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--c-white);
}
.logo__icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--c-navy);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-white);
}
.logo__word {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-head);
  font-weight: 700;
}
.logo__word span:last-child {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-small);
  color: var(--c-hero-chip);
}

/* Nav */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  list-style: none;
}
.main-nav a,
.dropdown__toggle {
  color: var(--c-gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  background: none;
  border: 0;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.main-nav a[aria-current="page"] { color: var(--c-white); }
.main-nav a:hover,
.dropdown__toggle:hover { color: var(--c-white); }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown__toggle .chevron { transition: transform .2s; }
.dropdown__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  padding: var(--s-2);
  list-style: none;
  display: none;
  z-index: 50;
}
.dropdown__panel li { display: block; }
.dropdown__panel a {
  display: block;
  color: var(--c-text);
  font-weight: 400;
  padding: var(--s-2) var(--s-3);
  border-radius: 6px;
}
.dropdown__panel a:hover { background: var(--c-pill); color: var(--c-text); }
.dropdown:hover .dropdown__panel,
.dropdown__toggle[aria-expanded="true"] + .dropdown__panel { display: block; }
.dropdown__toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: var(--s-2);
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--c-gold);
  margin: 5px 0;
  transition: .3s;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  background: var(--c-dark);
  color: var(--c-white);
  text-align: center;
  padding: var(--s-7) 0 var(--s-6);
}
.hero h1 {
  font-size: var(--fs-h1);
  max-width: 18ch;
  margin: 0 auto var(--s-5);
  color: var(--c-white);
}

.author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.author__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-navy);
}
.author__name {
  font-size: var(--fs-small);
  color: var(--c-hero-chip);
}

.updated-pill {
  display: inline-block;
  text-transform: uppercase;
  font-size: var(--fs-small);
  letter-spacing: .12em;
  border: 1px solid var(--c-dark-border);
  border-radius: 999px;
  padding: var(--s-1) var(--s-4);
  color: var(--c-hero-intro);
  margin-bottom: var(--s-5);
}

/* Intro + Show More */
.hero__intro {
  color: var(--c-hero-intro);
  max-width: 68ch;
  margin: 0 auto var(--s-3);
}
.hero__intro.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.show-more {
  background: none;
  border: 0;
  color: var(--c-white);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: var(--s-5);
}
.show-more:hover { text-decoration: underline; }

/* Quick chips */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
  list-style: none;
  margin-bottom: var(--s-6);
}
.quick-chips a {
  display: inline-block;
  border: 1px solid var(--c-dark-border);
  color: var(--c-hero-chip);
  text-decoration: none;
  font-size: 14px;
  padding: var(--s-2) var(--s-4);
  border-radius: 999px;
}
.quick-chips a:hover { color: var(--c-white); border-color: var(--c-hero-chip); }

/* Table of Contents */
.toc {
  border: 1px solid var(--c-dark-border);
  border-radius: var(--radius-sm);
  text-align: left;
  max-width: var(--max-content);
  margin: 0 auto;
}
.toc__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: 0;
  cursor: pointer;
  padding: var(--s-4) var(--s-5);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 16px;
}
.toc__title {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 700;
}
.toc__toggle { color: var(--c-gold); font-weight: 600; }
.toc__list {
  list-style: none;
  padding: 0 var(--s-5) var(--s-5);
  margin: 0;
  display: none;
}
.toc__list.is-open { display: block; }
.toc__list li { padding: var(--s-1) 0; }
.toc__list a { color: var(--c-hero-intro); text-decoration: none; }
.toc__list a:hover { color: var(--c-white); }

/* =========================================================
   Content Zone
   ========================================================= */
.content {
  background: var(--c-white);
  padding: var(--s-7) 0;
}
.section { margin-bottom: var(--s-7); }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 14px;
  color: var(--c-muted);
  padding: var(--s-4) 0;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.breadcrumbs li::after { content: "/"; margin-left: var(--s-2); color: var(--c-border); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-cta); }

/* Toplist heading pill */
.toplist-updated {
  display: inline-block;
  background: var(--c-pill);
  color: var(--c-muted);
  font-size: 14px;
  padding: var(--s-2) var(--s-4);
  border-radius: 999px;
  margin-bottom: var(--s-5);
}
.toplist-updated b { color: var(--c-text); }

/* =========================================================
   Casino Card
   ========================================================= */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.card {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-white);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-hover); }

/* Left logo strip */
.card__logo {
  position: relative;
  background: var(--c-dark);
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-5);
}
.card__logo img { max-height: 44px; }
.card__logo-fallback { font-size: 1.1rem; font-weight: 700; color: var(--c-white); text-align: center; line-height: 1.2; }
.card__license { font-size: var(--fs-small); color: var(--c-white); }
.card__rank {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-top: 56px solid var(--c-navy);
  border-right: 56px solid transparent;
}
.card__rank span {
  position: absolute;
  top: -50px; left: 6px;
  color: var(--c-white);
  font-weight: 700;
  font-size: 15px;
}

/* Middle */
.card__body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.card__rating-row {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.rating-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid var(--c-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.rating-ring__score { font-size: var(--fs-bonus); font-weight: 700; color: var(--c-navy); }
.rating-ring__label { font-size: 10px; text-transform: uppercase; color: var(--c-muted); letter-spacing: .05em; }
.tag-pill {
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 13px;
  padding: var(--s-1) var(--s-3);
  border-radius: 999px;
}
.card__bonus { font-size: var(--fs-bonus); font-weight: 700; margin: 0; }
.card__terms { font-size: var(--fs-small); color: var(--c-muted); margin: 0; }

/* Right */
.card__cta {
  padding: var(--s-5);
  border-left: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-cta);
  color: var(--c-white);
  text-decoration: none;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
}
.btn--play {
  width: 100%;
  height: 56px;
  font-size: 17px;
}
.btn:hover { background: var(--c-cta-hover); }
.stars { color: var(--c-gold); font-size: 16px; letter-spacing: 2px; }
.card__editor { font-size: 11px; color: var(--c-muted); }
.card__review-link { font-size: 14px; color: var(--c-cta); text-decoration: none; }
.card__review-link:hover { text-decoration: underline; }

/* =========================================================
   Pros / Cons
   ========================================================= */
.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
.proscons__col {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: var(--s-5);
}
.proscons__col--pros { border-left: 4px solid var(--c-green); }
.proscons__col--cons { border-left: 4px solid var(--c-red); }
.proscons__col h3 { color: var(--c-text); }
.proscons__col ul { list-style: none; }
.proscons__col li { padding: var(--s-2) 0; padding-left: var(--s-5); position: relative; }
.proscons__col--pros li::before { content: "✓"; color: var(--c-green); position: absolute; left: 0; }
.proscons__col--cons li::before { content: "✕"; color: var(--c-red); position: absolute; left: 0; }

/* =========================================================
   Key Facts Table
   ========================================================= */
.key-facts {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.key-facts th,
.key-facts td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-border);
}
.key-facts th { width: 40%; font-weight: 600; color: var(--c-text); }
.key-facts td { color: var(--c-muted); }
.key-facts tr:nth-child(even) { background: var(--c-pill); }
.key-facts tr:last-child th,
.key-facts tr:last-child td { border-bottom: 0; }

/* =========================================================
   FAQ (details / summary)
   ========================================================= */
.faq details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--s-3);
  padding: 0 var(--s-5);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: var(--s-4) 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--c-navy); font-size: 22px; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--c-border); }
.faq details p { padding: var(--s-4) 0; margin: 0; color: var(--c-muted); }

/* =========================================================
   Article Grid
   ========================================================= */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.article-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s;
}
.article-card:hover { box-shadow: var(--shadow-hover); }
.article-card__img {
  aspect-ratio: 16 / 9;
  background: var(--c-pill);
  object-fit: cover;
  width: 100%;
}
.article-card__body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.article-card__title { font-size: 19px; margin: 0; color: var(--c-text); }
.article-card__excerpt { font-size: 15px; color: var(--c-muted); margin: 0; flex: 1; }
.article-card__meta { font-size: 13px; color: var(--c-muted); }

/* Article body prose */
.prose p { margin: 0 0 var(--s-4); }
.prose h2 { margin-top: var(--s-6); }
.prose h3 { color: var(--c-text); margin-top: var(--s-5); }
.prose ul { padding-left: var(--s-5); margin: 0 0 var(--s-4); }
.prose li { margin-bottom: var(--s-2); }

/* Data tables inside prose content */
.data-table-wrap { overflow-x: auto; margin: 0 0 var(--s-5); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 15px;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.data-table thead th {
  background: var(--c-navy);
  color: var(--c-white);
  font-weight: 600;
}
.data-table tbody tr:nth-child(even) { background: var(--c-pill); }
.data-table tbody td { color: var(--c-text); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* Callout boxes (key takeaways / editor checks) */
.callout {
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-navy);
  border-radius: var(--radius-sm);
  background: var(--c-pill);
  padding: var(--s-5);
  margin: 0 0 var(--s-5);
}
.callout h3 { margin-top: 0; }
.callout ul,
.callout ol { padding-left: var(--s-5); margin: 0; }
.callout li { margin-bottom: var(--s-2); }
.callout--gold { border-left-color: var(--c-gold); }

/* Author box */
.author-box {
  display: flex;
  gap: var(--s-4);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: var(--s-5);
  margin: 0 0 var(--s-5);
  align-items: flex-start;
}
.author-box__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-navy);
  flex-shrink: 0;
}
.author-box h3 { margin: 0 0 var(--s-2); }
.author-box p { margin: 0; color: var(--c-muted); font-size: 15px; }

/* Disclosure / page note */
.disclosure {
  font-size: 14px;
  color: var(--c-muted);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  padding: var(--s-4);
  margin: 0 0 var(--s-5);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--c-dark);
  color: var(--c-hero-chip);
  padding: var(--s-7) 0 var(--s-5);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
.footer-cols h4 { color: var(--c-white); font-size: 15px; margin-bottom: var(--s-3); }
.footer-cols ul { list-style: none; }
.footer-cols li { padding: var(--s-1) 0; }
.footer-cols a { color: var(--c-hero-chip); text-decoration: none; font-size: 14px; }
.footer-cols a:hover { color: var(--c-white); }

.footer-responsible {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-4);
  border-top: 1px solid var(--c-dark-border);
  padding-top: var(--s-5);
  margin-bottom: var(--s-4);
}
.badge-18 {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--c-white);
  color: var(--c-white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.rg-logos { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.rg-logo {
  border: 1px solid var(--c-dark-border);
  color: var(--c-hero-chip);
  font-size: 12px;
  padding: var(--s-2) var(--s-3);
  border-radius: 6px;
}
.footer-disclosure { font-size: 12px; color: var(--c-muted); line-height: 1.5; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .hero h1 { font-size: var(--fs-h1-mobile); }

  .card { grid-template-columns: 1fr; }
  .card__cta { border-left: 0; border-top: 1px solid var(--c-border); }
  .card__rank { border-top-width: 48px; border-right-width: 48px; }

  .proscons { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }

  /* Mobile nav */
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--c-dark);
    border-top: 1px solid var(--c-dark-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    z-index: 40;
  }
  .main-nav.is-open { max-height: 520px; overflow: auto; }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--s-4) var(--s-5);
  }
  .main-nav li { width: 100%; }
  .main-nav > ul > li { padding: var(--s-3) 0; border-bottom: 1px solid var(--c-dark-border); }
  .dropdown__panel {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: var(--s-2) 0 0 var(--s-4);
    min-width: 0;
  }
  .dropdown__panel a { color: var(--c-hero-chip); }
}

@media (max-width: 480px) {
  .article-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
}
