/*
  Dark theme stylesheet for OnlineCasino-Runa.es
  Theme base color: #171717 (wdtn #171717)
  - Uses CSS variables for easy theming
  - Mobile-first responsive design
  - Accessible focus states and readable contrast
  - Detailed comments explaining blocks/components
*/

/* =====================
   CSS RESET & VARIABLES
   ===================== */
:root {
  --color-bg: #171717;          /* Primary dark background */
  --color-surface: #1f1f1f;     /* Elevated surfaces */
  --color-elev-2: #262626;      /* Cards/overlays */
  --color-text: #e5e5e5;        /* Primary text */
  --color-text-muted: #b3b3b3;  /* Secondary text */
  --color-accent: #22c55e;      /* Accent (green) */
  --color-primary: #3b82f6;     /* Primary action (blue) */
  --color-link: #93c5fd;        /* Link color */
  --color-border: #2e2e2e;      /* Borders/dividers */
  --shadow-1: 0 2px 12px rgba(0,0,0,.35);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --container: 1200px;
}

/* A minimal modern reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
img { max-width: 100%; display: block; }
ul[role='list'], ol[role='list'] { list-style: none; }
button { font: inherit; }

/* =====================
   TYPOGRAPHY & BODY
   ===================== */
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  line-height: 1.6;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

/* Accessible skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-primary);
  color: #0b1220;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; top: 8px; z-index: 1000; }

/* =====================
   HEADER & NAVIGATION
   ===================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23,23,23,.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand__logo { height: 40px; width: auto; }

.primary-nav .nav__list { display: flex; gap: 10px; align-items: center; }
.nav__item { list-style: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; text-decoration: none; cursor: pointer; transition: transform .1s ease, background .2s ease, color .2s ease; }
.btn:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.btn--link { color: var(--color-link); padding: 8px 10px; }
.btn--link:hover { color: #fff; }
.btn--primary { background: var(--color-primary); color: #0b1220; padding: 10px 16px; font-weight: 600; box-shadow: var(--shadow-1); }
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--accent { background: var(--color-accent); color: #06250f; padding: 12px 20px; font-weight: 700; box-shadow: var(--shadow-1); }
.btn--accent:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* =====================
   HERO (Banner con overlay centrado)
   ===================== */
.hero { position: relative; isolation: isolate; min-height: clamp(320px, calc(var(--vh, 1vh) * 65), 560px); }
.hero picture { position: absolute; inset: 0; display: block; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Semi-transparent centered sector */
.hero__overlay {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.hero__overlay > * { pointer-events: auto; }
.hero__overlay::before {
  content: ""; position: absolute; inset: 0; display: grid; place-items: center; z-index: 0;
  /* Use a centered translucent shape for focus */
  background: radial-gradient(ellipse 45% 35% at 50% 50%, rgba(0,0,0,.55), rgba(0,0,0,.35) 40%, rgba(0,0,0,0) 70%);
}
.hero__panel {
  position: relative; z-index: 1; text-align: center;
  background: rgba(0,0,0,.5); /* semi-transparent card */
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(4px) saturate(120%);
  max-width: min(92vw, 720px);
  margin-inline: 12px; /* ensure breathing room on small screens */
}
.hero__title { position: relative; z-index: 1; font-size: clamp(24px, 4vw, 44px); font-weight: 800; text-align: center; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.hero__subtitle { position: relative; z-index: 1; margin-top: 8px; text-align: center; color: var(--color-text-muted); font-size: clamp(14px, 2.2vw, 18px); }
.hero .btn { position: relative; z-index: 1; margin-top: 16px; }

/* =====================
   SECTIONS & CONTENT
   ===================== */
.main { display: block; }
.section { padding-block: 32px; }
.section + .section { border-top: 1px solid var(--color-border); }
h2 { font-size: clamp(20px, 3.5vw, 30px); margin-bottom: 12px; }
h3 { font-size: clamp(16px, 3vw, 22px); margin-top: 16px; margin-bottom: 8px; }
p { color: var(--color-text); margin-bottom: 12px; }
.list { padding-left: 20px; }
.list li { margin: 6px 0; }
.list--ol { padding-left: 20px; }
.list--badges { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 0; list-style: none; }
.list--badges li { background: var(--color-elev-2); border: 1px solid var(--color-border); padding: 8px 12px; border-radius: 999px; color: var(--color-text); }

/* =====================
   TABLES (responsive mobile-first)
   ===================== */
.table-responsive { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.table { width: 100%; border-collapse: collapse; min-width: 520px; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.table thead th { position: sticky; top: 0; background: #1b1b1b; z-index: 1; }
.table--three { min-width: 680px; }

/* Stacked table on extra-small screens (with JS optional enhancement) */
@media (max-width: 480px) {
  .table { min-width: 100%; }
}

/* =====================
   SLOTS GRID
   ===================== */
.slots-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) {
  .slots-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .slots-grid { grid-template-columns: repeat(6, 1fr); }
}
.slot { display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-elev-2); border: 1px solid var(--color-border); transition: transform .12s ease, box-shadow .12s ease; }
.slot:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.slot img { aspect-ratio: 4/3; object-fit: cover; width: 100%; height: auto; }

/* =====================
   FOOTER
   ===================== */
.site-footer { background: #141414; border-top: 1px solid var(--color-border); padding-block: 24px; }
.footer__payments { margin-bottom: 16px; }
.payments-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; align-items: center; }
.payments-grid img { filter: grayscale(.1) brightness(.9); height: 28px; margin-inline: auto; }
@media (max-width: 480px) {
  .payments-grid { grid-template-columns: repeat(3, 1fr); }
}
.footer__nav .nav__list { display: flex; gap: 12px; padding-left: 0; list-style: none; flex-wrap: wrap; }
.footer__copy { color: var(--color-text-muted); margin-top: 12px; font-size: 14px; }

/* =====================
   ACCESSIBILITY
   ===================== */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
a { color: var(--color-link); }
a:hover { color: #ffffff; }

/* Focus styles for keyboard users */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* =====================
   CTA SECTION
   ===================== */
.cta { background: linear-gradient(180deg, #121212, #151515); }

/* =====================
   UTILITIES
   ===================== */
.header-spacer { height: 64px; }


