/* =========================================================
   UK Casino Comparison — Shared Styles
   Organised with custom properties for colours, spacing, type
   ========================================================= */

:root {
  /* Colours */
  --c-dark: #1e2023;
  --c-white: #ffffff;
  --c-gold: #e6b93c;
  --c-navy: #2c5f8d;
  --c-cta: #2b6f9b;
  --c-body: #222426;
  --c-muted: #6b6f76;
  --c-border: #e2e4e8;
  --c-pill: #f3f4f6;
  --c-hero-intro: #c8cacf;
  --c-hero-chip: #9ea1a7;
  --c-dark-border: #3a3d42;
  --c-green: #2e8b57;
  --c-red: #c0392b;
  --c-star: #e6b93c;

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

  /* Radius */
  --r-sm: 8px; --r-md: 10px; --r-pill: 999px;

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

  /* Layout */
  --content-max: 1080px;
  --header-h: 64px;
  --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.10);
}

/* ---------- 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-body);
  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);
}
p { margin: 0 0 var(--s-4); }
a { color: var(--c-cta); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }

.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;
}
:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

/* =========================================================
   Header
   ========================================================= */
.site-header { background: var(--c-dark); color: var(--c-white); position: relative; }
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
}
.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: var(--r-sm);
  background: var(--c-gold); color: var(--c-dark);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 20px; flex: none;
}
.logo-word { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font-head); font-weight: 700; }
.logo-word .line-1 { font-size: 16px; }
.logo-word .line-2 { font-size: 12px; color: var(--c-gold); letter-spacing: 1px; }

.main-nav { display: flex; }
.nav-list { list-style: none; display: flex; align-items: center; gap: var(--s-5); }
.nav-list > li { position: relative; }
.nav-list a, .nav-list .dropdown-toggle {
  color: var(--c-gold); text-decoration: none;
  font-weight: 600; font-size: 15px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-body);
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: var(--s-2) 0;
}
.nav-list a[aria-current="page"] { color: var(--c-white); }
.dropdown-toggle .chevron { transition: transform 0.2s ease; font-size: 11px; }
.dropdown-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.dropdown-panel {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 200px; background: var(--c-white);
  border: 1px solid var(--c-border); border-radius: var(--r-sm);
  box-shadow: var(--shadow-card); padding: var(--s-2);
  display: none; z-index: 50;
}
.dropdown-panel[data-open="true"] { display: block; }
.dropdown-panel a {
  display: block; color: var(--c-body);
  padding: var(--s-2) var(--s-3); border-radius: 6px; font-weight: 400;
}
.dropdown-panel a:hover { background: var(--c-pill); }

.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: 0.2s; }

/* =========================================================
   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-inline: auto; }

.author { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); margin: var(--s-5) 0; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--c-dark-border); }
.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: 1.5px;
  border: 1px solid var(--c-dark-border); border-radius: var(--r-pill);
  padding: var(--s-1) var(--s-4); color: var(--c-hero-intro);
  margin-bottom: var(--s-5);
}

.hero-intro { color: var(--c-hero-intro); max-width: 68ch; margin-inline: auto; }
.hero-intro.clamped {
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.show-more {
  background: none; border: 0; color: var(--c-white);
  font-weight: 600; cursor: pointer; text-decoration: underline;
  font-family: var(--font-body); font-size: var(--fs-base);
  margin-bottom: var(--s-5);
}

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

.toc { border: 1px solid var(--c-dark-border); border-radius: var(--r-sm); text-align: left; max-width: var(--content-max); }
.toc-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: 0; padding: var(--s-4);
  cursor: pointer; font-family: var(--font-body); color: var(--c-white);
}
.toc-title { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; }
.toc-toggle-label { color: var(--c-gold); font-weight: 600; }
.toc-body { display: none; padding: 0 var(--s-4) var(--s-4); }
.toc-body[data-open="true"] { display: block; }
.toc-body ol { margin: 0; padding-left: var(--s-5); color: var(--c-hero-intro); }
.toc-body a { color: var(--c-gold); text-decoration: none; }
.toc-body a:hover { text-decoration: underline; }

/* =========================================================
   Content zone
   ========================================================= */
.content { background: var(--c-white); padding: var(--s-7) 0; }
.content h2 { color: var(--c-navy); font-size: var(--fs-h2); margin-top: var(--s-7); }
.content h2:first-child { margin-top: 0; }
.section { margin-bottom: var(--s-7); }

.breadcrumbs { font-size: 14px; color: var(--c-muted); padding: var(--s-4) 0 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-pill {
  display: inline-block; background: var(--c-pill); color: var(--c-body);
  border-radius: var(--r-pill); padding: var(--s-2) var(--s-4);
  font-size: 14px; margin-bottom: var(--s-5);
}
.toplist-pill strong { font-weight: 600; }

/* =========================================================
   Casino card
   ========================================================= */
.card-list { list-style: none; display: grid; gap: var(--s-5); }
.casino-card {
  display: grid; grid-template-columns: 180px 1fr 200px;
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  overflow: hidden; background: var(--c-white);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.casino-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

.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-3); padding: var(--s-5); text-align: center;
}
.card-logo img { max-height: 48px; width: auto; }
.card-logo .licence { font-size: var(--fs-small); color: var(--c-white); }

.rank-flag {
  position: absolute; top: 0; left: 0; width: 0; height: 0;
  border-top: 54px solid var(--c-navy); border-right: 54px solid transparent;
}
.rank-flag span {
  position: absolute; top: -50px; left: 6px; color: var(--c-white);
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
}

.card-body { padding: var(--s-5); display: flex; flex-direction: column; justify-content: center; 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: none; color: var(--c-navy); line-height: 1;
}
.rating-ring .score { font-size: var(--fs-bonus); font-weight: 700; font-family: var(--font-head); }
.rating-ring .label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }

.tag-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; }
.tag-pill {
  border: 1px solid var(--c-border); color: var(--c-body);
  border-radius: var(--r-pill); padding: var(--s-1) var(--s-3); font-size: 13px;
}

.bonus-line { font-size: var(--fs-bonus); font-weight: 700; font-family: var(--font-head); color: var(--c-body); }
.terms-line { font-size: var(--fs-small); color: var(--c-muted); }

.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); justify-content: center;
}
.btn-play {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 56px; background: var(--c-cta); color: var(--c-white);
  border-radius: var(--r-sm); text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn-play:hover { filter: brightness(1.08); }

.stars { color: var(--c-star); letter-spacing: 2px; font-size: 16px; }
.editors-choice { font-size: var(--fs-xsmall); color: var(--c-muted); }
.read-review { font-size: 14px; color: var(--c-cta); text-decoration: none; }
.read-review:hover { text-decoration: underline; }

/* =========================================================
   Pros / Cons
   ========================================================= */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.proscons .box { border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: var(--s-4) var(--s-5); }
.proscons .pros { border-left: 4px solid var(--c-green); }
.proscons .cons { border-left: 4px solid var(--c-red); }
.proscons h3 { margin-bottom: var(--s-3); }
.proscons ul { list-style: none; }
.proscons li { padding: var(--s-2) 0; position: relative; padding-left: var(--s-5); }
.proscons .pros li::before { content: "\2713"; color: var(--c-green); position: absolute; left: 0; }
.proscons .cons li::before { content: "\2715"; 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(--r-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); vertical-align: top;
}
.key-facts th { width: 40%; font-weight: 600; color: var(--c-body); }
.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; }
.key-facts td a { display: inline-flex; align-items: center; gap: var(--s-2); }
.casino-logo { height: 28px; width: auto; max-width: 90px; object-fit: contain; flex: 0 0 auto; }

/* =========================================================
   FAQ accordion
   ========================================================= */
.faq details { border: 1px solid var(--c-border); border-radius: var(--r-sm); margin-bottom: var(--s-3); overflow: hidden; }
.faq summary {
  cursor: pointer; padding: var(--s-4); font-weight: 600; 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: 20px; }
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-answer { padding: 0 var(--s-4) var(--s-4); color: var(--c-muted); }

/* =========================================================
   Article card grid
   ========================================================= */
.article-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.article-card {
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  overflow: hidden; transition: box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow-card); }
.article-card .thumb { 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 h3 { font-size: 18px; margin: 0; }
.article-card h3 a { color: var(--c-body); text-decoration: none; }
.article-card h3 a:hover { color: var(--c-cta); }
.article-card .excerpt { font-size: 14px; color: var(--c-muted); margin: 0; flex: 1; }
.article-meta { display: flex; gap: var(--s-2); font-size: var(--fs-small); color: var(--c-muted); align-items: center; }

.article-prose { max-width: 72ch; }
.article-prose figure { margin: var(--s-5) 0; }
.article-prose figcaption { font-size: var(--fs-small); color: var(--c-muted); }

/* =========================================================
   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 { margin-bottom: var(--s-2); }
.footer-cols a { color: var(--c-hero-chip); text-decoration: none; font-size: 14px; }
.footer-cols a:hover { color: var(--c-gold); }

.footer-responsible {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
  padding-top: var(--s-5); border-top: 1px solid var(--c-dark-border);
}
.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: none;
}
.rg-logos { display: flex; gap: var(--s-4); list-style: none; flex-wrap: wrap; }
.rg-logos li {
  border: 1px solid var(--c-dark-border); border-radius: 6px;
  padding: var(--s-1) var(--s-3); font-size: var(--fs-small); color: var(--c-hero-chip);
}
.disclosure { font-size: var(--fs-small); color: var(--c-muted); margin-top: var(--s-4); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --fs-h1: var(--fs-h1-mob); }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--c-dark); border-top: 1px solid var(--c-dark-border);
    display: none; z-index: 40;
  }
  .main-nav[data-open="true"] { display: block; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 0; padding: var(--s-4); }
  .nav-list > li { width: 100%; }
  .dropdown-panel {
    position: static; box-shadow: none; border: 0;
    background: transparent; padding-left: var(--s-4);
  }
  .dropdown-panel a { color: var(--c-gold); }
  .casino-card { grid-template-columns: 1fr; }
  .card-cta { border-left: 0; border-top: 1px solid var(--c-border); }
  .proscons { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
}
