/* Global base styles — Bizzo Casino */

html { font-family: var(--font-family-base); }

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-body);
  font-size: var(--fs-body);
  line-height: var(--line-height-base);
  font-weight: var(--fw-regular);
}

h1, h2, h3 {
  color: var(--color-heading-gold);
  font-weight: var(--fw-bold);
  line-height: 1.25;
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-black); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); color: var(--color-white); }

p { margin-bottom: var(--space-paragraph); }
p:last-child { margin-bottom: 0; }

a { transition: color var(--transition-base); }
a:hover { color: var(--color-heading-gold); }

/* Focus visibility (accessibility requirement — never remove outline) */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent-light);
  color: var(--color-text-on-light);
  padding: 0.75rem 1.25rem;
  z-index: 999;
  font-weight: var(--fw-semibold);
  border-radius: 0 0 var(--radius-card) 0;
}
.skip-link:focus {
  left: 0;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-container-padding);
}

/* margin (not padding) so that two .section elements sitting next to each
   other collapse into a single natural gap instead of stacking two full
   paddings — padding never collapses, margin does. */
.section {
  margin-block: var(--space-block-gap);
}
.section--dark {
  background-color: var(--color-bg-dark);
  padding-block: var(--space-section);
  margin-block: 0;
}

.section__intro {
  /* Full width of its block, same as a table — no artificial ch cap that
     would make intro copy look narrower than everything around it. */
  margin-bottom: var(--space-h2-text);
}
.section__intro--spaced {
  margin-top: var(--space-h2-text);
}

/* NOTE: headings deliberately have no margin-top of their own — the
   spacing before each one comes from their wrapping block (.section's
   padding-block, .content-block's margin-block, .faq's margin-block, etc).
   An h2/h3 margin-top here would ADD to that wrapper spacing rather than
   collapse with it (most wrappers are flex or have padding, which blocks
   margin collapsing), silently doubling the gap between blocks. */
main h2 + * {
  margin-top: var(--space-h2-text);
}
main h3 {
  margin-top: var(--space-section-half);
}
main h3 + * {
  margin-top: var(--space-h3-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}
.btn--accent {
  background: var(--gradient-accent);
  color: var(--color-text-on-light);
  border: none;
}
.btn--accent:hover, .btn--accent:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  color: var(--color-text-on-light);
}
.btn--secondary {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-btn-secondary-border);
}
.btn--secondary:hover, .btn--secondary:focus-visible {
  background: var(--color-btn-secondary-border);
  color: var(--color-text-on-light);
}
.btn--neon {
  background: var(--color-accent-neon);
  color: var(--color-text-on-light);
  border: none;
}
.btn--neon:hover, .btn--neon:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.btn--block { width: 100%; }

/* Rating badge */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent-light);
  color: var(--color-text-on-light);
  border-radius: var(--radius-pill);
  padding: 0.4rem 1rem;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  margin-bottom: 1rem;
}
.rating__stars { letter-spacing: 0.1em; }
/* Default .rating--hero spacing (var(--space-section)) was sized for when
   this badge lived in its own block below the hero, on plain background.
   Now it renders inside .hero__inner itself (see hero.php's $hero_rating),
   so the hero-scoped override below replaces it with the tighter internal
   card rhythm and drops the margin-bottom — flex children's margins never
   collapse with each other, so keeping both would double up against
   .hero__lead's own margin-top. */
.rating--hero { margin-top: var(--space-section); }
.hero__inner .rating--hero { margin-top: var(--space-h2-text); margin-bottom: 0; }

/* In-copy contextual links (internal linking) — a dedicated class rather
   than a bare `a` selector inside .content-block__text/.section__intro, so
   this never touches the pre-existing mailto: support links or any other
   anchor already living in that same wrapper. Gold matches the site's
   existing accent (headings, CTA), with an underline so a contextual link
   still reads as a link and isn't mistaken for a heading. */
.content-block__text a.text-link,
.section__intro a.text-link {
  color: var(--color-heading-gold);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 212, 41, 0.45);
  text-underline-offset: 2px;
}
.content-block__text a.text-link:hover,
.content-block__text a.text-link:focus-visible,
.section__intro a.text-link:hover,
.section__intro a.text-link:focus-visible {
  color: var(--color-white);
  text-decoration-color: currentColor;
}

/* Breadcrumb */
.breadcrumb {
  font-size: var(--fs-small);
  color: var(--color-text-body);
  margin-bottom: 1rem;
}
/* The flex row belongs on the actual list (.breadcrumb__list, the <ol>) —
   .breadcrumb is the <nav>, whose only DOM child is the <ol>, so flex set
   here never reached the individual <li> items. They were falling back to
   the browser's default block list-item layout, stacking each crumb on
   its own line (e.g. "Domov /" then "Bonusi" below it) instead of sitting
   in a single row. flex-wrap: nowrap keeps the whole trail on one line. */
.breadcrumb__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.breadcrumb__item { display: flex; align-items: center; gap: 0.4rem; }
.breadcrumb a { color: var(--color-text-body); }
.breadcrumb a:hover { color: var(--color-heading-gold); }
.breadcrumb__sep { opacity: 0.6; }
.breadcrumb [aria-current='page'] { color: var(--color-white); }

/* Table wrapper for spec tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  margin-block: var(--space-paragraph);
  background: var(--color-card-bg);
}
.data-table {
  width: 100%;
  min-width: 480px;
}
.data-table caption { display: none; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.9rem 1.1rem;
  font-size: var(--fs-body);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.data-table th {
  color: var(--color-heading-gold);
  font-weight: var(--fw-semibold);
  background: var(--color-bg-dark);
}
.data-table tr:last-child td { border-bottom: none; }

/* Generic cards grid (bonus cards, etc.) */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-card-gap);
}
/* Grid tracks default to minmax(auto, 1fr) — the "auto" floor is each
   item's min-content size, not the track's actual available width. A card
   that contains a wide, non-shrinking child (a data table with its own
   min-width, an <img> whose width/height attributes set a large intrinsic
   size even though its CSS is width: 100%) was winning that min-content
   contest, forcing the whole track — and with it the page — wider than the
   mobile viewport. min-width: 0 removes that content-based floor so the
   item shrinks to the track's real width instead; a table that still needs
   more room than that then scrolls inside its own .table-wrap, which is
   the only horizontal scrollbar mobile should ever show. */
.cards-grid > * {
  min-width: 0;
}
@media (min-width: 480px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  padding: var(--space-card-padding);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.card__image {
  border-radius: var(--radius-card);
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--color-card-bg);
  width: 100%;
}
.card__title { margin: 0; }
.card__text { flex-grow: 1; margin: 0; }

/* Content section image + text layout (mobile-first) */
.content-block__media {
  order: -1;
  margin-bottom: var(--space-h2-text);
}
.content-block__media img {
  border-radius: var(--radius-card);
  width: 100%;
  height: auto;
}
@media (min-width: 1440px) {
  .content-block__media { order: 1; margin-bottom: 0; margin-top: var(--space-h2-text); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.h3-list {
  display: flex;
  flex-direction: column;
  /* Was accidentally using --space-section (2.5–3.75rem) as the gap
     between individual bullet/numbered items — that's section-level
     spacing, not list-item spacing. A natural in-text list needs a much
     smaller, tighter gap between items. */
  gap: 0.5rem;
  /* No margin-top of its own: inside .content-block__text (a flex column
     with its own gap) a margin here would ADD to that gap instead of
     collapsing with it, doubling the space above every list. The parent's
     gap (or, outside a flex context, the preceding paragraph's own
     margin-bottom) already provides correct, natural spacing. */
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
/* Same content-based grid-blowout fix as .cards-grid above — this grid also
   hosts cards that can contain a spec table (see /app/'s platform cards),
   and without this the table's min-width forced the card, the track and
   the page wider than the mobile viewport instead of just scrolling the
   table itself inside .table-wrap. */
.two-col > * {
  min-width: 0;
}
@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

.platform-icon {
  width: 48px;
  height: 48px;
}

/* 404 page */
.error-404 {
  text-align: center;
  padding-block: var(--space-section) calc(var(--space-section) * 2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.error-404__code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: var(--fw-black);
  color: var(--color-heading-gold);
  line-height: 1;
  margin: 0;
}
.error-404__text { max-width: 60ch; }

/* Opt-in scroll-reveal animation (see js/animations.js) */
[data-animate] {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}
