/* ============================================================
   Best Online Casino Australia — vanilla template stylesheet
   ============================================================ */

:root {
  --bg:            #0e1117;
  --bg-elevated:   #161b24;
  --bg-card:       #1b2230;
  --border:        #29313f;
  --text:          #e7ecf3;
  --text-muted:    #9aa6b6;
  --accent:        #f4c150;   /* gold */
  --accent-2:      #2ec4a6;   /* teal */
  --accent-warn:   #ff6b6b;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 8px 24px rgba(0,0,0,.35);
  --max:           1100px;
  --header-h:      64px;
  --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: #fff; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 0; }
h3 { font-size: 1.15rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(14,17,23,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #e0a020);
  color: #1a1205; font-weight: 800; font-size: .85rem;
}
.brand-text { font-size: 1.05rem; letter-spacing: .2px; }
.brand-accent { color: var(--accent); }

.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .92rem; font-weight: 500;
}
.main-nav a:hover, .main-nav a.active { color: #fff; background: var(--bg-card); text-decoration: none; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; padding: 10px;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 24px; background: radial-gradient(1000px 400px at 50% -10%, rgba(244,193,80,.10), transparent 70%); }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: .75rem; color: var(--accent); font-weight: 700; margin: 0 0 8px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin: 0 0 20px; }
.hero h1 .year { color: var(--accent); }

.byline { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.author-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.byline-name { display: block; font-weight: 600; color: #fff; }
.byline-role { display: block; font-size: .85rem; color: var(--text-muted); }

.author-bio { font-size: .92rem; color: var(--text-muted); background: var(--bg-elevated); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 16px; margin: 0 0 24px; }

.hero-figure { margin: 0 0 24px; }
.hero-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }

.lead { font-size: 1.15rem; color: #d6deea; }

/* ---------- Top-10 casino widget ---------- */
.cw-widget { margin: 0 0 28px; }
.cw-casino-list { display: grid; gap: 10px; }

.cw-casino-card {
  display: grid;
  grid-template-columns: 44px 96px minmax(0, 1.3fr) minmax(0, 1.6fr) auto;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px 12px 12px;
  transition: border-color .2s, transform .12s, box-shadow .2s;
}
.cw-casino-card:hover { border-color: rgba(244,193,80,.45); transform: translateY(-2px); box-shadow: var(--shadow); }

.cw-rank {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #e0a020);
  color: #1a1205; font-weight: 800; font-size: 1rem;
}
.cw-casino-card:nth-child(1) .cw-rank,
.cw-casino-card:nth-child(2) .cw-rank,
.cw-casino-card:nth-child(3) .cw-rank { box-shadow: 0 0 0 3px rgba(244,193,80,.18); }

.cw-card-image {
  height: 60px; border-radius: var(--radius-sm); overflow: hidden;
  background: #fff; border: 1px solid var(--border);
  display: grid; place-items: center; padding: 6px;
}
.cw-card-image img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

.cw-card-content { min-width: 0; }
.cw-info h3 { margin: 0 0 4px; font-size: 1.02rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-stars { color: var(--accent); font-size: .95rem; letter-spacing: 1px; line-height: 1; }
.cw-half-star { opacity: .35; }

.cw-offers { min-width: 0; }
.cw-bonus-text { color: #d6deea; font-size: .92rem; font-weight: 500; line-height: 1.4; }

.cw-actions { display: flex; justify-content: flex-end; }
.cw-btn {
  display: inline-block; padding: 11px 26px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .92rem; text-align: center; white-space: nowrap;
  transition: transform .12s, filter .12s;
}
.cw-btn:hover { text-decoration: none; transform: translateY(-1px); }
.cw-btn-primary { background: var(--accent-2); color: #04211b; }
.cw-btn-primary:hover { filter: brightness(1.08); }
.cw-btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }

@media (max-width: 720px) {
  .cw-casino-card {
    grid-template-columns: 38px 64px 1fr;
    grid-template-areas:
      "rank image content"
      "rank offers offers"
      "rank actions actions";
    column-gap: 12px; row-gap: 10px;
  }
  .cw-rank { grid-area: rank; align-self: start; margin-top: 2px; }
  .cw-card-image { grid-area: image; height: 48px; }
  .cw-card-content { grid-area: content; align-self: center; }
  .cw-offers { grid-area: offers; }
  .cw-actions { grid-area: actions; justify-content: stretch; }
  .cw-actions .cw-btn { flex: 1; }
}

/* ---------- Layout ---------- */
.layout { padding-bottom: 40px; }
.article > section { padding: 34px 0; border-top: 1px solid var(--border); }
.article > section:first-child { border-top: none; }
.article p { color: #cdd6e2; }
.note { border-left: 3px solid var(--accent); padding: 10px 16px; background: var(--bg-elevated); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #d6deea; }
.disclaimer { font-style: italic; color: var(--text-muted); font-size: .92rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin: 20px 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .94rem; }
thead th { background: var(--bg-elevated); color: #fff; text-align: left; padding: 12px 14px; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
tbody td { padding: 12px 14px; border-top: 1px solid var(--border); color: #cdd6e2; }
tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
tbody tr:hover { background: rgba(244,193,80,.06); }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #1a1205; font-weight: 800; font-size: .85rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--accent); color: #1a1205; font-weight: 700; font-size: .9rem;
  border: none; cursor: pointer; transition: transform .12s, filter .12s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 8px; color: #fff; }
.card p { margin: 0; color: var(--text-muted); font-size: .95rem; }
.card-warn { border-color: rgba(255,107,107,.4); }
.card-warn h3 { color: var(--accent-warn); }

/* ---------- Reviews ---------- */
.review { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; }
.review h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review p { margin: 0; color: #cdd6e2; }
.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 20px; background: rgba(46,196,166,.15); color: var(--accent-2); border: 1px solid rgba(46,196,166,.3); }

/* ---------- Figures ---------- */
.figure { margin: 24px 0; text-align: center; }
.figure img { max-width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.figure-narrow img { max-width: 420px; }
figcaption { margin-top: 10px; font-size: .88rem; color: var(--text-muted); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.steps li { position: relative; padding: 16px 16px 16px 60px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: #cdd6e2; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 16px;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--accent-2); color: #04211b; border-radius: 8px; font-weight: 800;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; margin-top: 20px; }
.faq-item { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 16px 44px 16px 18px; position: relative;
  font-weight: 600; color: #fff; list-style: none; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--accent); transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { background: var(--bg-card); }
.faq-body { padding: 0 18px 16px; }
.faq-body p { margin: 0; color: var(--text-muted); }

/* ---------- Responsible gambling banner ---------- */
.rg-banner { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 40px 0; }
.rg-banner h2 { color: var(--accent); }
.rg-help { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rg-help li { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; color: #cdd6e2; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0d12; border-top: 1px solid var(--border); padding-top: 44px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer-about { color: var(--text-muted); font-size: .9rem; margin: 14px 0; }
.age-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--accent-warn); border-radius: 50%; color: var(--accent-warn); font-weight: 800; margin: 0; }
.footer-col h4 { margin: 0 0 12px; color: #fff; font-size: .95rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col ul li { color: var(--text-muted); font-size: .9rem; }
.footer-col ul li a { color: var(--text-muted); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 36px; padding: 20px 0; }
.footer-bottom p { margin: 0; color: #6b7686; font-size: .82rem; text-align: center; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: #1a1205; border: none; cursor: pointer;
  font-size: 1.3rem; font-weight: 700; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { filter: brightness(1.08); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 400px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px; }
  .main-nav a { padding: 12px; border-radius: var(--radius-sm); }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
