:root {
    color-scheme: light;

    /* Палитра — синхронизирована с главной (welcome.blade.php), чтобы хедер/футер
       и общие карточки выглядели одинаково на всех страницах. */
    --bg: #f6efe2;
    --surface: #fbf6ee;
    --surface-strong: #f0e3cf;
    --ink: #403528;
    --textPrimary: #333333;
    --textPrimaryBase: #3D5632;
    --hoverPrimaryLight: #516A46;
    --activePrimaryDark: #29421E;
    --gold: #bf8d4d;
    --line: rgba(64, 53, 40, 0.12);
    --shadow: 0 26px 60px rgba(77, 57, 31, 0.12);
    --darkBlue: #21212D;
    --white: #FFF;
    --lightBlue: #769AC9;
    --brown: #795F52;

    /* Admin accent — единый акцент для админ-сайдбара, кнопок «Сохранить»/«Просмотр»,
       active-стейтов в селектах. Меняется одной точкой. */
    --admin-accent: #769AC9;
    --admin-accent-hover: #5A7FAF;
    --admin-accent-soft: rgba(118, 154, 201, 0.1);

    /* Высота фиксированной шапки. Используется как padding-top у <main>,
       чтобы контент не уходил под шапку. Если меняешь высоту шапки —
       поправь и здесь, и scroll-padding-top ниже синхронно. */
    --header-height: 96px;

    /* Алиасы под старые имена, используемые в остальных UI-слоях. */
    --page-ink: var(--ink);
    --page-textPrimary: var(--textPrimary);
    --page-bg: var(--bg);
    --paper-bg: var(--surface);
    --paper-edge: var(--surface-strong);
    --sand: var(--surface);
    --green-dark: var(--hoverPrimaryLight);
    --danger: #a04f3f;
    --warning: #d2b850;
    --success: #3e6f48;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Sticky-шапка ~80px, оставляем отступ при переходе по якорю. */
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    /* Sticky footer: body — это flex-колонка во всю высоту, #app забирает свободное
       место, футер сидит снизу. Каркас работает с любым контентом любой высоты. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Jost-Regular", "Trebuchet MS", "Gill Sans", sans-serif;
    color: var(--ink);
    background: #F5F3F1;
}

#app.wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Шапка фиксирована — даём контенту отступ сверху, чтобы не уходил под неё.
   Footer прижимается к низу через flex (см. body выше). */
#app.wrapper > main {
    flex: 1 0 auto;
    padding-top: var(--header-height);
    @media (width < 1024px) {
        padding-top: 76px;
    }
}

/* Футер не сжимается, всегда внизу под main'ом */
#app.wrapper > .site-footer {
    flex-shrink: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Глобальный класс заголовков в фирменном стиле проекта.
   Используется для крупных секционных заголовков на главной и не только. */
.heading-monomakh {
    font-family: 'Monomakh-Regular', serif;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    color: var(--ink);
}

img {
    max-width: 100%;
    display: block;
}

.shell {
    /* width: min(1180px, calc(100% - 32px)); */
    width: 100%;
    padding: 0 clamp(1rem, 4vw, 3rem);
    max-width: 1440px;
    margin: 0 auto;
}


/* Чекбокс */
.custom-checkbox {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    position: relative;
    cursor: pointer;

    .custom-checkbox__check {
        width: 1.5rem;
        height: 1.5rem;
        min-width: 1.5rem;
        min-height: 1.5rem;
        border-radius: 0.25rem;
        border: 1px solid var(--lightBlue);
        position: relative;
        overflow: hidden;
        pointer-events: none;

        &::after {
            position: absolute;
            content: '';
            width: 100%;
            height: 100%;
            top: 0;
            right: 0;
        }
    }

    input {
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0,0,0,0);
        position: absolute;
        /* top: 0; */
        /* left: 0; */
        /* opacity: 0; */
        &:checked + .custom-checkbox__check {
            background-color: var(--lightBlue);
        }
        &:checked + .custom-checkbox__check::after {
            background: url('../../images/icons/icon-check-white.svg') no-repeat center;
            background-size: 90%;
        }
        &:focus-visible + .custom-checkbox__check {
            border: 1px solid var(--darkBlue);
            box-shadow: 0 0 0 3px rgba(var(--darkBlue), 0.2);
        }
    }

    .custom-checkbox__description {
        font-family: 'Jost-Regular',sans-serif;
        color: var(--darkBlue);
        font-size: 1rem;
        line-height: 130%;

        a {
            color: var(--lightBlue);
            text-decoration: underline;
            transition: 0.3s;

            &:hover {
                opacity: 0.5;
            }
        }
    }

    &.has-error .custom-checkbox__description {
        color: #c75454;
    }
}


.title-none {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    width: 1px;
    height: 1px;
    pointer-events: none;
}



/* Вопрос-ответ */
/* ++++ */
.faq__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq__item {
    border-bottom: 1px solid rgba(64, 53, 40, 0.12);
    margin-bottom: 10px;
}

.faq__row {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 6px 6px 15px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--darkBlue);
    font-size: clamp(16px, 2vw, 24px);
    line-height: 130%;
    font-weight: 500;
}

.faq__row:hover .faq__q { color: #5A7FAF; }

.faq__chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.faq__item.is-open .faq__chevron { transform: rotate(180deg); }

.faq__answer {
    padding: 0 0 18px;
    color: #5C5851;
    font-size: 15px;
    line-height: 1.55;
    overflow: hidden;
}

.faq__short { margin: 0 0 8px; }

.faq__more {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #769AC9;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.faq__more:hover { color: #5A7FAF; }

.faq-acc-enter-active, .faq-acc-leave-active {
    transition: max-height 0.25s ease, opacity 0.2s ease;
    max-height: 400px;
}
.faq-acc-enter-from, .faq-acc-leave-to { max-height: 0; opacity: 0; }
/* +++ */


/*  */
.tooltip {
    position: relative;
}
.tooltip__text {
    border: 1px solid var(--white);
    background-color: #333333;
    color: #FFFFFF;
    font-size: clamp(12px, 1vw, 14px);
    text-transform: none;
    padding: 8px 16px;
    border-radius: 8px;
    width: 290px;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 100%;
    z-index: 1;
    transform: translateX(-50%);
    display: none;
    transition: 0.3s;
}
.tooltip__toggle:hover + .tooltip__text {
  display: block;
}
/*  */
