/* ============================================
   Maggico Casino - Dark theme styles
   Header brand color: #3f0072
   ============================================ */

/* --- Base & reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent horizontal scroll and fix mobile viewport */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Ensure mobile viewport is fixed (no zoom/overflow issues) */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background-color: #1a1a1d;
  color: #e4e4e7;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body,
.main-content {
  max-width: 100vw;
}

/* --- Header component --- */
/* Main site header with brand purple #3f0072 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #3f0072;
  color: #fff;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Logo / brand link */
.site-header__logo {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
}

.site-header__logo img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 180px;
}

/* Nav block */
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* All CTA buttons point to /go/ */
.site-header__btn,
.banner-cta__btn,
.slots__btn,
.article-cta {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: linear-gradient(180deg, #6b21a8 0%, #4c1d95 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.site-header__btn:hover,
.banner-cta__btn:hover,
.slots__btn:hover,
.article-cta:hover {
  background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
}

.site-header__btn:focus-visible,
.banner-cta__btn:focus-visible,
.slots__btn:focus-visible,
.article-cta:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

/* --- Main content wrapper --- */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* --- Breadcrumbs component --- */
.breadcrumbs {
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "›";
  color: #71717a;
}

.breadcrumbs__link {
  color: #a78bfa;
  text-decoration: none;
}

.breadcrumbs__link:hover {
  text-decoration: underline;
}

.breadcrumbs__current {
  color: #a1a1aa;
}

/* --- Banner component --- */
/* Full-width banner for web and mobile; CTA on semi-transparent block centered */
.banner {
  position: relative;
  width: 100%;
  min-height: 500px;
  background: #2d1b4e url("img/baner/baner.png") center top / auto no-repeat;
  margin-bottom: 2rem;
  border-radius: 0 0 8px 8px;
}

@media (max-width: 768px) {
  .banner {
    background-image: url("img/baner/baner-mob.png");
    background-size: auto;
  }
}

/* Semi-transparent overlay for CTA (web and mobile, centered) */
.banner-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(63, 0, 114, 0.85);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 90%;
}

.banner-cta__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  color: #fff;
}

.banner-cta__btn {
  margin-top: 0.5rem;
}

/* --- Popular slots block --- */
/* 12 images in 2 rows of 6; full size, rounded corners */
.slots {
  margin-bottom: 2rem;
}

.slots__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  color: #fff;
}

.slots__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

/* Slot card: image full size, rounded corners only */
.slots__item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.slots__item:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.slots__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  aspect-ratio: 1;
  object-fit: cover;
}

.slots__btn {
  width: 100%;
  margin-top: 0.5rem;
  text-align: center;
}

/* --- Article / text content --- */
.article {
  margin-bottom: 2rem;
}

.article h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 1rem;
  color: #fff;
}

.article h2 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  margin: 1.5rem 0 0.75rem;
  color: #e4e4e7;
}

.article h3 {
  font-size: 1.125rem;
  margin: 1.25rem 0 0.5rem;
  color: #d4d4d8;
}

.article p,
.article li {
  margin: 0 0 0.75rem;
  color: #a1a1aa;
}

.article ul,
.article ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

.article th,
.article td {
  border: 1px solid #3f3f46;
  padding: 0.75rem;
  text-align: left;
  background-color: #27272a;
}

.article th {
  background-color: #3f0072;
  color: #fff;
  font-weight: 600;
}

/* --- Table: mobile adaptation --- */
/* On small screens, table becomes card list (each row = card) */
@media (max-width: 768px) {
  .article table,
  .article thead,
  .article tbody,
  .article tr,
  .article th,
  .article td {
    display: block;
  }

  .article thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  .article tr {
    margin-bottom: 1rem;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    overflow: hidden;
    background-color: #27272a;
  }

  .article td {
    border: none;
    border-bottom: 1px solid #3f3f46;
    padding: 0.5rem 1rem;
    position: relative;
    padding-left: 45%;
  }

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

  .article td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    width: 40%;
    font-weight: 600;
    color: #a78bfa;
  }
}

/* Add data-label to cells via JS or manually in HTML for mobile table */
/* If no data-label, we use first row as labels - see script.js */

/* --- Footer component --- */
/* Payment system logos from img/pay folder */
.site-footer {
  background-color: #18181b;
  border-top: 1px solid #3f3f46;
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer__payments {
  margin-top: 1rem;
}

.site-footer__payments-title {
  font-size: 0.875rem;
  color: #71717a;
  margin: 0 0 0.75rem;
}

.site-footer__payments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.site-footer__payments-list img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0.95);
}

/* --- Responsive: slots grid --- */
/* Desktop: 6 columns; tablet: 3; mobile: 2 */
@media (max-width: 1024px) {
  .slots__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .slots__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .banner-cta {
    padding: 1rem 1.25rem;
  }

  .banner-cta__title {
    font-size: 1.25rem;
  }
}

/* --- Utility: skip link for accessibility --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: #3f0072;
  color: #fff;
  text-decoration: none;
  z-index: 200;
  border-radius: 4px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}
