/*
  Light theme stylesheet for kasyno-spincity.pl
  - Header color: #0c4cc0
  - Responsive layout (mobile-first)
  - Accessibility helpers
  - Responsive table styles (mobile stacked)
  - Detailed comments explaining logic and layout
*/

/* CSS Variables for theming */
:root {
  --color-primary: #0c4cc0; /* Header & brand color (requested) */
  --color-primary-contrast: #ffffff;
  --color-bg: #ffffff;
  --color-text: #0b1220;
  --color-muted: #6b7280;
  --color-surface: #f5f7fb;
  --color-overlay: rgba(0, 0, 0, 0.4); /* semi-transparent overlay */
  --color-cta: #00b37e;
  --radius: 12px;
  --shadow-md: 0 6px 24px rgba(0,0,0,0.12);
  --container-w: 1200px;
}

/* Global resets and mobile viewport fixes */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden; /* Fix screen in mobile: prevent horizontal scroll */
}

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 16px; /* Horizontal gutters for mobile */
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 10000;
  padding: 8px 12px;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border-radius: 6px;
}

/* Header component */
.site-header {
  position: sticky; /* Keep header visible while scrolling */
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  box-shadow: var(--shadow-md);
}
.site-header .container { padding-left: 20px; padding-right: 20px; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.logo img { display: block; height: 32px; width: auto; }

/* Primary nav */
.nav-toggle {
  display: none; /* hide hamburger on mobile per requirements */
  background: transparent;
  border: 0;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  color: var(--color-primary-contrast);
}
.nav-toggle-bar {
  width: 26px;
  height: 2px;
  background: var(--color-primary-contrast);
}

.primary-nav {
  position: fixed;
  inset: 0 0 auto 0;
  top: 56px; /* below header */
  background: var(--color-primary);
  transform: translateY(-110%);
  transition: transform .3s ease;
  padding: 12px 16px 16px;
  display: none; /* hide nav container on mobile to avoid blue strip overlay */
}
.primary-nav.open { transform: translateY(0); }
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none; /* hide full nav on mobile */
  gap: 8px;
}
.nav-list a {
  color: var(--color-primary-contrast);
  text-decoration: none;
  font-weight: 600;
}
.nav-cta { display: flex; gap: 8px; margin-top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px; /* smaller buttons */
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: filter .2s ease, transform .02s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-cta);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn-contrast {
  background: #111827;
  color: #fff;
}

/* Hero banner with overlay CTA */
.hero {
  position: relative;
  min-height: auto; /* use intrinsic banner height */
}
.hero-frame {
  position: relative;
  width: 100%;
  margin: 16px 0; /* align with container, not auto centering */
  border-radius: 16px; /* rounded edges */
  overflow: hidden; /* clip overlay within rounded corners */
}
.hero-image { width: auto; max-width: 100%; height: auto; display: block; margin: 0 auto; }
.hero-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center; /* Center by default on mobile */
  padding: 16px;
}
.hero-overlay-inner {
  background: var(--color-overlay); /* Semi-transparent block */
  color: #fff;
  padding: 16px;
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  text-align: center; /* Mobile: centered CTA */
}
.hero-subtitle { margin: 8px 0 16px; font-size: 1.0625rem; }

/* Breadcrumbs */
.breadcrumbs {
  background: var(--color-surface);
  border-bottom: 1px solid #e5e7eb;
}
.breadcrumbs ol {
  margin: 0; padding: 8px 16px; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.breadcrumbs a { color: var(--color-primary); text-decoration: none; }
.breadcrumbs li[aria-current="page"] { color: var(--color-muted); }

/* Slots grid */
.slots { padding: 24px 0; }
.slots h2 { margin: 0 0 12px 0; }
.slots-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Mobile default */
  gap: 12px;
}
.slots-grid li { background: var(--color-surface); border-radius: 12px; padding: 8px; }
.slots-grid img { border-radius: 10px; }

/* Content area */
.content-area { padding: 24px 0 48px; }
.article-intro p:first-child { font-weight: 700; color: var(--color-muted); }
.content-area h2 { margin-top: 24px; margin-bottom: 8px; }
.content-area h3 { margin-top: 18px; margin-bottom: 6px; }
.content-area h4 { margin-top: 12px; margin-bottom: 6px; }
.center { text-align: center; }
.cta-section { background: var(--color-surface); padding: 24px; border-radius: var(--radius); }
.cta-layout { display: grid; gap: 16px; align-items: center; }
.cta-copy { }
.cta-media img { max-width: 360px; width: 100%; height: auto; display: block; }

/* Table responsiveness
   Strategy:
   - On small screens: stack rows; show column labels using data-label via ::before
   - JS adds data-label to each cell based on the header text
*/
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #e5e7eb; padding: 10px; text-align: left; }
thead th { background: #eef2ff; }

@media (max-width: 680px) {
  .responsive-table thead { display: none; }
  .responsive-table tr {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* label + value */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
  }
  .responsive-table td {
    border: 0;
    border-bottom: 1px solid #f0f2f5;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
  }
  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--color-muted);
  }
  .responsive-table tr:last-child td:last-child { border-bottom: 0; }
}

/* Footer */
.site-footer { background: #0b1220; color: #c7d2fe; padding: 24px 0; }
.footer-inner { display: grid; gap: 16px; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.footer-nav a { color: #c7d2fe; text-decoration: none; }
.payments { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.payments img { height: 24px; width: auto; }

/* Desktop adjustments */
@media (min-width: 768px) {
  .site-header .container { padding-left: 12px; padding-right: 12px; }
  .primary-nav {
    position: static;
    transform: none;
    background: transparent;
    padding: 0;
    display: contents; /* restore nav on desktop */
  }
  .nav-toggle { display: none; }
  /* Center nav items; keep CTAs on the right */
  .header-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; }
  .primary-nav { display: contents; }
  .primary-nav .nav-list {
    display: flex; gap: 16px; justify-content: center; align-items: center;
  }
  .nav-cta { margin-top: 0; margin-left: 16px; justify-self: end; }

  /* Hero CTA placement: desktop left */
  .hero-overlay { place-items: start; align-items: center; }
  .hero-overlay-inner { text-align: left; max-width: 520px; margin-left: 5vw; }

  /* Slots: 6 per row on desktop as requested */
  .slots-grid { grid-template-columns: repeat(6, 1fr); }

  /* Banner respects intrinsic size on desktop */
  .hero { min-height: auto; }

  /* CTA layout with image on the right */
  .cta-layout { grid-template-columns: 1.2fr .8fr; }
}


