/**
 * Bruce Bet Casino – Dark theme & layout
 * Shared styles: dark theme, responsiveness, tables, components.
 * Each geo folder uses this file (or copy).
 */

/* ========== CSS variables (dark theme) ========== */
:root {
  /* Backgrounds */
  --bg-page: #0f0f12;
  --bg-card: #1a1a1f;
  --bg-elevated: #222228;
  /* Text */
  --text-primary: #e8e8ec;
  --text-secondary: #a0a0a8;
  --text-muted: #6b6b74;
  /* Accent & borders */
  --accent: #d4a84b;
  --accent-hover: #e4b95a;
  --border: #2d2d35;
  --border-light: #3a3a42;
  /* Banner CTA overlay */
  --overlay-bg: rgba(0, 0, 0, 0.55);
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  /* Layout */
  --content-max: 900px;
  --header-h: 60px;
  --radius: 8px;
  --radius-slots: 12px;
}

/* ========== Reset & base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  /* Fix mobile viewport: prevent zoom and lock horizontal scroll */
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========== Typography ========== */
h1, h2, h3, h4 {
  line-height: 1.25;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

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

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

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

/* ========== Layout: header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-logo {
  display: block;
  height: 36px;
  width: auto;
}

/* Header login button */
.header-login {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent);
  color: #0f0f12;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.2s;
}

.header-login:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #0f0f12;
}

/* ========== Layout: main content wrapper ========== */
.main-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-lg);
}

/* ========== Breadcrumbs ========== */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumbs ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

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

/* ========== Banner block ========== */
.banner-block {
  position: relative;
  width: 100%;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
}

/* Web: full-width banner image */
.banner-block picture,
.banner-block img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
}

/* Mobile: banner at original size – full width, natural height (no crop, no reduce) */
@media (max-width: 767px) {
  .banner-block {
    min-height: 0;
  }
  .banner-block picture,
  .banner-block img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}

/* Hide mobile banner on desktop, desktop banner on mobile */
.banner-desktop {
  display: none;
}

.banner-mobile {
  display: block;
}

@media (min-width: 768px) {
  .banner-desktop {
    display: block;
  }
  .banner-mobile {
    display: none;
  }
  .banner-block {
    min-height: 320px;
  }
}

/* CTA overlay: semi-transparent block, centered on all viewports */
.banner-cta {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--space-xl));
  max-width: 360px;
  padding: var(--space-lg);
  background: var(--overlay-bg);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.banner-cta .cta-title {
  margin: 0 0 var(--space-sm);
  font-size: 1.25rem;
  color: #fff;
}

.banner-cta .btn-cta {
  display: inline-block;
  padding: var(--space-sm) var(--space-xl);
  background: var(--accent);
  color: #0f0f12;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.banner-cta .btn-cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

/* ========== Popular slots: 12 images, 2 rows of 6, rounded ========== */
.slots-section {
  margin-bottom: var(--space-2xl);
}

.slots-section h2 {
  margin-top: 0;
  margin-bottom: var(--space-lg);
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
}

.slots-grid .slot-item {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius-slots);
  overflow: hidden;
  background: var(--bg-elevated);
}

.slots-grid .slot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-slots);
}

/* Mobile: 2 columns, fixed cell size – images fill and crop (not reduced) */
@media (max-width: 767px) {
  .slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  .slots-grid .slot-item {
    height: 42vw;
    min-height: 140px;
    overflow: hidden;
  }
  .slots-grid .slot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== Article content ========== */
.article-content {
  margin-bottom: var(--space-2xl);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.9375rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-content th,
.article-content td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-content th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-primary);
}

.article-content tr:last-child td {
  border-bottom: none;
}

.article-content ol,
.article-content ul {
  margin: 0 0 var(--space-md);
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: var(--space-xs);
}

/* ========== Table wrapper: desktop = horizontal scroll if needed ========== */
.table-wrapper {
  width: 100%;
  margin: var(--space-lg) 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.table-wrapper table {
  margin: 0;
}

@media (min-width: 768px) {
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrapper table {
    min-width: 500px;
  }
}

/* Mobile: no horizontal scroll – table stacks vertically (cards), content moves down */
@media (max-width: 767px) {
  .table-wrapper {
    overflow-x: hidden;
  }
  .table-wrapper table {
    min-width: 0;
    width: 100%;
    display: block;
  }
  .table-wrapper thead {
    display: none;
  }
  .table-wrapper tbody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
    overflow: hidden;
    background: var(--bg-card);
  }
  .table-wrapper tbody tr:last-child {
    margin-bottom: 0;
  }
  .table-wrapper tbody td {
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-light);
    text-align: left;
  }
  .table-wrapper tbody td:last-child {
    border-bottom: none;
  }
  .table-wrapper tbody td[data-label]::before {
    content: attr(data-label);
    font-weight: 600;
    display: inline-block;
    min-width: 8em;
    margin-right: var(--space-sm);
  }
  .article-content table {
    font-size: 0.875rem;
  }
}

@media (max-width: 479px) {
  .article-content th,
  .article-content td {
    padding: var(--space-xs) var(--space-sm);
  }
}

/* ========== Buttons: all point to /go/ ========== */
.btn-primary,
a.btn-primary,
button.btn-primary {
  display: inline-block;
  padding: var(--space-sm) var(--space-xl);
  background: var(--accent);
  color: #0f0f12;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #0f0f12;
}

/* ========== Footer & payment logos ========== */
.site-footer {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.footer-payments-label {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

.footer-payments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.footer-payments img {
  height: 28px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  opacity: 0.9;
}

.footer-payments a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer-payments a:hover img {
  opacity: 1;
}

/* ========== Utility: skip link (a11y) ========== */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  z-index: 9999;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: #0f0f12;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: var(--space-md);
}
