/* ===== Контейнеры ===== */
.legal-container {
    max-width: 1420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    /* добавим отступы по бокам для мобильных */
}

/* ===== Секции ===== */
.legal-intro-section,
.legal-docs-section,
.legal-updates-section {
    background: var(--color-bg);
}

.legal-docs-section {
    margin-bottom: 52px;
}

/* ===== Заголовок ===== */
.legal-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--color-primary);
}

/* ===== Интро ===== */
.legal-intro-accent {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--color-bg-light);
    border-radius: 16px;
    align-items: flex-start;
    margin: 32px 0;
}

.legal-intro-secondary {
    font-size: 18px;
    line-height: 1.6;
}

/* ===== Изображение интро ===== */
.legal-intro-image {
    width: 36px;
    height: 36px;
    filter: brightness(0) saturate(100%) invert(51%) sepia(89%) saturate(2470%) hue-rotate(330deg) brightness(96%) contrast(101%);
}

.legal-intro-image.masked {
    width: 36px;
    height: 36px;
    background-color: var(--color-accent);
    mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
}

/* ===== Документы ===== */
.legal-subtitle {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--color-bg-light);
    border-radius: 16px;
    align-items: flex-start;
    margin: 32px 0;
}

.legal-docs-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.legal-doc-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    transition: .3s;
}

.legal-doc-item> :is(span, p, div, h3, h4) {
    flex: 1;
    min-width: 0;
}

.legal-doc-item strong {
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}


.legal-doc-item>div {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.legal-doc-item>div strong {
    margin-left: auto;
    white-space: nowrap;
}

/* Мобилка: 1 документ в строке (одна карточка на ряд) */
@media (max-width: 768px) {
    .legal-docs-list {
        grid-template-columns: 1fr;
    }
}

.legal-doc-item:hover {
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.legal-doc-item img {
    width: 48px;
}

/* ===== Слайдер карточки ===== */
.legal-update-card {
    background: var(--color-bg-light);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    min-height: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: .3s;
}

.legal-update-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.legal-update-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.legal-update-card p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.legal-update-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: auto;
}

/* ===== Слайдер ===== */
.swiper {
    margin: 26px 0 !important;
}

/* ===== Стрелки ===== */
/* ===== Стрелки вне слайда ===== */
.legal-swiper {
    position: relative;
}

.legal-swiper .swiper-button-next,
.legal-swiper .swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

/* Стрелки-иконки */
.legal-swiper .swiper-button-next::after,
.legal-swiper .swiper-button-prev::after {
    font-size: 20px;
    color: #fff;
}

/* Hover эффект */
.legal-swiper .swiper-button-next:hover,
.legal-swiper .swiper-button-prev:hover {
    background: var(--color-accent);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Расположение стрелок снаружи */
.legal-swiper .swiper-button-next {
    right: -60px;
    /* справа за пределами слайда */
}

.legal-swiper .swiper-button-prev {
    left: -60px;
    /* слева за пределами слайда */
}

/* Адаптив для мобильных */
@media (max-width: 768px) {

    .legal-swiper .swiper-button-next,
    .legal-swiper .swiper-button-prev {
        width: 36px;
        height: 36px;
    }

    .legal-swiper .swiper-button-next {
        right: -40px;
    }

    .legal-swiper .swiper-button-prev {
        left: -40px;
    }
}



/* ===== Пагинация ===== */
.swiper-pagination-bullet {
    background: rgba(0, 0, 0, 0.2);
}

.swiper-pagination-bullet-active {
    background: var(--color-accent) !important;
}

/* ===== Адаптив ===== */
@media (max-width: 1200px) {
    .legal-container {
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    .legal-container {
        padding: 0 16px;
        /* контент прижимаем к краям */
    }

    .legal-intro-section,
    .legal-docs-section,
    .legal-updates-section {
        padding: 40px 0;
    }

    .legal-title {
        font-size: 32px;
    }

    .legal-intro-secondary {
        font-size: 16px;
    }

    .legal-update-card h3 {
        font-size: 18px;
    }

    .legal-update-card p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .legal-title {
        font-size: 28px;
    }

    .legal-intro-secondary {
        font-size: 14px;
    }

    .legal-update-card h3 {
        font-size: 16px;
    }

    .legal-update-card p {
        font-size: 13px;
    }
}