/**
 * 888 GCC - Main Stylesheet
 *
 * EXPLANATION:
 * ============
 * This file contains all CSS for the theme. We use CSS Custom Properties
 * (variables) for colors so they can be changed via the Customizer and
 * easily switched for light/dark mode.
 *
 * Organization:
 * 1. CSS Variables (colors, spacing)
 * 2. Reset & Base Styles
 * 3. Layout (container, grid)
 * 4. Header
 * 5. Mobile Menu
 * 6. Footer
 * 7. Components (buttons, cards)
 * 8. Utility Classes
 * 9. Responsive Breakpoints
 *
 * @package Casino888
 * @since 1.0.0
 */

/*--------------------------------------------------------------
# 0. Fonts — Cairo (self-hosted, Arabic-native, variable weight axis)
--------------------------------------------------------------*/

/**
 * Cairo is served by Google Fonts as a single variable-weight woff2 per
 * subset — the three @font-face blocks below all point at the SAME file
 * per subset but declare different font-weight values so browsers pick
 * the correct instance out of the variable font's weight axis.
 */
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/cairo-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/cairo-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/cairo-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/cairo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/cairo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/cairo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

/*--------------------------------------------------------------
# 1. CSS Variables
--------------------------------------------------------------*/

/**
 * EXPLANATION:
 * CSS Custom Properties (variables) let us define values once
 * and reuse them throughout. They start with -- and are accessed
 * with var(--name).
 *
 * Benefits:
 * - Change a color in one place, updates everywhere
 * - JavaScript can modify them for live theme switching
 * - Customizer can inject overrides via inline styles
 */
:root {
    /* Colors - Dark Mode (Default) — dark surfaces + lime-green CTAs */
    --c888-primary: #7BF037;          /* primary CTA / play button */
    --c888-primary-hover: #7FF800;    /* brighter green on hover */
    --c888-secondary: #1f1f1f;        /* page background */
    --c888-surface: #2a2a2a;          /* cards, header, footer */
    --c888-surface-2: #2B2B2B;        /* raised surface / hover rows */
    --c888-text: #FFFFFF;
    --c888-text-secondary: #C1C1C1;
    --c888-border: #2E2E2E;
    --c888-accent-gold: #FCE403;      /* jackpot / promo highlights */
    --c888-on-primary: #0A0A0A;       /* text/icon on the green CTA */

    /* Typography — Cairo (self-hosted, Arabic-native) with system fallbacks */
    --c888-font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    --c888-font-size-base: 16px;
    --c888-font-size-sm: 14px;
    --c888-font-size-xs: 12px;
    --c888-font-size-lg: 18px;
    --c888-font-size-xl: 20px;
    --c888-font-size-2xl: 24px;
    --c888-font-size-3xl: 30px;

    /* Spacing */
    --c888-spacing-xs: 4px;
    --c888-spacing-sm: 8px;
    --c888-spacing-md: 16px;
    --c888-spacing-lg: 24px;
    --c888-spacing-xl: 32px;
    --c888-spacing-2xl: 48px;
    --c888-spacing-3xl: 64px;

    /* Layout */
    --c888-container-max: 100%;
    --c888-container-padding: 20px;
    --c888-header-height: 70px;
    --c888-header-height-mobile: 60px;
    /* Full sticky-header height (logo row + nav row) — used to offset sticky
       sidebars so they don't slide behind the header. */
    --c888-header-full: 118px;

    /* Transitions */
    --c888-transition-fast: 150ms ease;
    --c888-transition-normal: 250ms ease;
    --c888-transition-slow: 350ms ease;

    /* Shadows */
    --c888-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --c888-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --c888-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);

    /* Border Radius */
    --c888-radius-sm: 4px;
    --c888-radius-md: 8px;
    --c888-radius-lg: 12px;
    --c888-radius-full: 9999px;
}

/**
 * Light Mode Colors
 *
 * EXPLANATION:
 * When body has .light-mode class, these variables override the defaults.
 * The class is toggled by JavaScript when user clicks the theme toggle.
 */
body.light-mode {
    --c888-secondary: #FFFFFF;
    --c888-surface: #F5F5F5;
    --c888-text: #1F1B2E;
    --c888-text-secondary: #666666;
    --c888-border: #E0E0E0;
}

/*--------------------------------------------------------------
# 2. Reset & Base Styles
--------------------------------------------------------------*/

/**
 * EXPLANATION:
 * CSS Reset removes browser default styling for consistency.
 * We use a minimal reset that keeps useful defaults.
 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--c888-font-size-base);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-gutter: stable;
    /* Prevent any horizontal overflow / sideways "wobble" site-wide.
       Use `clip` (not `hidden`) so the body does NOT become a scroll
       container — that keeps position: sticky (sticky header) working. */
    overflow-x: clip;
}

body {
    font-family: var(--c888-font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--c888-text);
    background-color: var(--c888-secondary);
    transition: background-color var(--c888-transition-normal),
                color var(--c888-transition-normal);
    overflow-x: clip;
    max-width: 100%;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--c888-transition-fast);
}

a:hover {
    /* Color not changed globally; specific components define hover colors. */
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--c888-primary);
    outline-offset: 2px;
}

/*--------------------------------------------------------------
# 3. Layout
--------------------------------------------------------------*/

.c888-container {
    max-width: var(--c888-container-max);
    margin: 0 auto;
    padding: 0 var(--c888-container-padding);
}

.c888-main {
    min-height: calc(100vh - var(--c888-header-height));
}

/* Interior page main wrapper — archive.php, taxonomy-game_category.php,
   single.php, single-game.php */
.c888-main--interior {
    padding-top: var(--c888-spacing-xl);
}

/* ---------------------------------------------------------------
   Blog templates — constrain content to a centered 1200px column

   Applies to the blog index (home.php → #c888-blog-home), the blog
   category / archive (archive.php → #c888-archive) and the single
   post (single.php → #c888-single). Every .c888-container in these
   templates is capped to 1200px; the horizontal centering comes for
   free from the base `.c888-container { margin: 0 auto }` rule.

   The bottom SEO-content block is deliberately EXCLUDED — it stays
   full-bleed. Its own .c888-container is isolated back to full width
   by the higher-specificity rule below (id + 2 classes beats id + 1),
   so only the reading content narrows while the SEO band spans edge
   to edge as before. */
#c888-blog-home .c888-container,
#c888-archive .c888-container,
#c888-single .c888-container {
    max-width: 1200px;
}

/* Isolate the SEO-content block: it keeps the site-wide full width. */
#c888-blog-home .c888-seo-content .c888-container,
#c888-archive .c888-seo-content .c888-container,
#c888-single .c888-seo-content .c888-container {
    max-width: var(--c888-container-max);
}

.c888-content {
    padding: var(--c888-spacing-2xl) 0;
}

/*--------------------------------------------------------------
# 4. Header
--------------------------------------------------------------*/

.c888-header {
    background-color: var(--c888-secondary);
    border-bottom: 1px solid var(--c888-border);
    height: var(--c888-header-height);
    z-index: 100;
    transition: background-color var(--c888-transition-normal);
}

/**
 * Sticky Header
 *
 * EXPLANATION:
 * position: sticky keeps the header fixed at the top when scrolling,
 * but only when enabled via Customizer (.c888-header--sticky class).
 */
.c888-header--sticky {
    position: sticky;
    top: 0;
}

.c888-header__container {
    max-width: var(--c888-container-max);
    margin: 0 auto;
    padding: 0 var(--c888-container-padding);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--c888-spacing-lg);
}

/* Mobile Menu Toggle - Hidden on desktop */
.c888-header__menu-toggle {
    display: none;
}

/* Logo */
.c888-header__logo {
    flex-shrink: 0;
}

.c888-header__logo img,
.c888-header__logo .custom-logo {
    height: 36px;
    width: auto !important;
    max-width: none;
}

/* Dark/light mode logo switching — CSS only, no flash */
.c888-logo__light                 { display: none; }
body.light-mode .c888-logo__dark  { display: none; }
body.light-mode .c888-logo__light { display: inline-block; }

.c888-header__logo .site-title {
    font-size: var(--c888-font-size-xl);
    font-weight: 700;
    color: var(--c888-text);
}

/* Desktop Navigation */
.c888-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.c888-nav-menu {
    display: flex;
    gap: var(--c888-spacing-xl);
}

.c888-nav-menu li {
    position: relative;
}

.c888-nav-menu a {
    display: block;
    padding: var(--c888-spacing-sm) 0;
    font-size: var(--c888-font-size-base);
    font-weight: 500;
    color: var(--c888-text);
    position: relative;
}

/**
 * Active/Hover Underline Effect
 *
 * EXPLANATION:
 * We use a ::after pseudo-element to create the purple underline.
 * It starts at 0 width and expands on hover/active state.
 */
.c888-nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--c888-primary);
    transition: width var(--c888-transition-normal);
}

.c888-nav-menu a:hover::after,
.c888-nav-menu .current-menu-item a::after,
.c888-nav-menu .current_page_item a::after {
    width: 100%;
}

/* ── Desktop submenu dropdown ── */
.c888-nav-menu .menu-item-has-children {
    position: relative;
}

.c888-nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 200px;
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: 8px;
    padding: 10px 0 6px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    list-style: none;
    margin: 0;
}

.c888-nav-menu .menu-item-has-children:hover > .sub-menu,
.c888-nav-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.c888-nav-menu .sub-menu li {
    position: relative; /* needed so 3rd-tier .sub-menu can flyout from this li */
}

.c888-nav-menu .sub-menu a {
    padding: 9px 18px;
    font-size: .9rem;
    white-space: nowrap;
}

.c888-nav-menu .sub-menu a::after {
    display: none; /* no underline inside dropdown */
}

.c888-nav-menu .sub-menu a:hover {
    color: var(--c888-primary);
}

/* 3rd-tier dropdown — flies out to the right of the 2nd-tier item.
   Hover on a level-2 .menu-item-has-children reveals its nested .sub-menu. */
.c888-nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 1px;
}

[dir="rtl"] .c888-nav-menu .sub-menu .sub-menu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 1px;
}

/* Caret on a nested parent points right (▸) instead of down (▾). */
.c888-nav-menu .sub-menu .menu-item-has-children > a::after {
    content: ' ▸';
    float: right;
    margin-left: 8px;
}

[dir="rtl"] .c888-nav-menu .sub-menu .menu-item-has-children > a::after {
    content: ' ◂';
    float: left;
    margin-left: 0;
    margin-right: 8px;
}

/* Caret on parent item — appended after link text */
.c888-nav-menu .menu-item-has-children > a::after {
    content: ' ▾';
    font-size: .7em;
    letter-spacing: 0;
    vertical-align: middle;
    opacity: .6;
    width: auto;    /* override the underline trick */
    height: auto;
    background: none;
    position: static;
    bottom: auto;
    left: auto;
    transition: none;
}
.c888-nav-menu .menu-item-has-children:hover > a::after,
.c888-nav-menu .menu-item-has-children.is-open > a::after {
    opacity: 1;
}

/* Header Actions (Theme toggle + Buttons) */
.c888-header__actions {
    display: flex;
    align-items: center;
    gap: var(--c888-spacing-md);
}

.c888-header__buttons {
    display: flex;
    gap: var(--c888-spacing-sm);
}

/*--------------------------------------------------------------
# Theme Toggle Button
--------------------------------------------------------------*/

.c888-theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--c888-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c888-text-secondary);
    transition: color var(--c888-transition-fast),
                background-color var(--c888-transition-fast);
}

.c888-theme-toggle:hover {
    color: var(--c888-text);
    background-color: var(--c888-surface);
}

.c888-theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Show sun in dark mode, moon in light mode */
.c888-theme-toggle__sun {
    display: block;
}

.c888-theme-toggle__moon {
    display: none;
}

body.light-mode .c888-theme-toggle__sun {
    display: none;
}

body.light-mode .c888-theme-toggle__moon {
    display: block;
}

/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/

.c888-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--c888-spacing-xs);
    padding: var(--c888-spacing-sm) var(--c888-spacing-lg);
    font-size: var(--c888-font-size-sm);
    font-weight: 600;
    border-radius: var(--c888-radius-md);
    transition: all var(--c888-transition-fast);
    white-space: nowrap;
}

.c888-btn__icon {
    width: 16px;
    height: 16px;
}

/* Outline Button (Login) */
.c888-btn--outline {
    background: transparent;
    border: 1px solid var(--c888-text-secondary);
    color: var(--c888-text);
}

.c888-btn--outline:hover {
    border-color: var(--c888-text);
    color: var(--c888-text);
}

/* Primary Button (Register) */
.c888-btn--primary {
    background: var(--c888-primary);
    border: 1px solid var(--c888-primary);
    color: #FFFFFF;
}

.c888-btn--primary:hover {
    background: var(--c888-primary-hover);
    border-color: var(--c888-primary-hover);
    color: #FFFFFF;
}

/*--------------------------------------------------------------
# 5. Mobile Menu
--------------------------------------------------------------*/

/**
 * The menu panel sits directly below the header and slides downward.
 * z-index 99 keeps it behind the header (z-index 100) so the header
 * is always visible and acts as the natural "close" affordance via
 * the hamburger→X animation.
 */
.c888-mobile-menu {
    position: fixed;
    top: var(--c888-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--c888-secondary);
    z-index: 99;
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    pointer-events: none;
    transition: transform var(--c888-transition-slow),
                opacity var(--c888-transition-slow);
    opacity: 0;
    overflow-y: auto;
}

.c888-mobile-menu.is-open {
    transform: translateY(0);
    pointer-events: auto;
    opacity: 1;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

.c888-mobile-menu__nav {
    flex: 1;
    padding: var(--c888-spacing-2xl) var(--c888-container-padding);
}

.c888-mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-lg);
}

.c888-mobile-nav-menu a {
    display: block;
    font-size: var(--c888-font-size-2xl);
    font-weight: 600;
    color: var(--c888-text);
    padding: var(--c888-spacing-sm) 0;
    position: relative;
}

.c888-mobile-nav-menu .current-menu-item a,
.c888-mobile-nav-menu .current_page_item a {
    color: var(--c888-primary);
}

.c888-mobile-nav-menu .current-menu-item a::after,
.c888-mobile-nav-menu .current_page_item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--c888-primary);
}

/* Mobile submenu */
.c888-mobile-nav-menu .menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.c888-mobile-nav-menu .menu-item-has-children > a {
    flex: 1;
}

.c888-mobile-submenu-toggle {
    background: none;
    border: none;
    color: var(--c888-text);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 8px;
    cursor: pointer;
    opacity: .6;
    transition: opacity .2s, transform .2s;
}
.c888-mobile-submenu-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
    opacity: 1;
}

.c888-mobile-nav-menu .sub-menu {
    display: none;
    width: 100%;
    flex-basis: 100%;
    list-style: none;
    margin: 4px 0 0;
    padding-inline-start: 16px;
    border-inline-start: 2px solid var(--c888-primary);
}
.c888-mobile-nav-menu .sub-menu.is-open {
    display: block;
}
.c888-mobile-nav-menu .sub-menu a {
    font-size: 1rem;
    font-weight: 400;
    padding: 6px 0;
}
.c888-mobile-nav-menu .sub-menu a::after {
    display: none;
}

.c888-mobile-menu__footer {
    padding: var(--c888-spacing-lg) var(--c888-container-padding);
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--c888-border);
}

/*--------------------------------------------------------------
# Hamburger Icon & Animation
--------------------------------------------------------------*/

.c888-hamburger {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.c888-hamburger__line {
    width: 100%;
    height: 2px;
    background-color: var(--c888-text);
    border-radius: 1px;
    transition: transform var(--c888-transition-normal),
                opacity var(--c888-transition-normal),
                background-color var(--c888-transition-fast);
    transform-origin: center;
}

/* Animate to X when menu is open */
.c888-header__menu-toggle.is-open .c888-hamburger__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.c888-header__menu-toggle.is-open .c888-hamburger__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.c888-header__menu-toggle.is-open .c888-hamburger__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/*--------------------------------------------------------------
# 6. Footer
--------------------------------------------------------------*/

.c888-footer {
    background-color: var(--c888-surface);
    padding: var(--c888-spacing-3xl) var(--c888-container-padding);
    transition: background-color var(--c888-transition-normal);
}

/* Footer Logo — only add bottom gap when a sibling follows it */
.c888-footer__logo {
    text-align: center;
}

.c888-footer__logo:not(:last-child) {
    margin-bottom: var(--c888-spacing-2xl);
}

.c888-footer__logo img,
.c888-footer__logo .custom-logo {
    height: 60px;
    width: auto;
    margin: 0 auto;
}

/* Footer Content — flexbox so any number of menu columns works naturally */
.c888-footer__content {
    max-width: var(--c888-container-max);
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: var(--c888-spacing-2xl);
}

/* Only add the divider when payments or legal follow */
.c888-footer__content:not(:last-child) {
    padding-bottom: var(--c888-spacing-2xl);
    border-bottom: 1px solid var(--c888-border);
}

/* App Download Section */
.c888-app-download {
    max-width: 280px;
}

.c888-app-download__title {
    font-size: var(--c888-font-size-sm);
    font-weight: 600;
    color: var(--c888-text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: var(--c888-spacing-md);
}

.c888-app-download__content {
    display: flex;
    align-items: stretch;
    gap: var(--c888-spacing-md);
    background: var(--c888-secondary);
    border-radius: var(--c888-radius-lg);
    padding: var(--c888-spacing-md);
}

.c888-app-download__qr {
    display: flex;
    align-items: stretch;
}

.c888-app-download__qr img {
    width: auto;
    height: 100%;
    max-width: 100px;
    object-fit: contain;
    border-radius: var(--c888-radius-sm);
    background: white;
    padding: 4px;
}

.c888-app-download__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-sm);
}

/* Store Buttons */
.c888-store-btn {
    display: flex;
    align-items: center;
    gap: var(--c888-spacing-sm);
    background: var(--c888-border);
    padding: var(--c888-spacing-sm) var(--c888-spacing-md);
    border-radius: var(--c888-radius-md);
    transition: background-color var(--c888-transition-fast);
}

.c888-store-btn:hover {
    background: var(--c888-surface);
    color: var(--c888-text);
}

.c888-store-btn__icon {
    width: 20px;
    height: 20px;
}

.c888-store-btn__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.c888-store-btn__text small {
    font-size: 10px;
    color: var(--c888-text-secondary);
}

.c888-store-btn__text strong {
    font-size: var(--c888-font-size-sm);
}

/* Footer Menus — flex container so columns distribute evenly */
.c888-footer__menus {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--c888-spacing-xl);
    justify-content: center;
}

.c888-footer-menu {
    flex: 0 1 auto;
    min-width: 130px;
    max-width: 220px;
}

.c888-footer-menu__title {
    font-size: var(--c888-font-size-base);
    font-weight: 600;
    color: var(--c888-text);
    margin-bottom: var(--c888-spacing-md);
    display: block;
    text-align: start;
    cursor: default;
}

.c888-footer-menu__title .c888-footer-menu__arrow {
    display: none;
}

.c888-footer-menu__list {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-sm);
}

.c888-footer-menu__list a {
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
}

.c888-footer-menu__list a:hover {
    color: var(--c888-text);
}

/* Social Icons — standalone full-width centred row */
.c888-footer__social-row {
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
    padding: 0;
}

.c888-footer__social-row:not(:last-child) {
    border-bottom: none;
}

.c888-social-icons {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-sm);
    background-color: var(--c888-secondary);
    padding: var(--c888-spacing-lg) var(--c888-spacing-sm);
    border-radius: var(--c888-radius-full);
}

.c888-social-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--c888-radius-full);
    background-color: var(--c888-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    transition: background-color var(--c888-transition-fast),
                transform var(--c888-transition-fast);
}

.c888-social-icon:hover {
    background-color: var(--c888-primary-hover);
    color: #FFFFFF;
    transform: scale(1.1);
}

.c888-social-icon svg {
    width: 18px;
    height: 18px;
}

/* Payment Icons */
.c888-footer__payments {
    max-width: var(--c888-container-max);
    margin: 0 auto;
    padding: var(--c888-spacing-2xl) 0;
}

.c888-footer__payments:not(:last-child) {
    border-bottom: 1px solid var(--c888-border);
}

.c888-payment-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--c888-spacing-md);
}

.c888-payment-icon {
    background: white;
    border-radius: var(--c888-radius-lg);
    padding: var(--c888-spacing-sm) var(--c888-spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.c888-payment-icon img {
    height: 30px;
    width: auto;
}

/* Legal Section — sizing + flex handled in one place (see "Language Switcher" section below) */

.c888-footer__copyright {
    margin-bottom: var(--c888-spacing-md);
}

.c888-legal-disclaimer {
    line-height: 1.5;
}

/*--------------------------------------------------------------
# 7. Post Cards (Index Page)
--------------------------------------------------------------*/

.c888-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--c888-spacing-xl);
}

.c888-post-card {
    background: var(--c888-surface);
    border-radius: var(--c888-radius-lg);
    overflow: hidden;
    transition: transform var(--c888-transition-fast),
                box-shadow var(--c888-transition-fast);
}

.c888-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--c888-shadow-lg);
}

.c888-post-card__image {
    aspect-ratio: 2 / 1;
    overflow: hidden;
}

.c888-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.c888-post-card__content {
    padding: var(--c888-spacing-md);
}

.c888-post-card__category {
    display: inline-block;
    font-size: var(--c888-font-size-xs);
    font-weight: 600;
    color: var(--c888-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--c888-spacing-xs);
}

.c888-post-card__title {
    font-size: var(--c888-font-size-base);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--c888-spacing-xs);
}

.c888-post-card__title a:hover {
    color: var(--c888-primary);
}

.c888-post-card__excerpt {
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
    margin-bottom: var(--c888-spacing-sm);
}

.c888-post-card__date {
    font-size: var(--c888-font-size-xs);
    color: var(--c888-text-secondary);
}

/* ---------------------------------------------------------------
   Featured post card (tri-card rows: featured + related posts)
--------------------------------------------------------------- */

.c888-post-card--featured {
    background: #130f1e;
    position: relative;
}

.c888-post-card--featured .c888-post-card__link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.c888-post-card--featured .c888-post-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 1;
}

.c888-post-card--featured .c888-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--c888-transition-fast);
}

.c888-post-card--featured:hover .c888-post-card__image img {
    transform: scale(1.04);
}

.c888-post-card--featured .c888-post-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 80%,
        rgba(10, 7, 20, 0.95) 100%
    );
    pointer-events: none;
}

.c888-post-card--featured .c888-post-card__image-placeholder {
    width: 100%;
    aspect-ratio: 2 / 1;
    background: #1a1530;
}

.c888-post-card--featured .c888-post-card__category {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 3;
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--c888-primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 0;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.c888-post-card--featured .c888-post-card__category:hover {
    background: var(--c888-primary-hover);
    transform: scale(1.06);
}

.c888-post-card--featured .c888-post-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 12px;
    z-index: 2;
    pointer-events: none;
}

.c888-post-card--featured .c888-post-card__title {
    font-size: var(--c888-font-size-sm);
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    margin: 0;
}

/* No Posts Message */
.c888-no-posts {
    text-align: center;
    padding: var(--c888-spacing-3xl) 0;
}

.c888-no-posts h1 {
    font-size: var(--c888-font-size-2xl);
    margin-bottom: var(--c888-spacing-md);
}

/* Pagination */
.navigation.pagination {
    margin-top: var(--c888-spacing-2xl);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: var(--c888-spacing-sm);
}

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--c888-spacing-md);
    background: var(--c888-surface);
    border-radius: var(--c888-radius-md);
    font-weight: 500;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--c888-primary);
    color: #FFFFFF;
}

/*--------------------------------------------------------------
# 8. Responsive Styles
--------------------------------------------------------------*/

/* Tablet and below */
@media (max-width: 1024px) {
    .c888-footer__content {
        flex-wrap: wrap;
        gap: var(--c888-spacing-xl);
    }

    .c888-footer__menus {
        flex-wrap: wrap;
    }

}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    :root {
        --c888-header-height: var(--c888-header-height-mobile);
    }

    /* Header Mobile */
    .c888-header__menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .c888-header__nav {
        display: none;
    }

    .c888-header__theme-toggle {
        display: none;
    }

    .c888-header__buttons .c888-btn__icon {
        display: none;
    }

    /* Footer Mobile */
    .c888-footer__content {
        flex-direction: column;
        gap: 0;
    }

    .c888-app-download {
        max-width: 100%;
        padding-bottom: var(--c888-spacing-xl);
        border-bottom: 1px solid var(--c888-border);
    }

    .c888-app-download__content {
        justify-content: flex-start;
        align-items: center;
    }

    .c888-app-download__qr {
        display: none;
    }

    .c888-app-download__buttons {
        flex-direction: row;
    }

    /* Footer Menus — stack vertically, become accordions */
    .c888-footer__menus {
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-width: 100%;
    }

    .c888-footer-menu {
        width: 100%;
        max-width: 100%;
        border-bottom: 1px solid var(--c888-border);
    }

    .c888-footer-menu__title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: var(--c888-spacing-md) 0;
        margin-bottom: 0;
        cursor: pointer;
    }

    .c888-footer-menu__title .c888-footer-menu__arrow {
        display: block;
        width: 20px;
        height: 20px;
        transition: transform var(--c888-transition-fast);
    }

    .c888-footer-menu.is-open .c888-footer-menu__arrow {
        transform: rotate(180deg);
    }

    .c888-footer-menu__links {
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--c888-transition-normal);
    }

    .c888-footer-menu.is-open .c888-footer-menu__links {
        max-height: 500px;
    }

    .c888-footer-menu__list {
        padding-bottom: var(--c888-spacing-md);
    }

    /* Social row — centred below menus on mobile */
    .c888-footer__social-row {
        justify-content: center;
        padding: var(--c888-spacing-xl) 0;
        border-top: 1px solid var(--c888-border);
        width: 100%;
    }

    .c888-social-icons {
        flex-direction: row;
        padding: var(--c888-spacing-sm) var(--c888-spacing-lg);
    }

    /* Payment Icons */
    .c888-payment-icons {
        justify-content: center;
    }

    /* Posts Grid */
    .c888-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .c888-header__buttons .c888-btn {
        padding: var(--c888-spacing-sm) var(--c888-spacing-md);
        font-size: var(--c888-font-size-xs);
    }

    .c888-mobile-menu__buttons .c888-btn {
        padding: var(--c888-spacing-sm) var(--c888-spacing-md);
        font-size: var(--c888-font-size-xs);
    }
}

/*--------------------------------------------------------------
# 9. Page Sections — shared base used by all templates
--------------------------------------------------------------*/

/* Base section wrapper — used on homepage full-width sections AND
   interior page featured/related sections */
.c888-section {
    padding: var(--c888-spacing-3xl) 0;
}

/* Section heading — shared by posts-grid, featured-article, archive-featured, related-posts */
.c888-section__heading {
    font-size: var(--c888-font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--c888-spacing-xl);
    color: var(--c888-text);
}

/* ---------------------------------------------------------------
   Homepage Sections (front-page.php, archive-game.php, page-game.php)
   Sections below are full-width with inner .c888-container
--------------------------------------------------------------- */

/* ---------------------------------------------------------------
   Hero Section
--------------------------------------------------------------- */

.c888-hero {
    position: relative;
    /* Constrain to the regular container width instead of full-bleed */
    width: calc(100% - 2 * var(--c888-container-padding));
    max-width: calc(var(--c888-container-max) - 2 * var(--c888-container-padding));
    margin-inline: auto;
    background-color: var(--c888-surface);
    background-size: cover;
    background-position: center;
    /* Match the big featured card in the category-posts (6) grid.
       min-height is border-box, so the inherited .c888-section vertical
       padding (3xl) sits inside it — the banner stays 300px tall while
       keeping the same vertical rhythm as the sections around it. */
    min-height: 300px;
    display: flex;
    align-items: center;
    border-radius: var(--c888-radius-lg);
    overflow: hidden;
    /* The banner background fills the box edge-to-edge, so it needs its own
       outward spacing below it — otherwise the next section (e.g. the archive
       posts list, whose top padding is stripped) butts right against it. */
    margin-bottom: var(--c888-spacing-3xl);
}

.c888-hero__overlay {
    position: absolute;
    inset: 0;
}

.c888-hero__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--c888-spacing-lg);
    padding-top: var(--c888-spacing-lg);
    padding-bottom: var(--c888-spacing-lg);
}

.c888-hero__title {
    font-size: var(--c888-font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    max-width: 700px;
}

.c888-hero__subtitle {
    font-size: var(--c888-font-size-lg);
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
}

/* Whole-hero clickable link — replaces the visible CTA button.
   Covers the entire banner and sits above the centered text. */
.c888-hero__link {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
    background: transparent;
    transition: background-color 0.2s ease;
}

.c888-hero__link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.c888-hero__link:focus-visible {
    outline: 2px solid var(--c888-primary);
    outline-offset: -4px;
}

/* ---------------------------------------------------------------
   Posts Grid Section
--------------------------------------------------------------- */

.c888-section--posts-grid {
    background-color: var(--c888-secondary);
}

/* ---------------------------------------------------------------
   CTA Banner Section
--------------------------------------------------------------- */

.c888-cta-banner {
    padding: var(--c888-spacing-2xl) 0;
}

.c888-cta-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--c888-spacing-xl);
    flex-wrap: wrap;
}

.c888-cta-banner__text {
    flex: 1;
    min-width: 240px;
}

.c888-cta-banner__heading {
    font-size: var(--c888-font-size-2xl);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--c888-spacing-xs);
}

.c888-cta-banner__subheading {
    font-size: var(--c888-font-size-base);
    color: rgba(255, 255, 255, 0.85);
}

.c888-cta-banner__btn {
    background: #fff;
    color: #1F1B2E;
    font-weight: 700;
    border-color: #fff;
    padding: var(--c888-spacing-md) var(--c888-spacing-2xl);
    white-space: nowrap;
    flex-shrink: 0;
}

.c888-cta-banner__btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    color: #1F1B2E;
}

/* ---------------------------------------------------------------
   Featured Article Section
--------------------------------------------------------------- */

.c888-featured-article {
    background-color: var(--c888-surface);
}

.c888-featured-article__card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--c888-spacing-2xl);
    align-items: center;
}

.c888-featured-article__image img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: var(--c888-radius-lg);
}

.c888-featured-article__content {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-md);
}

.c888-featured-article__title {
    font-size: var(--c888-font-size-2xl);
    font-weight: 700;
    line-height: 1.3;
}

.c888-featured-article__title a:hover {
    color: var(--c888-primary);
}

.c888-featured-article__excerpt {
    font-size: var(--c888-font-size-base);
    color: var(--c888-text-secondary);
    line-height: 1.7;
}

.c888-featured-article__read-more {
    align-self: flex-start;
}

/* ---------------------------------------------------------------
   Responsive — homepage sections
--------------------------------------------------------------- */

@media (max-width: 768px) {
    .c888-section {
        padding: var(--c888-spacing-xl) 0;
    }

    .c888-section__heading {
        margin-bottom: var(--c888-spacing-lg);
    }

    .c888-hero {
        min-height: 0;
    }

    .c888-hero__inner {
        padding-top: var(--c888-spacing-xl);
        padding-bottom: var(--c888-spacing-xl);
        gap: var(--c888-spacing-md);
    }

    .c888-hero__title {
        font-size: var(--c888-font-size-2xl);
    }

    .c888-hero__subtitle {
        font-size: var(--c888-font-size-base);
    }

    .c888-cta-banner__inner {
        flex-direction: column;
        text-align: center;
    }

    .c888-cta-banner__btn {
        width: 100%;
        justify-content: center;
    }

    .c888-featured-article__card {
        grid-template-columns: 1fr;
    }

    .c888-featured-article__image img {
        height: 240px;
    }
}

/* ---------------------------------------------------------------
   Category Posts section (5 posts: 1 big + 2 stacked smalls / 3 smalls)
--------------------------------------------------------------- */

.c888-section.c888-category-posts {
    padding: var(--c888-spacing-xl) 0;
}

/* 3-column grid — big spans 2 cols, right-col 1 col, bottom 3 auto-fill */
.c888-category-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--c888-spacing-md);
}

/* Big card: span 2 cols, stretch full row height */
.c888-category-posts__grid > .c888-post-card--featured:first-child,
.c888-category-posts__grid > .c888-post-card--placeholder:first-child {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

.c888-category-posts__grid > .c888-post-card--featured:first-child .c888-post-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.c888-category-posts__grid > .c888-post-card--featured:first-child .c888-post-card__image {
    flex: 1;
    aspect-ratio: unset;
}

.c888-category-posts__grid > .c888-post-card--featured:first-child .c888-post-card__image img,
.c888-category-posts__grid > .c888-post-card--featured:first-child .c888-post-card__image-placeholder {
    height: 100%;
    min-height: 300px;
}

/* Right column: 2 stacked equal smalls */
.c888-category-posts__right-col {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-md);
}

.c888-category-posts__right-col .c888-post-card--featured,
.c888-category-posts__right-col .c888-post-card--placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.c888-category-posts__right-col .c888-post-card--featured .c888-post-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.c888-category-posts__right-col .c888-post-card--featured .c888-post-card__image {
    flex: 1;
    aspect-ratio: unset;
}

.c888-category-posts__right-col .c888-post-card--featured .c888-post-card__image img,
.c888-category-posts__right-col .c888-post-card--featured .c888-post-card__image-placeholder {
    height: 100%;
    min-height: 130px;
}

/* Row 2: 3 equal smalls auto-placed (each spans 1 col) */
.c888-category-posts__grid > .c888-post-card--featured:nth-child(n+3) .c888-post-card__image img,
.c888-category-posts__grid > .c888-post-card--featured:nth-child(n+3) .c888-post-card__image-placeholder {
    height: 100%;
}

/* Responsive — slider on mobile */
@media (max-width: 768px) {
    .c888-section.c888-category-posts {
        padding: var(--c888-spacing-lg) 0;
    }

    /* Before JS initialises: hide overflow */
    .c888-category-posts__grid {
        display: block;
        overflow: hidden;
    }

    /* Stacked fallback (before/without the JS slider): even vertical gaps
       between every direct card — big card, right-col, and the bottom 3.
       The :not() keeps this off once the slider replaces the children with
       its track + dots. */
    .c888-category-posts__grid:not(.c888-cp-slider-active) > * + * {
        margin-top: var(--c888-spacing-md);
    }

    /* Slider track: horizontal flex strip */
    .c888-cp-slider__track {
        display: flex;
        transition: transform 0.4s ease;
    }

    /* Each slide fills the full container width */
    .c888-cp-slider__slide {
        flex: 0 0 100%;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    /* Card image inside slider — let 2/1 aspect-ratio from base rule apply */
    .c888-cp-slider__slide .c888-post-card__image img {
        height: 100%;
    }

    /* Dot indicators */
    .c888-cp-slider__dots {
        display: flex;
        justify-content: center;
        gap: 6px;
        padding: 10px 0 4px;
    }

    .c888-cp-slider__dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: transparent;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
        padding: 0;
        cursor: pointer;
        outline: none;
        transition: background 0.2s, box-shadow 0.2s;
    }

    .c888-cp-slider__dot.is-active {
        background: var(--c888-primary);
        box-shadow: inset 0 0 0 2px var(--c888-primary);
    }
}

/* --------------------------------------------------------------
   Category Posts — Desktop Carousel (.c888-cp-carousel)
   Shows 3 cards at once, prev/next arrows, dot indicators.
   -------------------------------------------------------------- */

.c888-cp-carousel {
    position: relative;
    overflow: hidden;
}

.c888-cp-carousel__track {
    display: flex;
    transition: transform 0.4s ease;
}

/* Disable the lift-on-hover inside the carousel — overflow:hidden would clip it */
.c888-cp-carousel .c888-post-card:hover {
    transform: none;
}

/* Each slide wrapper takes exactly 1/3 of the container and provides the gap */
.c888-cp-carousel__slide {
    flex: 0 0 calc(100% / 3);
    width: calc(100% / 3);
    padding: 0 8px;
    box-sizing: border-box;
}

/* Card inside the slide fills the padded area with visible rounded corners */
.c888-cp-carousel__slide .c888-post-card--featured {
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

/* Card image inside carousel — let 2/1 aspect-ratio from base rule apply */
.c888-cp-carousel__track .c888-post-card__image img {
    height: 100%;
}

/* Prev / Next buttons */
.c888-cp-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(19, 15, 30, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.c888-cp-carousel__btn:hover {
    background: var(--c888-primary);
    border-color: var(--c888-primary);
    transform: translateY(-50%) scale(1.08);
}


.c888-cp-carousel__btn svg {
    display: block;
    flex-shrink: 0;
}

.c888-cp-carousel__prev { inset-inline-start: 10px; }
.c888-cp-carousel__next { inset-inline-end: 10px; }

/* Dot indicators */
.c888-cp-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 0 4px;
}

.c888-cp-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c888-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.c888-cp-carousel__dot.is-active {
    background: var(--c888-primary);
}

/* On mobile: hide prev/next, let mobile slider handle it */
@media (max-width: 768px) {
    .c888-cp-carousel__btn { display: none; }

    .c888-cp-carousel__slide {
        flex: 0 0 100%;
        width: 100%;
        padding: 0;
    }
}

/* ==============================================================
   INTERIOR PAGE LAYOUT
   Shared by archive (archive.php, taxonomy-game_category.php)
   and single (single.php, single-game.php) templates.
   ============================================================== */

/* ---------------------------------------------------------------
   Page header — same padding for both archive title and post title
--------------------------------------------------------------- */

.c888-archive__header {
    padding: var(--c888-spacing-md) 0 var(--c888-spacing-sm);
}

.c888-single__header {
    padding: var(--c888-spacing-xs) 0 var(--c888-spacing-lg);
}

/* ---------------------------------------------------------------
   Page titles
--------------------------------------------------------------- */

.c888-archive__title,
.c888-single__title {
    font-weight: 700;
    color: var(--c888-text);
}

.c888-single__title {
    font-size: var(--c888-font-size-3xl);
}

/* Archive-specific title — compact */
.c888-archive__title {
    font-size: var(--c888-font-size-xl);
    margin: 0 0 4px;
    line-height: 1.2;
}

/* Single-specific title margin + line-height */
.c888-single__title {
    line-height: 1.25;
    margin: var(--c888-spacing-sm) 0 var(--c888-spacing-md);
}

/* Archive category description */
.c888-archive__description {
    font-size: var(--c888-font-size-base);
    color: var(--c888-text-secondary);
    line-height: 1.7;
    max-width: 680px;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ---------------------------------------------------------------
   Two-column layout — shared by archive and single
--------------------------------------------------------------- */

.c888-archive-layout,
.c888-single-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--c888-spacing-2xl);
    align-items: start;
    padding-bottom: var(--c888-spacing-3xl);
}

/* Grid items default to min-width:auto which lets wide children (tables,
   long-word text, iframes) push the track past the viewport. Pin to 0 so
   the column respects the layout's width. */
.c888-single__content,
.c888-single__sidebar {
    min-width: 0;
}

.c888-archive-layout--with-sidebar,
.c888-single-layout--with-sidebar {
    grid-template-columns: 1fr 300px;
}

/* ---------------------------------------------------------------
   Archive featured section (tri-card row above the posts list)
--------------------------------------------------------------- */

.c888-archive__featured {
    padding: var(--c888-spacing-3xl) 0;
    border-bottom: 1px solid var(--c888-border);
    margin-bottom: var(--c888-spacing-xl);
}

/* ---------------------------------------------------------------
   Posts list layout variant
--------------------------------------------------------------- */

/* Strip the generic .c888-section top padding so the list aligns
   with the top of the sidebar in the 2-column archive layout. */
.c888-archive__posts-list {
    padding-top: 0;
}

.c888-posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-lg);
}

.c888-posts-list .c888-post-card--list {
    display: flex;
    align-items: stretch;
    background: var(--c888-surface);
    border-radius: var(--c888-radius-lg);
    overflow: hidden;
}

.c888-posts-list .c888-post-card--list .c888-post-card__image {
    /* Proportional, not a fixed pixel basis: the thumbnail is 40% of the
       card so it scales with the column width (which now varies — the blog
       content is capped at 1200px). `aspect-ratio: 2/1` derives the height
       from that fluid width, keeping every list thumbnail the same shape. */
    flex: 0 0 40%;
    max-width: 480px;
    aspect-ratio: 2 / 1;
}

.c888-posts-list .c888-post-card--list .c888-post-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.c888-posts-list .c888-post-card--list .c888-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.c888-posts-list .c888-post-card--list .c888-post-card__content {
    flex: 1;
    min-width: 0;
    padding: var(--c888-spacing-sm) var(--c888-spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
}

.c888-posts-list .c888-post-card--list .c888-post-card__title {
    font-size: var(--c888-font-size-base);
    line-height: 1.3;
    margin: 0;
}

.c888-posts-list .c888-post-card--list .c888-post-card__excerpt {
    font-size: var(--c888-font-size-xs);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.c888-posts-list .c888-post-card--list .c888-post-card__date {
    font-size: var(--c888-font-size-xs);
}

.c888-posts-list .c888-post-card--list .c888-post-card__category {
    font-size: 10px;
    margin: 0;
}

/* "Read more" button on list cards (Posts Filter / archive lists). */
.c888-post-card__more {
    align-self: flex-start;
    margin-top: 8px;
    display: inline-block;
    padding: 7px 18px;
    border-radius: 999px;
    background: var(--c888-primary);
    color: #111;
    font-size: var(--c888-font-size-xs);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.18s ease;
}

.c888-post-card__more:hover {
    background: var(--c888-accent-hover);
}

/* ---------------------------------------------------------------
   Posts Filter module — category tabs + infinite scroll
   (the 888 "Best Articles" block)
--------------------------------------------------------------- */

/* No top padding so the heading/tabs align with the top of the sidebar banner
   in the 2-column archive layout. Two-class selector (.c888-section.c888-posts-filter)
   to beat the later generic `.c888-section { padding: …xl… }` rule; only the
   top/bottom are touched so the horizontal section inset is preserved. */
.c888-section.c888-posts-filter {
    padding-top: 0;
    padding-bottom: var(--c888-spacing-lg);
}

.c888-posts-filter__heading {
    margin-bottom: var(--c888-spacing-md);
}

.c888-posts-filter__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 4px;
    align-items: center;
    margin-bottom: var(--c888-spacing-lg);
    padding-bottom: var(--c888-spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.c888-posts-filter__tab {
    appearance: none;
    border: 0;
    background: transparent;
    /* Tabs render as <a> so the category archives are crawlable — see
       c888_render_section_posts_filter(). These two keep an anchor looking
       exactly like the <button> it replaced. */
    display: inline-block;
    text-decoration: none;
    color: var(--c888-text-secondary);
    font-family: inherit;
    font-size: var(--c888-font-size-sm);
    font-weight: 600;
    line-height: 1.2;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease;
}

.c888-posts-filter__tab:hover {
    color: var(--c888-text);
}

.c888-posts-filter__tab.is-active {
    color: #111;
    background: var(--c888-primary);
}

/* Posts Filter list cards: top-align content so the button sits naturally. */
.c888-posts-filter .c888-posts-list .c888-post-card--list .c888-post-card__content {
    justify-content: flex-start;
}

.c888-posts-filter__results {
    position: relative;
}

.c888-posts-filter__sentinel {
    width: 100%;
    height: 1px;
}

.c888-posts-filter__spinner {
    height: 0;
    overflow: hidden;
    margin: 0 auto;
    transition: height 0.18s ease;
}

.c888-posts-filter__results.is-loading .c888-posts-filter__spinner {
    height: 44px;
    margin-top: var(--c888-spacing-md);
    background: no-repeat center / 28px 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 50 50'%3E%3Cpath fill='%237BF037' d='M25 5a20 20 0 1 0 20 20h-4A16 16 0 1 1 25 9z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}

.c888-posts-filter__results.is-loading .c888-posts-filter__grid.is-switching {
    opacity: 0.4;
    transition: opacity 0.18s ease;
}

@media (max-width: 768px) {
    .c888-posts-filter__tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .c888-posts-filter__tab {
        padding: 7px 12px;
        font-size: var(--c888-font-size-xs);
    }
}

/* ---------------------------------------------------------------
   Pagination
--------------------------------------------------------------- */

.c888-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: var(--c888-spacing-sm);
    justify-content: center;
    padding: var(--c888-spacing-xl) 0;
}

.c888-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--c888-spacing-sm);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-sm);
    color: var(--c888-text);
    text-decoration: none;
    font-size: var(--c888-font-size-sm);
    transition: background var(--c888-transition-fast), border-color var(--c888-transition-fast);
}

.c888-pagination .page-numbers:hover,
.c888-pagination .page-numbers.current {
    background: var(--c888-primary);
    border-color: var(--c888-primary);
    color: #fff;
}

/* ==============================================================
   SINGLE POST TEMPLATE
   Layout + header rules are in INTERIOR PAGE LAYOUT above.
   ============================================================== */

/* ---------------------------------------------------------------
   Post meta
--------------------------------------------------------------- */

.c888-single__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--c888-spacing-sm);
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
}

.c888-single__meta-sep {
    opacity: 0.4;
}

/* ---------------------------------------------------------------
   Article body
--------------------------------------------------------------- */

.c888-single__featured-image {
    float: inline-start;
    width: 620px;
    max-width: 60%;
    margin-block: 0 var(--c888-spacing-md);
    margin-inline-end: var(--c888-spacing-xl);
    border-radius: var(--c888-radius-lg);
    overflow: hidden;
}

.c888-single__featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Text wraps around the floated image, but headings always start on their
   own line below it rather than squeezing into whatever width is left. */
.c888-single__body h2,
.c888-single__body h3,
.c888-single__body h4 {
    clear: inline-start;
}

@media (max-width: 600px) {
    .c888-single__featured-image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 var(--c888-spacing-xl);
    }
}

/* ---------------------------------------------------------------
   SEO game — hero banner
   The scraped 888 .static-herobanner image (post featured image),
   rendered full-width at the very top of the page above the
   breadcrumb. See single-seo_game.php.
--------------------------------------------------------------- */

.c888-game-hero {
    margin-bottom: var(--c888-spacing-lg);
    border-radius: var(--c888-radius-lg);
    overflow: hidden;
    line-height: 0;
    /* Pin every hero to the donor banners' native 1690x350 ratio so banners
       with odd source dimensions (e.g. 950x300) don't render taller. */
    aspect-ratio: 1690 / 350;
}

.c888-game-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    /* Fill the fixed-ratio box uniformly; off-ratio banners are cropped, not stretched. */
    object-fit: cover;
    object-position: center;
}

/* Casino CTA under the title */
.c888-seo-game__cta {
    margin: var(--c888-spacing-md) 0 var(--c888-spacing-xl);
}

.c888-single__body {
    font-size: var(--c888-font-size-base);
    line-height: 1.8;
    color: var(--c888-text);
}

.c888-single__body h2,
.c888-single__body h3,
.c888-single__body h4 {
    font-weight: 700;
    line-height: 1.3;
    margin: var(--c888-spacing-xl) 0 var(--c888-spacing-md);
    color: var(--c888-text);
}

.c888-single__body h2 { font-size: var(--c888-font-size-2xl); }
.c888-single__body h3 { font-size: var(--c888-font-size-xl); }
.c888-single__body h4 { font-size: var(--c888-font-size-lg); }

.c888-single__body p {
    margin-bottom: var(--c888-spacing-lg);
}

.c888-single__body ul,
.c888-single__body ol {
    margin-block: 0 var(--c888-spacing-lg);
    margin-inline-start: var(--c888-spacing-xl);
}

.c888-single__body ul {
    list-style: disc;
}

.c888-single__body ol {
    list-style: decimal;
}

.c888-single__body li {
    margin-bottom: var(--c888-spacing-xs);
}

/* Nested lists inside content list items */
.c888-single__body li ul,
.c888-single__body li ol {
    margin-block: var(--c888-spacing-xs) var(--c888-spacing-sm);
    margin-inline-start: var(--c888-spacing-lg);
}

.c888-single__body li ul {
    list-style: circle;
}

.c888-single__body li li ul {
    list-style: square;
}

.c888-single__body li ol {
    list-style: lower-alpha;
}

.c888-single__body a {
    color: var(--c888-primary);
    text-decoration: underline;
}

.c888-single__body a:hover {
    color: var(--c888-primary-hover);
}

.c888-single__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--c888-radius-md);
    margin: var(--c888-spacing-md) 0;
}

/* Captioned images: WordPress wraps these in <figure class="wp-caption">
   with an inline width (e.g. style="width: 1536px"). Cap it so the figure
   never overflows the content column. The inline style only sets `width`,
   so this max-width caps the rendered size without !important. */
.c888-single__body figure,
.c888-single__body .wp-caption {
    max-width: 100%;
    height: auto;
    margin: var(--c888-spacing-md) 0;
}

.c888-single__body figure img,
.c888-single__body .wp-caption img {
    margin: 0;
}

.c888-single__body figcaption,
.c888-single__body .wp-caption-text {
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
    text-align: center;
    margin-top: var(--c888-spacing-xs);
}

/* AI image credit — small left-aligned notice under every editorial image
   ("Visual creado con IA"). Inserted after each content image by the
   the_content filter and under featured images by the single templates. */
.c888-ai-credit {
    display: block;
    text-align: start;
    font-size: var(--c888-font-size-sm);
    line-height: 1.4;
    font-style: italic;
    color: var(--c888-text-secondary);
    margin: var(--c888-spacing-xs) 0 var(--c888-spacing-md);
}

/* Tuck the credit right under its image (kill the image's bottom margin when a
   credit immediately follows). Progressive enhancement — older browsers without
   :has() simply keep the default, slightly larger gap. */
.c888-single__body img:has(+ .c888-ai-credit),
.c888-single__body a:has(+ .c888-ai-credit),
.wc2026-single-match__content img:has(+ .c888-ai-credit),
.wc2026-single-match__content a:has(+ .c888-ai-credit),
.wc2026-single-team__content img:has(+ .c888-ai-credit),
.wc2026-single-team__content a:has(+ .c888-ai-credit) {
    margin-bottom: 0;
}

.c888-single__featured-image {
    position: relative;
}

.c888-single__featured-image .c888-ai-credit {
    margin-top: var(--c888-spacing-xs);
}

.c888-single__body blockquote {
    border-inline-start: 4px solid var(--c888-primary);
    padding-inline-start: var(--c888-spacing-lg);
    margin: var(--c888-spacing-xl) 0;
    color: var(--c888-text-secondary);
    font-style: italic;
}

.c888-single__body .table-scroll,
.c888-single__body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--c888-spacing-lg) 0;
}

.c888-single__body table {
    border-collapse: collapse;
}

.c888-single__body table th,
.c888-single__body table td {
    padding: var(--c888-spacing-sm) var(--c888-spacing-md);
    border: 1px solid var(--c888-border);
    text-align: start;
    vertical-align: top;
}

.c888-single__body table th {
    background: var(--c888-surface);
    font-weight: 700;
}

/* ---------------------------------------------------------------
   Game single (single-game.php) — content-first SEO pages
   Scraped 888 game reviews: prose + small screenshots + a "game
   stats" table whose cells are icon → label → value triplets.
--------------------------------------------------------------- */

/* Standalone screenshots — imported as bare <img> tags sitting inline
   in the running text. They're small natives (~360px wide, upscaling
   would blur them), so show them at natural size, centered, framed as
   a card instead of dumped against the left edge. Runs of adjacent
   screenshots are wrapped in an inline .c888-img-row flex span (see
   c888_game_group_content_images(), inc/seo-game.php) and laid out
   side by side. */
.c888-single--game .c888-single__body p > img.c888-content-img,
.c888-single--game .c888-single__body .c888-img-row img.c888-content-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: var(--c888-spacing-sm);
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-md);
}

/* Row of consecutive screenshots — horizontal on desktop, wraps back
   to a centered stack when the viewport can't fit them side by side. */
.c888-single--game .c888-single__body .c888-img-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--c888-spacing-md);
    margin: var(--c888-spacing-lg) 0;
}

.c888-single--game .c888-single__body .c888-img-row img.c888-content-img {
    margin: 0;
    max-width: 100%;
}

/* Game stats table → stat-card grid. Cell markup is:
   <td><img (48x34 icon)><p><b>Label</b></p><p><b>Value</b></p></td> */
.c888-single--game .c888-single__body table {
    display: table;          /* undo the generic block+scroll treatment */
    width: 100%;
    table-layout: fixed;     /* even columns regardless of cell content */
    border-collapse: separate;
    border-spacing: 6px;
}

.c888-single--game .c888-single__body table td {
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-md);
    text-align: center;
    vertical-align: top;
    padding: var(--c888-spacing-md);
}

/* Icon centered above the label, native 48px size, no photo frame */
.c888-single--game .c888-single__body table td img.c888-content-img {
    display: block;
    margin: 0 auto var(--c888-spacing-xs);
    border-radius: 0;
}

.c888-single--game .c888-single__body table td p {
    margin: 0;
}

/* Label — small, muted, uppercase */
.c888-single--game .c888-single__body table td p:first-of-type b {
    display: block;
    font-size: var(--c888-font-size-sm);
    font-weight: 600;
    color: var(--c888-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

/* Value — the emphasised line */
.c888-single--game .c888-single__body table td p + p b {
    font-weight: 700;
    color: var(--c888-text);
}

/* Small screens: fall back to the scrollable block table so a fixed
   full-width layout can't crush 3-column rows into unreadable slivers. */
@media (max-width: 600px) {
    .c888-single--game .c888-single__body table {
        display: block;
        width: auto;
        table-layout: auto;
    }
}

.c888-single__body iframe,
.c888-single__body video,
.c888-single__body embed,
.c888-single__body object {
    max-width: 100%;
}

.c888-single__body pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------
   Related posts section
--------------------------------------------------------------- */

.c888-single__related {
    padding: var(--c888-spacing-3xl) 0;
    border-top: 1px solid var(--c888-border);
}

/* ==============================================================
   BREADCRUMBS — all breadcrumb rules in one place
   ============================================================== */

/* Outer wrapper — controls spacing above/below breadcrumb trail */
.c888-breadcrumbs-wrap {
    padding: 0 0 var(--c888-spacing-xs);
    font-size: var(--c888-font-size-sm);
}

/* When breadcrumbs are inside the wrapper, let the wrapper own the spacing */
.c888-breadcrumbs-wrap .c888-breadcrumbs {
    padding: 0;
}

/* Standalone breadcrumbs (not inside wrapper) */
.c888-breadcrumbs {
    padding: var(--c888-spacing-sm) 0;
}

.c888-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
}

.c888-breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.c888-breadcrumbs__link {
    color: var(--c888-text-secondary);
    text-decoration: none;
    transition: color var(--c888-transition-fast);
}

.c888-breadcrumbs__link:hover {
    color: var(--c888-primary);
    text-decoration: underline;
}

.c888-breadcrumbs__link--accent {
    color: var(--c888-primary);
    font-weight: 600;
}

.c888-breadcrumbs__link--accent:hover {
    color: var(--c888-accent-hover, var(--c888-primary-hover, #9F67FF));
}

.c888-breadcrumbs__item--current span {
    color: var(--c888-primary);
    font-weight: 600;
}

.c888-breadcrumbs__sep {
    color: var(--c888-text-secondary);
    opacity: 0.5;
    font-size: 0.9em;
    user-select: none;
}

/* Light mode overrides */
.light-mode .c888-breadcrumbs__link           { color: var(--c888-light-text-secondary, #666); }
.light-mode .c888-breadcrumbs__link:hover     { color: var(--c888-primary); }
.light-mode .c888-breadcrumbs__item--current span { color: var(--c888-primary); }

/* ---------------------------------------------------------------
   Tri-card row (featured + related)
--------------------------------------------------------------- */

.c888-tri-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--c888-spacing-lg);
}

/* ---------------------------------------------------------------
   Sticky sidebar
--------------------------------------------------------------- */

/* Sidebar columns must stretch to the full grid height so sticky has room to scroll */
.c888-archive__sidebar,
.c888-single__sidebar {
    align-self: stretch;
    grid-column: 2;
}

.c888-sidebar-sticky {
    position: sticky;
    /* The sticky header is two rows (logo + nav ≈ 118px), taller than
       --c888-header-height (70px, the top row only). Use the real full-header
       height so the banner sticks BELOW the header instead of behind it. */
    top: calc(var(--c888-header-full) + var(--c888-spacing-md));
    max-height: calc(100vh - var(--c888-header-full) - var(--c888-spacing-xl));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--c888-border) transparent;
}

.c888-sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}

.c888-sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.c888-sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--c888-border);
    border-radius: 2px;
}

.c888-sidebar-banner__image img,
.c888-sidebar-banner__img {
    width: 100%;
    height: auto;
    border-radius: var(--c888-radius-md);
    display: block;
}

.c888-sidebar-banner__html {
    font-size: var(--c888-font-size-sm);
}

.c888-sidebar-banner__placeholder {
    border: 2px dashed var(--c888-border);
    border-radius: var(--c888-radius-md);
    padding: var(--c888-spacing-xl);
    text-align: center;
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
}

/* ---------------------------------------------------------------
   Table of Contents
--------------------------------------------------------------- */

.c888-toc {
    margin-top: var(--c888-spacing-lg);
    padding: var(--c888-spacing-md) var(--c888-spacing-lg);
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-md);
}

.c888-toc__title {
    font-size: var(--c888-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c888-text-secondary);
    margin: 0 0 var(--c888-spacing-md);
}

.c888-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    counter-reset: toc-counter;
}

.c888-toc__item {
    counter-increment: toc-counter;
}

.c888-toc__link {
    display: flex;
    align-items: baseline;
    gap: var(--c888-spacing-sm);
    padding: 5px 8px;
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
    border-inline-start: 2px solid transparent;
    border-start-end-radius: var(--c888-radius-sm);
    border-end-end-radius: var(--c888-radius-sm);
    text-decoration: none;
    line-height: 1.4;
    transition: color var(--c888-transition-fast),
                border-color var(--c888-transition-fast),
                background var(--c888-transition-fast);
}

.c888-toc__link::before {
    content: counter(toc-counter);
    flex-shrink: 0;
    font-size: var(--c888-font-size-xs);
    font-weight: 700;
    color: var(--c888-border);
    min-width: 16px;
    transition: color var(--c888-transition-fast);
}

.c888-toc__link:hover {
    color: var(--c888-text);
    background: rgba(124, 58, 237, 0.06);
    border-inline-start-color: var(--c888-border);
}

/* Active: currently in viewport */
.c888-toc__item.is-active > .c888-toc__link {
    color: var(--c888-primary);
    border-inline-start-color: var(--c888-primary);
    background: rgba(124, 58, 237, 0.08);
    font-weight: 600;
}

.c888-toc__item.is-active > .c888-toc__link::before {
    color: var(--c888-primary);
}

/* Passed: already scrolled past */
.c888-toc__item.is-passed > .c888-toc__link {
    color: var(--c888-text-secondary);
    border-inline-start-color: var(--c888-border);
    opacity: 0.55;
}

.c888-toc__item.is-passed > .c888-toc__link::before {
    content: '✓';
    color: var(--c888-primary);
    opacity: 0.6;
}

/* ---------------------------------------------------------------
   Mobile ToC accordion (hidden on desktop)
--------------------------------------------------------------- */

.c888-toc-mobile {
    display: none; /* shown only on mobile via media query below */
}

@media (max-width: 768px) {
    .c888-toc-mobile {
        display: block;
        margin: var(--c888-spacing-lg) 0;
        background: var(--c888-surface);
        border: 1px solid var(--c888-border);
        border-radius: var(--c888-radius-md);
        overflow: hidden;
    }

    .c888-toc-mobile__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: var(--c888-spacing-md) var(--c888-spacing-lg);
        background: transparent;
        border: none;
        color: var(--c888-text);
        font-size: var(--c888-font-size-sm);
        font-weight: 700;
        cursor: pointer;
        text-align: start;
        gap: var(--c888-spacing-sm);
    }

    .c888-toc-mobile__toggle:hover {
        background: rgba(124, 58, 237, 0.06);
    }

    /* Chevron arrow */
    .c888-toc-mobile__chevron {
        flex-shrink: 0;
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--c888-text-secondary);
        border-bottom: 2px solid var(--c888-text-secondary);
        transform: rotate(45deg);
        transition: transform var(--c888-transition-fast);
        margin-bottom: 3px;
    }

    .c888-toc-mobile.is-open .c888-toc-mobile__chevron {
        transform: rotate(-135deg);
        margin-bottom: -3px;
    }

    .c888-toc-mobile__body {
        padding: 0 var(--c888-spacing-md) var(--c888-spacing-md);
        border-top: 1px solid var(--c888-border);
    }

    /* Reuse .c888-toc__list / .c888-toc__item / .c888-toc__link inside accordion */
    .c888-toc-mobile .c888-toc__list {
        padding-top: var(--c888-spacing-sm);
    }
}

/* ---------------------------------------------------------------
   Post card placeholder (builder)
--------------------------------------------------------------- */

.c888-post-card--placeholder {
    border: 2px dashed var(--c888-border);
    border-radius: var(--c888-radius-lg);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------
   Responsive — interior page layout (archive + single)
--------------------------------------------------------------- */

@media (max-width: 1024px) {
    .c888-archive-layout--with-sidebar,
    .c888-single-layout--with-sidebar {
        grid-template-columns: 1fr 260px;
    }
}

@media (max-width: 768px) {
    .c888-archive-layout--with-sidebar,
    .c888-single-layout--with-sidebar,
    .c888-archive-layout,
    .c888-single-layout {
        grid-template-columns: 1fr;
        gap: var(--c888-spacing-lg);
    }

    /* Sidebar drops below the content column on mobile (single-column grid).
       Spacing comes from the grid gap above — no extra margin needed. */
    .c888-archive__sidebar,
    .c888-single__sidebar {
        grid-column: 1;
    }

    /* Desktop ToC panel is replaced by the mobile accordion (#c888-toc-mobile) */
    .c888-toc {
        display: none;
    }

    .c888-tri-cards {
        grid-template-columns: 1fr;
    }

    .c888-sidebar-sticky {
        position: static;
    }

    .c888-single__title {
        font-size: var(--c888-font-size-2xl);
    }

    .c888-archive__title {
        font-size: var(--c888-font-size-lg);
    }

    .c888-posts-list .c888-post-card--list {
        flex-direction: column;
    }

    .c888-posts-list .c888-post-card--list .c888-post-card__image {
        flex: 0 0 auto;
        width: 100%;
    }

}

/* ----------------------------------------------------------------
# FAQ Accordion
---------------------------------------------------------------- */

.c888-faq {
    padding: var(--c888-spacing-3xl) 0;
}

.c888-faq__list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--c888-border);
}

.c888-faq__item {
    border-bottom: 1px solid var(--c888-border);
}

.c888-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 0;
    background: none;
    border: none;
    color: var(--c888-text);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    gap: 1rem;
    transition: color 0.2s;
}

.c888-faq__question:hover {
    color: var(--c888-primary);
}

.c888-faq__icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    position: relative;
    border: 2px solid currentColor;
    border-radius: 50%;
    transition: color 0.2s;
}

.c888-faq__icon::before,
.c888-faq__icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.c888-faq__icon::before {
    width: 2px;
    height: 0.55rem;
    transition: opacity 0.2s, transform 0.2s;
}

.c888-faq__icon::after {
    width: 0.55rem;
    height: 2px;
}

.c888-faq__item.is-open .c888-faq__icon::before {
    opacity: 0;
}

.c888-faq__item.is-open .c888-faq__question {
    color: var(--c888-primary);
}

.c888-faq__answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding-bottom 0.3s ease;
    padding-bottom: 0;
    color: var(--c888-text-secondary);
    line-height: 1.75;
}

.c888-faq__item.is-open .c888-faq__answer {
    padding-bottom: 1.25rem;
}

.c888-faq__answer p:first-child { margin-top: 0; }
.c888-faq__answer p:last-child  { margin-bottom: 0; }

@media (max-width: 768px) {
    .c888-faq__question {
        font-size: 0.9375rem;
    }
}

/*--------------------------------------------------------------
# Language Switcher
--------------------------------------------------------------*/

/**
 * EXPLANATION:
 * The language switcher is a button + dropdown pattern used in both
 * the header (desktop) and the mobile menu footer row.
 * Today it is the English edition's EN → AR switcher (c888_lang_switcher() in
 * inc/edition.php); the markup is the Polylang-era c888_language_switcher().
 *
 * Structure:
 *   .c888-lang-switcher          wrapper (position: relative)
 *   ├── .c888-lang-switcher__toggle   trigger button
 *   │    ├── .c888-lang-switcher__flag   <img> flag
 *   │    ├── .c888-lang-switcher__code   2-letter slug ("ES", "AR")
 *   │    └── .c888-lang-switcher__arrow  chevron SVG
 *   └── .c888-lang-switcher__dropdown   floating <ul>
 *        └── .c888-lang-switcher__item  each language
 *             └── .c888-lang-switcher__link  <a>
 */

.c888-lang-switcher {
    position: relative;
}

/* Toggle button */
.c888-lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: var(--c888-radius-md);
    font-size: var(--c888-font-size-sm);
    font-weight: 600;
    color: var(--c888-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    transition: color var(--c888-transition-fast),
                border-color var(--c888-transition-fast),
                background-color var(--c888-transition-fast);
    white-space: nowrap;
}

.c888-lang-switcher__toggle:hover,
.c888-lang-switcher.is-open .c888-lang-switcher__toggle {
    color: var(--c888-text);
    border-color: var(--c888-border);
    background-color: var(--c888-surface);
}

/* Flag image inside toggle */
.c888-lang-switcher__flag img {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

/* Language code text */
.c888-lang-switcher__code {
    letter-spacing: 0.5px;
}

/* Chevron arrow */
.c888-lang-switcher__arrow {
    transition: transform var(--c888-transition-fast);
    flex-shrink: 0;
}

.c888-lang-switcher.is-open .c888-lang-switcher__arrow {
    transform: rotate(180deg);
}

/* Dropdown list */
.c888-lang-switcher__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    min-width: 160px;
    background-color: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-md);
    box-shadow: var(--c888-shadow-lg);
    z-index: 200;
    overflow: hidden;
    /* Hidden by default — JS adds .is-open to parent */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity var(--c888-transition-fast),
                transform var(--c888-transition-fast);
}

.c888-lang-switcher.is-open .c888-lang-switcher__dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Each language option */
.c888-lang-switcher__link {
    display: flex;
    align-items: center;
    gap: var(--c888-spacing-sm);
    padding: 10px var(--c888-spacing-md);
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text-secondary);
    transition: background-color var(--c888-transition-fast),
                color var(--c888-transition-fast);
}

.c888-lang-switcher__link:hover,
.c888-lang-switcher__item--active .c888-lang-switcher__link {
    background-color: var(--c888-secondary);
    color: var(--c888-text);
}

/* Language full name */
.c888-lang-switcher__name {
    flex: 1;
}

/* Checkmark for active language */
.c888-lang-switcher__check {
    flex-shrink: 0;
    color: var(--c888-primary);
}

/* Footer placement — dropdown opens upward */
.c888-lang-switcher--footer .c888-lang-switcher__dropdown {
    top: auto;
    bottom: calc(100% + 6px);
    inset-inline-end: 0;
}

/* Mobile placement — full-width inline list (no dropdown) */
.c888-lang-switcher--mobile {
    width: 100%;
}

.c888-lang-switcher--mobile .c888-lang-switcher__toggle {
    display: none; /* no toggle button needed — always expanded */
}

.c888-lang-switcher--mobile .c888-lang-switcher__dropdown {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-direction: row;
    gap: var(--c888-spacing-sm);
    padding: 0;
    min-width: 0;
}

.c888-lang-switcher--mobile .c888-lang-switcher__link {
    padding: 6px 10px;
    border-radius: var(--c888-radius-md);
    border: 1px solid var(--c888-border);
    font-size: var(--c888-font-size-sm);
}

.c888-lang-switcher--mobile .c888-lang-switcher__item--active .c888-lang-switcher__link {
    border-color: var(--c888-primary);
    color: var(--c888-primary);
    background: transparent;
}

/* The EN → AR switcher (English edition only, inc/edition.php) is rendered twice:
   a dropdown in the header's top row, and an inline row inside the burger menu.
   Exactly one shows per breakpoint. Below 900px the top row is already full,
   which is why that row hides the 888bet and help buttons there too. */
.c888-header__nav .c888-lang-switcher--mobile { display: none; }

@media (max-width: 900px) {
    .c888-header__top-right .c888-lang-switcher { display: none; }
    .c888-header__nav .c888-lang-switcher--mobile { display: block; padding: 12px 13px 14px; }
}

/* Footer legal bar — single definition covering sizing, typography, and flex layout */
.c888-footer__legal {
    max-width: var(--c888-container-max);
    margin: 0 auto;
    font-size: var(--c888-font-size-xs);
    color: var(--c888-text-secondary);
    text-align: center;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--c888-spacing-lg);
    flex-wrap: wrap;
}

.c888-footer__legal-left {
    flex: 1;
}

/*--------------------------------------------------------------
# RTL (Right-to-Left) Support — Arabic
--------------------------------------------------------------*/

/**
 * EXPLANATION:
 * When the active language is Arabic, WordPress adds dir="rtl" to the
 * <html> tag via language_attributes() in header.php. We target that
 * attribute to flip the layout without affecting LTR languages.
 *
 * Key things that need flipping:
 * 1. Navigation underline — starts from the right instead of left
 * 2. Header container — flex direction is auto-reversed by dir="rtl",
 *    but icon/button order needs explicit handling
 * 3. Mobile menu underline — same as nav underline
 * 4. Text alignment for centered/left-aligned elements
 * 5. Language switcher dropdown — opens to the left instead of right
 * 6. Footer legal bar — mirrors
 */

[dir="rtl"] .c888-nav-menu a::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .c888-mobile-nav-menu .current-menu-item a::after,
[dir="rtl"] .c888-mobile-nav-menu .current_page_item a::after {
    left: auto;
    right: 0;
}

/* Hamburger lines — keep visual alignment correct */
[dir="rtl"] .c888-header__menu-toggle {
    order: 1; /* push to right side of flex row */
}

[dir="rtl"] .c888-header__logo {
    order: 0;
}

/* Buttons — icon before text flips naturally with dir="rtl" */
[dir="rtl"] .c888-btn {
    flex-direction: row-reverse;
}

/* Store buttons in app download section */
[dir="rtl"] .c888-store-btn {
    flex-direction: row-reverse;
}

/* Game-card Play CTA — the ▶ glyph is directional.
   The flex order already places the icon on the leading (right) side in RTL,
   so only the glyph itself is wrong: a right-pointing triangle reads as
   "rewind/back" to an Arabic reader. Mirror it in CSS rather than swapping
   the character in game-card.php, so the markup stays direction-agnostic and
   an LTR build of this template still renders correctly. */
[dir="rtl"] .c888-game-card__play-icon {
    transform: scaleX(-1);
}

/* ==============================================================
   WC2026 PLUGIN — single-post theme override styles
   ============================================================== */

/* CTA button at bottom of article body */
.c888-single__cta-wrap {
    margin-top: var(--c888-spacing-2xl);
    text-align: center;
}

.c888-single__cta-btn {
    padding: var(--c888-spacing-md) var(--c888-spacing-2xl);
    font-size: var(--c888-font-size-base);
}

/* Sidebar: related entity list (match / team / group) */
.wc2026-sidebar-related {
    margin-top: var(--c888-spacing-xl);
    padding: var(--c888-spacing-lg);
    background: var(--c888-surface);
    border-radius: var(--c888-radius-md);
    border: 1px solid var(--c888-border);
}

.wc2026-sidebar-related__title {
    font-size: var(--c888-font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c888-text-secondary);
    margin: 0 0 var(--c888-spacing-md);
}

.wc2026-sidebar-related__group + .wc2026-sidebar-related__group {
    margin-top: var(--c888-spacing-md);
    padding-top: var(--c888-spacing-md);
    border-top: 1px solid var(--c888-border);
}

.wc2026-sidebar-related__subtitle {
    font-size: var(--c888-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c888-primary);
    margin: 0 0 var(--c888-spacing-sm);
}

.wc2026-sidebar-related__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-sm);
}

.wc2026-sidebar-related__item a {
    display: block;
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text);
    padding: var(--c888-spacing-xs) 0;
    border-bottom: 1px solid var(--c888-border);
    transition: color var(--c888-transition-fast);
}

.wc2026-sidebar-related__item:last-child a {
    border-bottom: none;
}

.wc2026-sidebar-related__item a:hover {
    color: var(--c888-primary);
}

/* Light mode overrides */
.light-mode .wc2026-sidebar-related {
    background: var(--c888-light-surface, #F5F5F5);
    border-color: rgba(0,0,0,0.1);
}

.light-mode .wc2026-sidebar-related__item a {
    color: var(--c888-light-text, #1F1B2E);
    border-color: rgba(0,0,0,0.08);
}

.light-mode .wc2026-sidebar-related__group + .wc2026-sidebar-related__group {
    border-top-color: rgba(0,0,0,0.1);
}

/* ---------------------------------------------------------------
   Banner + Post section
--------------------------------------------------------------- */

.c888-banner-post__grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--c888-spacing-md);
    align-items: stretch;
}

.c888-banner-post__banner {
    border-radius: var(--c888-radius-md, 8px);
    overflow: hidden;
    position: relative;
    /* img/placeholder are absolutely positioned so they don't contribute to
       grid row sizing — the right-column post card sets the row height instead */
}

.c888-banner-post__banner a {
    display: block;
    position: absolute;
    inset: 0;
}

.c888-banner-post__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.c888-banner-post__placeholder {
    position: absolute;
    inset: 0;
    background: var(--c888-surface);
    border: 2px dashed var(--c888-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c888-text-secondary);
    border-radius: var(--c888-radius-md, 8px);
    padding: var(--c888-spacing-lg);
    text-align: center;
}

.c888-banner-post__post {
    display: flex;
    flex-direction: column;
}

.c888-banner-post__post .c888-post-card--featured {
    flex: 1;
}

.c888-banner-post__post .c888-post-card--featured .c888-post-card__image img,
.c888-banner-post__post .c888-post-card--featured .c888-post-card__image-placeholder {
    height: 180px;
}

@media (max-width: 768px) {
    .c888-banner-post__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   WC2026 Team Data Tables (Key Facts / Last 5 / Top Players)
   Rendered on /copa-mundial-2026/selecciones/{team}/ from the uploads CSVs.
   ========================================================================== */
.c888-team-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-md);
    overflow: hidden;
    font-size: var(--c888-font-size-sm);
    color: var(--c888-text);
}

.c888-team-table th,
.c888-team-table td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--c888-border);
}

.c888-team-table tr:last-child th,
.c888-team-table tr:last-child td {
    border-bottom: 0;
}

.c888-team-table thead th {
    background: color-mix(in srgb, var(--c888-primary) 14%, transparent);
    color: var(--c888-text);
    font-weight: 600;
    white-space: nowrap;
}

/* Key Facts is a two-column label/value table */
.c888-team-table--facts th {
    width: 42%;
    color: var(--c888-text-secondary);
    font-weight: 600;
}

.c888-team-table--last5 td:nth-child(2),
.c888-team-table--last5 td:nth-child(4) {
    white-space: nowrap;
}

.c888-team-table__result {
    font-weight: 700;
}

.c888-team-table__result--w { color: #22c55e; }
.c888-team-table__result--l { color: #ef4444; }
.c888-team-table__result--d { color: var(--c888-text-secondary); }

.c888-team-table__player {
    font-weight: 600;
    color: var(--c888-text);
}

@media (max-width: 600px) {
    .c888-team-table {
        font-size: var(--c888-font-size-xs);
    }

    .c888-team-table th,
    .c888-team-table td {
        padding: 8px 10px;
    }

    .c888-team-table--facts th {
        width: 46%;
    }
}

/* ==========================================================================
   WC2026 Match Data Sections (Comparison / Head-to-Head / Last 5 / Players)
   Rendered on /copa-mundial-2026/partidos/{match}/. Comparison/last5/players
   are derived from the team CSVs; H2H/preview come from uploads/matches.csv.
   Reuses .c888-team-table for the table chrome.
   ========================================================================== */
.c888-match-data {
    margin-top: 28px;
}

.c888-match-section {
    margin: 28px 0;
}

.c888-match-section__title {
    font-size: var(--c888-font-size-lg, 1.25rem);
    color: var(--c888-text);
    margin: 0 0 14px;
}

.c888-match-preview {
    color: var(--c888-text);
    line-height: 1.7;
}

.c888-match-bottom-content {
    color: var(--c888-text);
    line-height: 1.7;
    margin-top: 32px;
}

/* ── Horizontal-overflow guard for the single match page ──────────────────
   iOS Safari ignores overflow-x on html/body, so clip on the page container
   itself (a normal element it DOES respect). Scoped to the match page. */
.wc2026-single-match {
    overflow-x: clip;
    max-width: 100%;
}

/* Remove the overflow SOURCE too, so it can't overflow even where clip is
   unsupported: the venue/kickoff pills are white-space:nowrap (plugin) and can
   be very long ("MetLife Stadium, East Rutherford, New Jersey"), forcing the
   header grid's center column wider than a narrow phone. Let them wrap. */
.wc2026-single-match .wc2026-single-match__meta-pills .wc2026-single-match__pill {
    white-space: normal;
    max-width: 100%;
}

/* ── Match scoreboard: stage title + before/after results ──────────────────
   Theme styling for the restructured centre column (wc2026/single-match.php):
   a stage/group title on top, the meta pills, then the big value (kickoff time
   "before", final score "after"), then a status sub-label — "Full time" once
   the match is FINISHED, the date before kickoff. Mirrors the plugin's
   __score / __finished-label treatment so it adapts to light + dark themes. */
.wc2026-single-match__stage-title {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .2px;
    color: #f0f0f8;
    margin-bottom: 2px;
}
.wc2026-single-match__stage-title a {
    color: inherit;
    text-decoration: none;
}
.wc2026-single-match__stage-title a:hover {
    text-decoration: underline;
}
body.light-mode .wc2026-single-match .wc2026-single-match__stage-title {
    color: #0d0d1a;
}

/* "Before" kickoff time — promote to the same prominence as the final score
   (the plugin styles it small + purple; the design wants it big + dark). */
.wc2026-single-match .wc2026-single-match__kickoff-time {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    color: #f0f0f8;
}
body.light-mode .wc2026-single-match .wc2026-single-match__kickoff-time {
    color: #0d0d1a;
}

/* Status sub-label beneath the big value ("Full time" / date / live). */
.wc2026-single-match__status-sub {
    font-size: .8rem;
    font-weight: 600;
    color: #666680;
    margin-top: 2px;
}
body.light-mode .wc2026-single-match .wc2026-single-match__status-sub {
    color: #888899;
}

/* Read the score as "1 - 2": widen the separator spacing a touch. */
.wc2026-single-match .wc2026-single-match__score-sep {
    padding: 0 10px;
}

/* Goal scorers row (full width, below the header grid): home scorers right-
   aligned, away left-aligned, single ball icon centred (flashscore-style).
   Only output when at least one side has input — see wc2026/single-match.php. */
.wc2026-single-match__scorers {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    max-width: 520px;
    width: 100%;
    margin: 10px auto 0;
    font-size: .82rem;
    line-height: 1.5;
    color: #666680;
}
.wc2026-single-match__scorers-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
}
.wc2026-single-match__scorers-col--home {
    align-items: flex-end;
    text-align: right;
}
.wc2026-single-match__scorers-col--away {
    align-items: flex-start;
    text-align: left;
}
.wc2026-single-match__scorers-icon {
    flex: 0 0 auto;
    font-size: .95rem;
    line-height: 1.5;
    opacity: .6;
}
body.light-mode .wc2026-single-match .wc2026-single-match__scorers {
    color: #555566;
}

@media (max-width: 680px) {
    .wc2026-single-match .wc2026-single-match__kickoff-time { font-size: 2rem; }
    .wc2026-single-match__scorers { gap: 10px; font-size: .78rem; }
}

/* And let any long token in the derived tables wrap rather than overflow. */
.wc2026-single-match__content .c888-team-table td,
.wc2026-single-match__content .c888-team-table th {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* The WC2026 plugin styles `th` inside .wc2026-single-*__content as
   text-transform:uppercase + white-space:nowrap, which leaks into our derived
   tables and stops long labels from wrapping (overflow on mobile). Override it
   with higher specificity so our match tables can wrap and fit. */
.wc2026-single-match__content .c888-team-table th {
    white-space: normal;
}

.wc2026-single-match__content .c888-match-compare th[scope="row"] {
    letter-spacing: normal;
}

/* --- Editorial lists inside team content ---
   The global reset (ul, ol { list-style: none }) strips bullets, so the
   editorial copy in the team content column renders as unstyled lists.
   Restore proper disc/decimal lists here, matching .c888-single__body.
   Scoped to .wc2026-single-team__content — the derived data is in <table>s
   and the "related matches" list lives in the sidebar, so neither is hit. */
.wc2026-single-team__content ul,
.wc2026-single-team__content ol {
    margin: 0 0 var(--c888-spacing-lg) var(--c888-spacing-xl);
    padding: 0;
}

.wc2026-single-team__content ul {
    list-style: disc;
}

.wc2026-single-team__content ol {
    list-style: decimal;
}

.wc2026-single-team__content li {
    margin-bottom: var(--c888-spacing-xs);
    line-height: 1.7;
}

.wc2026-single-team__content li ul,
.wc2026-single-team__content li ol {
    margin: var(--c888-spacing-xs) 0 var(--c888-spacing-sm) var(--c888-spacing-lg);
}

.wc2026-single-team__content li ul {
    list-style: circle;
}

.wc2026-single-team__content li li ul {
    list-style: square;
}

.wc2026-single-team__content li ol {
    list-style: lower-alpha;
}

/* --- Team comparison (3-column: label | home | away) --- */
/* Fixed layout + wrapping so the 3 columns always fit the viewport on mobile
   instead of long values (coach names, clubs, "Campeón (…)") forcing overflow. */
.c888-match-compare {
    table-layout: fixed;
}

.c888-match-compare th,
.c888-match-compare td {
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Column widths come from the header row under table-layout: fixed. */
.c888-match-compare thead th:first-child {
    width: 32%;
}

/* Override the base .c888-team-table thead nowrap so team names can wrap. */
.c888-match-compare thead th {
    white-space: normal;
}

.c888-match-compare tbody th[scope="row"] {
    text-align: left;
    color: var(--c888-text-secondary);
    font-weight: 600;
}

.c888-match-compare__team {
    vertical-align: middle;
}

/* Flex wrapper keeps the flag and the country name side by side and
   vertically centered; the name wraps within its own column instead of
   dropping onto a new line below the flag. */
.c888-match-compare__team-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.c888-match-compare__team-inner > span {
    font-weight: 700;
    text-align: left;
}

.c888-match-compare__flag {
    flex: none;
    width: 28px;
    height: auto;
    border-radius: var(--c888-radius-sm);
}

/* --- Recent-form badges --- */
.c888-match-form {
    display: inline-flex;
    gap: 4px;
    justify-content: center;
}

.c888-match-form__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--c888-radius-sm);
    font-size: var(--c888-font-size-xs);
    font-weight: 700;
    color: #fff;
}

.c888-match-form__badge--w { background: #22c55e; }
.c888-match-form__badge--l { background: #ef4444; }
.c888-match-form__badge--d { background: var(--c888-text-secondary); }
.c888-match-form__none { color: var(--c888-text-secondary); }

/* --- Head-to-head --- */
.c888-match-h2h__summary {
    color: var(--c888-text);
    font-weight: 600;
    margin: 0 0 14px;
}

/* --- Two-column blocks (last 5 + players) --- */
.c888-match-last5,
.c888-match-players {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.c888-match-last5__team,
.c888-match-players__team {
    font-size: var(--c888-font-size-base, 1rem);
    color: var(--c888-text);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .c888-match-last5,
    .c888-match-players {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .c888-match-compare thead th:first-child {
        width: 30%;
    }

    /* Tighter cells so three columns fit comfortably on narrow screens. */
    .wc2026-single-match__content .c888-match-compare th,
    .wc2026-single-match__content .c888-match-compare td,
    .c888-match-compare th,
    .c888-match-compare td {
        padding: 7px 6px;
        font-size: var(--c888-font-size-xs);
        line-height: 1.35;
        letter-spacing: normal;
    }

    .c888-match-compare__flag {
        width: 20px;
    }

    .c888-match-form {
        flex-wrap: wrap;
        gap: 3px;
    }

    .c888-match-form__badge {
        width: 18px;
        height: 18px;
    }
}

/*--------------------------------------------------------------
# Back to Top button (floating, desktop + mobile)
--------------------------------------------------------------*/
.c888-back-to-top {
    position: fixed;
    inset-inline-end: 20px;
    bottom: 20px;
    z-index: 990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--c888-primary);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease,
                background-color .2s ease;
}

.c888-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.c888-back-to-top:hover {
    background: var(--c888-primary-hover, var(--c888-accent-hover));
}

.c888-back-to-top:focus-visible {
    outline: 2px solid var(--c888-primary-hover, var(--c888-accent-hover));
    outline-offset: 2px;
}

.c888-back-to-top svg {
    display: block;
}

@media (max-width: 768px) {
    .c888-back-to-top {
        inset-inline-end: 14px;
        bottom: 14px;
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .c888-back-to-top {
        transform: none;
        transition: opacity .2s ease, visibility .2s ease, background-color .2s ease;
    }
}

/* ============================================================================
   888-style casino grid — game tiles, grid, hero, section header
   Built as our own components, matching the captured 888 layout.
   ============================================================================ */

.c888-hero {
    background: linear-gradient(180deg, #1d1d1d 0%, var(--c888-secondary) 100%);
    padding: var(--c888-spacing-2xl) var(--c888-container-padding);
    text-align: center;
    border-bottom: 1px solid var(--c888-border);
}
.c888-hero__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 .5rem;
    color: var(--c888-text);
}
.c888-hero__subtitle { color: var(--c888-text-secondary); margin: 0 auto; max-width: 680px; }
.c888-hero__cta {
    display: inline-block; margin-top: var(--c888-spacing-lg);
    background: var(--c888-primary); color: var(--c888-on-primary);
    font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
    padding: 14px 34px; border-radius: 8px; text-decoration: none;
    transition: background var(--c888-transition-fast), transform var(--c888-transition-fast);
}
.c888-hero__cta:hover { background: var(--c888-primary-hover); transform: translateY(-1px); }

/* Section header (e.g. "Slots", "Live Casino") with a green accent rule */
.c888-section { padding: var(--c888-spacing-xl) var(--c888-container-padding); max-width: var(--c888-container-max); margin: 0 auto; }
.c888-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--c888-spacing-md); }
.c888-section__title {
    font-size: 1.15rem; font-weight: 800; color: var(--c888-text); margin: 0;
    padding-left: 12px; border-left: 4px solid var(--c888-primary); line-height: 1.1;
}
.c888-section__more { color: var(--c888-primary); font-weight: 700; font-size: .85rem; text-decoration: none; }
.c888-section__more:hover { color: var(--c888-primary-hover); }

/* Game grid */
.c888-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
@media (min-width: 1024px) { .c888-game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

/* Game tile — circular art to match 888casino's lobby style */
/* Game tile — square with rounded corners */
.c888-game-card { display: flex; flex-direction: column; gap: 10px; }
.c888-game-card__art {
    position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden;
    background: transparent;
    transition: transform var(--c888-transition-fast), box-shadow var(--c888-transition-fast);
}
.c888-game-card:hover .c888-game-card__art {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 0 0 2px rgba(123,240,55,.25);
}
.c888-game-card__link {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 6px; box-sizing: border-box;
}
.c888-game-card__img {
    display: block;
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    object-fit: contain;
    transition: transform var(--c888-transition-normal);
}
.c888-game-card__placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 800; color: var(--c888-text-secondary);
    background: transparent;
}
/* Hover: zoom + reveal gold Play CTA over dark scrim */
.c888-game-card__play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8);
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--c888-accent-gold); color: #1a1a1a;
    font-weight: 800; text-transform: uppercase; font-size: .85rem; letter-spacing: .04em;
    padding: 10px 22px; border-radius: 999px; text-decoration: none;
    opacity: 0; transition: opacity var(--c888-transition-fast), transform var(--c888-transition-fast);
    z-index: 2; white-space: nowrap;
}
.c888-game-card__play-icon { font-size: .75em; }
.c888-game-card__art::after {
    content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.52);
    opacity: 0; transition: opacity var(--c888-transition-fast); z-index: 1;
}
.c888-game-card:hover .c888-game-card__img { transform: scale(1.06); }
.c888-game-card:hover .c888-game-card__art::after { opacity: 1; }
.c888-game-card:hover .c888-game-card__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
/* Game title: hidden by default, revealed as a caption over the art on hover
   (desktop) or when JS adds .is-active on tap (mobile). pointer-events:none so
   it never intercepts the card's link/Play taps. */
.c888-game-card__name {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 16px 8px 8px;
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%);
    color: #fff; font-size: .82rem; font-weight: 600; line-height: 1.25;
    text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(6px);
    transition: opacity var(--c888-transition-fast), transform var(--c888-transition-fast);
    z-index: 3; pointer-events: none;
}
.c888-game-card:hover .c888-game-card__name,
.c888-game-card.is-active .c888-game-card__name {
    opacity: 1; transform: translateY(0);
}
/* SEO-enabled games render this as a real <a> to the game's on-site page
   (see template-parts/game-card.php) — it needs its own clicks/focus, unlike
   the plain <span> above whose taps are meant to fall through to the card. */
a.c888-game-card__name {
    pointer-events: auto; text-decoration: none; display: block;
}
a.c888-game-card__name:focus-visible {
    opacity: 1; transform: translateY(0); outline: 2px solid var(--c888-accent-gold); outline-offset: -2px;
}
/* On tap-reveal (mobile), also surface the scrim + Play CTA so the first tap
   gives the same affordance hover does on desktop. */
.c888-game-card.is-active .c888-game-card__art::after { opacity: 1; }
.c888-game-card.is-active .c888-game-card__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ============================================================================
   888-style shell — top bar + left sidebar + content + rich footer
   ============================================================================ */
:root { --c888-chrome: #1b1b1b; --c888-chrome-2: #141414; --c888-topbar-h: 60px; --c888-sidebar-w: 210px; }

body { background: var(--c888-secondary); color: var(--c888-text); margin: 0; }

/* ---- Top bar ---- */
.c888-topbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: 18px;
    height: var(--c888-topbar-h); padding: 0 16px;
    background: var(--c888-chrome); border-bottom: 1px solid var(--c888-border);
}
.c888-topbar__left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.c888-topbar__logo .c888-logo,
.c888-topbar__logo a { font-size: 1.6rem; font-weight: 900; color: #fff; text-decoration: none; letter-spacing: .02em; }
.c888-topbar__logo img { max-height: 30px; width: auto; }
.c888-topbar__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.c888-topbar__burger span { width: 22px; height: 2px; background: #fff; display: block; }

.c888-search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px;
    background: var(--c888-chrome-2); border: 1px solid var(--c888-border); border-radius: 999px; padding: 0 14px; height: 38px; color: var(--c888-text-secondary); }
.c888-search input { flex: 1; background: none; border: 0; outline: none; color: var(--c888-text); font-size: .9rem; }
.c888-search input::placeholder { color: var(--c888-text-secondary); }

.c888-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.c888-topbar__tab { display: inline-flex; align-items: center; gap: 6px; color: var(--c888-text); text-decoration: none;
    font-weight: 700; font-size: .8rem; letter-spacing: .04em; padding: 8px 10px; opacity: .85; }
.c888-topbar__tab:hover { opacity: 1; color: var(--c888-primary); }
.c888-topbar__signup, .c888-topbar__login {
    display: inline-flex; align-items: center; height: 38px; padding: 0 20px; border-radius: 999px;
    font-weight: 800; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
.c888-topbar__signup { background: var(--c888-accent-gold); color: #1a1a1a; }
.c888-topbar__signup:hover { filter: brightness(1.07); }
.c888-topbar__login { background: var(--c888-primary); color: var(--c888-on-primary); }
.c888-topbar__login:hover { background: var(--c888-primary-hover); }

/* ---- Shell ---- */
.c888-shell { display: flex; align-items: flex-start; }

/* ---- Sidebar ---- */
.c888-sidebar {
    position: sticky; top: var(--c888-topbar-h); flex: 0 0 var(--c888-sidebar-w); width: var(--c888-sidebar-w);
    height: calc(100vh - var(--c888-topbar-h)); overflow-y: auto;
    background: var(--c888-chrome-2); border-right: 1px solid var(--c888-border); padding: 14px 10px; }
.c888-sidebar__account { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 16px; border-bottom: 1px solid var(--c888-border); margin-bottom: 10px; }
.c888-sidebar__avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--c888-surface); color: var(--c888-text-secondary); }
.c888-sidebar__login { display: block; width: 100%; text-align: center; background: var(--c888-primary); color: var(--c888-on-primary);
    font-weight: 800; text-transform: uppercase; font-size: .8rem; padding: 9px 0; border-radius: 6px; text-decoration: none; }
.c888-sidebar__login:hover { background: var(--c888-primary-hover); }
.c888-sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.c888-sidebar__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
    color: var(--c888-text-secondary); text-decoration: none; font-size: .9rem; font-weight: 600; border-left: 3px solid transparent; }
.c888-sidebar__item:hover { background: var(--c888-surface); color: var(--c888-text); }
.c888-sidebar__item.is-active { color: var(--c888-primary); background: rgba(123,240,55,.08); border-left-color: var(--c888-primary); }
.c888-sidebar__icon { flex-shrink: 0; }

/* ---- Content column ---- */
.c888-content { flex: 1 1 auto; min-width: 0; }
.c888-content .c888-main { display: block; }

/* ---- Rich footer ---- */
.c888-footer { background: var(--c888-chrome-2); border-top: 1px solid var(--c888-border); margin-top: 40px; }
.c888-footer__inner { max-width: none; margin: 0; padding: 36px 20px; }
.c888-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--c888-border); }
.c888-footer__col-title { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c888-text); margin: 0 0 12px; }
.c888-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.c888-footer__col a { color: var(--c888-text-secondary); text-decoration: none; font-size: .85rem; }
.c888-footer__col a:hover { color: var(--c888-primary); }
.c888-footer__logos { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 22px 0; border-bottom: 1px solid var(--c888-border); }
.c888-logo-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; height: 40px; padding: 0 14px;
    background: #fff; color: #333; border-radius: 6px; font-weight: 700; font-size: .8rem; }
.c888-logo-chip--license { background: var(--c888-surface); color: var(--c888-text-secondary); border: 1px solid var(--c888-border); }
.c888-footer__responsible { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--c888-surface); border-radius: 8px; padding: 14px 18px; margin: 22px 0; }
.c888-footer__safe { font-weight: 800; letter-spacing: .04em; color: var(--c888-text); }
.c888-footer__age { font-weight: 900; color: var(--c888-accent-gold); border: 2px solid var(--c888-accent-gold); border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; }
.c888-footer__legal { color: var(--c888-text-secondary); font-size: .75rem; line-height: 1.6; }

/* ---- Responsive: sidebar off-canvas on mobile ---- */
@media (max-width: 900px) {
    .c888-topbar__burger { display: flex; }
    .c888-search { max-width: none; }
    .c888-topbar__tab { display: none; }
    .c888-sidebar { position: fixed; left: 0; top: var(--c888-topbar-h); z-index: 90; transform: translateX(-100%); transition: transform .25s ease; }
    body.c888-sidebar-open .c888-sidebar { transform: translateX(0); }
    .c888-content { width: 100%; }
}

/* ============================================================================
   GCC layout — horizontal top nav header + welcome-bonus footer bar
   (overrides the earlier sidebar shell; markup now uses .c888-header__bar etc.)
   ============================================================================ */
.c888-header { position: sticky; top: 0; z-index: 100; background: #0d0d0d; border-bottom: 1px solid var(--c888-border); }
.c888-header__bar { display: flex; align-items: center; gap: 16px; height: 58px; max-width: none; margin: 0; padding: 0 18px; }
.c888-header__logo { font-size: 1.7rem; font-weight: 900; letter-spacing: .02em; color: var(--c888-accent-gold); text-decoration: none; flex-shrink: 0; }
.c888-header__logo:hover { filter: brightness(1.1); }

.c888-header__nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.c888-header__nav::-webkit-scrollbar { display: none; }
.c888-header__tab { position: relative; white-space: nowrap; color: var(--c888-text-secondary); text-decoration: none;
    font-size: .85rem; font-weight: 600; padding: 19px 12px; }
.c888-header__tab:hover { color: var(--c888-text); }
.c888-header__tab.is-active { color: var(--c888-primary); }
.c888-header__tab.is-active::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 3px; background: var(--c888-primary); border-radius: 0 0 3px 3px; }

.c888-header__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.c888-btn-signup, .c888-btn-login {
    display: inline-flex; align-items: center; height: 36px; padding: 0 20px; border-radius: 999px;
    font-weight: 800; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
.c888-btn-signup { background: var(--c888-accent-gold); color: #1a1a1a; }
.c888-btn-signup:hover { filter: brightness(1.07); }
/* LOG IN button styles defined below in the full button block */

.c888-header__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.c888-header__burger span { width: 22px; height: 2px; background: #fff; display: block; }

/* Welcome-bonus bar (footer top) */
.c888-footer__welcome { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap;
    background: #111; border-bottom: 1px solid var(--c888-border); padding: 18px 20px; }
.c888-footer__welcome-text { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; justify-content: center; }
.c888-footer__welcome-text strong { color: var(--c888-text); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.c888-footer__welcome-text span { color: var(--c888-primary); font-weight: 800; font-size: 1.05rem; }
.c888-footer__join { background: var(--c888-accent-gold); color: #1a1a1a; font-weight: 800; text-transform: uppercase;
    padding: 11px 26px; border-radius: 999px; text-decoration: none; font-size: .8rem; letter-spacing: .03em; }
.c888-footer__join:hover { filter: brightness(1.07); }
.c888-vip-badge { color: var(--c888-accent-gold); font-weight: 900; font-size: 1.5rem; }
.c888-vip-badge em { color: var(--c888-text); font-style: normal; font-size: .9rem; vertical-align: super; }

/* Full-width content (no sidebar in GCC layout) */
.c888-main { display: block; width: 100%; }

@media (max-width: 900px) {
    .c888-header__burger { display: flex; order: -1; }
    .c888-header__nav { position: fixed; left: 0; right: 0; top: 58px; flex-direction: column; background: #0d0d0d;
        padding: 8px 12px; border-bottom: 1px solid var(--c888-border); transform: translateY(-120%); transition: transform .25s ease; overflow: visible; }
    body.c888-nav-open .c888-header__nav { transform: translateY(0); }
    .c888-header__tab { padding: 12px; width: 100%; }
    .c888-header__tab.is-active::before { left: 0; top: auto; bottom: 0; right: auto; width: 3px; height: 100%; }
}

/* ============================================================================
   GCC header v2 — two rows (logo+auth / icon nav). Overrides earlier header.
   ============================================================================ */
:root { --c888-accent-orange: #FF5A1F; }

.c888-header { position: sticky; top: 0; z-index: 100; background: #0d0d0d; border-bottom: 1px solid var(--c888-border); }

/* Row 1 */
.c888-header__top { display: flex; align-items: center; gap: 16px; max-width: none; margin: 0; padding: 8px 24px 4px; }
.c888-header__logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; text-decoration: none; flex-shrink: 0; }
.c888-brand-888 { color: var(--c888-primary); font-weight: 900; font-size: 1.8rem; letter-spacing: .01em; }
.c888-brand-sub { color: var(--c888-primary); font-size: .55rem; letter-spacing: .08em; text-transform: lowercase; margin-top: 2px; }

.c888-header__top-right { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.c888-header__bet { color: var(--c888-accent-orange); font-weight: 900; font-size: 1.05rem; text-decoration: none; letter-spacing: .01em; }
.c888-header__bet span { font-size: .7em; font-weight: 800; }
.c888-header__icobtn { background: none; border: 0; color: var(--c888-text-secondary); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.c888-header__icobtn:hover { color: var(--c888-text); }
.c888-btn-signup { display: inline-flex; align-items: center; height: 36px; padding: 0 22px; border-radius: 999px;
    background: var(--c888-accent-gold); color: #1a1a1a; font-weight: 800; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
.c888-btn-signup:hover { filter: brightness(1.07); }
.c888-btn-login { display: inline-flex; align-items: center; height: 36px; padding: 0 22px; border-radius: 999px;
    background: transparent; border: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.85);
    font-weight: 800; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
.c888-btn-login:hover { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.06); }

/* Row 2 — icon nav */
.c888-header__nav { display: flex; align-items: center; gap: 4px; max-width: 2028px; margin: 0 auto; padding: 2px 20px 8px; overflow-x: auto; scrollbar-width: none; }
.c888-header__nav::-webkit-scrollbar { display: none; }
.c888-header__tab { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; text-decoration: none;
    color: var(--c888-text-secondary); font-size: .82rem; font-weight: 600; padding: 8px 12px; border-radius: 6px; }
.c888-header__tab-icon { flex-shrink: 0; }
.c888-header__tab:hover { color: var(--c888-text); background: rgba(255,255,255,.04); }
.c888-header__tab.is-active { color: var(--c888-primary); }
.c888-header__tab--bet { color: var(--c888-accent-orange); }
.c888-header__tab--bet:hover { color: var(--c888-accent-orange); }

.c888-header__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.c888-header__burger span { width: 22px; height: 2px; background: #fff; display: block; }

@media (max-width: 900px) {
    /* The nav row goes position:fixed below, so it leaves the flow and the
       header shrinks to its top row (~71px). Anything that offsets itself by
       the full header height (sticky sidebars: .c888-sidebar-sticky,
       .c888-legal-nav) must follow, or it floats with a dead 47px gap. */
    :root { --c888-header-full: 71px; }
    .c888-header__burger { display: flex; }
    .c888-header__nav { position: fixed; left: 0; right: 0; top: 56px; flex-direction: column; align-items: stretch;
        background: #0d0d0d; border-bottom: 1px solid var(--c888-border); transform: translateY(-120%); transition: transform .25s ease; }
    body.c888-nav-open .c888-header__nav { transform: translateY(0); }
    .c888-header__bet, .c888-header__icobtn { display: none; }
}

/* ============================================================================
   GCC header polish — fix hover color, stray active bar, spacing
   ============================================================================ */
.c888-header__top { padding: 11px 18px 7px; }
.c888-header__nav { padding: 4px 14px 0; gap: 2px; }
.c888-header__tab { position: relative; padding: 9px 13px 13px; color: #d8d8d8; }
/* hover: turn green, no grey box */
.c888-header__tab:hover { color: var(--c888-primary); background: none; }
.c888-header__tab.is-active { color: var(--c888-primary); }
/* kill the stray top bar inherited from the earlier single-row header block */
.c888-header__tab.is-active::before { display: none !important; }
/* clean active underline at the bottom of the nav row */
.c888-header__tab.is-active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0;
    height: 3px; background: var(--c888-primary); border-radius: 3px 3px 0 0; }
/* 888bet cross-sell keeps its orange on hover */
.c888-header__tab--bet, .c888-header__tab--bet:hover { color: var(--c888-accent-orange); }
/* Per-item custom color — set via --tab-color inline style */
.c888-header__tab--colored                  { color: var(--tab-color) !important; }
.c888-header__tab--colored:hover            { color: var(--tab-color) !important; opacity: .85; }
.c888-header__tab--colored.is-active        { color: var(--tab-color) !important; }
.c888-header__tab--colored.is-active::after { background: var(--tab-color) !important; }

/* ============================================================================
   Homepage rebuild — full-width header, banner slider, filter bar,
   category icons, and game strips (888-style casino front page).
   ============================================================================ */

/* ---- Header: full-width bar, items stuck to the edges ----
   The header spans edge-to-edge and the logo/auth hug the left/right sides;
   only the page content below is centered (see .c888-home). */
:root { --c888-content-max: 2028px; }
/* Old single-row header CSS pinned a fixed 70px height, which clipped the
   second (nav) row and let it spill onto the banner — let it grow to fit. */
.c888-header { height: auto; }
.c888-header__top,
.c888-header__nav { max-width: none; margin-left: 0; margin-right: 0; }
.c888-header__top { padding-left: 28px; padding-right: 28px; }
/* Nav starts at the leading edge (aligned under the logo), not centered. */
.c888-header__nav { padding-inline-start: 18px; padding-inline-end: 28px; justify-content: flex-start; }

/* Homepage is a centered column; sections manage their own inner padding. */
.c888-main { width: 100%; }
.c888-home { max-width: var(--c888-content-max); margin: 0 auto; padding-bottom: 40px; }

/* ---------------------------------------------------------------------------
   Banner slider
--------------------------------------------------------------------------- */
.c888-banner-slider { position: relative; margin: 16px 24px 24px; border-radius: 14px; overflow: hidden; }
.c888-banner-slider__viewport { overflow: hidden; }
.c888-banner-slider__track { display: flex; transition: transform .5s ease; }
/* The creative is handed in as --c888-slide-bg (and optionally --c888-slide-bg-m)
   inline per slide rather than as an inline background-image, so that the mobile
   rule further down can actually override it — an inline background-image would
   outrank any stylesheet. The #111 base shows through for a slide with no image. */
.c888-banner-slider__slide { position: relative; flex: 0 0 100%; min-height: 300px; display: block;
    background-color: #111; background-image: var(--c888-slide-bg, none);
    background-size: cover; background-position: center; text-decoration: none; }
/* Mobile slides are taller than the old 220px so the copy can scale up without
   the panel running out of vertical room — see the mobile block further down. */
@media (max-width: 768px) { .c888-banner-slider__slide { min-height: 240px; } }
.c888-banner-slider__inner { position: relative; z-index: 2; max-width: 600px;
    padding: 36px 44px; display: flex; flex-direction: column; gap: 8px; height: 100%;
    /* Plain block boxes don't shift with dir=rtl on their own — force the
       reading-direction start (right in RTL) explicitly so "Right" in the
       builder is really right, and the --left modifier below has a real
       opposite state to flip to. */
    margin-inline-end: auto; }
/* Per-slide override: pushes the text panel to the opposite side of the
   slide (e.g. artwork on one side, copy on the other). */
.c888-banner-slider__inner--left { margin-inline-end: 0; margin-inline-start: auto; }
.c888-banner-slider__eyebrow { color: #fff; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.c888-banner-slider__title { color: #fff; font-size: 2rem; font-weight: 900; line-height: 1.1; margin: 0; text-transform: uppercase; }
.c888-banner-slider__highlight { color: var(--c888-primary); }
.c888-banner-slider__subtitle { color: #fff; font-size: 1.05rem; font-weight: 700; text-transform: uppercase; }
.c888-banner-slider__cta { align-self: flex-start; margin-top: 14px; display: inline-flex; align-items: center;
    background: var(--c888-accent-gold); color: #1a1a1a; font-weight: 800; text-transform: uppercase;
    letter-spacing: .03em; font-size: .85rem; padding: 12px 28px; border-radius: 999px; text-decoration: none;
    box-shadow: 0 0 0 0 rgba(252,228,3,.5); animation: c888-glow 1.8s ease-in-out infinite; }
@keyframes c888-glow { 50% { box-shadow: 0 0 18px 2px rgba(252,228,3,.45); } }
.c888-banner-slider__cta:hover { background: #ffe040; color: #1a1a1a; }
/* Tablet / small laptop. The 600px panel is sized for a ~1377px slide, where it
   takes ~44% and leaves the artwork clear. The banner images are
   background-size: cover, so as the slide narrows the artwork is cropped inward
   and its own baked-in lettering marches toward the text panel — while the
   panel keeps its full 600px. By ~1360px they collide and the copy sits on top
   of the picture. Shrink the panel across this range (and step the type down to
   match) so the title still fits on one line but the artwork keeps its half. */
@media (min-width: 769px) and (max-width: 1360px) {
    .c888-banner-slider__inner { max-width: 370px; padding: 28px 30px; }
    .c888-banner-slider__eyebrow { font-size: .95rem; }
    .c888-banner-slider__title { font-size: 1.6rem; }
    .c888-banner-slider__subtitle { font-size: .95rem; }
}
@media (max-width: 768px) {
    .c888-banner-slider { margin: 10px 12px 18px; }

    /* NB: the slide keeps the base `background-position: center`. Shifting the
       crop sideways to free up room for the copy was tried and reverted — the
       creatives are ~3380x560 panoramas (6:1) and `cover` leaves only about a
       quarter of that width visible on a phone, so moving the window even a few
       percent pushes the character (the whole point of the artwork) off-frame.
       Centre stays; the panel is kept narrow instead, below. */

    /* Narrow panel, big type. ~42% keeps the copy clear of the character on the
       far side of the slide while still reading large, which is the look the
       reference banners have. The 170px floor matters: 42% of a 360px phone is
       only ~135px, which snaps the title to three lines and wraps the CTA
       label onto two — so below ~430px the panel stops shrinking and takes
       proportionally more of the slide. The 300px ceiling stops it sprawling as
       the tablet handover approaches. Sizes are fluid (vw) rather than stepped
       per breakpoint so the copy holds one optical weight from a 360px phone up
       to 768px instead of jumping at 430px, and the clamp ceilings hand over
       cleanly to the 769px+ rules. Vertically centred — the taller slide leaves
       slack now. */
    .c888-banner-slider__inner { max-width: clamp(170px, 42%, 300px); padding: 18px 16px;
        gap: 4px; justify-content: center; }
    .c888-banner-slider__eyebrow  { font-size: clamp(13px, 4.0vw, 22px); }
    .c888-banner-slider__title    { font-size: clamp(22px, 7.0vw, 40px); }
    .c888-banner-slider__subtitle { font-size: clamp(12px, 3.8vw, 20px); }

    /* At this size the longest lines reach the edge of the narrow panel and
       cross onto the artwork — on the welcome slides the title lands on the
       gold bell, green-on-gold, which is the one genuinely unreadable pairing
       here. A shadow buys that legibility back without widening the panel or
       moving the crop (both already rejected). Mobile only: the desktop panel
       is wide enough that the copy never reaches the artwork. */
    .c888-banner-slider__eyebrow,
    .c888-banner-slider__title,
    .c888-banner-slider__subtitle { text-shadow: 0 2px 12px rgba(0,0,0,.75), 0 1px 3px rgba(0,0,0,.6); }

    /* Full-bleed CTA: on a phone the button is the whole point of the slide, so
       it fills the panel instead of hugging its label. `align-self` has to be
       overridden explicitly — the base rule pins it to flex-start. */
    .c888-banner-slider__cta { align-self: stretch; justify-content: center; text-align: center;
        font-size: clamp(12px, 3.1vw, 15px); padding: 12px 18px; margin-top: 12px; }
}

/* ---------------------------------------------------------------------------
   Per-slide mobile creative
   ---------------------------------------------------------------------------
   Everything in the 768px block above is damage control for showing a
   ~3380x560 panorama on a phone: `cover` leaves roughly a quarter of its width
   visible, so the panel is kept narrow and the type is shadowed to survive
   landing on the artwork. A slide that supplies its own portrait-friendly
   creative (the donor ships 1120x760) needs none of that — the artwork is
   already composed for this shape and normally has the offer copy baked in.

   Note the breakpoint: 600px, not the 768px used everywhere else. A ~1.47:1
   creative suits a narrow portrait viewport, but 601-768px is landscape phones
   and small tablets, whose shape the panorama actually fits better — and
   forcing the portrait creative in there means either a ~500px-tall banner or
   cropping the baked-in copy off the sides. Handing that range back to the
   (already tuned) panorama rules above avoids both.

   The image arrives as an inline --c888-slide-bg-m custom property on the slide
   (see c888_render_banner_slider_section). Only this rule reads it, so a
   desktop never fetches the mobile file and a phone never fetches the panorama:
   the browser resolves url() lazily, per matched declaration. */
@media (max-width: 600px) {
    .c888-banner-slider__slide--has-mobile {
        background-image: var(--c888-slide-bg-m);
        /* The ratio travels with the image (--c888-slide-bg-m-ratio, set inline
           per slide) because mobile creatives are not one shape: the donor's
           homepage heroes are 1120x760 while its inner-page strips are 414x105.
           The fallback is the hero ratio, used only if a creative was stored
           before its dimensions were recorded. */
        aspect-ratio: var(--c888-slide-bg-m-ratio, 112 / 76);
    }

    /* A creative the shared track height would zoom-crop (a wide inner strip in
       a slider whose tallest slide is a portrait hero). Letterboxing shows it
       whole against the slide's own #111 ground; PHP decides which slides get
       this, since only it can compare every creative's ratio. */
    .c888-banner-slider__slide--mobile-contain {
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    /* Slides are flex items sharing one track, so the track takes the height of
       the tallest — which is what we want, each creative asking for its own
       height. But a slide *without* a mobile creative would keep the 240px floor
       from the block above and force everything else into a letterbox, cropping
       the offer copy off the sides of the artwork. Zero the floor across the
       whole slider so only real creatives set the height. */
    .c888-banner-slider--has-mobile .c888-banner-slider__slide { min-height: 0; }

    /* Artwork carries its own copy: printing the overlay text on top would
       duplicate the offer. The CTA still has to render — it is the only
       interactive part of the slide — so the panel collapses to just the
       button, pinned low the way the donor lays it out. */
    .c888-banner-slider__slide--mobile-art-only .c888-banner-slider__eyebrow,
    .c888-banner-slider__slide--mobile-art-only .c888-banner-slider__title,
    .c888-banner-slider__slide--mobile-art-only .c888-banner-slider__subtitle {
        display: none;
    }
    .c888-banner-slider__slide--mobile-art-only .c888-banner-slider__inner {
        justify-content: flex-end;
        /* Clear of the dots, which sit 12px off the bottom. */
        padding-bottom: 34px;
    }
}
/* prev/next */
.c888-banner-slider__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
    background: rgba(0,0,0,.45); color: #fff; }
.c888-banner-slider__nav:hover { background: rgba(0,0,0,.7); }
.c888-banner-slider__prev { inset-inline-start: 14px; }
.c888-banner-slider__next { inset-inline-end: 14px; }
/* Phones: the arrows float at the slide's vertical middle — exactly where the
   copy sits once it moves to the edge — and padding the text clear of them
   just leaves it stranded in a gutter. Hide them; the track handles swipe
   (main.js) and the dots still give direct access. Must come *after* the
   display:grid above, not in the earlier max-width block, or source order
   keeps the arrows visible. */
@media (max-width: 768px) { .c888-banner-slider__nav { display: none; } }
.c888-banner-slider__dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3;
    display: flex; justify-content: center; gap: 8px; }
.c888-banner-slider__dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255,255,255,.5); }
.c888-banner-slider__dot.is-active { background: var(--c888-primary); }
/* builder: slider shows normally — auto-advance previews all slides.
   Nav prev/next dimmed because the builder click handler intercepts them anyway. */
body.c888-builder-active .c888-banner-slider__nav { opacity: .35; pointer-events: none; }

/* ---------------------------------------------------------------------------
   Game filter bar
--------------------------------------------------------------------------- */
.c888-game-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 6px 24px 18px; }
.c888-game-filters__select { position: relative; }
.c888-game-filters__select select {
    appearance: none; -webkit-appearance: none; background: var(--c888-surface);
    color: var(--c888-text); border: 1px solid var(--c888-border); border-radius: 8px;
    padding-block: 10px; padding-inline: 14px 38px; font-size: .9rem; font-weight: 600; cursor: pointer; min-width: 190px; }
.c888-game-filters__select::after { content: "▾"; position: absolute; inset-inline-end: 14px; top: 50%;
    transform: translateY(-50%); pointer-events: none; color: var(--c888-text-secondary); font-size: .8rem; }
.c888-game-filters__search { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex: 1; max-width: 360px;
    background: var(--c888-surface); border: 1px solid var(--c888-border); border-radius: 8px; padding: 0 14px; height: 42px; }
.c888-game-filters__search svg { flex-shrink: 0; color: var(--c888-text-secondary); }
.c888-game-filters__search input { flex: 1; background: none; border: 0; outline: none; color: var(--c888-text); font-size: .9rem; }
.c888-game-filters__search input::placeholder { color: var(--c888-text-secondary); }
@media (max-width: 768px) {
    .c888-game-filters { padding: 6px 12px 14px; }
    .c888-game-filters__select select { min-width: 0; flex: 1; width: 100%; }
    .c888-game-filters__search { margin-inline-start: 0; max-width: none; flex-basis: 100%; }
}

/* ---------------------------------------------------------------------------
   Category icons strip
--------------------------------------------------------------------------- */
.c888-cat-icons { padding: 16px 24px 28px; }
/* Desktop: centered wrap — icons are 150px, no CSS bg/border (webp images have built-in dark bg) */
.c888-cat-icons__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
.c888-cat-icons__item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px;
    text-decoration: none; width: clamp(100px, 14vw, 240px); }
.c888-cat-icons__art { width: clamp(100px, 14vw, 240px); height: clamp(100px, 14vw, 240px); border-radius: 50%; overflow: hidden;
    background: transparent; border: none; display: grid; place-items: center;
    transition: transform var(--c888-transition-fast), filter var(--c888-transition-fast); }
.c888-cat-icons__item:hover .c888-cat-icons__art { transform: translateY(-5px) scale(1.05); filter: brightness(1.12); }
.c888-cat-icons__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c888-cat-icons__placeholder { font-size: 5rem; font-weight: 800; color: var(--c888-text-secondary);
    width: clamp(100px, 14vw, 240px); height: clamp(100px, 14vw, 240px); display: grid; place-items: center;
    background: var(--c888-surface-2); border-radius: 50%; }
.c888-cat-icons__label { color: var(--c888-text); font-size: 1.05rem; font-weight: 700; text-align: center;
    line-height: 1.3; white-space: normal; overflow: hidden; text-overflow: ellipsis; max-width: clamp(100px, 14vw, 240px); }
/* Mobile ≤768px: force exactly 6 equal columns, always one row */
@media (max-width: 768px) {
    .c888-cat-icons { padding: 6px 8px 14px; }
    .c888-cat-icons__row {
        display: grid !important;
        /* minmax(0, 1fr), not plain 1fr: a bare 1fr track's implicit minimum is
           "auto", which respects each cell's min-content width. Labels use
           white-space:nowrap, so a longer label (e.g. a long Arabic term name)
           would force its whole column wider and squeeze the rest unevenly. */
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 5px !important;
        flex-wrap: unset;
    }
    .c888-cat-icons__item { width: 100%; min-width: 0; flex: unset; }
    .c888-cat-icons__art {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        min-width: 0;
    }
    .c888-cat-icons__placeholder {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        font-size: 1.1rem; min-width: 0;
    }
    .c888-cat-icons__label {
        font-size: 0.6rem;
        max-width: 100%; white-space: nowrap;
        overflow: hidden; text-overflow: ellipsis;
    }
}
/* Hide on mobile when toggled off in builder */
@media (max-width: 768px) {
    .c888-cat-icons--hide-mobile { display: none !important; }
}

/* ---------------------------------------------------------------------------
   Deposit hub card grid (/banking/deposit/) — mirrors the donor
   "deposit-withdrawal-cards" component (inc/deposit-cards.php). Icon webps carry
   their own dark background, so the card itself stays transparent like the
   homepage category icons.
--------------------------------------------------------------------------- */
.c888-deposit-cards { margin: 28px 0 8px; }
.c888-deposit-cards__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.c888-deposit-cards__item {
    display: flex; flex-direction: column; gap: 12px;
    text-decoration: none;
    transition: transform var(--c888-transition-fast), filter var(--c888-transition-fast);
}
.c888-deposit-cards__img-wrap {
    display: block; width: 100%; aspect-ratio: 360 / 190;
    border-radius: var(--c888-radius-md); overflow: hidden;
}
.c888-deposit-cards__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c888-deposit-cards__item:hover { transform: translateY(-5px); filter: brightness(1.1); }
.c888-deposit-cards__label {
    color: var(--c888-text); font-size: 1.02rem; font-weight: 700;
    text-align: center; line-height: 1.3;
}
@media (max-width: 1024px) {
    .c888-deposit-cards__grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (max-width: 680px) {
    .c888-deposit-cards__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .c888-deposit-cards__label { font-size: 0.85rem; }
}

/* ---------------------------------------------------------------------------
   Game strips (per-category horizontal rows, 14 tiles)
--------------------------------------------------------------------------- */
.c888-game-strip { position: relative; padding: 18px 32px 28px; }
.c888-game-strip__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.c888-game-strip__title { font-size: 1.4rem; font-weight: 800; color: var(--c888-text); margin: 0;
    padding-inline-start: 14px; border-inline-start: 5px solid var(--c888-primary); line-height: 1.1; }
.c888-game-strip__more { color: var(--c888-primary); font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.c888-game-strip__more:hover { color: var(--c888-primary-hover); }
.c888-game-strip__more span { color: var(--c888-text-secondary); font-weight: 600; }
/* Two rows of seven tiles (14), exactly like the 888 lobby. The 14 cards
   flow column-first so the first 7 fill the top row and the next 7 the
   bottom row. */
.c888-game-strip__row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 22px;
}
/* Prevent grid cell blowout on long game titles or wide images */
.c888-game-strip__row > * { min-width: 0; }
@media (max-width: 1300px) { .c888-game-strip__row { grid-template-columns: repeat(5, 1fr); gap: 18px; } }
@media (max-width: 1000px) { .c888-game-strip__row { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (max-width: 768px)  { .c888-game-strip { padding: 10px 16px 18px; }
                             .c888-game-strip__row { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 480px)  { .c888-game-strip__row { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* builder affordance for the new sections */
body.c888-builder-active [data-c888-section] { position: relative; outline: 1px dashed rgba(123,240,55,.4); outline-offset: -1px; cursor: pointer; }
body.c888-builder-active [data-c888-section]:hover { outline-color: var(--c888-primary); }

/*--------------------------------------------------------------
# SEO Content Block
# Appears at the bottom of every page template — homepage,
# category archives, single posts/pages/games.
--------------------------------------------------------------*/

.c888-seo-content {
    padding: 52px 0 56px;
    border-top: 1px solid var(--c888-border);
    background-color: var(--c888-surface);
}

.c888-seo-content__heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c888-text);
    margin: 0 0 24px;
    line-height: 1.3;
}

/* ── Two-column layout — full content always visible ── */
.c888-seo-content__body {
    column-count: 2;
    column-gap: 52px;
    color: var(--c888-text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Keep headings, paragraphs, list ITEMS and tables from breaking mid-element.
   Deliberately NOT ul/ol themselves: scraped 888 content contains link lists
   with 100+ items — forbidding a break inside the whole list forces the entire
   list into one column and destroys the two-column balance. Lists may split
   between items; each item stays whole. */
.c888-seo-content__body h2,
.c888-seo-content__body h3,
.c888-seo-content__body h4,
.c888-seo-content__body p,
.c888-seo-content__body li,
.c888-seo-content__body table {
    break-inside: avoid;
}

/* Don't let a heading be orphaned at the very bottom of a column */
.c888-seo-content__body h2,
.c888-seo-content__body h3,
.c888-seo-content__body h4 {
    break-after: avoid;
}

/* ── Typography ── */
.c888-seo-content__body p { margin: 0 0 14px; }
.c888-seo-content__body p:last-child { margin-bottom: 0; }

.c888-seo-content__body h2,
.c888-seo-content__body h3,
.c888-seo-content__body h4 {
    color: var(--c888-text);
    font-weight: 700;
    margin: 22px 0 9px;
    line-height: 1.3;
}
.c888-seo-content__body h2 { font-size: 1.05rem; }
.c888-seo-content__body h3 { font-size: 0.95rem; }
.c888-seo-content__body h4 { font-size: 0.875rem; }

.c888-seo-content__body ul,
.c888-seo-content__body ol { padding-inline-start: 22px; margin: 0 0 14px; }
.c888-seo-content__body ul { list-style: disc; }
.c888-seo-content__body ol { list-style: decimal; }
.c888-seo-content__body li { margin-bottom: 5px; list-style: inherit; }

.c888-seo-content__body strong { color: var(--c888-text); font-weight: 600; }

/* Links — site green */
.c888-seo-content__body a {
    color: #7df700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.c888-seo-content__body a:hover { color: #a2ff33; }

/* ── Table — stays inside its column, alternating rows ── */
.c888-seo-content__body table {
    width: 100%;
    max-width: 530px;
    border-collapse: collapse;
    margin: 16px 0 20px;
    font-size: 0.82rem;
    border-radius: 8px;
    overflow: hidden;
}

.c888-seo-content__body table td,
.c888-seo-content__body table th {
    padding: 9px 12px;
    text-align: start;
    border: none;
}

/* Header row — darkest */
.c888-seo-content__body table tr:first-child {
    background-color: #2a2a2a;
    color: #fff;
}
.c888-seo-content__body table tr:first-child td {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Odd data rows — dark */
.c888-seo-content__body table tr:nth-child(odd):not(:first-child) {
    background-color: #373737;
    color: #fff;
}

/* Even data rows — white */
.c888-seo-content__body table tr:nth-child(even) {
    background-color: #fff;
    color: #1a1a1a;
}

/* ── "Explore our games" — internal links to SEO game pages ──
   Sits below the two-column body on game_category archives. Rendered as a
   compact multi-column link list so up to 20 links don't stack in one
   viewport-tall column. */
.c888-seo-content__games-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c888-text);
    margin: 32px 0 12px;
    line-height: 1.3;
}

.c888-seo-content__games-list {
    column-count: 4;
    column-gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.8;
}

.c888-seo-content__games-list li {
    break-inside: avoid;
    margin: 0 0 6px;
}

.c888-seo-content__games-list a {
    color: #7df700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.c888-seo-content__games-list a:hover { color: #a2ff33; }

/* ── Mobile — single column ── */
@media (max-width: 1024px) {
    .c888-seo-content__games-list { column-count: 2; }
}
@media (max-width: 768px) {
    .c888-seo-content__body { column-count: 1; }
    .c888-seo-content__games-list { column-count: 1; }
}

/* ── Light mode ── */
body.light-mode .c888-seo-content {
    background-color: var(--c888-light-surface, #F5F5F5);
    border-top-color: rgba(0,0,0,.08);
}

/* ============================================================================
   888-style footer (GCC edition) — complete rewrite
   Matches 888casino.com layout: offer bar → collapsible columns →
   logo tiles → legal text. Mobile sticky bar overlays at bottom.
   ============================================================================ */

/* ── Reset any old .c888-footer rules that conflict ── */
.c888-footer {
    background: #000000;
    color: #fff;
    padding: var(--c888-spacing-3xl) 0 0;  /* top gap belongs to the footer (its bg fills it) */
    border-top: none !important;  /* offer box has its own border; no double line */
    margin-top: 0;
    font-size: .82rem;
}

/* ─────────────────────────────────────────────────────────
   ① Welcome bonus offer bar — compact, matches header height feel
───────────────────────────────────────────────────────── */

.c888-footer__offer {
    background: #171717;
    border-radius: 0 0 6px 6px;  /* flat top, rounded bottom */
    border: 2px solid #2e2e2e;
    border-top: none;
    margin: 0 16px 16px;  /* no top margin — sits flush with footer top */
    padding: 24px 28px 32px;  /* extra bottom for T&C */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.c888-footer__offer-content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    flex-wrap: wrap;
}

.c888-footer__offer-text {
    flex: 1;
    min-width: 240px;
}

.c888-footer__offer-t1 {
    display: block;
    color: #fff;
    font-weight: 300;
    text-transform: uppercase;
    font-size: 1.4rem;
    letter-spacing: .06em;
}

.c888-footer__offer-t2 {
    display: block;
    color: var(--c888-primary, #7BF037);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.9rem;
    line-height: 1.15;
    letter-spacing: .01em;
}

.c888-footer__offer-cta { flex-shrink: 0; text-align: center; }

.c888-footer__offer-btn {
    display: inline-block;
    background: var(--c888-primary, #7BF037);
    color: #111;
    font-weight: 900;
    font-size: 1rem;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    min-width: 10em;
    text-align: center;
    transition: filter .2s;
}
.c888-footer__offer-btn:hover { filter: brightness(1.1); }

.c888-footer__offer-tc {
    position: absolute;
    inset-inline-end: 14px;
    bottom: 8px;
}
.c888-footer__offer-tc a {
    color: #555;
    text-decoration: underline;
    font-size: .72rem;
}

/* ─────────────────────────────────────────────────────────
   ② Collapsible nav columns
───────────────────────────────────────────────────────── */

.c888-footer__cols {
    padding: 0 16px;
    margin-top: 0;
    border-top: none !important;
    border-bottom: none !important;
}

@media (min-width: 1280px) {
    .c888-footer__cols {
        display: flex;
        flex-direction: row;
        gap: 32px;
        padding: 20px 24px;
        margin-top: 0;
    }
}

.c888-footer__col-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.c888-footer__col {
    border-bottom: 1px solid #2e2e2e;
    position: relative;
}

@media (min-width: 1280px) {
    .c888-footer__col { border-bottom: none; flex: 1; }
}

.c888-footer__col-handle label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    cursor: pointer;
    padding: 10px 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .08em;
    line-height: 1;
}

.c888-footer__col-handle label::after {
    content: "+";
    color: #777;
    font-size: 14px;
    font-weight: 400;
    transition: transform .2s ease;
    flex-shrink: 0;
}

.c888-footer__col-toggle:checked + .c888-footer__col-handle label::after {
    transform: rotate(135deg);
}

@media (min-width: 1280px) {
    .c888-footer__col-handle label {
        cursor: default;
        padding: 0 0 10px;
    }
    .c888-footer__col-handle label::after { display: none; }
}

.c888-footer__col-body {
    overflow: hidden;
    height: 0;
}

.c888-footer__col-toggle:checked ~ .c888-footer__col-body {
    height: auto;
    overflow: visible;
}

@media (min-width: 1280px) {
    .c888-footer__col-body { height: auto !important; overflow: visible; }
}

.c888-footer__col-list {
    list-style: none;
    margin: 0;
    padding: 0 0 10px;
}

.c888-footer__col-list li { margin: 0; }

.c888-footer__col-list a {
    display: block;
    color: #777;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.9;
    transition: color .2s;
}

.c888-footer__col-list a:hover { color: #fff; }

/* ─────────────────────────────────────────────────────────
   ③④⑤ Logos — payment + GCB + responsible gaming
───────────────────────────────────────────────────────── */

.c888-footer__logos {
    display: block;          /* override old display:flex that puts rows side-by-side */
    padding: 12px 16px;
    border-top: 1px solid #2e2e2e;
    margin-top: 4px;
}

.c888-footer__logo-row { padding: 6px 0; }

.c888-footer__logo-row ul {
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

/* Compact logo tile */
.c888-footer__logo-row li {
    border: 1px solid #2e2e2e;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 110px;
    height: 50px;
    padding: 6px 10px;
}

.c888-footer__logo-row li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.c888-footer__logo-row li img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity .2s;
    vertical-align: middle;
}

.c888-footer__logo-row li a:hover img { opacity: .75; }


/* ─────────────────────────────────────────────────────────
   ⑥ Copyright + legal text
───────────────────────────────────────────────────────── */

.c888-footer__legal {
    display: block;      /* override old display:flex that adds gap between <p>s */
    gap: 0;
    padding: 12px 16px 20px;
    border-top: 1px solid #2e2e2e;
    margin-top: 4px;
    text-align: start;
    max-width: none;
    margin-inline: 0;
}

.c888-footer__legal p {
    color: #555;
    font-size: .72rem;
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
    padding: 0;
    text-align: start;
}

.c888-footer__legal a { color: #777; text-decoration: underline; }
.c888-footer__legal a:hover { color: #aaa; }

/* ─────────────────────────────────────────────────────────
   ⑦ Mobile sticky footer bar
   Fixed bottom nav; hidden on desktop (≥1024 px).
───────────────────────────────────────────────────────── */

.c888-footer-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    min-height: 55px;
    display: flex;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(5px);
}

@media (min-width: 1024px) {
    .c888-footer-bar { display: none; }
}

/* Push page content above the sticky bar on mobile */
@media (max-width: 1023px) {
    body { padding-bottom: 60px; }
}

.c888-footer-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    text-decoration: none;
    padding: 8px 4px;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .02em;
    transition: color .2s;
    max-width: 20%;
}

.c888-footer-bar__item:hover,
.c888-footer-bar__item:active {
    color: var(--c888-primary, #7BF037);
}

/* Inline SVG icon element */
.c888-fbar-icon {
    display: block;
    width: 24px;
    height: 24px;
    background-size: 28px;
    background-repeat: no-repeat;
    background-position: center;
}

/* SVG data-URI icons (white, 2px stroke) */
.c888-fbar-icon--home {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E");
}

.c888-fbar-icon--casino {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E");
}

.c888-fbar-icon--login {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.c888-fbar-icon--deposit {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'/%3E%3Cline x1='1' y1='10' x2='23' y2='10'/%3E%3C/svg%3E");
}

.c888-fbar-icon--live {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M5.636 5.636a9 9 0 1 0 12.728 12.728'/%3E%3Cpath d='M7.05 7.05A7 7 0 1 0 16.95 16.95'/%3E%3C/svg%3E");
}

/* ─────────────────────────────────────────────────────────
   Builder hint text (mobile bar hint in footer builder)
───────────────────────────────────────────────────────── */

.c888-builder-hint {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    padding: 8px 12px;
    margin: 0 0 8px;
    background: rgba(255,255,255,.05);
    border-radius: 4px;
}

.c888-builder-field--mobile-bar-row label {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .7;
    margin-bottom: 6px;
}

.c888-builder-input { width: 100%; margin-bottom: 6px; }
.c888-builder-input--half { width: calc(50% - 4px); display: inline-block; margin-right: 4px; }
.c888-builder-input--half:last-of-type { margin-right: 0; }


/* ═══════════════════════════════════════════════════════════════
   Global background = #000000 (header, footer, body, all sections)
   Overrides all hardcoded #000, #0d0d0d, #111, #171717 values.
   ═══════════════════════════════════════════════════════════════ */

body { background: #1f1f1f !important; }

/* Header */
.c888-header,
.c888-header__top,
.c888-header__nav,
.c888-mobile-menu { background: #000 !important; }

/* Footer shell */
.c888-footer { background: #000000 !important; }

/* Footer welcome bar (slightly elevated surface) */
.c888-footer__offer { background: #2a2a2a !important; }

/* Footer accordion columns */
.c888-footer__col-handle label,
.c888-footer__col-body { background: #000000; }

/* Old welcome-bonus bar (if still rendered anywhere) */
.c888-footer__welcome { background: #000000 !important; }

/* SEO content section */
.c888-seo-content { background: #000000 !important; }

/* Cards / surfaces keep a slight elevation */
.c888-card,
.c888-post-card,
.c888-archive-card,
.c888-sidebar-banner { background: #2a2a2a; }

/* Game cards have no background — image fills the art area */
.c888-game-card { background: transparent !important; }

/* Icon-only column image (e.g. 888 Exclusive Club VIP badge) */
.c888-footer__col-img { padding: 4px 0 8px; }
.c888-footer__col-img a { display: block; width: 100%; }
.c888-footer__col-img img { display: block; width: 100%; max-width: 150px; height: auto; opacity: .9; }
.c888-footer__col-img img:hover { opacity: 1; }

/* ── Kill old border-bottom rules that cause double separators ── */
.c888-footer__cols   { border-bottom: none !important; }
.c888-footer__logos  { border-bottom: none !important; }

/* Site logo image in header */
.c888-header__logo img,
.c888-logo__dark,
.c888-logo__light { height: 52px; width: auto; display: block; }

/* Light/dark logo switching */
body:not(.light-mode) .c888-logo__light { display: none; }
body.light-mode .c888-logo__dark  { display: none; }
body.light-mode .c888-logo__light { display: block; }

/* 888bet sport button SVG in header */
.c888-header__bet-img { height: 32px; width: auto; display: block; }

/*--------------------------------------------------------------
# HTML Sitemap page (page-sitemap.php)
--------------------------------------------------------------*/
.c888-sitemap-page__intro { margin-bottom: var(--c888-spacing-lg); }

.c888-sitemap,
.c888-sitemap ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Indent every nested level off its parent with a guide rule. */
.c888-sitemap ul {
    margin-inline-start: var(--c888-spacing-lg);
    padding-inline-start: var(--c888-spacing-md);
    border-inline-start: 1px solid var(--c888-border);
}

.c888-sitemap li {
    margin: var(--c888-spacing-xs) 0;
    line-height: 1.5;
}

.c888-sitemap a {
    color: var(--c888-text-secondary);
}

.c888-sitemap a:hover,
.c888-sitemap a:focus {
    color: var(--c888-primary);
    text-decoration: underline;
}

/* The two top levels (Online Casino → categories / page groups) read as
   headings so the structure stays scannable. */
.c888-sitemap > li > a {
    font-size: var(--c888-font-size-xl);
    font-weight: 700;
    color: var(--c888-text);
}

.c888-sitemap > li > ul > li > a {
    font-size: var(--c888-font-size-lg);
    font-weight: 600;
    color: var(--c888-text);
}

/* The long flat slot list flows into responsive columns to stay compact. */
.c888-sitemap__games {
    columns: 220px 4;
    column-gap: var(--c888-spacing-lg);
    border-inline-start: 0 !important;
}

.c888-sitemap__games li {
    break-inside: avoid;
}

.c888-sitemap__games a {
    font-size: var(--c888-font-size-sm);
    font-weight: 400 !important;
}

@media (max-width: 768px) {
    .c888-sitemap__games { columns: 160px 2; }
}

/* ════════════════════════════════════════════════════════════════
 * PROMOTIONS — hub (archive-promotion.php) + single (single-promotion.php)
 * Native-Arabic bonus offers. RTL-safe: logical spacing + start alignment
 * so the layout mirrors correctly under the site's dir="rtl".
 * ════════════════════════════════════════════════════════════════ */

/* ── Single promo hero banner (wide donor banner / teaser) ── */
.c888-promo-hero {
    margin-bottom: var(--c888-spacing-lg);
    border-radius: var(--c888-radius-lg);
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 1700 / 370;          /* donor desktop banner ratio */
    background: var(--c888-surface);
}
.c888-promo-hero__img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}

/* ── Single promo CTA ── */
.c888-promo__cta { margin: var(--c888-spacing-md) 0 var(--c888-spacing-xl); }
.c888-promo__cta--bottom { margin: var(--c888-spacing-xl) 0 0; }
.c888-promo__cta-btn { font-size: 1.05rem; font-weight: 700; padding: 14px 38px; }

/* ── Single promo: in-content artwork ──
   Donor promo pages lay their artwork out as a designed composite (logo,
   prize tiles, game cards side by side). The scraper flattens that to a run of
   bare <img> tags, which the shared grouping filter wraps in .c888-img-row
   (see c888_game_group_content_images(), inc/seo-game.php).

   Unlike game screenshots these are decorative transparent artwork, so they get
   NO card frame — only a size cap and centering. Without the cap they render at
   natural size (up to 896x546) stacked vertically: the /promotions/plinko/ body
   measured 7,983px tall with 12 images before this rule. Capping by HEIGHT (not
   width) keeps mixed aspect ratios — a 67x71 icon next to a 1254x1254 square —
   visually consistent in the same row. */
.c888-single--promotion .c888-single__body .c888-img-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--c888-spacing-md);
    margin: var(--c888-spacing-lg) 0;
}

.c888-single--promotion .c888-single__body .c888-img-row img.c888-content-img {
    display: block;
    margin: 0;
    max-height: 170px;
    width: auto;
    max-width: 100%;
    height: auto;
}

/* Ungrouped images: inline-block, NOT block.
   Donor game-card lists come through as `<img>إلعب الآن<img>إلعب الآن` — a tile
   followed by its "Play Now" label, whose <a> the scraper strips. The run is not
   adjacent images, so the grouping filter correctly leaves it alone. Laying these
   out as blocks stacked each tile full-width with its label orphaned on a line
   between them; inline-block lets tile+label pair up and sit side by side, which
   is the donor layout, without rewriting the content (the last label runs
   straight into the next heading's text, so it cannot be split reliably). */
.c888-single--promotion .c888-single__body p > img.c888-content-img {
    display: inline-block;
    vertical-align: middle;
    margin: var(--c888-spacing-sm);
    max-width: min(100%, 420px);
    max-height: 240px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Centre a paragraph that is mostly artwork, so the inline tiles form a tidy
   band instead of hugging the inline-start edge. */
.c888-single--promotion .c888-single__body p:has(> img.c888-content-img) {
    text-align: center;
}

@media (max-width: 600px) {
    .c888-single--promotion .c888-single__body .c888-img-row img.c888-content-img {
        max-height: 110px;
    }
}

/* ── Hub: grouped sections ── */
.c888-promo-section { margin: var(--c888-spacing-xl) 0; }
.c888-promo-section__title {
    font-size: var(--c888-font-size-2xl);
    font-weight: 800;
    margin: 0 0 var(--c888-spacing-lg);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--c888-primary);
    display: inline-block;
}

/* ── Card grid (shared by hub + related) ── */
.c888-promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.c888-promo-card {
    display: flex; flex-direction: column;
    background: var(--c888-surface);
    border-radius: var(--c888-radius-lg);
    overflow: hidden;
    transition: transform var(--c888-transition-fast), box-shadow var(--c888-transition-fast);
}
.c888-promo-card:hover { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.c888-promo-card__media {
    display: block; width: 100%; aspect-ratio: 16 / 9;
    overflow: hidden; line-height: 0; background: #0d0d0d;
}
.c888-promo-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c888-promo-card__body {
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px 18px 20px;
    flex: 1 1 auto;
}
.c888-promo-card__title { font-size: 1.12rem; font-weight: 700; line-height: 1.35; margin: 0; }
.c888-promo-card__title a { color: var(--c888-text); text-decoration: none; }
.c888-promo-card__title a:hover { color: var(--c888-primary); }
.c888-promo-card__excerpt {
    color: var(--c888-text-secondary);
    font-size: 0.95rem; line-height: 1.6; margin: 0;
}
.c888-promo-card__cta {
    margin-top: auto; align-self: flex-start;
    font-weight: 700; padding: 10px 24px;
}

/* ── Related offers on a single ── */
.c888-promo-related { margin: var(--c888-spacing-xl) 0; }
.c888-promo-related__title {
    font-size: var(--c888-font-size-xl); font-weight: 800;
    margin: 0 0 var(--c888-spacing-lg);
}
.c888-promo-related .c888-promo-card__media { aspect-ratio: 16 / 9; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .c888-promo-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 600px) {
    .c888-promo-grid { grid-template-columns: 1fr; gap: 16px; }
    .c888-promo-section__title { font-size: var(--c888-font-size-xl); }
}

/* =========================================================================
   Promotions hub — builder-driven layout (inc/promotions.php)
   Masthead banner + page H1, jump-button nav, then horizontally-scrollable
   strips of small offer cards. RTL is the site default; flex rows + overflow
   scroll flow correctly under dir="rtl".
   ========================================================================= */

.c888-promotions { padding: 0 0 var(--c888-spacing-xl); }

/* ── Masthead: banner with the page title overlaid at the bottom ── */
.c888-promo-masthead { position: relative; }
.c888-promo-masthead .c888-banner-slider { margin: 0; }
.c888-promo-masthead__bar {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 40px 0 22px;
    background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
    pointer-events: none;
}
.c888-promo-masthead__title {
    margin: 0;
    font-size: var(--c888-font-size-3xl, 2rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
/* No banner present → keep a readable title block instead of an empty overlay. */
.c888-promo-masthead:not(:has(.c888-banner-slider)) .c888-promo-masthead__bar {
    position: static;
    background: var(--c888-surface);
    padding: var(--c888-spacing-lg) 0;
}
.c888-promo-masthead:not(:has(.c888-banner-slider)) .c888-promo-masthead__title {
    color: var(--c888-text);
    text-shadow: none;
}

/* ── Jump-button nav (one per strip) ── */
.c888-promo-jump {
    background: var(--c888-secondary, #171717);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.c888-promo-jump__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    justify-content: center;
    align-items: flex-start;
    list-style: none;
    margin: 0;
    padding: 14px 0;
}
.c888-promo-jump__li { margin: 0; }
.c888-promo-jump__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 84px;
    padding: 4px 6px;
    color: var(--c888-text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    transition: color var(--c888-transition-fast);
}
.c888-promo-jump__item:hover,
.c888-promo-jump__item:focus { color: var(--c888-primary); }
.c888-promo-jump__icon { display: block; }
.c888-promo-jump__icon--img {
    height: 30px;
    width: auto;
    max-width: 56px;
    object-fit: contain;
}
.c888-promo-jump__label { line-height: 1.25; max-width: 110px; }

/* ── Strip: full-width title bar + horizontal scroller ── */
.c888-promo-strip { margin: 0; scroll-margin-top: 90px; }
.c888-promo-strip__head {
    background: var(--c888-surface);
    border-top: 1px solid rgba(255,255,255,.05);
}
.c888-promo-strip__title {
    margin: 0;
    padding: 12px 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--c888-primary);
    text-align: start;
}
/* Sports bucket carries the donor's orange accent (title + card CTAs). */
.c888-promo-strip--sports .c888-promo-strip__title { color: #FC6200; }
.c888-promo-strip--sports .c888-promo-card__cta {
    background: #FC6200;
    border-color: #FC6200;
    color: #fff;
}
.c888-promo-strip--sports .c888-promo-card__cta:hover {
    background: #e35900;
    border-color: #e35900;
    color: #fff;
}
.c888-promo-strip__scroller {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 18px 0 22px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.c888-promo-strip__row {
    display: flex;
    gap: 16px;
    width: max-content;
    min-width: 100%;
    padding-inline: var(--c888-container-padding, 20px);
    box-sizing: border-box;
}
.c888-promo-strip__scroller::-webkit-scrollbar { height: 8px; }
.c888-promo-strip__scroller::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18); border-radius: 8px;
}

/* ── Small offer card (donor layout) ── */
.c888-promo-card--sm {
    flex: 0 0 380px;
    width: 380px;
    background: var(--c888-secondary, #171717);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--c888-radius-lg);
    padding: 14px;
    gap: 12px;
}
.c888-promo-card--sm .c888-promo-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.c888-promo-card--sm .c888-promo-card__title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    flex: 1 1 auto;
    min-width: 0;
}
.c888-promo-card__tc {
    flex: 0 0 auto;
    font-size: 0.72rem;
    color: var(--c888-text-secondary);
    text-decoration: underline;
    white-space: nowrap;
}
.c888-promo-card__tc:hover { color: var(--c888-primary); }
.c888-promo-card--sm .c888-promo-card__media {
    border-radius: var(--c888-radius-md, 8px);
    aspect-ratio: 16 / 9;
}
/* Foot row: description text + small CTA button side by side. */
.c888-promo-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}
.c888-promo-card--sm .c888-promo-card__excerpt {
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.c888-promo-card--sm .c888-promo-card__cta {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 7px 14px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: var(--c888-radius-md, 8px);
}

/* ── SEO copy below the strips: compact two-column flow ── */
.c888-promo-archive__seo { margin: var(--c888-spacing-xl) 0 0; }
.c888-promo-seo__cols {
    column-count: 2;
    column-gap: 48px;
}
.c888-promo-seo__cols > *:first-child { margin-top: 0; }
.c888-promo-seo__cols h2 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--c888-text);
    margin: 18px 0 8px;
}
.c888-promo-seo__cols h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c888-text);
    margin: 12px 0 4px;
}
.c888-promo-seo__cols p,
.c888-promo-seo__cols li {
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--c888-text-secondary);
    margin: 0 0 8px;
}
.c888-promo-seo__cols ol,
.c888-promo-seo__cols ul { padding-inline-start: 1.25em; margin: 0 0 8px; }
.c888-promo-seo__cols h2,
.c888-promo-seo__cols h3 { break-after: avoid; }
.c888-promo-seo__cols h2,
.c888-promo-seo__cols h3,
.c888-promo-seo__cols p,
.c888-promo-seo__cols li { break-inside: avoid; }

@media (max-width: 768px) {
    .c888-promo-seo__cols { column-count: 1; }
}
@media (max-width: 600px) {
    .c888-promo-card--sm { flex-basis: 78vw; width: 78vw; }
    .c888-promo-masthead__title { font-size: var(--c888-font-size-2xl, 1.6rem); }
}

/* =========================================================================
   Legal / policy pages (/legal/) — inc/legal-pages.php
   A two-column "side-nav + document" layout for the policy cluster, plus a
   card grid on the /legal/ hub. RTL-safe: the nav is DOM-first and the grid
   flips automatically when the document direction is RTL.
   ========================================================================= */

/* Two-column layout: nav rail then the document. */
.c888-single-layout--with-nav {
    grid-template-columns: 280px 1fr;
}

/* Side-nav rail listing every policy page.
   Sticky offset must clear the sticky site header, which is two rows tall
   (--c888-header-full ≈ 118px), not the 70px --c888-header-height. Sticking
   at a bare spacing offset parked the rail *behind* the header and hid its
   top ~94px. Same pattern as .c888-sidebar-sticky. max-height + scroll keeps
   a long policy list usable on short viewports. */
.c888-legal-nav {
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-md);
    padding: var(--c888-spacing-md);
    position: sticky;
    top: calc(var(--c888-header-full) + var(--c888-spacing-md));
    max-height: calc(100vh - var(--c888-header-full) - var(--c888-spacing-xl));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--c888-border) transparent;
}
.c888-legal-nav__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--c888-spacing-sm);
    padding-bottom: var(--c888-spacing-sm);
    border-bottom: 2px solid var(--c888-primary);
    color: var(--c888-text);
}
.c888-legal-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.c888-legal-nav__item {
    margin: 0;
}
.c888-legal-nav__link {
    display: block;
    padding: 10px var(--c888-spacing-sm);
    border-radius: var(--c888-radius-sm);
    color: var(--c888-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.c888-legal-nav__link:hover {
    background: var(--c888-surface-2);
    color: var(--c888-text);
}
.c888-legal-nav__item--active .c888-legal-nav__link {
    background: var(--c888-primary);
    color: #1a1a1a;
    font-weight: 600;
}

/* Hub card grid (/legal/ landing). */
.c888-legal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--c888-spacing-md);
    margin-top: var(--c888-spacing-lg);
}
.c888-legal-card {
    display: flex;
    flex-direction: column;
    gap: var(--c888-spacing-xs);
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-md);
    padding: var(--c888-spacing-lg);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.c888-legal-card:hover {
    border-color: var(--c888-primary);
    transform: translateY(-2px);
}
.c888-legal-card__title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--c888-text);
}
.c888-legal-card__desc {
    font-size: 0.9rem;
    color: var(--c888-text-secondary);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .c888-single-layout--with-nav {
        grid-template-columns: 240px 1fr;
    }
    .c888-legal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .c888-single-layout--with-nav {
        grid-template-columns: 1fr;
    }
    .c888-legal-nav {
        position: static;
        /* Drop the sticky viewport clamp too, or the rail scrolls internally
           while stacked full-width above the document. */
        max-height: none;
        overflow-y: visible;
    }
    .c888-legal-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================================
   VIP Club programme page (inc/vip-page.php, page.php .c888-single--vip)
   Recreates the donor 888 VIP programme layout: hero + benefit grid +
   tiered membership cards + alternating promo banners + events grid +
   account-manager team + contact block. Gold accent (#FFDD77) is local
   to this block so it can differ from the global --c888-accent-gold.
   =============================================================== */
.c888-vip {
    --c888-vip-gold: #FFDD77;
    /* Fill the page content column so the VIP page is the same width as every
       other interior page (page.php .c888-single__content), not a narrower
       island. The donor's .programme_container is full-width too. */
    width: 100%;
    text-align: start;
}

/* The VIP page supplies its own H1/banners, so drop the generic single
   body typography spacing that would otherwise fight the layout. */
.c888-single--vip .c888-single-layout { gap: 0; }

.c888-vip__logo { text-align: center; padding: 1.2rem 0 0.2rem; }
.c888-vip__logo-img { width: 15.5rem; max-width: 90%; height: auto; }

.c888-vip__h1,
.c888-vip__h2 {
    color: var(--c888-vip-gold);
    font-weight: 500;
    line-height: 1.2;
    margin: 0.6em 0 0.4em;
}
.c888-vip__h1 { font-size: 1.5rem; }
.c888-vip__h2 { font-size: 1.35rem; }
.c888-vip__h2--center { text-align: center; }

/* The lead paragraph immediately under a heading is gold in the donor. */
.c888-vip__lead { color: var(--c888-vip-gold); }
.c888-vip__lead--center { text-align: center; }
.c888-vip__p,
.c888-vip__lead {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 0.9em;
}

/* ---- Buttons -------------------------------------------------- */
.c888-vip__btn {
    display: inline-block;
    border-radius: 30px;
    padding: 0 1.4em;
    min-width: 11em;
    line-height: 2.4em;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    background: transparent;
    transition: background-color var(--c888-transition-normal), color var(--c888-transition-normal);
}
.c888-vip__btn--outline {
    color: var(--c888-vip-gold);
    border: 2px solid var(--c888-vip-gold);
}
.c888-vip__btn--outline:hover { background: var(--c888-vip-gold); color: #232323; }
.c888-vip__btn--readmore {
    min-width: 0;
    color: #cacbca;
    border: 2px solid #cacbca;
    padding: 0.35em 1.2em;
    line-height: 1.4;
    font-size: 0.85rem;
}
.c888-vip__btn--readmore:hover { background: #cacbca; color: #232323; }

/* ---- Hero banner with overlaid Play Now ---------------------- */
.c888-vip__hero { position: relative; margin-top: 2rem; }
.c888-vip__hero img { width: 100%; height: auto; display: block; border-radius: var(--c888-radius-md); }
.c888-vip__hero-cta {
    position: absolute;
    left: 50%;
    bottom: 8%;
    transform: translateX(-50%);
}

/* ---- Full-width promo banners -------------------------------- */
.c888-vip__banner { margin-top: 2rem; }
.c888-vip__banner img { width: 100%; height: auto; display: block; border-radius: var(--c888-radius-md); }

/* ---- Benefit icon grid -------------------------------------- */
.c888-vip__benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    text-align: center;
}
.c888-vip__benefit {
    flex: 0 1 140px;
    max-width: 200px;
    text-decoration: none;
    transition: transform var(--c888-transition-slow);
}
.c888-vip__benefit:hover { transform: scale(1.05); }
.c888-vip__benefit-icon { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.c888-vip__benefit-label {
    display: block;
    color: var(--c888-vip-gold);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.4em;
}
/* Dim the un-hovered icons, like the donor :has(img:hover). */
.c888-vip__benefits:has(.c888-vip__benefit:hover) .c888-vip__benefit:not(:hover) {
    opacity: 0.7;
    transform: scale(0.92);
}

/* ---- Membership tier cards ---------------------------------- */
.c888-vip__tiers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0.5em 0 1.3em;
    text-align: center;
}
.c888-vip__tier { flex: 0 1 calc(50% - 1rem); }
.c888-vip__tier-name { color: var(--c888-vip-gold); font-weight: 500; margin: 0 0 0.5em; }
.c888-vip__tier-card { width: 100%; height: auto; margin-bottom: 0.8em; }

.c888-vip__cta-row { display: flex; justify-content: center; margin: 1.5em 0 1em; }

/* ---- Events grid -------------------------------------------- */
.c888-vip__events {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2.4rem 0 1.5rem;
}
.c888-vip__event { display: flex; flex-direction: column; }
.c888-vip__event-img { width: 100%; max-width: 350px; height: auto; align-self: center; }
.c888-vip__event-info { flex: 1; }
.c888-vip__event-title { margin: 0.6em 0 0.3em; font-size: 1.05rem; }
.c888-vip__event-text { font-weight: 500; font-size: 0.95rem; line-height: 1.6; }
.c888-vip__event-cta { margin-top: 0.6em; }

/* ---- Account-manager team ----------------------------------- */
.c888-vip__team {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}
.c888-vip__member { flex: 0 1 calc(50% - 1rem); }
/* Global `img { display:block }` ignores text-align, so center the fixed-width
   photo with auto margins. Selector is scoped under .c888-vip to outspecify
   `.c888-single__body img` (which sets margin:16px 0 and would left-align it). */
.c888-vip .c888-vip__member-img { width: 150px; max-width: 100%; height: auto; margin: 0 auto; }
.c888-vip__member-name { color: var(--c888-vip-gold); margin: 0.4em 0 0.8em; }

/* ---- Contact block ------------------------------------------ */
.c888-vip__anchor { height: 1px; }
.c888-vip__contact { display: flex; flex-direction: column; align-items: center; margin-top: 1.5rem; }
.c888-vip__gold { color: var(--c888-vip-gold) !important; text-decoration: none; }
.c888-vip__contact-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; width: 100%; }
.c888-vip__contact-item { flex: 0 1 calc(33% - 1rem); min-width: 140px; text-align: center; }
.c888-vip__contact-item img { width: 100px; max-width: 100%; height: auto; margin: 0 auto; }
.c888-vip__contact-text { font-weight: 500; font-size: 0.95rem; line-height: 1.6; }

/* ---- Responsive -------------------------------------------- */
@media (min-width: 600px) {
    .c888-vip__events { grid-template-columns: 1fr 1fr; }
    .c888-vip__benefit-label,
    .c888-vip__p,
    .c888-vip__lead { font-size: 1rem; }
}
@media (min-width: 800px) {
    .c888-vip__event {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 1.2fr;
        grid-template-areas: "image info" "image button";
        align-items: start;
        column-gap: 1.5rem;
    }
    .c888-vip__event-img { grid-area: image; max-width: 100%; }
    .c888-vip__event-info { grid-area: info; }
    .c888-vip__event-cta { grid-area: button; }
}
@media (min-width: 992px) {
    .c888-vip__logo-img { width: 26rem; }
    .c888-vip__h1 { font-size: 2.28rem; }
    .c888-vip__h2 { font-size: 2rem; }
    .c888-vip__p,
    .c888-vip__lead { font-size: 1.15rem; }
    .c888-vip__tiers,
    .c888-vip__team { flex-wrap: nowrap; }
    .c888-vip__tier { flex: 1 1 0; }
    .c888-vip__hero-cta { bottom: 12%; }
}

/* ---- VIP READ MORE modals (assets/js/vip-modals.js) -------- */
body.c888-vip-modal-open { overflow: hidden; }
.c888-vip-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}
.c888-vip-modal[hidden] { display: none; }
.c888-vip-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}
.c888-vip-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    background: #1b1b1b;
    border: 1px solid var(--c888-vip-gold, #FFDD77);
    border-radius: var(--c888-radius-md);
    padding: 2rem 1.6rem 1.6rem;
    box-shadow: var(--c888-shadow-lg);
    text-align: start;
}
.c888-vip-modal__close {
    position: absolute;
    top: 0.5rem;
    inset-inline-end: 0.7rem;
    background: transparent;
    border: 0;
    color: var(--c888-vip-gold, #FFDD77);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
}
.c888-vip-modal__title {
    color: var(--c888-vip-gold, #FFDD77);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.6em;
    text-transform: uppercase;
}
.c888-vip-modal__intro { color: var(--c888-vip-gold, #FFDD77); font-weight: 500; margin: 0 0 1em; }
.c888-vip-modal__role {
    color: var(--c888-vip-gold, #FFDD77);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 1.2em;
}
.c888-vip-modal__list { margin: 0 0 1.2em; padding-inline-start: 1.2em; }
.c888-vip-modal__list li { margin-bottom: 0.6em; line-height: 1.5; }
.c888-vip-modal__list strong { color: var(--c888-vip-gold, #FFDD77); }
.c888-vip-modal__notes {
    border-top: 1px solid var(--c888-border);
    padding-top: 0.9em;
    font-size: 0.8rem;
    color: var(--c888-text-secondary);
}
.c888-vip-modal__notes p { margin: 0 0 0.5em; line-height: 1.4; }
.c888-vip-modal__img { width: 100%; height: auto; border-radius: var(--c888-radius-sm); margin: 0 0 1.1em; display: block; }
.c888-vip-modal__body { line-height: 1.6; margin: 0; }
.c888-vip-modal__qa { margin: 0; }
.c888-vip-modal__qa dt { color: var(--c888-vip-gold, #FFDD77); font-weight: 600; margin-bottom: 0.2em; }
.c888-vip-modal__qa dd { margin: 0 0 1em; line-height: 1.55; }

/*--------------------------------------------------------------
# 404 page (404.php)
# One centred card: a large decorative "404", the heading, two
# lines of copy and two ways out (homepage + HTML sitemap).
# Logical properties only, so it mirrors correctly under dir=rtl.
--------------------------------------------------------------*/

.c888-404 .c888-container {
    display: flex;
    justify-content: center;
    padding-block: var(--c888-spacing-xl) var(--c888-spacing-3xl);
}

.c888-404__card {
    width: 100%;
    max-width: 640px;
    padding: var(--c888-spacing-2xl) var(--c888-spacing-xl);
    background: var(--c888-surface);
    border: 1px solid var(--c888-border);
    border-radius: var(--c888-radius-lg);
    text-align: center;
}

/* The numeral is decoration (aria-hidden) — the <h1> carries the meaning. */
.c888-404__code {
    margin: 0 0 var(--c888-spacing-sm);
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--c888-primary);
    direction: ltr;
}

.c888-404__title {
    margin: 0 0 var(--c888-spacing-md);
    font-size: var(--c888-font-size-3xl);
    font-weight: 700;
    line-height: 1.3;
    color: var(--c888-text);
}

.c888-404__text {
    margin: 0 0 var(--c888-spacing-sm);
    font-size: var(--c888-font-size-base);
    line-height: 1.7;
    color: var(--c888-text-secondary);
}

.c888-404__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--c888-spacing-md);
    margin-top: var(--c888-spacing-xl);
}

.c888-404__btn {
    min-width: 200px;
    padding: 12px var(--c888-spacing-lg);
    font-size: var(--c888-font-size-base);
}

/* Not .c888-btn--primary: that one sets white text, which is unreadable on the
   lime green. Dark text on green is the site's CTA convention (--c888-on-primary). */
.c888-404__btn--primary {
    background: var(--c888-primary);
    border: 1px solid var(--c888-primary);
    color: var(--c888-on-primary);
}

.c888-404__btn--primary:hover,
.c888-404__btn--primary:focus-visible {
    background: var(--c888-primary-hover);
    border-color: var(--c888-primary-hover);
    color: var(--c888-on-primary);
}

@media (max-width: 480px) {
    .c888-404__card {
        padding: var(--c888-spacing-xl) var(--c888-spacing-md);
    }

    .c888-404__code {
        font-size: 72px;
    }

    .c888-404__title {
        font-size: var(--c888-font-size-2xl);
    }

    .c888-404__btn {
        width: 100%;
        min-width: 0;
    }
}

/*--------------------------------------------------------------
# 404 page — English variant (template-parts/404-english.php)
# Served to the retired donor site's English URL space.
#
# This is a STANDALONE document: no site header, no footer, because
# both are Arabic CONTENT rather than UI chrome and we do not
# translate those. The card therefore has to centre itself in the
# viewport instead of sitting in a normal page flow.
#
# It reuses every .c888-404__* rule above unchanged. Those are
# written with logical properties, so they lay out correctly under
# this page's dir=ltr as well as the Arabic page's dir=rtl.
--------------------------------------------------------------*/

.c888-404en__main {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh; /* dvh so mobile browser toolbars don't cause overflow */
    padding-inline: var(--c888-spacing-md);
}

/* The shared rule gives .c888-container a large padding-block to clear the
   sticky header. There is no header here, so the card would sit low. */
.c888-404en__main .c888-container {
    padding-block: var(--c888-spacing-xl);
}

.c888-404en__logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--c888-spacing-lg);
    line-height: 1;
}

.c888-404en__logo-img {
    width: auto;
    height: 80px;
}

/* Its own rule rather than .c888-404__title: this page is a language gate
   with no big "404" numeral above the heading, so the heading carries the
   weight on its own and sits closer to the logo. */
.c888-404en__title {
    margin: 0 0 var(--c888-spacing-md);
    font-size: var(--c888-font-size-3xl);
    font-weight: 700;
    line-height: 1.25;
    color: var(--c888-text);
}

/* Two equal-weight choices, so they share a row and neither dominates. */
.c888-404en__actions {
    margin-top: var(--c888-spacing-xl);
}

@media (max-width: 480px) {
    .c888-404en__logo-img {
        height: 64px;
    }

    .c888-404en__title {
        font-size: var(--c888-font-size-2xl);
    }
}

/* ==========================================================================
   Sports section — /sports/
   The sportsbook engine in an iframe, our Arabic SEO content below it.

   Height is driven by the engine's own ON_PAGE_HEIGHT_CHANGE reports, but
   CAPPED by assets/js/sportsbook-frame.js — the engine's event list is infinite
   scroll, so an uncapped frame grows forever (measured: +500px per report to
   173,000px). Below the cap a short page fits exactly, which is what matters
   for a two-fixture league or an out-of-season sport; above it the engine
   scrolls internally.
   ========================================================================== */

.c888-sportsbook {
    width: 100%;
    margin: 0 0 var(--c888-space-lg, 2rem);
    background: var(--c888-chrome, #15171a);
    border-radius: 8px;
    overflow: hidden;
}

.c888-sportsbook__frame {
    display: block;
    width: 100%;
    /* The floor before the engine reports its real height. Anything shorter and
       the page visibly jumps on load; the JS only ever grows it from here. */
    height: 900px;
    border: 0;
}

/* The wrapper is always in the DOM even when the term has no copy, because the
   iframe bridge swaps content into it. Empty, it must take up no room. */
.c888-sports-seo:empty {
    display: none;
}

.c888-sports-seo[hidden] {
    display: none;
}

/* The /sports/ hub: builder-driven, so each section is a positioned block
   rather than a fixed stack. The sections themselves carry no chrome — the
   banner, frame and link grid style themselves. */
.c888-sports-hub > .c888-hub-section {
    position: relative;
}

.c888-sport-links__heading {
    margin: 0 0 var(--c888-space-md, 1rem);
    font-size: 1.25rem;
}

/* Links to the pages one level down, between the engine and the article.
   Logical properties throughout — the document is RTL. */
.c888-sport-links {
    margin: 0 0 var(--c888-space-lg, 2rem);
}

.c888-sport-links__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.c888-sport-links__item {
    margin: 0;
}

.c888-sport-links__link {
    display: block;
    padding: 12px 16px;
    border: 1px solid var(--c888-border, #2a2d33);
    border-radius: 6px;
    background: var(--c888-chrome, #15171a);
    color: var(--c888-text, #e8e8ea);
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}

.c888-sport-links__link:hover,
.c888-sport-links__link:focus-visible {
    /* --c888-primary is the theme's green CTA colour; --c888-accent does not
       exist (only --c888-accent-gold), and naming a variable that is undefined
       silently falls through to the literal and drifts from the palette. */
    border-color: var(--c888-primary, #7BF037);
    background: var(--c888-surface-2, #2B2B2B);
}

@media (max-width: 782px) {
    .c888-sportsbook {
        /* Full-bleed on phones: the engine's own layout already has padding, so
           an outer gutter wastes a quarter of a narrow screen. */
        margin-inline: calc(var(--c888-container-padding, 1rem) * -1);
        border-radius: 0;
    }

    .c888-sportsbook__frame {
        height: 700px;
    }

    .c888-sport-links__grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* ==========================================================================
   Sports fixtures & odds — /sports/…
   Our own crawlable copy of the engine's event list, rendered by
   inc/sports-odds.php BELOW the editorial copy.

   Logical properties throughout (inline-start/end, not left/right): the site is
   dir="rtl" and the reading-START edge is the right one. A table with `left`
   padding mirrors wrongly and nothing about it looks broken until an Arabic
   reader sees it.
   ========================================================================== */

.c888-odds {
    margin-block: var(--c888-space-lg, 2rem);
}

.c888-odds[hidden] {
    display: none;
}

.c888-odds__title {
    font-size: var(--c888-font-size-xl, 20px);
    margin: 0 0 .25rem;
}

/* How old the prices are. Deliberately quiet but always present — these are
   odds on a gambling page, fetched once a day. */
.c888-odds__asof {
    margin: 0 0 1rem;
    font-size: var(--c888-font-size-xs, 12px);
    color: var(--c888-text-secondary, #C1C1C1);
}

.c888-odds__league {
    margin-block-end: 1.5rem;
}

.c888-odds__league-name {
    font-size: var(--c888-font-size-sm, 14px);
    font-weight: 700;
    margin: 0 0 .5rem;
    color: var(--c888-text-secondary, #C1C1C1);
}

/* The markets overflow on a phone long before the fixture column does, so the
   table scrolls horizontally rather than wrapping team names to four lines. */
.c888-odds__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.c888-odds__table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c888-surface, #2a2a2a);
    border: 1px solid var(--c888-border, #2E2E2E);
    border-radius: var(--c888-radius-md, 8px);
    overflow: hidden;
    font-size: var(--c888-font-size-sm, 14px);
    color: var(--c888-text, #fff);
}

.c888-odds__table th,
.c888-odds__table td {
    padding: .6rem .75rem;
    text-align: start;
    vertical-align: middle;
    border-block-end: 1px solid var(--c888-border, #2E2E2E);
}

.c888-odds__table thead th {
    font-size: var(--c888-font-size-xs, 12px);
    font-weight: 600;
    color: var(--c888-text-secondary, #C1C1C1);
    background: var(--c888-surface-2, #2B2B2B);
    white-space: nowrap;
}

.c888-odds__table tbody tr:last-child th,
.c888-odds__table tbody tr:last-child td {
    border-block-end: 0;
}

.c888-odds__table tbody tr:hover {
    background: var(--c888-surface-2, #2B2B2B);
}

/* --- the fixture cell --------------------------------------------------- */

.c888-odds__fixture {
    font-weight: 400;
    min-width: 11rem;
}

.c888-odds__when {
    display: block;
    font-size: var(--c888-font-size-xs, 12px);
    color: var(--c888-text-secondary, #C1C1C1);
    margin-block-end: .2rem;
}

.c888-odds__live {
    display: inline-block;
    padding: .1rem .4rem;
    border-radius: 3px;
    background: #D0021B;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.c888-odds__phase {
    margin-inline-start: .4rem;
}

.c888-odds__teams {
    display: block;
}

.c888-odds__team {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.c888-odds__score {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* --- the market cells --------------------------------------------------- */

.c888-odds__market {
    white-space: nowrap;
}

/* Each price. An <a> when the page links out, a <span> when it does not — the
   two must look identical, so everything here is on the shared class. */
.c888-odds__pick {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    min-width: 3.4rem;
    padding: .3rem .45rem;
    margin-inline-end: .25rem;
    border: 1px solid var(--c888-border, #2E2E2E);
    border-radius: 4px;
    background: var(--c888-surface-2, #2B2B2B);
    color: var(--c888-text, #fff);
    text-decoration: none;
    line-height: 1.2;
}

.c888-odds__pick:last-child {
    margin-inline-end: 0;
}

a.c888-odds__pick:hover,
a.c888-odds__pick:focus-visible {
    border-color: var(--c888-primary, #7BF037);
    background: var(--c888-surface, #2a2a2a);
}

.c888-odds__pick-name {
    font-size: 10px;
    color: var(--c888-text-secondary, #C1C1C1);
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c888-odds__pick-line {
    font-variant-numeric: tabular-nums;
}

.c888-odds__pick-odd {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

a.c888-odds__pick:hover .c888-odds__pick-odd,
a.c888-odds__pick:focus-visible .c888-odds__pick-odd {
    color: var(--c888-primary, #7BF037);
}

.c888-odds__empty {
    color: var(--c888-text-secondary, #C1C1C1);
}

.c888-odds__cta-wrap {
    margin-block-start: 1rem;
}

@media (max-width: 782px) {
    .c888-odds__table {
        /* The scroll container handles the overflow; without a floor the
           browser squeezes every market column to its narrowest glyph. */
        min-width: 32rem;
    }

    .c888-odds__pick-name {
        max-width: 4.5rem;
    }
}
