/*
Theme Name: Astra Child Cokasino
Template: astra
Text Domain: astra-child-cokasino
Version: 1.0.5
*/

:root {
  --cok-bg: #12121a;
  --cok-surface: #1c1c28;
  --cok-border: #2e2e3e;
  --cok-gold: #d4af37;
  --cok-gold-hover: #e8c766;
  --cok-text: #e8e6e3;
  --cok-text-muted: #a8a4a0;
  --cok-radius: 12px;
  --cok-shadow: 0 4px 16px rgba(0,0,0,.35);
  --cok-ink-1: #d4af37;
  --cok-ink-2: #8a8a9a;
}

/* Anti-flex Astra (critical) */
#content .ast-container, .ast-container { display: block !important; width: 100% !important; max-width: 100% !important; }
#primary, .site-main, #main { width: 100% !important; max-width: 100% !important; flex: 1 1 100% !important; margin-inline: auto !important; }

/* ============ CENTERING FIX: hero + all headings ============ */
.cok-hero, .cok-hero h1, .cok-hero .cok-standfirst,
.cok-breadcrumb { text-align: center; }
.cok-hero { text-align: center; }
.cok-hero h1, .cok-hero .cok-standfirst { margin-inline: auto; max-width: 900px; }

/* Page title (entry header) — centered too */
body.cok-body .entry-header,
body.cok-body .entry-header .entry-title,
body.cok-body .page-header,
body.cok-body .page-title,
body.cok-body .ast-single-post .entry-header .entry-title {
  text-align: center;
  width: 100%;
}

/* Section headings: centered, framed with golden rules (4-6 per page) */
body.cok-body .entry-content h2 {
  text-align: center;
  margin-inline: auto;
  color: var(--cok-gold);
  font-size: 1.45rem;
  line-height: 1.3;
  max-width: 760px;
  padding: .85rem 1rem;
  margin-top: 2.25rem;
  margin-bottom: 1.25rem;
  border-top: 2px solid var(--cok-gold);
  border-bottom: 1px solid var(--cok-border);
  background: linear-gradient(180deg, rgba(212,175,55,.07), rgba(212,175,55,0));
  border-radius: 0 0 var(--cok-radius) var(--cok-radius);
}
body.cok-body .entry-content h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: .6rem auto 0;
  background: var(--cok-gold);
  opacity: .6;
}
/* Secondary headings centered as well */
body.cok-body .entry-content h3,
body.cok-body .entry-content h4 {
  text-align: center;
  margin-inline: auto;
  max-width: 760px;
}
/* Framed h3 variant inside cards stays subtle */
body.cok-body .entry-content h3 {
  color: var(--cok-text);
  border-top: 1px solid var(--cok-border);
  padding-top: .9rem;
  margin-top: 1.75rem;
  margin-bottom: .9rem;
}

/* FAQ / table captions centered */
.cok-table caption { text-align: center; }

/* ============ Base ============ */
body.cok-body { background: var(--cok-bg); color: var(--cok-text); }
body.cok-body h1, body.cok-body h2, body.cok-body h3,
body.cok-body h4, body.cok-body h5, body.cok-body h6 { color: var(--cok-text); }

body.cok-body p, body.cok-body li { color: var(--cok-text); }
body.cok-body a { color: var(--cok-gold); text-decoration: none; }
body.cok-body a:hover, body.cok-body a:focus { color: var(--cok-gold-hover); }

/* One centered measure */
.cok-wrap { max-width: 900px; margin-inline: auto; }
.entry-content { max-width: 900px; margin-inline: auto; }

/* ============ Header: compact, single row, centered ============ */
.cok-header {
  background: var(--cok-surface);
  border-bottom: 1px solid var(--cok-border);
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: .5rem 1rem;
  position: relative;
  z-index: 100;
  text-align: center;
}
.cok-header .cok-header-in {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
.cok-header .cok-logo {
  color: var(--cok-gold);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  text-align: center;
}
.cok-header nav {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
}
.cok-header nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.cok-header nav ul::-webkit-scrollbar { display: none; }
.cok-header nav ul li { position: relative; flex: 0 0 auto; }
.cok-header nav ul li > a {
  color: var(--cok-text);
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.2;
  padding: .35rem .45rem;
  display: inline-block;
  white-space: nowrap;
}
.cok-header nav ul li > a:hover { color: var(--cok-gold); }
.cok-header nav ul li ul {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cok-surface);
  border: 1px solid var(--cok-border);
  border-radius: var(--cok-radius);
  box-shadow: var(--cok-shadow);
  padding: .5rem 0;
  min-width: 240px;
  z-index: 1000;
  display: none;
  white-space: normal;
  flex-direction: column;
  overflow-x: visible;
}
.cok-header nav ul li:hover > ul { display: block; }
.cok-header nav ul li ul li { display: block; flex: none; }
.cok-header nav ul li ul li a { padding: .45rem .9rem; display: block; font-size: .85rem; white-space: normal; }
.cok-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--cok-border);
  border-radius: 8px;
  color: var(--cok-text);
  padding: .4rem .7rem;
  font-size: 1rem;
  cursor: pointer;
}

/* Hero */
.cok-hero {
  padding: 2.5rem 1.5rem;
  margin: 1.5rem 0;
}
.cok-hero h1 { margin: 0 0 .75rem; }
.cok-standfirst { color: var(--cok-text-muted); font-size: 1.1rem; margin: 0; }

/* Breadcrumbs */
.cok-breadcrumb {
  color: var(--cok-text-muted);
  font-size: .85rem;
  padding: .75rem 0;
}
.cok-breadcrumb a { color: var(--cok-text-muted); }
.cok-breadcrumb a:hover { color: var(--cok-gold); }

/* Card blocks */
.cok-section,
.cok-toc,
.cok-table-wrap,
.cok-faq,
.cok-faq-item,
.cok-warning,
.cok-care,
.cok-licence,
.cok-calc,
.cok-board-lead,
.cok-onward,
.cok-colophon {
  border: 1px solid var(--cok-border);
  background: var(--cok-surface);
  border-radius: var(--cok-radius);
  box-shadow: var(--cok-shadow);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.cok-faq-item { margin: 0 0 1rem; }
.cok-faq-item:last-child { margin-bottom: 0; }

/* TOC */
.cok-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  justify-content: center;
}
.cok-toc { text-align: center; }
.cok-toc a { color: var(--cok-gold); font-size: .95rem; }
.cok-toc a:hover { color: var(--cok-gold-hover); }

/* Tables */
.cok-table-wrap { overflow-x: auto; }
.cok-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.cok-table caption {
  text-align: center;
  color: var(--cok-text-muted);
  font-size: .85rem;
  padding-bottom: .75rem;
}
.cok-table th, .cok-table td {
  border: 1px solid var(--cok-border);
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
}
.cok-table thead th { color: var(--cok-gold); background: var(--cok-bg); }
.cok-table tbody tr:nth-child(even) { background: var(--cok-bg); }
.cok-table-note { color: var(--cok-text-muted); font-size: .85rem; margin: .75rem 0 0; text-align: center; }

/* Table overflow guard */
.cok-table-wrap, .cok-tablewrap, .cok-board-scroll, .cok-figure { max-width: 100%; overflow-x: auto; }
.cok-table, .cok-board-table { max-width: none; }
.entry-content > * { max-width: 100%; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.cok-section, .cok-toc, .cok-faq, .cok-warning, .cok-care,
.cok-licence, .cok-onward, .cok-figure, .cok-calc,
.cok-board-lead, .cok-board-slot, .cok-tablewrap, .cok-table-wrap {
  overflow-wrap: break-word;
  min-width: 0;
}

/* FAQ */
.cok-faq-q { margin: 0 0 .5rem; color: var(--cok-text); text-align: center; }
.cok-faq-a p { margin: 0; color: var(--cok-text); }

/* Warning, care, licence */
.cok-warning { border-left: 4px solid var(--cok-gold); }
.cok-warning p { margin: 0; font-weight: 600; text-align: center; }
.cok-care ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.cok-licence p { margin: 0; color: var(--cok-text-muted); }

/* Onward */
.cok-onward ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.cok-onward li { margin: 0 0 .5rem; }
.cok-onward li:last-child { margin-bottom: 0; }

/* Figure */
.cok-figure {
  margin: 1.5rem 0;
  border: 1px solid var(--cok-border);
  background: var(--cok-surface);
  border-radius: var(--cok-radius);
  box-shadow: var(--cok-shadow);
  padding: 1.5rem;
  text-align: center;
}
.cok-chart { width: 100%; height: auto; display: block; max-width: 100%; margin-inline: auto; }
.cok-figure figcaption { color: var(--cok-text-muted); font-size: .85rem; margin-top: .75rem; }

/* Note */
.cok-note { color: var(--cok-text-muted); font-size: .85rem; margin: 1rem 0 0; text-align: center; }

/* Board slot */
.cok-board-slot { padding: 1.5rem; min-height: 2rem; }

/* Calculator slot */
.cok-calc { min-height: 4rem; }

/* CTA */
.cok-cta {
  display: inline-block;
  background: var(--cok-gold);
  color: #12121a;
  border-radius: 8px;
  padding: .6rem 1.2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.cok-cta:hover, .cok-cta:focus {
  background: var(--cok-gold-hover);
  color: #12121a;
}

/* Footer */
#colophon, .site-info { display: none !important; }
.cok-footer {
  background: var(--cok-surface);
  border-top: 1px solid var(--cok-border);
  margin-top: 2rem;
  padding: 2rem 1.5rem;
}
.cok-footer .cok-footer-in {
  max-width: 900px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}
.cok-footer .cok-footer-name { margin: 0 0 .25rem; color: var(--cok-gold); font-weight: 700; }
.cok-footer .cok-footer-tagline { margin: 0; color: var(--cok-text-muted); font-size: .9rem; }
.cok-footer .cok-footer-warning { max-width: 380px; }
.cok-footer .cok-footer-warning p { margin: 0; color: var(--cok-text-muted); font-size: .85rem; }
.cok-footer .cok-footer-copy { text-align: right; }
.cok-footer .cok-footer-copy p { margin: 0; color: var(--cok-text-muted); font-size: .85rem; }

/* Media queries */
@media (max-width: 1024px) {
  .cok-hero { padding: 2rem 1rem; }
}

@media (max-width: 768px) {
  .cok-header nav ul { display: none; }
  .cok-burger { display: block; }
  .cok-footer .cok-footer-in { flex-direction: column; }
  .cok-footer .cok-footer-copy { text-align: left; }
  .cok-hero { padding: 1.5rem 1rem; }
  body.cok-body .entry-content h2 { font-size: 1.25rem; }
}

@media (max-width: 600px) {
  .cok-hero { padding: 1rem .5rem; }
  .cok-section, .cok-toc, .cok-table-wrap, .cok-faq,
  .cok-warning, .cok-care, .cok-licence, .cok-calc,
  .cok-board-lead, .cok-onward, .cok-figure, .cok-colophon {
    padding: 1rem;
  }
}

@media (max-width: 390px) {
  .cok-hero { padding: .75rem .25rem; }
  .cok-hero h1 { font-size: 1.5rem; }
}

/* Hard overflow guard: document must never scroll sideways */
html, body { overflow-x: hidden; }
body.cok-body #primary, body.cok-body .site-main, body.cok-body #main {
  overflow-x: clip;
}
body.cok-body .entry-content {
  overflow-x: clip;
}
body.cok-body .entry-content > * {
  max-width: 100%;
}
body.cok-body .entry-content svg,
body.cok-body .cok-chart {
  max-width: 100%;
  height: auto;
}
body.cok-body pre, body.cok-body code {
  overflow-x: auto;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
}