/* ================= БАЗОВЫЕ СТИЛИ ================= */
.legal {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.legal-page{
    padding-bottom: 5rem;
}
.legal-top {
    border-radius: 1rem;
    background: var(--1, linear-gradient(319deg, #3BC3F3 30%, #2399D2 60%));
    display: flex;
    padding: 2.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    align-self: stretch;
}

.legal-title {
    color: #FFF;
    font-size: 3rem;
    font-style: normal;
    font-weight: 400;
    line-height: 110%;
    text-transform: none !important;
    margin-bottom: 0 !important;
}

.legal-title,
.legal-top p {
    max-width: 38rem;
}

.legal-top p {
    color: #FFF;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    opacity: 0.7;
}

/* ================= НАВИГАЦИЯ (legal-nav) ================= */
.legal-nav {
    border-radius: 0.375rem;
    border: 1px solid rgba(59, 195, 243, 0.50);
    background: #FFF;
    display: flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    gap: 1rem;
    justify-content: space-between;
    overflow-x: auto;
    /* Скрываем скроллбар для чистоты */
    scrollbar-width: none;
}
.legal-nav::-webkit-scrollbar {
    display: none;
}

.legal-nav-link {
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    border-radius: 0.25rem;
    color: #2399D2;
    font-size: 0.9375rem;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    letter-spacing: 0.01875rem;
    cursor: pointer;
    text-decoration: none;
    padding: 0.5rem 0.75rem; /* Добавил отступ, чтобы клик был удобнее */
    transition: color 0.3s ease, background-color 0.3s ease, font-weight 0.3s ease;
}

/* Ховер для обычных ссылок */
.legal-nav-link:hover {
    color: #31B1E5;
    font-weight: 700;
}

/* Активная ссылка */
.legal-nav-link.active {
    color: #FFF;
    background: #31B1E5;
    padding: 0.75rem 1.75rem;
    font-weight: 400; /* Возвращаем нормальный вес, как в вашем оригинале */
}

/* Ховер на активной ссылке (чтобы цвет не сбрасывался) */
.legal-nav-link.active:hover {
    color: #FFF;
    font-weight: 400;
}

/* ================= ТАБЫ (legal-tab) ================= */
/* Скрываем все табы по умолчанию */
.legal-tab {
    display: none;
    margin-top: 3.5rem; /* ~56px отступ от навигации */
}

/* Показываем только активный таб */
.legal-tab.active {
    display: block;
}

/* ================= ЗАГОЛОВОК СЕКЦИИ + КНОПКИ СЛАЙДЕРА ================= */
.licenses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.875rem; /* 30px */
}

.licenses-header h2 {
    color: #5bc0de;
    font-size: 2.25rem; /* 36px */
    margin: 0;
    font-weight: 400;
}

/* Кастомные кнопки навигации слайдера */
.custom-nav {
    display: flex;
    gap: 0.625rem; /* 10px */
}

.custom-nav button {
    width: 2.75rem; /* 44px */
    height: 2.75rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(320deg, #3BC3F3 30%, #2399D2 60%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    padding: 0;
}

.custom-nav button:hover {
    background-color: #46b8da;
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(91, 192, 222, 0.4);
}

.custom-nav button:active {
    transform: scale(0.95);
}
.doc-prev{
    transform: rotate(180deg);
}
/* Стиль для неактивной кнопки (Swiper добавляет этот класс автоматически) */
.custom-nav button.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background-color: #5bc0de; /* Оставляем цвет, но прозрачный */
}
.custom-nav button.swiper-button-disabled.doc-prev{
    transform: rotate(180deg) scale(1);
}

/* ================= СЛАЙДЕР ЛИЦЕНЗИЙ ================= */
.licenses-slider {
    padding-bottom: 1.875rem; /* Место для теней/пагинации */
    overflow: hidden;
}

.licenses-slider .swiper-slide {
    width: 20rem; /* 320px */
    height: auto;
    display: flex;
}

.license-card {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.9375rem; /* 15px */
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.license-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.license-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 0.9375rem;
    border-radius: 0.25rem;
    display: block;
}

/* Иконка лупы внутри карточки лицензии */
.zoom-icon {
    position: absolute;
    bottom: 0.9375rem;
    right: 0.9375rem;
    color: #5bc0de;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.zoom-icon:hover {
    transform: scale(1.15);
}

/* ================= СЛАЙДЕР ДОКУМЕНТОВ ================= */
.docs-slider {
    padding: 0.625rem 0.3125rem 1.875rem; /* 10px 5px 30px */
    overflow: hidden;
}

.docs-slider .swiper-slide {
    width: 20rem; /* 320px */
    height: auto;
    display: flex;
}

.doc-card {
    background: #f4f6f8; /* Светло-серый фон как на скрине */
    border-radius: 0.5rem;
    padding: 1.875rem 1.5625rem 1.5625rem; /* 30px 25px 25px */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 18.75rem; /* 300px */
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.doc-card__icon {
    margin-bottom: 1.25rem; /* 20px */
}

.doc-card__icon svg {
    display: block;
    width: 2.75rem; /* 44px */
    height: 2.75rem;
}

.doc-card__text {
    font-size: 0.9375rem; /* 15px */
    line-height: 1.5;
    color: #333;
    margin-bottom: 2.5rem; /* 40px - чтобы текст не наезжал на кнопку */
    flex-grow: 1;
}

/* Кнопка лупы (синий круг) */
.doc-card__zoom {
    position: absolute;
    bottom: 1.25rem; /* 20px */
    right: 1.25rem;
    width: 2.625rem; /* 42px */
    height: 2.625rem;
    background-color: #2173A4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.doc-card__zoom:hover {
    background-color: #1a5a82;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(33, 115, 164, 0.4);
}

.doc-card__zoom:active {
    transform: scale(0.95);
}

.doc-card__zoom svg {
    display: block;
}

/* ================= АДАПТИВ ================= */
@media (max-width: 768px) {
    .legal-tab{
        margin-top: 2.8rem;
        position: relative;
    }
    .legal-title {
        font-size: 2rem;
    }
    
    .legal-top p {
        font-size: .875rem;
    }

    .licenses-header{
        position: absolute;
        bottom: -4rem;
        right: 0;
    }
    .custom-nav button{
        width: 2.5rem;
        height: 2.5rem;
    }
    .licenses-header h2 {
        font-size: 1.5rem; /* 24px */
        display: none;
    }

    .licenses-slider .swiper-slide,
    .docs-slider .swiper-slide {
        width: 16.25rem; /* 260px */
    }

    .doc-card {
        min-height: 15.625rem; /* 250px */
        padding: 1.25rem;
    }

    .doc-card__text {
        font-size: 0.875rem; /* 14px */
    }
    
    .legal-nav {
        padding: 0.625rem 1.25rem;
    }
    
    .legal-nav-link.active {
        padding: 0.625rem 1rem;
    }
    .legal-nav-link{
        font-size: .75rem;
    }
}


/*  */
/* ================= СЕКЦИЯ ОБРАЩЕНИЯ К РУКОВОДСТВУ ================= */
.appeal-block {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.appeal-block__left {
    flex: 0 0 33%;
}

.appeal-block__title {
    font-size: 2.25rem; /* 36px */
    line-height: 1.2;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.appeal-block__right {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.appeal-block__right p {
    margin: 0 0 0.5rem 0;
}

.appeal-block__right p:last-of-type {
    margin-bottom: 2rem;
}

.appeal-block__btn {
    display: inline-block;
    background-color: #2173A4;
    color: #FFF;
    border: none;
    border-radius: 0.375rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.appeal-block__btn:hover {
    background-color: #1a5a82;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 115, 164, 0.3);
}

.appeal-block__btn:active {
    transform: translateY(0);
}

/* ================= МОДАЛЬНОЕ ОКНО ================= */
.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.review-modal.active {
    opacity: 1;
    visibility: visible;
}

.review-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.review-modal__content {
    position: relative;
    border-radius: 0.75rem;
    background: var(--1, linear-gradient(319deg, #3BC3F3 30%, #2399D2 60%));
    padding: 2.5rem;
    width: 100%;
    max-width: 37.5rem; /* 600px */
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.review-modal.active .review-modal__content {
    transform: translateY(0);
}

.review-modal__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    background: #FFF;
    border: none;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    padding: 0;
}

.review-modal__close:hover {
    background-color: #f0f0f0;
    transform: rotate(90deg);
}

.review-modal__title {
    color: #FFF;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1.5rem 0;
}

/* ================= ФОРМА ================= */
.review-form {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

/* Звезды рейтинга */
.review-form__rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.review-form__rating .star {
    font-size: 2.5rem;
    color: transparent;
    -webkit-text-stroke: 2px #FFF;
    cursor: pointer;
    transition: color 0.2s, -webkit-text-stroke 0.2s, transform 0.2s;
    line-height: 1;
}

.review-form__rating .star.hover svg,
.review-form__rating .star.active svg {
    color: #FFF;
    fill: white;
    stroke: white;
    transform: scale(1.1);
}
.review-form__rating .star.hover svg path,
.review-form__rating .star.active svg path{
    opacity: 1;
}
/* Поля ввода */
.review-form__input,
.review-form__textarea {
    width: 100% !important;
    padding: 0.625rem 1.5rem !important;
    border: none !important;
    border-radius: 0.375rem !important;
    font-size: 1rem !important;
    font-family: inherit;
    background: #FFF !important;
    color: #888;
    outline: none;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
    margin-bottom: 0 !important;
}
.review-form__textarea {
    margin-bottom: 1rem !important;
}
.review-form__input::placeholder,
.review-form__textarea::placeholder {
    color: #999;
}

.review-form__input:focus,
.review-form__textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.review-form__textarea {
    min-height: 8rem;
    resize: vertical;
}

/* Чекбокс */
.review-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: #FFF;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.review-form__checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.review-form__checkbox-mark {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #FFF;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin-top: 0.1rem;
}

.review-form__checkbox input:checked + .review-form__checkbox-mark {
    background-color: #FFF;
}

.review-form__checkbox input:checked + .review-form__checkbox-mark::after {
    content: '';
    display: block;
    width: 0.3rem;
    height: 0.6rem;
    border: solid #2196F3;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.review-form__checkbox-text a {
    color: inherit;
    text-decoration: underline;
}

/* Кнопка отправки */
.review-form__submit {
    width: 100%;
    padding: 1.25rem;
    background: #FFF;
    color: #2173A4;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.review-form__submit:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.review-form__submit:active {
    transform: translateY(0);
}

/* ================= АДАПТИВ ================= */
@media (max-width: 992px) {
    .appeal-block {
        flex-direction: column;
        gap: 2rem;
    }
    .appeal-block__left {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .appeal-block__title {
        font-size: 1.75rem;
    }
    .review-modal__content {
        padding: 1.25rem;
        /* margin: 1rem; */
        max-height: 85vh;
    }
    .review-form__checkbox-text{
        font-weight: 400;
    }
    .review-form__submit{
        font-size: .875rem;
        font-weight: 400;
    }
    .review-modal__title {
        font-size: 1.5rem;
    }
    .review-form__rating .star {
        font-size: 2rem;
    }

    .legal-top{
        padding: 1.25rem;
    }
}

/* ================= ДОКУМЕНТЫ ИЗ АДМИНКИ (раздел «Правовые документы») ================= */
.legal-empty {
    margin: 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* PDF или Word во вкладке «Лицензии»: обложка или заглушка с типом файла */
.license-card__file {
    display: block;
    color: inherit;
    text-decoration: none;
}

.license-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-height: 12.5rem; /* как у картинки лицензии */
    margin-bottom: 0.9375rem;
    padding: 1.25rem;
    border-radius: 0.25rem;
    background: #f4f6f8;
    text-align: center;
    box-sizing: border-box;
}

.license-card__placeholder svg {
    display: block;
    width: 2.75rem;
    height: 2.75rem;
}

.license-card__type {
    color: #2173A4;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.license-card__title {
    color: #333;
    font-size: 0.9375rem;
    line-height: 1.4;
}

/* Документы под блоком «Обращение к руководству» */
.legal-appeal-docs {
    margin-top: 3.5rem;
}

/* ================= ФОРМА ОТЗЫВА: ОШИБКИ И УСПЕШНАЯ ОТПРАВКА ================= */
.review-modal [hidden] {
    display: none !important;
}

/* Ловушка для ботов */
.review-form__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.review-form__message {
    margin: 0;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    background: #FFF;
    color: #B42318;
    font-size: 0.875rem;
    line-height: 1.4;
}

.review-form__input[aria-invalid="true"],
.review-form__textarea[aria-invalid="true"] {
    box-shadow: 0 0 0 3px #FDA29B;
}

.review-form__checkbox input[aria-invalid="true"] + .review-form__checkbox-mark {
    border-color: #FDA29B;
}

.review-form__rating .star:focus-visible {
    outline: 2px solid #FFF;
    outline-offset: 4px;
    border-radius: 0.25rem;
}

.review-form__submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.review-form__success {
    color: #FFF;
    text-align: center;
    font-size: 1.125rem;
    line-height: 1.5;
}

.review-form__success-text {
    margin: 0 0 1.5rem;
}

/* ================= ТЕКСТЫ ВКЛАДОК (блок «Тексты страницы» в админке) ================= */
.legal-text {
    margin-bottom: 1.875rem;
    max-width: 60rem;
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
}

.legal-text p,
.legal-text ul,
.legal-text ol {
    margin: 0 0 0.75rem;
}

.legal-text ul,
.legal-text ol {
    padding-left: 1.25rem;
}

.legal-text a {
    color: #2173A4;
    text-decoration: underline;
}

.legal-text > :last-child {
    margin-bottom: 0;
}

.legal-text--appeal {
    margin-bottom: 2rem;
}

.appeal-block__right .legal-text--appeal p:last-of-type {
    margin-bottom: 0;
}
