/* Юридические страницы SITE — как в SHOP: светлый поток, hero + card + aside */

.legal-page {
    --legal-ink: #1A1F3A;
    --legal-ink-soft: #2A314F;
    --legal-page: #FFF1E6;
    --legal-page-soft: #FFF8F2;
    --orange: #FF6B35;
    --orange-dark: #E4561F;
    --font-head: "Unbounded", "Manrope", system-ui, sans-serif;
    background: var(--legal-page-soft) !important;
}

/* Меню лежит на градиенте hero и становится персиковым только после прокрутки */
.legal-page .navbar {
    min-height: 64px;
    padding: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: 0 !important;
}

.legal-page .navbar > .container {
    min-height: 64px;
}

.legal-page .navbar.scrolled,
.legal-page .navbar:has(.navbar-collapse.show) {
    background: rgba(255, 241, 230, .92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 22px rgba(26, 26, 46, .05) !important;
    border-bottom: 1px solid rgba(255, 140, 80, .12) !important;
}

.legal-page .navbar-brand {
    gap: 10px;
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    color: #1A1A2E !important;
}

.legal-page .navbar .nav-link {
    margin: 0;
    padding: 8px 14px !important;
    border-radius: 10px;
    background: transparent !important;
    color: #2B2B3D !important;
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.legal-page .navbar .nav-link:hover,
.legal-page .navbar .nav-link.active {
    background: #FFF1E8 !important;
    color: var(--orange-dark) !important;
}

.legal-page .navbar .nav-link.btn-login,
.legal-page .navbar .nav-link.btn-login:hover,
.legal-page .navbar .nav-link.btn-login.active {
    background: var(--orange) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 12px !important;
    padding: 8px 14px !important;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(255, 107, 53, .28);
}

.legal-page .navbar .nav-link.btn-login:hover {
    background: var(--orange-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(255, 107, 53, .36);
}

.legal-page .navbar-toggler {
    border-color: rgba(26, 31, 58, 0.16);
    background: #fff;
}

.legal-page .navbar-toggler-icon {
    filter: invert(1) brightness(0.25);
}

@media (min-width: 1200px) {
    .legal-page .navbar-collapse {
        flex-grow: 1;
    }

    .legal-page .navbar-nav {
        align-items: center;
        gap: 6px;
        width: 100%;
        margin-left: 22px !important;
        margin-right: 0 !important;
    }

    .legal-page .navbar-nav .nav-item:last-child {
        margin-left: auto;
    }
}

.legal-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 112px 0 40px;
    background:
        radial-gradient(ellipse 60% 55% at 95% 0%, rgba(255, 176, 80, .35), transparent 55%),
        radial-gradient(ellipse 50% 50% at 0% 60%, rgba(255, 107, 53, .18), transparent 55%),
        linear-gradient(180deg, #FFE8D6 0%, var(--legal-page) 55%, var(--legal-page-soft) 100%);
    color: var(--legal-ink);
}

.legal-hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 72% 22%, rgba(255, 138, 76, .16), transparent 40%),
        radial-gradient(circle at 16% 12%, rgba(255, 210, 63, .14), transparent 36%);
}

.legal-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.legal-hero-head {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0 0 22px;
    border-bottom: 1px solid rgba(26, 31, 58, .1);
}

.legal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0;
    padding: 7px 12px;
    border-radius: 999px;
    background: #FFEFE4;
    border: 1px solid #F5D0B5;
    color: var(--orange-dark);
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.legal-hero h1 {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(30px, 4.2vw, 44px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--legal-ink);
}

.legal-hero-lead {
    margin: 0;
    width: 100%;
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: #3F4660;
}

@media (max-width: 720px) {
    .legal-hero-lead { white-space: normal; }
}

.legal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legal-tabs a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #E8E4DC;
    background: rgba(255, 255, 255, .72);
    color: var(--legal-ink-soft);
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none !important;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.legal-tabs a:hover {
    background: #fff;
    border-color: #F5D0B5;
    color: var(--orange-dark);
    transform: translateY(-1px);
}

.legal-tabs a.is-active {
    background: linear-gradient(135deg, #FF8A4C, var(--orange));
    border-color: transparent;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(255, 107, 53, .28);
}

.legal-section {
    position: relative;
    z-index: 1;
    padding-top: 8px;
    padding-bottom: 56px;
    background: transparent;
}

.legal-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.legal-card {
    padding: 30px 32px 36px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid rgba(26, 31, 58, .06);
    box-shadow:
        0 18px 40px rgba(18, 22, 43, .05),
        inset 0 1px 0 rgba(255, 255, 255, .8);
}

.legal-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #EEF0F5;
    color: #7A8196;
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.legal-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legal-card-meta i { color: var(--orange); }

.legal-meta-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #F5D0B5;
    background: #FFF7F2;
    color: var(--orange);
    font: inherit;
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.legal-meta-btn:hover {
    background: #FFEFE6;
    box-shadow: 0 8px 18px rgba(255, 107, 53, .12);
    transform: translateY(-1px);
}

.legal-doc {
    max-width: none;
    font-family: "Manrope", "Poppins", sans-serif;
}

.legal-doc > *:first-child { margin-top: 0; }

.legal-muted {
    color: #7A8196;
}

.legal-doc h1,
.legal-doc h2,
.legal-doc h3,
.legal-doc h4 {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--legal-ink);
    line-height: 1.35;
}

.legal-doc h1 {
    font-size: 22px;
    margin: 0 0 16px;
}

.legal-doc h2 {
    margin: 40px 0 14px;
    padding: 2px 0 2px 16px;
    border-left: 3px solid var(--orange);
    border-radius: 2px;
    font-size: 19px;
}

.legal-doc h2:first-of-type {
    margin-top: 6px;
}

.legal-doc h2 + p {
    margin-top: 0;
}

.legal-doc h3 {
    font-size: 17px;
    margin: 26px 0 10px;
    color: #2A314F;
    font-family: "Manrope", "Poppins", sans-serif;
    font-weight: 800;
}

.legal-doc h4 {
    font-size: 15px;
    margin: 20px 0 8px;
    font-family: "Manrope", "Poppins", sans-serif;
    font-weight: 800;
}

.legal-doc p {
    font-size: 16.5px;
    line-height: 1.6;
    margin: 0 0 14px;
    color: #3A415C;
}

.legal-doc li {
    color: #3A415C;
    font-size: 15.5px;
    line-height: 1.5;
}

.legal-doc ul,
.legal-doc ol {
    margin: 0 0 16px;
    padding-left: 0;
    display: grid;
    gap: 8px;
    list-style: none;
}

.legal-doc ul > li,
.legal-doc ol > li {
    position: relative;
    padding: 10px 14px 10px 40px;
    border-radius: 12px;
    background: #F7F8FC;
    border: 1px solid #EEF0F5;
}

.legal-doc ul > li::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 1.05em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
}

.legal-doc ol {
    counter-reset: legal-ol;
}

.legal-doc ol > li {
    counter-increment: legal-ol;
}

.legal-doc ol > li::before {
    content: counter(legal-ol);
    position: absolute;
    left: 12px;
    top: 10px;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #FFF1EA;
    color: var(--orange-dark);
    font-size: 12px;
    font-weight: 800;
}

.legal-doc a {
    color: var(--orange);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-doc a:hover {
    color: var(--orange-dark);
}

.legal-doc strong,
.legal-doc b {
    font-weight: 800;
}

/* Таблицы — как в SHOP */
.legal-doc .table-responsive,
.legal-doc .legal-table-wrap {
    margin: 12px 0 22px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.legal-doc table {
    width: 100%;
    min-width: 0;
    margin: 12px 0 22px;
    border-collapse: collapse;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    font-size: 14.5px;
    line-height: 1.5;
}

.legal-doc .legal-table-wrap > table,
.legal-doc .table-responsive > table {
    margin: 0;
    min-width: 480px;
}

.legal-doc table th,
.legal-doc table td,
.legal-doc .table > :not(caption) > * > *,
.legal-doc .table-bordered > :not(caption) > * > * {
    border: 0;
    box-shadow: none;
}

.legal-doc table thead th,
.legal-doc table tr:first-child th {
    padding: 10px 0 10px 12px;
    background: transparent;
    color: #2A314F;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .02em;
    text-align: left;
    white-space: normal;
    border-bottom: 1px solid rgba(26, 31, 58, 0.12);
}

.legal-doc table thead th:first-child,
.legal-doc table tr:first-child th:first-child {
    padding-left: 0;
}

.legal-doc table tbody td,
.legal-doc table td {
    padding: 12px 0 12px 12px;
    color: #3A415C;
    vertical-align: top;
    border-bottom: 1px solid rgba(26, 31, 58, 0.08);
    background: transparent;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.legal-doc table tbody td:first-child,
.legal-doc table td:first-child {
    padding-left: 0;
}

.legal-doc table tbody tr:nth-child(even) td {
    background: transparent;
}

.legal-doc table tbody tr:last-child td,
.legal-doc table tr:last-child td {
    border-bottom: 0;
}

.legal-doc table tbody tr:hover td {
    background: transparent;
}

.legal-doc table th:first-child,
.legal-doc table td:first-child {
    width: 1%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #5A6178;
}

.legal-doc table th:last-child,
.legal-doc table td:last-child {
    padding-right: 0;
}

.legal-doc h2 + .legal-table-wrap,
.legal-doc h2 + .table-responsive,
.legal-doc h2 + table {
    margin-top: 4px;
}

.legal-doc table p {
    margin: 0 0 .35em;
    font-size: inherit;
    line-height: inherit;
}

.legal-doc table p:last-child {
    margin-bottom: 0;
}

/* Aside */
.legal-aside {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 96px;
}

.legal-aside-card {
    padding: 20px 18px;
    border-radius: 22px;
    background: linear-gradient(165deg, #1A1F3A, #12162B);
    color: #F4F1EC;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 16px 36px rgba(18, 22, 43, .14);
}

.legal-aside-card h2 {
    margin: 0 0 14px;
    font-family: var(--font-head);
    font-size: 16px;
    color: #fff;
}

.legal-aside-links {
    display: grid;
    gap: 8px;
}

.legal-aside-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    color: #F4F1EC !important;
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.legal-aside-links a:hover {
    background: rgba(255, 107, 53, .2);
    color: #FFB08A !important;
    transform: translateX(2px);
}

.legal-aside-links i {
    width: 16px;
    text-align: center;
    color: #FFB08A;
}

.legal-aside-nav {
    background: #fff;
    color: var(--legal-ink);
    border: 1px solid rgba(26, 31, 58, .06);
    box-shadow: 0 12px 28px rgba(18, 22, 43, .05);
}

.legal-aside-nav h2 { color: var(--legal-ink); }

.legal-aside-nav .legal-aside-links a {
    background: #F7F8FC;
    color: var(--legal-ink) !important;
}

.legal-aside-nav .legal-aside-links a:hover {
    background: #FFF1EA;
    color: var(--orange) !important;
}

.legal-aside-nav .legal-aside-links i { color: var(--orange); }

.legal-footer {
    background: #1A1F3A;
    color: rgba(255, 255, 255, 0.7);
    padding: 22px 0;
}

.legal-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
}

.legal-footer-copy {
    margin: 0;
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 0.9rem;
}

.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.legal-footer-links a,
.legal-footer-links button {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72) !important;
    font-family: "Manrope", "Poppins", sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.legal-footer-links a:hover,
.legal-footer-links button:hover {
    color: #FFB08A !important;
}

@media (prefers-reduced-motion: reduce) {
    .legal-tabs a:hover,
    .legal-meta-btn:hover,
    .legal-aside-links a:hover { transform: none; }
}

@media (max-width: 900px) {
    .legal-hero { padding: 96px 0 28px; }

    .legal-section-grid {
        grid-template-columns: 1fr;
    }

    .legal-aside { position: static; }

    .legal-card { padding: 22px 18px 26px; }

    .legal-meta-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .legal-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
