/* Runa Casino — overrides & layout polish */
html, body {
  overflow-x: hidden;
  overflow-x: clip;
}

/* ── CLS: reserve space before paint ── */
.site-header-h7g {
  min-height: 56px;
  contain: layout style;
}
.header-inner-h7g {
  min-height: 56px;
  box-sizing: border-box;
}
.logo-area-h7g img {
  width: 99px;
  height: 40px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.hero-ticker {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  box-sizing: border-box;
  contain: layout style;
}
.hero-ticker-track {
  height: 44px;
  box-sizing: border-box;
  /* transform-only animation = no CLS */
  will-change: transform;
  backface-visibility: hidden;
}

.hero-banner-full {
  contain: layout style;
  /* space reserved via aspect-ratio — do not rely on img intrinsic size */
}
.hero-banner-full picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.hero-banner-full img {
  max-width: none; /* override global img max-width */
}

/* Game cards: stable box before lazy images load */
.game-card-h7g {
  contain: layout style;
}
.game-card-inner-h7g {
  aspect-ratio: 1 / 1 !important;
  width: 100%;
  background: color-mix(in srgb, var(--main-text) 6%, transparent);
}
.game-info {
  min-height: 2.4em;
  contain: layout;
}
.footer-responsibility-logos img {
  display: block;
  width: auto;
  flex-shrink: 0;
}
.footer-logo img {
  width: 89px;
  height: 36px;
  object-fit: contain;
}

/* Softer geometry vs template clone */
.login-btn-h7g,
.signup-btn-h7g,
.banner-cta-btn-h7g,
.game-signup-btn-h7g,
.game-play-btn-h7g,
.hero-ticker-btn {
  border-radius: 8px !important;
  letter-spacing: 0.02em;
}

a.login-btn-h7g,
a.signup-btn-h7g,
a.banner-cta-btn-h7g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}
.header-buttons-h7g a.login-btn-h7g,
.header-buttons-h7g a.signup-btn-h7g {
  width: auto;
}

.signup-btn-h7g,
.banner-cta-btn-h7g {
  font-weight: 700;
}

/* ── Ticker ── */
.hero-ticker {
  width: 100%;
  background: linear-gradient(90deg, #c99212 0%, #E8B923 45%, #f0d060 100%);
  overflow: hidden;
  border-top: 1px solid rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
.hero-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 0;
  white-space: nowrap;
  animation: hero-ticker-scroll 50s linear infinite;
}
.hero-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0e0c14 !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 4px;
}
.hero-ticker-item strong {
  font-weight: 800;
  color: #0e0c14 !important;
}
.hero-ticker-btn {
  display: inline-block;
  background: rgba(14, 12, 20, 0.92);
  color: #E8B923 !important;
  padding: 6px 18px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.hero-ticker-btn:hover {
  background: #0e0c14;
  color: #fff !important;
}
@keyframes hero-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Hero banner ── */
.hero-banner-full {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 560px;
  overflow: hidden;
  margin: 0;
  background: #0e0c14;
}
.hero-banner-full picture,
.hero-banner-full img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.hero-banner-full::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(to bottom, rgba(14, 12, 20, 0) 0%, var(--main-bg, #0e0c14) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Desktop: CTA on the right — no duplicate bonus copy */
.hero-banner-overlay {
  position: absolute;
  z-index: 2;
  left: auto;
  right: 5%;
  top: auto;
  bottom: 14%;
  transform: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  max-width: 42%;
  padding: 0;
  text-align: right;
  pointer-events: none;
}
.hero-banner-overlay .hero-cta-btn,
.hero-banner-overlay .banner-cta-btn-h7g {
  pointer-events: auto;
  padding: 14px 28px !important;
  font-size: 1rem !important;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Page body / sidebar */
.page-body-wrap {
  display: flex !important;
  align-items: stretch !important;
  gap: 24px !important;
}
.page-body-wrap > aside.mobile-sidebar-h7g {
  align-self: stretch !important;
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}
.page-body-wrap > aside.mobile-sidebar-h7g > .sidebar-overlay-h7g {
  flex: 1 !important;
  min-height: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}
.page-body-wrap > aside.mobile-sidebar-h7g > .sidebar-overlay-h7g > .sidebar-panel-h7g {
  flex: 1 !important;
  min-height: 100% !important;
}

/* Article */
.content-container-h7g {
  overflow-x: clip;
  max-width: 100%;
}
.content-container-h7g table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
.content-container-h7g th,
.content-container-h7g td {
  border: 1px solid color-mix(in srgb, var(--table-border) 55%, transparent);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.content-container-h7g th {
  background: color-mix(in srgb, var(--table-border) 18%, transparent);
  color: var(--table-color);
  font-weight: 700;
}
.content-container-h7g tr:nth-child(even) td {
  background: var(--table-even-bg);
}
.content-container-h7g ul,
.content-container-h7g ol {
  margin: 0.75rem 0 1rem 1.25rem;
  padding-left: 0.25rem;
}
.content-container-h7g li {
  margin: 0.35rem 0;
}
.content-container-h7g a {
  color: var(--link-color);
}
.text-section-h7g h1,
.text-section-h7g h2,
.text-section-h7g h3 {
  line-height: 1.25;
  word-wrap: break-word;
}

/* Games — tighten spacing overrides */
.games-grid-h7g {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.game-card-image-h7g img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.game-info {
  padding: 6px 4px 0;
  text-align: center;
  overflow: hidden;
}
.game-name,
.game-provider {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 0.78rem;
  line-height: 1.3;
}
.game-provider {
  opacity: 0.7;
  font-size: 0.7rem;
}

/* Footer */
.footer-nav-h7g {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav-h7g li {
  white-space: nowrap;
}
footer.footer-two-column {
  width: 100%;
  margin-top: 0;
  padding: 48px clamp(24px, 7vw, 160px) 28px;
  box-sizing: border-box;
  background: var(--footer-bg);
  color: var(--footer-color);
  border-top: 1.5px solid color-mix(in srgb, var(--main-text) 10%, transparent);
}
footer.footer-two-column .footer-col-left,
footer.footer-two-column .footer-col-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  align-items: center;
}
footer.footer-two-column .footer-logo img {
  max-height: 36px !important;
  width: auto !important;
  display: block;
}
footer.footer-two-column .footer-copyright,
footer.footer-two-column .footer-by-visiting {
  font-size: 0.72rem;
  opacity: 0.65;
  margin: 0;
  line-height: 1.4;
  max-width: 42rem;
}
footer.footer-two-column .footer-18plus {
  font-size: 0.88rem;
  opacity: 0.85;
  margin: 0;
  font-weight: 700;
}

/* Header */
.header-inner-h7g {
  display: flex;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
}
.logo-area-h7g {
  min-width: 0;
  flex-shrink: 1;
}
.header-buttons-h7g {
  flex-shrink: 0;
}

/* Active nav item */
.header-nav-h7g a[aria-current="page"],
.sidebar-nav-h7g a[aria-current="page"] {
  color: var(--link-color);
  font-weight: 700;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  .header-buttons-h7g {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
  }
  .header-buttons-h7g a.login-btn-h7g,
  .header-buttons-h7g a.signup-btn-h7g {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  .page-body-wrap {
    display: block !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip;
  }
  .page-body-wrap > main,
  .page-body-wrap > aside.mobile-sidebar-h7g,
  .main-content-h7g,
  .content-container-h7g {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .main-content-h7g {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .content-container-h7g {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  main img,
  main table,
  main pre,
  main iframe {
    max-width: 100%;
  }

  .hero-ticker-track {
    animation-duration: 35s;
    gap: 18px;
  }
  .hero-ticker-item {
    font-size: 0.78rem;
    gap: 6px;
  }
  .hero-ticker-btn {
    padding: 4px 12px;
    font-size: 0.72rem;
  }

  .site-header-h7g,
  .header-inner-h7g {
    min-height: 52px;
  }
  .logo-area-h7g img {
    width: auto;
    height: 32px;
    max-height: 32px !important;
  }
  .hero-ticker {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }
  .hero-ticker-track {
    height: 40px;
  }

  /* Mobile hero: portrait — same ratio as hero-mobile.jpg (3:4) */
  .hero-banner-full {
    aspect-ratio: 3 / 4;
    max-height: none;
    height: auto;
    /* Avoid vh-based height — it shifts when browser chrome shows/hides */
  }
  .hero-banner-full img {
    object-position: center top;
  }
  .hero-banner-full::after {
    height: 34%;
    background: linear-gradient(
      to bottom,
      rgba(14, 12, 20, 0) 0%,
      rgba(14, 12, 20, 0.55) 55%,
      var(--main-bg, #0e0c14) 100%
    );
  }
  .hero-banner-overlay {
    left: 50%;
    right: auto;
    bottom: 5%;
    top: auto;
    transform: translateX(-50%);
    max-width: 92%;
    width: 92%;
    justify-content: center;
    text-align: center;
  }
  .hero-banner-overlay .hero-cta-btn,
  .hero-banner-overlay .banner-cta-btn-h7g {
    width: min(280px, 100%);
    min-width: 0;
    padding: 12px 20px !important;
    font-size: 0.92rem !important;
  }

  .header-inner-h7g {
    gap: 8px !important;
    flex-wrap: nowrap !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .logo-area-h7g img {
    max-height: 32px !important;
    width: auto !important;
    height: auto !important;
    max-width: min(120px, 36vw) !important;
  }
  .header-buttons-h7g {
    gap: 6px !important;
  }
  .header-buttons-h7g button,
  .header-buttons-h7g a,
  .header-buttons-h7g .login-btn-h7g,
  .header-buttons-h7g .signup-btn-h7g {
    padding: 8px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }
  .burger-wrap-h7g {
    flex-shrink: 0;
  }

  /* Games: compact 2-col, no huge gaps */
  #games-block {
    margin: 8px 0 20px;
  }
  .games-grid-h7g {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 10px !important;
    row-gap: 14px !important;
    padding: 0 !important;
    margin: 12px 0 20px !important;
    max-width: 100% !important;
  }
  .game-card-h7g {
    width: 100%;
    max-width: 100%;
  }
  .game-card-labeled-h7g,
  .game-card-inner-h7g {
    max-width: 100% !important;
    width: 100% !important;
  }
  .game-card-labeled-h7g,
  .game-card-inner-h7g {
    aspect-ratio: auto !important;
  }
  .game-card-inner-h7g {
    aspect-ratio: 1 / 1 !important;
    min-height: 0;
  }
  .game-card-image-h7g {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 100%;
  }
  .game-card-image-h7g img {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover !important;
  }
  .game-info {
    min-height: 2.6em;
  }
  /* Always show play/demo on touch — hover is unreliable */
  .game-card-inner-h7g::after {
    background-color: rgba(0, 0, 0, 0.35) !important;
  }
  .game-card-hover-h7g {
    gap: 6px !important;
    opacity: 1 !important;
    transform: none !important;
    row-gap: 6px !important;
    padding: 8px !important;
    background: linear-gradient(to top, rgba(14, 12, 20, 0.85) 0%, rgba(14, 12, 20, 0.15) 100%);
  }
  .game-signup-btn-h7g,
  .game-play-btn-h7g {
    font-size: 0.7rem !important;
    padding: 6px 8px !important;
  }
  .games-blocks-divider {
    margin: 16px 0 !important;
  }

  /* Tables → stacked cards on mobile */
  .content-container-h7g table {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0 !important;
    margin: 1rem 0;
    background: transparent;
  }
  .content-container-h7g thead {
    display: none;
  }
  .content-container-h7g tbody {
    display: block;
    width: 100%;
  }
  .content-container-h7g tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--table-border) 45%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--table-border) 8%, transparent);
  }
  .content-container-h7g tr:nth-child(even) td {
    background: transparent;
  }
  .content-container-h7g td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 0 !important;
    padding: 0 !important;
    white-space: normal;
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: left;
    background: transparent !important;
  }

  /* 2-col: label on top, value below */
  .content-container-h7g table:not([data-cols="multi"]) td:first-child {
    font-weight: 700;
    color: var(--link-color);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .content-container-h7g table:not([data-cols="multi"]) td:last-child {
    color: var(--main-text);
    font-size: 0.95rem;
  }

  /* multi-col: each cell shows header via data-label */
  .content-container-h7g table[data-cols="multi"] td {
    padding: 8px 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--main-text) 10%, transparent) !important;
  }
  .content-container-h7g table[data-cols="multi"] td:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .content-container-h7g table[data-cols="multi"] td:first-child {
    padding-top: 0 !important;
    font-weight: 700;
    font-size: 1rem;
  }
  .content-container-h7g table[data-cols="multi"] td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--link-color);
    margin-bottom: 3px;
  }
  .content-container-h7g table[data-cols="multi"] td:first-child::before {
    display: none;
  }
  .text-section-h7g h1 {
    font-size: 1.55rem !important;
    margin: 0.6rem 0 0.8rem;
  }
  .text-section-h7g h2 {
    font-size: 1.2rem !important;
    margin: 1.4rem 0 0.6rem;
  }
  .text-section-h7g h3 {
    font-size: 1.05rem !important;
  }
  .text-section-h7g p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  /* Footer mobile */
  footer.footer-two-column {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 28px 16px 24px !important;
  }
  footer.footer-two-column .footer-col-right {
    order: 1;
  }
  footer.footer-two-column .footer-col-left {
    order: 2;
  }
  .footer-nav-h7g {
    gap: 8px 12px;
    font-size: 0.84rem;
    justify-content: center;
    max-width: 100%;
  }
  .footer-nav-h7g li {
    white-space: normal;
  }
  .footer-nav-h7g a {
    padding: 6px 8px;
    display: inline-block;
  }
  .footer-responsibility-logos {
    gap: 14px !important;
    margin: 8px 0 0 !important;
    padding: 4px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
  .footer-responsibility-logos a {
    height: auto !important;
  }
  .footer-responsibility-logos img {
    height: 28px !important;
    max-height: 28px !important;
    width: auto !important;
  }
  footer.footer-two-column .footer-copyright {
    font-size: 0.68rem;
    padding: 0 4px;
  }
  footer.footer-two-column .footer-contact-us {
    font-size: 0.85rem !important;
    word-break: break-all;
  }
}

@media (max-width: 400px) {
  .header-inner-h7g {
    gap: 4px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .logo-area-h7g img {
    max-height: 26px !important;
    max-width: min(96px, 30vw) !important;
  }
  .header-buttons-h7g {
    gap: 4px !important;
  }
  .header-buttons-h7g button,
  .header-buttons-h7g a,
  .header-buttons-h7g .login-btn-h7g,
  .header-buttons-h7g .signup-btn-h7g {
    padding: 6px 8px !important;
    font-size: 11px !important;
  }
  .games-grid-h7g {
    column-gap: 8px !important;
    row-gap: 12px !important;
  }
  .main-content-h7g {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

@media (min-width: 769px) {
  footer.footer-two-column {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px 40px;
    align-items: start;
    max-width: 1600px;
    margin: 0 auto;
  }
  footer.footer-two-column .footer-col-left {
    align-items: flex-start;
    text-align: left;
  }
  footer.footer-two-column .footer-col-right {
    align-items: flex-end;
    text-align: right;
  }
  footer.footer-two-column .footer-contact-us {
    text-align: left !important;
    margin: 0 !important;
  }
  footer.footer-two-column .footer-col-right .footer-responsibility-logos {
    flex-wrap: nowrap !important;
    gap: 12px !important;
    justify-content: flex-end !important;
    padding: 8px 0 !important;
  }
  footer.footer-two-column .footer-col-right .footer-responsibility-logos img {
    width: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-ticker-track {
    animation: none;
  }
}
