/* ==========================================================================
   HERO SECTION STYLES
   ========================================================================== */

.hero--viola {
    background-color: transparent !important;
    padding: 60px 0 0 0;
    overflow: hidden;
    position: relative;
}

.hero__content {
    padding-bottom: 60px;
}

.hero__license {
    display: block;
    font-size: 12px;
    color: var(--c-text-muted);
    margin-bottom: 140px;
    line-height: 1.4;
}

.hero__visual--viola {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0;
}

.hero__photo-wrapper--viola {
    position: relative;
    width: 100%;
    max-width: 800px;
    z-index: 1;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__photo--viola {
    width: 100%;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    margin-bottom: 200px;
    transform-origin: center bottom !important;
    transition: transform 0.4s ease-out;
    will-change: transform;
}

.hero__mascots--viola {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 250px;
    width: auto;
    z-index: 2;
    pointer-events: none;
}

/* ==========================================================================
   ШАПКА САЙТА (УБРАН ЦВЕТ ФОНА ПО ТЗ)
   ========================================================================== */
.header,
header.header,
header {
    background-color: transparent !important;
    /* Просвечивает новый общий фон сайта ECDDF3 */
}

/* ==========================================================================
   БЛОК 1: СТОМАТОЛОГИЯ БЕЗ НЕРВОВ
   ========================================================================== */
.advantages-section {
    padding: 0 0 80px 0;
}

/* Отступы заголовка в ПК версии по ТЗ */
.advantages-section__title {
    margin-top: 40px;
    margin-bottom: 56px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}

.adv-card {
    background: var(--c-white);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.7s ease, box-shadow 0.7s ease;
    will-change: transform, opacity;
}

.adv-card__icon {
    font-size: 32px;
    margin-bottom: 0px;
}

.adv-card__icon img {
    height: 77px;
    width: auto;
    object-fit: contain;
    display: block;
}

.adv-card__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-dark);
    margin: 16px 0 12px 0;
    line-height: 1.3;
}

.adv-card__text {
    font-size: 14px;
    color: var(--c-text);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   ЭФФЕКТ СИНХРОННОГО СЖАТИЯ СОСЕДНИХ КОЛОНОК
   ========================================================================== */
.advantages-grid.has-scaled .adv-card:not(.adv-card--team) {
    opacity: 0.9;
}

/* 1 карточка: жмется к левому краю */
.advantages-grid.has-scaled .adv-card:nth-child(1) {
    transform-origin: left center;
    transform: scale(0.9);
}

/* 2 карточка: сдвигается влево, чтобы сохранить отступ 24px от первой */
.advantages-grid.has-scaled .adv-card:nth-child(2) {
    transform-origin: left center;
    transform: scale(0.9) translateX(-11%);
}

/* 4 карточка: жмется к правому краю */
.advantages-grid.has-scaled .adv-card:nth-child(4) {
    transform-origin: right center;
    transform: scale(0.9);
}

/* ТРЕТЬЯ КАРТОЧКА (Темная команда) */
.adv-card--team {
    background: #212121;
    border-radius: 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 2;
    transform: scale(1);
    transform-origin: center center;
}

/* Состояние увеличения центральной карточки */
.advantages-grid.has-scaled .adv-card--team.is-scaled {
    transform: scale(1.3) translateX(-3.5%);
    z-index: 10;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.adv-card__team-img-wrap {
    padding: 15px;
}

.adv-card__team-img-wrap img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.adv-card__team-content {
    padding: 0 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    justify-content: flex-end;
}

.adv-card__team-title {
    color: var(--c-white);
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.adv-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.adv-card__link:hover {
    color: var(--c-white);
}

/* ==========================================================================
   БЛОК 2: ПРОМО (ВИОЛА - ВСЯ СТОМАТОЛОГИЯ)
   ========================================================================== */
.promo-clinic-section {
    padding: 0px 0;
    position: relative;
}

/* Маскот в ПК версии */
.promo-clinic-section__mascot {
    position: absolute;
    left: 0px;
    top: -150px;
    width: 149px;
    z-index: 10;
    pointer-events: none;
}

.promo-clinic-section__title {
    position: relative;
    z-index: 5;
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--c-dark);
    margin: 0;
}

.promo-clinic-section__title-accent {
    color: var(--c-primary);
    display: block !important;
        margin-top: 8px !important;
        line-height: 1.3 !important;
        color: var(--c-primary) !important;
        font-family: var(--font-main) !important;
        font-weight: 700 !important;
        font-size: clamp(24px, 2.5vw, 32px) !important;
}

.promo-clinic-section__image-wrapper {
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.promo-clinic-section__image {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   БЛОК 3: ФОРМА ЗАПИСАТЬСЯ НА ПРИЕМ
   ========================================================================== */
.appointment-section {
    padding: 60px 0;
}

.appointment-card {
    background-color: #212121;
    border-radius: 32px;
    padding: 60px;
    color: var(--c-white);
}

.appointment-card__title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.appointment-card__subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 40px 0;
    line-height: 1.5;
}

.appointment-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    margin-bottom: 24px;
}

.appointment-form__input {
    width: 100%;
    padding: 18px 24px;
    border-radius: 12px;
    border: none;
    background: var(--c-white);
    font-size: 16px;
    font-family: var(--font-main);
    color: var(--c-dark);
    outline: none;
}

.appointment-form__submit-wrapper {
    position: relative;
    display: inline-block;
}

.appointment-form__mascot {
    position: absolute;
    bottom: 50%;
    right: 20px;
    width: 60px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.appointment-form__submit-wrapper:hover .appointment-form__mascot {
    transform: translateY(0);
    bottom: 90%;
    opacity: 1;
}

.appointment-form__submit {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    border-radius: 12px;
    border: none;
    background-color: #B265F0;
    color: var(--c-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    height: 100%;
}

.appointment-form__submit:hover {
    background-color: #9A50D8;
}

.appointment-form__policy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.appointment-form__policy input[type="checkbox"] {
    margin-top: 4px;
    accent-color: #B265F0;
}

.appointment-form__policy span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

/* ==========================================================================
   ОБЩАЯ РОЗОВАЯ ПОДЛОЖКА ДЛЯ ТРЕХ БЛОКОВ (МАРЖИН ОБНУЛЕН В ПК ПО ТЗ)
   ========================================================================== */
.home-pink-wrapper {
    background-color: var(--c-primary-light);
    border-radius: 40px;
    margin: 0px auto;
    /* Изменено на 0px auto по ТЗ */
    overflow: hidden;
}

.home-pink-wrapper .advantages-section,
.home-pink-wrapper .promo-clinic-section,
.home-pink-wrapper .appointment-section {
    background-color: transparent !important;
}

/* ==========================================================================
   АДАПТИВНОСТЬ И СРЕДНИЕ РАЗРЕШЕНИЯ
   ========================================================================== */
@media (max-width: 1399px) {
    .advantages-grid {
        gap: 16px;
    }
}

@media (max-width: 1200px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages-grid.has-scaled .adv-card:not(.adv-card--team) {
        transform: none;
    }

    .advantages-grid.has-scaled .adv-card--team.is-scaled {
        transform: none;
    }
}

@media (max-width: 1399px) and (min-width: 992px) {
    .promo-clinic-section__mascot {
        display: none !important;
    }
}

/* ==========================================================================
   МОБИЛЬНЫЙ АДАПТИВ СТРОГО ПО ТЗ
   ========================================================================== */
@media (max-width: 991px) {

    .home-pink-wrapper {
        border-radius: 24px;
        margin: 0px 0;
        /* Изменено на 0px 0 строго по ТЗ */
    }

    /* Мобильные отступы заголовка преимуществ по ТЗ */
    .advantages-section__title {
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .advantages-section {
        padding: 0 0;
    }

    .hero__content {
        padding-bottom: 0px;
    }

    .promo-clinic-section {
        padding: 40px 0 !important;
    }

    .appointment-section {
        padding: 0 0;
    }

    .hero--viola {
        padding: 40px 0 0 0;
    }

    .hero__visual--viola {
        margin-top: 40px;
    }

    .hero__photo--viola {
        margin-bottom: 150px;
    }

    .hero__mascots--viola {
        height: 180px;
    }

    .hero__license {
        margin-bottom: 60px;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }

    .promo-clinic-section__mascot {
        display: block !important;
        left: auto;
        right: 0px;
        top: -14px;
        transform: scaleX(-1);
        width: 180px;
    }

    .appointment-form__row {
        grid-template-columns: 1fr;
    }

    .appointment-form__submit {
        width: 100%;
        justify-content: center;
    }

    .appointment-card {
        padding: 40px 30px;
    }
}

/* ==========================================================================
   ТЕКСТОВЫЙ КОНТЕНТ НА СТРАНИЦЕ УСЛУГИ
   ========================================================================== */
.service-content-section {
    padding: 40px 0 60px 0;
}

.service-content-inner {
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-dark);
    max-width: 900px;
}

.service-content-inner h2,
.service-content-inner h3 {
    color: var(--c-primary);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

/* ==========================================================================
   БЛОК FAQ (ВОПРОС-ОТВЕТ)
   ========================================================================== */
.faq-section {
    padding: 60px 0;
}

.faq-accordion {
    max-width: 800px;
    margin: 0;
    /* Убрано центрирование "0 auto", теперь блок четко по левому краю */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--c-white);
    border-radius: 16px;
    border: 1px solid var(--c-border);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 10px 25px rgba(162, 89, 232, 0.08);
    /* Легкая фиолетовая тень */
}

.faq-item__header {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-main);
    color: var(--c-dark);
}

.faq-item__icon {
    width: 28px;
    height: 28px;
    position: relative;
    flex-shrink: 0;
    background-color: var(--c-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
}

.faq-item__icon::before,
.faq-item__icon::after {
    content: '';
    position: absolute;
    background-color: var(--c-primary);
    transition: transform 0.3s ease;
}

.faq-item__icon::before {
    width: 12px;
    height: 2px;
}

.faq-item__icon::after {
    width: 2px;
    height: 12px;
}

/* Состояние "Открыто" */
.faq-item.is-active .faq-item__icon::after {
    transform: scaleY(0);
}

.faq-item.is-active .faq-item__header {
    color: var(--c-primary);
}

.faq-item__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item__content {
    padding: 0 24px 24px 24px;
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .faq-item__header {
        font-size: 16px;
        padding: 20px;
    }

    .faq-item__content {
        padding: 0 20px 20px 20px;
    }
}

/* ==========================================================================
   ВЛОЖЕННЫЕ (ДОЧЕРНИЕ) УСЛУГИ И СЕТКА С ФОТОГРАФИЯМИ
   ========================================================================== */
.child-services {
    padding: 60px 0;
}

.child-services__title {
    margin-bottom: 40px;
    font-size: clamp(28px, 3.5vw, 42px);
    width: 100%;
}
.child-services__title {
    max-width: 66.666%;
}

.child-services__title span {
    color: var(--c-primary);
}



.child-services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    grid-auto-rows: 240px;
}

.child-service-card {
    background-color: var(--c-white);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--c-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.child-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.child-service-card__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.child-service-card__link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-dark);
}

.child-service-image {
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.child-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ширина колонок для десктопа */
.span-1 {
    grid-column: span 1;
}

.span-2 {
    grid-column: span 2;
}

/* ==========================================================================
   АДАПТИВНОСТЬ СЕТКИ УСЛУГ
   ========================================================================== */
@media (max-width: 991px) {
    .child-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* МОБИЛЬНАЯ ВЕРСИЯ: Плотная верстка и скрытие картинок */
@media (max-width: 575px) {
    .child-services {
        padding: 40px 0;
    }

    .child-services__title {
        margin-bottom: 24px;
    }
        .child-services__title {
            max-width: 100%;
        }

    .child-services__grid {
        grid-template-columns: 1fr;
        gap: 12px;
        /* Максимально плотно прижимаем карточки друг к другу */
        grid-auto-rows: minmax(130px, auto);
        /* Делаем карточки ниже */
    }

    /* Полностью убираем фотографии из сетки */
    .child-service-image {
        display: none !important;
    }

    /* Уменьшаем отступы и размеры текста внутри самой карточки */
    .child-service-card {
        padding: 20px 24px;
        border-radius: 16px;
    }

    .child-service-card__title {
        font-size: 18px;
    }

    .child-service-card__link {
        font-size: 13px;
        margin-top: 16px;
    }

    .span-2 {
        grid-column: span 1;
    }
}

/* ==========================================================================
   КОНТРОЛЬ ОТСТУПОВ МЕЖДУ БЛОКАМИ УСЛУГИ (РОВНО 64PX)
   ========================================================================== */
.service-hero {
    padding: 40px 0 0 0 !important;
    /* Оставляем верхний отступ от шапки, нижний 0 */
}

.child-services,
.service-portfolio,
.service-content-section,
.service-bottom-blocks {
    padding: 64px 0 0 0 !important;
    /* Четко 64px от предыдущего блока */
}

.service-bottom-blocks {
    padding-bottom: 80px !important;
    /* Отступ перед подвалом сайта */
}

/* Переопределяем отступы для слайдера врачей и FAQ, если они выводятся на странице услуги */
.service-page .specialists-section,
.service-page .faq-section {
    padding-top: 64px !important;
    padding-bottom: 0 !important;
}

/* Мобильные отступы: делаем блоки чуть плотнее друг к другу */
@media (max-width: 991px) {

    .child-services,
    .service-portfolio,
    .service-content-section,
    .service-bottom-blocks,
    .service-page .specialists-section,
    .service-page .faq-section {
        padding: 48px 0 0 0 !important;
    }
}

/* ==========================================================================
   СТРАНИЦА ДОКУМЕНТАЦИИ (ПЛАВНЫЙ СКРОЛЛ)
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

.docs-page {
    padding-bottom: 80px;
}

.docs-hero {
    padding: 40px 0 20px 0;
}

/* Якорное меню */
.docs-nav {
    margin-top: 32px;
    margin-bottom: 20px;
    overflow-x: auto;
    /* Горизонтальный скролл на мобилках */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    /* Место под скроллбар */
}

/* Скрываем системный скроллбар для красоты (опционально) */
.docs-nav::-webkit-scrollbar {
    height: 4px;
}

.docs-nav::-webkit-scrollbar-thumb {
    background-color: rgba(162, 89, 232, 0.3);
    border-radius: 4px;
}

.docs-nav__list {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    /* Чтобы кнопки не падали на вторую строку */
}

.docs-nav__link {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--c-white);
    color: var(--c-dark);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--c-border);
}

.docs-nav__link:hover {
    background-color: var(--c-primary-light);
    color: var(--c-primary);
    border-color: var(--c-primary-light);
}

/* Секции контента */
.docs-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--c-border);
    scroll-margin-top: 100px;
    /* Отступ при якорном прыжке (учитывает высоту шапки) */
}

.docs-section:last-child {
    border-bottom: none;
}

.docs-section__title {
    margin-bottom: 32px;
    color: var(--c-primary);
}

/* Макет 1: Сетка сканов */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.docs-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--c-dark);
    transition: transform 0.3s ease;
}

.docs-card:hover {
    transform: translateY(-4px);
}

.docs-card__img {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--c-border);
    margin-bottom: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

.docs-card:hover .docs-card__img {
    box-shadow: 0 15px 30px rgba(162, 89, 232, 0.15);
    /* Фиолетовая тень */
}

.docs-card__img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 3 / 4;
    /* Формат А4 */
}

.docs-card__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Макет 2: Списки файлов */
.docs-subcategory {
    margin-bottom: 32px;
}

.docs-subcategory:last-child {
    margin-bottom: 0;
}

.docs-subcategory__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--c-dark);
}

.docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-list__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--c-text);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.docs-list__link svg {
    flex-shrink: 0;
    color: var(--c-text-muted);
    transition: color 0.2s ease;
    margin-top: 2px;
}

.docs-list__link:hover {
    color: var(--c-primary);
}

.docs-list__link:hover svg {
    color: var(--c-primary);
}

/* Адаптив */
@media (max-width: 991px) {
    .docs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .docs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .docs-nav__link {
        font-size: 13px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .docs-grid {
        grid-template-columns: 1fr;
        /* На очень узких экранах по 1 скану */
    }
}

/* ==========================================================================
   ФИКС ШИРИНЫ ДЛЯ СТРАНИЦЫ ДОКУМЕНТОВ (Бронебойный сброс макета темы)
   ========================================================================== */
/* 1. Делаем фон страницы белым (или замени на #ECDDF3, если нужен розовый, как на всем сайте) */
body.page-template-page-documents-php,
body.page-template-page-documents,
body:has(.docs-page) {
    background-color: var(--c-white) !important;
}

/* 2. Принудительно растягиваем все возможные системные "коробки" темы на 100% ширины экрана */
body.page-template-page-documents-php #page,
body.page-template-page-documents-php #content,
body.page-template-page-documents-php #primary,
body.page-template-page-documents-php .site,
body.page-template-page-documents-php .site-content,
body.page-template-page-documents-php .ast-container,
body.page-template-page-documents-php .wrap,
body:has(.docs-page) #page,
body:has(.docs-page) #content,
body:has(.docs-page) #primary,
body:has(.docs-page) .site,
body:has(.docs-page) .site-content,
body:has(.docs-page) .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

/* 3. Гарантируем, что наш контент внутри останется ровным и не растянется шире 1440px */
body.page-template-page-documents-php .container,
body:has(.docs-page) .container {
    max-width: var(--container-max) !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* ==========================================================================
   БЛОК: БЕЗОПАСНОСТЬ ЛЕЧЕНИЯ (ЦСО)
   ========================================================================== */
.safety-section {
    padding: 20px 0 0px 0;
    position: relative;
    z-index: 2;
}

.safety-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.safety-section__title {
    margin-bottom: 24px;
}

.safety-section__text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
    margin-top: 0;
    margin-bottom: 16px;
}

/* Сетка для 5 фотографий (Коллаж) */
.safety-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 160px;
    /* Высота маленьких картинок */
    gap: 16px;
}

.safety-gallery__item {
    border-radius: 24px;
    /* Фирменное скругление Виолы */
    overflow: hidden;
    background-color: var(--c-primary-light);
    /* Заглушка на время загрузки */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.safety-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.safety-gallery__item:hover img {
    transform: scale(1.05);
    /* Легкий зум при наведении */
}

/* Делаем первую картинку большой (занимает 2х2 ячейки) */
.safety-gallery__item--large {
    grid-column: span 2;
    grid-row: span 2;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ БЛОКА БЕЗОПАСНОСТИ
   ========================================================================== */
@media (max-width: 1200px) {
    .safety-wrapper {
        gap: 40px;
    }

    .safety-gallery {
        grid-auto-rows: 130px;
    }
}

@media (max-width: 991px) {
    .safety-section {
        padding: 40px 0;
    }

    .safety-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .safety-gallery {
        grid-auto-rows: 15vw;
        /* Пропорциональная высота на планшетах */
    }
}

@media (max-width: 575px) {
    .safety-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
        gap: 12px;
    }

    /* На мобильных телефонах большое фото займет всю ширину */
    .safety-gallery__item--large {
        grid-column: span 2;
        grid-row: span 2;
        /* Или span 1, если хотите, чтобы фото было горизонтальным */
    }
}