/* Статические страницы (контент из редактора WP) */
.site-page {
    padding: 3rem 6vw 5rem;
    max-width: 52rem;
    margin: 0 auto;
}

.site-page__inner {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 2.25rem 3rem;
    box-shadow: 0 12px 40px rgba(46, 48, 87, 0.08);
}

.site-page .title {
    margin-bottom: 1.5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

/* Шаблон «Юридическая страница»: H1 только из редактора — тот же масштаб, что у .title */
.site-page--legal .entry-content--no-template-title > h1:first-child {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-family: 'Geometria', 'Montserrat', sans-serif;
    font-weight: 600;
    color: #2e3057;
    line-height: 1.25;
}

.site-page--legal .entry-content--no-template-title > .wp-block-heading:first-child h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-family: 'Geometria', 'Montserrat', sans-serif;
    font-weight: 600;
    color: #2e3057;
    line-height: 1.25;
}

.site-page__content {
    font-family: 'Open Sans', 'Geometria', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #2e3057;
}

.site-page__content h2 {
    font-family: 'Geometria', 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin: 2rem 0 0.75rem;
    color: #2e3057;
}

.site-page__content p {
    margin: 0 0 1rem;
}

.site-page__content ul {
    margin: 0 0 1rem 1.1rem;
    padding: 0;
}

.site-page__content li {
    margin-bottom: 0.35rem;
}

.site-page__content a {
    color: #464890;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-page__content a:hover {
    color: #2e3057;
}

/* Футер: юр. блок (поверх декора .footer-text-decor) */
.footer-legal {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-bottom: calc(max(calc(1.25 * 1vw), 15px) * 2);
    padding-top: 0.5rem;
    font-size: calc(max(calc(1 * 1vw), 15px) * 0.75);
    line-height: 1.5;
    color: #313234;
    color: var(--color-text-primary, #313234);
}

.footer-legal__entity {
    margin: 0 0 0.35rem;
    font-family: "Geometria", var(--ffG, sans-serif);
    font-weight: 500;
    font-size: max(calc(1 * 1vw), 15px);
    font-size: var(--fz, 15px);
}

.footer-legal__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-top: 0.65rem;
}

.footer-legal__links a {
    color: #464890;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-legal__links a:hover {
    color: #2e3057;
}

/* Cookie-баннер: текст слева, кнопка «Принять» справа (как референс, цвета DAIVEN) */
.deiven-cookie {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    padding: max(1rem, env(safe-area-inset-bottom));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.deiven-cookie[hidden] {
    display: none !important;
}

.deiven-cookie__panel {
    pointer-events: auto;
    width: 100%;
    max-width: min(70rem, calc(100vw - 2rem));
    background: #ffffff;
    color: #313234;
    border-radius: clamp(18px, 3vw, 28px);
    padding: clamp(1rem, 2.2vw, 1.35rem) clamp(1.1rem, 2.5vw, 1.75rem);
    border: 1px solid rgba(70, 72, 144, 0.1);
    box-shadow:
        0 4px 24px rgba(46, 48, 87, 0.07),
        0 16px 48px rgba(46, 48, 87, 0.1);
    animation: deiven-cookie-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .deiven-cookie__panel {
        animation: none;
    }
}

@keyframes deiven-cookie-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deiven-cookie__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 1.75rem;
}

.deiven-cookie__text {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-family: 'Open Sans', 'Geometria', sans-serif;
    font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
    line-height: 1.55;
    color: #313234;
    color: var(--color-text-primary, #313234);
}

.deiven-cookie__text a {
    color: #464890;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.deiven-cookie__text a:hover {
    color: #2e3057;
}

.deiven-cookie__accept {
    flex-shrink: 0;
    align-self: center;
    border: none;
    cursor: pointer;
    font-family: 'Geometria', 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: #fff;
    padding: 0.65rem clamp(1.5rem, 4vw, 2rem);
    border-radius: 999px;
    background: linear-gradient(165deg, #5c61c8 0%, #5b5fb4 40%, #464890 100%);
    box-shadow: 0 4px 18px rgba(70, 72, 144, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.deiven-cookie__accept:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 22px rgba(70, 72, 144, 0.42);
}

.deiven-cookie__accept:active {
    transform: scale(0.98);
}

.deiven-cookie__accept:focus-visible {
    outline: 3px solid rgba(91, 95, 180, 0.55);
    outline-offset: 3px;
}

body.deiven-cookie--open {
    padding-bottom: 0;
}

@media (max-width: 640px) {
    .deiven-cookie__row {
        flex-direction: column;
        align-items: stretch;
    }

    .deiven-cookie__accept {
        width: 100%;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

/* Чекбокс согласия: на всю ширину колонки формы, сетка — чекбокс ровно у первой строки текста */
.feedback-consent {
    width: 100%;
    max-width: 100%;
    margin-top: 0.75rem;
    padding-top: 0;
    border-top: none;
    margin-bottom: 0;
    box-sizing: border-box;
}

/* Отступ между согласием и кнопкой отправки */
#contacts #feedback-form .form-btn {
    margin-top: 2rem;
}

.feedback-consent__label {
    display: grid;
    grid-template-columns: 1.125rem minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: start;
    margin: 0;
    cursor: pointer;
    font-family: "Open Sans", "OpenSans", sans-serif;
    font-size: calc(max(calc(1 * 1vw), 15px) * 0.82);
    font-size: calc(var(--fz, 15px) * 0.82);
    line-height: 1.55;
    color: #383a6d;
}

.feedback-consent__label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.32em 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: #464890;
    cursor: pointer;
    align-self: start;
}

.feedback-consent__text {
    display: block;
    min-width: 0;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.feedback-consent__label a {
    color: #464890;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.feedback-consent__label a:hover {
    color: #2e3057;
}
