/* ==========================================================================
   Шаблон sv — CSS поверх Bootstrap 5.3.8.
   Кольори, шрифти, радіуси, тіні — ЛИШЕ через var(--…) теми (лист Themes)
   або color-mix() від них. Жодного #hex / rgb() / hsl() літералом.
   ========================================================================== */

/* ============================== BASE — контракт, не видаляти ===============
   Функціональні правила, на які спираються білдер і sc-shortcodes.js.
   Вигляд міняй у секції DESIGN нижче. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: clip; }
[data-theme-mode="dark"] { color-scheme: dark; }
[data-theme-mode="light"] { color-scheme: light; }
img { max-width: 100%; height: auto; }
/* Довге слово чи URL у тексті не має розпирати сторінку на телефоні. */
body { overflow-wrap: break-word; }

:root {
    --bs-body-bg: var(--body-bg);
    --bs-body-color: var(--text-color);
    --bs-body-font-family: var(--body-font-family);
    --bs-body-font-size: var(--body-font-size);
    --bs-body-font-weight: var(--body-weight);
    --bs-body-line-height: var(--body-line-height);
    --bs-heading-color: var(--heading-color);
    --bs-secondary-color: var(--muted-text-color);
    --bs-border-color: var(--border-color);
    --bs-border-radius: var(--global-radius);
    --bs-emphasis-color: var(--heading-color);
    --bs-link-color-rgb: inherit;
}

@media (min-width: 1200px) {
    .container { max-width: var(--container-width); }
}

:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Логотип: текстова заглушка, коли картинка не завантажилась (клас
   .is-missing ставить sc-shortcodes.js). Без цих правил назва сайту
   показувалась би поруч із логотипом завжди. */
.site-logo-text--fallback { display: none; }
.site-logo.is-missing .site-logo-image { display: none; }
.site-logo.is-missing .site-logo-text--fallback { display: block; }
.site-logo-image { display: block; width: auto; }
.footer-logo { display: block; width: auto; }
.footer-logo-wrap { display: block; }
.footer-logo-text { display: none; }
.footer-logo-wrap.is-missing .footer-logo { display: none; }
.footer-logo-wrap.is-missing .footer-logo-text { display: block; }

/* Меню, які генерує білдер: <nav class="header-nav"><ul><li><a>… */
.header-nav ul, .footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-menu-title { display: block; }     /* це span, а не h2 */
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.header-cta { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; text-decoration: none; }

/* Проза контенту — лише елементи БЕЗ класу: у блоків шорткодів (.sc-*) свої
   класи й відступи, і правило з вищою специфічністю зламало б їх. */
.content-section p:not([class]),
.content-section ul:not([class]),
.content-section ol:not([class]) { margin-bottom: 1.1em; }
.content-section li:not([class]) { margin-bottom: .4em; }

/* ============================== DESIGN — під скріншот ======================
   Бічна панель зліва (лого + вертикальне меню), тонка верхня смуга з кнопкою
   праворуч, «шапка» сторінки — великий uppercase H1 на сяйві, футер з логотипом,
   сіткою меню й горизонтальними роздільниками. */

:root {
    --sv-side-w: 240px;
    --sv-top-h: 72px;
    --sv-side-bg: color-mix(in srgb, var(--header-bg) 100%, transparent);
}

body {
    background-color: var(--body-bg);
    color: var(--text-color);
    font-family: var(--body-font-family);
    font-size: var(--body-font-size);
    font-weight: var(--body-weight);
    line-height: var(--body-line-height);
}

h1, h2, h3, h4 {
    font-family: var(--heading-font-family);
    font-weight: var(--heading-weight);
    color: var(--heading-color);
}
h1 { font-size: clamp(28px, 6vw, var(--h1-size)); line-height: 1.1; }
h2 { font-size: clamp(23px, 4.4vw, var(--h2-size)); line-height: 1.2; }
h3 { font-size: clamp(19px, 3.4vw, var(--h3-size)); line-height: 1.3; }

a { color: var(--link-color); transition: color var(--transition-speed) ease; }
a:hover { color: var(--link-hover-color); }

.sv-wrap { width: 100%; max-width: var(--container-width); margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }

/* ---------- Хедер: бічна панель + верхня смуга ---------- */
.sv-header { color: var(--header-text); }
.sv-logo { display: inline-flex; align-items: center; color: var(--header-text); text-decoration: none; }
.sv-logo .site-logo-text { font-family: var(--heading-font-family); font-weight: var(--heading-weight); font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; color: var(--header-text); }
.site-logo-image { max-height: 60px; }

.sv-burger {
    display: inline-flex; flex-direction: column; justify-content: center;
    width: 44px; height: 44px; padding: 0 10px;
    background: color-mix(in srgb, var(--header-bg) 85%, var(--header-text));
    border: 0; border-radius: var(--global-radius);
}
.sv-burger__bar { display: block; width: 100%; height: 2px; margin: 3px 0; background-color: var(--header-link); border-radius: 2px; }

.header-nav a {
    position: relative;
    display: flex; align-items: center; gap: .9rem;
    padding: .8rem 1rem;
    color: var(--header-link);
    text-decoration: none;
    font-size: 1.05rem; font-weight: 500;
    border-radius: var(--global-radius);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}
.header-nav a::before {
    content: ""; flex: 0 0 22px; height: 22px;
    border: 2px solid color-mix(in srgb, var(--header-link) 75%, transparent);
    border-radius: calc(var(--global-radius) * .5 + 3px);
    background: radial-gradient(circle, color-mix(in srgb, var(--header-link) 75%, transparent) 3px, transparent 3.5px);
}
.header-nav a:hover { color: var(--header-link-hover); background-color: color-mix(in srgb, var(--header-bg) 95%, var(--header-text)); }
.header-nav a[aria-current="page"] { color: var(--header-text); font-weight: 700; background-color: color-mix(in srgb, var(--header-bg) 93%, var(--header-text)); }
.header-nav a[aria-current="page"]::before { border-color: var(--accent-color); background: radial-gradient(circle, var(--accent-color) 4px, transparent 4.5px); }

.header-cta {
    min-height: 48px;
    padding: .7rem 1.6rem;
    border: var(--button-border);
    border-radius: var(--button-radius);
    background-color: var(--button-bg);
    color: var(--button-text);
    font-family: var(--heading-font-family);
    font-weight: 800; font-size: .95rem;
    text-transform: uppercase; letter-spacing: .03em;
    box-shadow: var(--button-shadow);
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.header-cta:hover { background-color: var(--button-hover-bg); color: var(--button-hover-text); transform: translateY(-1px); }

/* Десктоп: фіксована бічна панель і верхня смуга */
@media (min-width: 992px) {
    body.sv-page { padding-left: var(--sv-side-w); padding-top: var(--sv-top-h); }
    .sv-side {
        position: fixed; inset: 0 auto 0 0; z-index: 1031;
        width: var(--sv-side-w);
        display: flex; flex-direction: column;
        padding: 18px 16px 24px;
        background-color: var(--header-bg);
        border-right: 1px solid var(--header-border);
        overflow-y: auto;
    }
    .sv-side__head { display: flex; justify-content: center; padding-bottom: 28px; margin-bottom: 18px; border-bottom: 1px solid var(--header-border); }
    .sv-burger { display: none; }
    .sv-side .sv-nav.collapse { display: block; }
    .header-nav ul { display: flex; flex-direction: column; gap: 4px; }
    .sv-top {
        position: fixed; top: 0; left: var(--sv-side-w); right: 0; z-index: 1030;
        height: var(--sv-top-h);
        display: flex; align-items: center; justify-content: flex-end; gap: 12px;
        padding-inline: clamp(16px, 3vw, 40px);
        background-color: var(--header-bg);
        border-bottom: 1px solid var(--header-border);
        box-shadow: var(--header-shadow);
    }
}

/* Мобільний: одна смуга лого · кнопка · бургер, меню під нею */
@media (max-width: 991.98px) {
    .sv-header {
        position: sticky; top: 0; z-index: 1030;
        display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
        min-height: 64px; padding: 8px 16px;
        background-color: var(--header-bg);
        border-bottom: 1px solid var(--header-border);
        box-shadow: var(--header-shadow);
    }
    .sv-side, .sv-top { display: contents; }
    .sv-side__head { order: 1; margin-right: auto; min-width: 0; }
    .site-logo-image { max-height: 44px; }
    .sv-top .header-cta { order: 2; min-height: 40px; padding: .5rem 1rem; font-size: .8rem; }
    .sv-burger { order: 3; }
    .sv-nav { order: 4; flex: 0 0 100%; }
    .sv-nav .header-nav { padding: 8px 0 6px; border-top: 1px solid var(--header-border); margin-top: 6px; }
}
@media (max-width: 400px) {
    .sv-header { gap: 6px; padding-inline: 10px; }
    .site-logo-image { max-height: 36px; max-width: 110px; }
    .sv-logo .site-logo-text { font-size: 1rem; }
    .sv-top .header-cta { padding: .45rem .7rem; font-size: .72rem; letter-spacing: 0; }
    .sv-burger { width: 40px; height: 40px; }
}

/* ---------- «Шапка» сторінки: великий заголовок на сяйві ---------- */
.sv-hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; align-items: center;
    min-height: clamp(220px, 34vw, 460px);
    padding-block: clamp(36px, 6vw, 80px);
    background-color: var(--body-bg);
}
.sv-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 90% at 88% 20%, color-mix(in srgb, var(--accent-color) 30%, transparent), transparent 70%),
        radial-gradient(50% 70% at 70% 0%, color-mix(in srgb, var(--link-color) 22%, transparent), transparent 70%),
        linear-gradient(115deg, transparent 38%, color-mix(in srgb, var(--heading-color) 7%, transparent) 50%, transparent 62%);
}
.sv-hero::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 40%; z-index: -1;
    background: linear-gradient(to bottom, transparent, var(--body-bg));
}
.sv-hero__inner { position: relative; }
.sv-title {
    margin: 0; max-width: 20ch;
    font-size: clamp(28px, 4.2vw, calc(var(--h1-size) * 1.3));
    font-weight: 800; line-height: 1.12;
    text-transform: uppercase; letter-spacing: -.005em;
    text-wrap: balance;
}
.breadcrumbs { margin-bottom: 1.1rem; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-text-color); }
.breadcrumbs li + li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 .7rem .12em; border-radius: 50%; background: var(--accent-color); }
.breadcrumbs a { color: var(--muted-text-color); text-decoration: none; }
.breadcrumbs a:hover { color: var(--link-color); }

/* ---------- Контент ---------- */
.sv-content { padding-block: clamp(24px, 3vw, 40px) var(--section-spacing); background-color: var(--content-bg); color: var(--text-color); }
.sv-article { background-color: transparent; }
.sv-article > :first-child { margin-top: 0; }
.sv-article > :last-child { margin-bottom: 0; }
.content-section h2:not([class]) {
    margin-top: 1.8em; margin-bottom: .7em;
    text-transform: uppercase; font-weight: 800; letter-spacing: .01em;
}
.content-section h3:not([class]) { margin-top: 1.5em; margin-bottom: .55em; font-weight: 700; }
.content-section article > p:not([class]):first-child { font-size: 1.12em; color: var(--heading-color); }
.content-section p:not([class]), .content-section ul:not([class]), .content-section ol:not([class]) { color: var(--text-color); }
.content-section a:not([class]) { color: var(--link-color); text-underline-offset: 3px; }
.content-section a:not([class]):hover { color: var(--link-hover-color); }
.content-section ul:not([class]) li:not([class])::marker { color: var(--accent-color); }
.sv-article > h2, .sv-article > h3, .sv-article > p,
.sv-article > ul, .sv-article > ol { max-width: var(--content-max-width); }

/* Картки шорткодів — тонка рамка й м'яке підсвічування, як плитки на скріні */
.sv-content .sc-game-card, .sv-content .sc-bonus-card { border: 1px solid var(--card-border); transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease; }
.sv-content .sc-game-card:hover, .sv-content .sc-bonus-card:hover { box-shadow: var(--card-hover-shadow); transform: translateY(-2px); }

/* ---------- Футер ---------- */
.sv-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding-block: clamp(36px, 5vw, 64px) 32px;
}
.sv-footer a { color: var(--footer-link); text-decoration: none; }
.sv-footer a:hover { color: var(--footer-link-hover); }
.sv-footer__logo { margin-bottom: 2.2rem; }
.footer-logo { max-height: 56px; }
.footer-logo-text, .sv-footer__name { font-family: var(--heading-font-family); font-weight: var(--heading-weight); font-size: 1.4rem; text-transform: uppercase; color: var(--footer-text); }

.sv-footer__menus {
    border-bottom: 1px solid var(--footer-border);
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem;
    padding-bottom: 2.2rem;
}
.footer-menu-title { margin-bottom: 1rem; font-family: var(--heading-font-family); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--footer-muted); }
.footer-nav ul { display: flex; flex-direction: column; gap: .75rem; }
.footer-nav a { font-weight: 700; font-size: .95rem; }

/* Знаки відповідальної гри — рядком, без рамок, сірі, як на скріні */
.sv-footer__marks { margin-block: 1.4rem; }
.sv-footer__marks .sc-logos { margin: 0; }
.sv-footer__marks .sc-logos__list { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: 0; padding: 0; }
.sv-footer__marks .sc-logos__item { flex: 0 0 auto; }
.sv-footer__marks .sc-logos__frame { display: flex; align-items: center; height: 64px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.sv-footer__marks .sc-logos__img { width: auto; height: 56px; max-height: none; max-width: 150px; object-fit: contain; opacity: .85; transition: opacity var(--transition-speed) ease; }
.sv-footer__marks .sc-logos__item:hover .sc-logos__img { opacity: 1; }
@media (max-width: 575.98px) {
    .sv-footer__marks .sc-logos__list { gap: 10px 18px; }
    .sv-footer__marks .sc-logos__frame { height: 48px; }
    .sv-footer__marks .sc-logos__img { height: 42px; }
}

.sv-footer__legal { padding-top: 1.6rem; font-size: .9rem; color: var(--footer-muted); }
.sv-footer__legal .footer-brand-text, .sv-footer__legal p { margin: 0 0 .9rem; color: var(--footer-muted); }
.sv-footer__legal a { text-decoration: underline; text-underline-offset: 3px; }
.sv-footer__mail { display: inline-block; font-weight: 600; }

@media (max-width: 767.98px) {
    .sv-footer__menus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    .sv-footer__menus { grid-template-columns: 1fr; }
}
