/**
 * National Casino — global layout, typography and component primitives.
 */

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

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

main {
  display: block;
}

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

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
  color: var(--color-heading-gold);
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3.5rem;
  height: 0.1875rem;
  background: var(--gradient-accent-btn);
  border-radius: var(--radius-card);
}

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-accent-light);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 0.125rem solid var(--color-heading-gold);
  outline-offset: 0.1875rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  background: var(--color-heading-gold);
  color: var(--color-btn-text-dark);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-card);
  font-weight: var(--fw-semibold);
  z-index: var(--z-modal);
  transition: top var(--transition-base);
}

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

/* Sections */
.section {
  padding-block: var(--space-section);
}

.section__intro {
  max-width: var(--container-max-width);
}

.section__body {
  max-width: 68rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-card);
  font-family: var(--font-family-base);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-accent-btn);
  color: var(--color-btn-text-dark);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-card);
  color: var(--color-btn-text-dark);
}

.btn--secondary {
  background: transparent;
  color: var(--color-white);
  border: 0.0625rem solid var(--color-btn-secondary-border);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--color-btn-secondary-border);
  color: var(--color-btn-text-dark);
}

.btn--block {
  width: 100%;
}

/* Cards */
.card {
  background: var(--color-bg-dark);
  border-radius: var(--radius-card);
  padding: var(--space-card-padding);
}

/* Tables */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  border-radius: var(--radius-card);
  background: var(--color-bg-dark);
  margin-bottom: var(--space-paragraph);
}

.data-table caption {
  text-align: left;
  color: var(--color-white);
  font-weight: var(--fw-semibold);
  padding: 1rem 1.25rem 0;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.875rem 1.25rem;
  border-bottom: 0.0625rem solid rgba(245, 241, 234, 0.08);
  font-size: var(--fs-small);
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.data-table th {
  color: var(--color-heading-gold);
  font-weight: var(--fw-semibold);
}

/* Only tables that are genuinely too wide to wrap comfortably (many columns)
   get a minimum width, which then scrolls inside .table-wrap instead of
   squeezing the text unreadably. Most 2-3 column tables stay full-width and
   wrap naturally on mobile, so no horizontal scroll is needed at all. */
@media (min-width: 30em) {
  .data-table--wide {
    min-width: 36rem;
  }
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: none;
}

/* Lists */
.styled-list {
  display: grid;
  gap: 0.625rem;
  margin-bottom: var(--space-paragraph);
}

.styled-list li {
  position: relative;
  padding-left: 1.5rem;
}

.styled-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-heading-gold);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: var(--fs-small);
  color: var(--color-text-main);
}

.breadcrumb a {
  color: var(--color-text-main);
}

.breadcrumb a:hover {
  color: var(--color-heading-gold);
}

.breadcrumb__current {
  color: var(--color-heading-gold);
}

/* Contextual in-body text links (internal linking). Scoped to the actual
   body-copy containers only, so it never touches nav, footer, breadcrumb,
   buttons, TOC or FAQ links, which already have their own color rules. */
.section__intro a,
.content-section__body a {
  color: var(--color-heading-gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-weight: var(--fw-semibold);
}

.section__intro a:hover,
.section__intro a:focus-visible,
.content-section__body a:hover,
.content-section__body a:focus-visible {
  color: var(--color-accent-light);
}

/* Content section media placement: image always sits right after the H2,
   above the body text, at every breakpoint (mobile-first, no reordering needed). */
.content-section__media {
  margin-block: 1.5rem;
}

.content-section__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

/* Grid utility for card layouts */
.grid {
  display: grid;
  gap: var(--space-card-gap);
  grid-template-columns: 1fr;
}

@media (min-width: 30em) {
  .grid--2-up {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60em) {
  .grid--3-up {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4-up {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Two column feature layout (Android/iOS) */
.two-col {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 60em) {
  .two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Card portrait media (used in Android/iOS comparison cards) */
.card__media-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 11rem;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
}

/* 404 page */
.error-404__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-block: var(--space-section);
}

.error-404__code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: var(--fw-extrabold);
  color: var(--color-heading-gold);
  line-height: 1;
  margin-bottom: 0;
}

.error-404__text {
  max-width: 36rem;
}
