@import url('fonts/stylesheet.css');


/* ===== Базовые стили (Mobile First) ===== */
.about-page {
    font-family: 'Ruberoid', Helvetica, sans-serif;
    color: #333;
    line-height: 1.6;
    padding: 20px 15px;
    max-width: 100%;
    box-sizing: border-box;
}

.about-page h2 {
    font-size: 1.5em;
    margin: 0 0 15px;
    color: #222;
    font-weight: 600;
    font-family: 'Ruberoid', Helvetica, sans-serif;
    letter-spacing: -1px;
}

.about-section {
    margin-bottom: 60px;
    margin-top: 40px;
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.info-block__image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.info-block__text {
    font-size: 1rem;
    line-height: 1.6;
}

.info-block__text ul {
    padding-left: 20px;
    margin: 10px 0 0;
}

.info-block__text ul li {
    margin-bottom: 5px;
}

.video-wrapper {
    position: relative;
    margin: 20px auto 0;
    background: transparent;
}

.video-wrapper video,
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.gallery__item {
    flex: 1 1 calc(50% - 15px);
    max-width: calc(50% - 15px);
    box-sizing: border-box;
}

.gallery__item a {
    display: block;
    line-height: 0;
    width: fit-content;
    margin: 0 auto;
    border: 2px solid #1E4687;
    border-radius: 4px;
    padding: 10px;
    background-color: #fff;
}

.gallery__item img {
    width: auto;
    height: 350px;
    object-fit: contain;
    background: transparent;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    border: 2px solid #1E4687;
    background-color: rgba(255,255,255,0.4);
    @media (max-width: 768px) {
        height: auto;
    }
}

.partner-block .info-block__image img {
    max-width: 400px;
    @media(max-width: 400px){
        max-width: 100%;
    }
}

.partner-block .info-block__text a {
    color: #0066cc;
    text-decoration: none;
}

.partner-block .info-block__text a:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {

    .alternating-sections .about-section:nth-child(odd) .info-block {
        flex-direction: row;
    }

    .alternating-sections .about-section:nth-child(even) .info-block {
        flex-direction: row-reverse;
    }

    .quality-section .info-block {
        flex-direction: row;
    }

    .info-block__image {
        max-width: 400px;
    }

    .info-block__image img {
        width: 100%;
        height: auto;
    }

    .info-block__text {
        flex: 1;
    }

    .gallery__item {
        flex: 1 1 calc(25% - 15px);
        max-width: calc(25% - 15px);
    }
}

@media (min-width: 992px) {
    .about-page {
        margin: 0 auto;
        padding: 40px 20px;
    }
}


/* ===== Блок фактов (светлая секция): таблица-цифры ===== */
/* Контейнер таблицы. Высота = 3 строки * 70px + верхний и нижний отступы по 10px
   (значения должны совпадать с константами скрипта внизу страницы) */
.facts {
    position: relative;
    height: 230px;
    padding: 10px 0;
    box-sizing: border-box;
    margin: 50px 0px;
}

.facts__row {
    position: absolute;
    left: 0;
    right: 0;
    height: 70px;                /* высота строки, совпадает с rowHeight скрипта (70) */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 4px;
    border-bottom: 1px solid rgba(12, 56, 129, 0.18);
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.4;

    /* Изначально строки скрыты, показываются только с классом .active */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    /* Плавное появление/исчезновение */
    transition: opacity 0.6s ease, visibility 0.6s ease;
    will-change: opacity;
}

/* Убираем нижнюю границу у последней строки в группе (3-я и 6-я) */
.facts__row:nth-child(3),
.facts__row:nth-child(6) {
    border-bottom: none;
}

/* Активная строка */
.facts__row.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Подпись строки: стрелка «вверх-вправо» выводится псевдоэлементом
   вместо прежней <img>-иконки string-top-right.svg */
.facts__label {
    position: relative;
    padding-left: 2.2em;         /* место под стрелку */
    min-width: 0;
    color: #333;
    font-weight: 600;
}

.facts__label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.6em;
    height: 1.6em;
    background: url("/local/templates/polus/icons/string-top-right.svg") center/contain no-repeat;
}

.facts__value {
    color: var(--color-blue, #0C3881);
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    border: 3px solid var(--color-orange);
    padding: 0.55rem;
    border-radius: 10px;
    min-width: 115px;
    @media (max-width: 768px) {
        min-width: 75px;
        padding: 0.55rem 0.15rem;
        font-size: 14px;
    }
}

/* ===== Переменные секций страницы ===== */
.about-page {
    --color-orange: #FF8000;
    --color-blue: #0C3881;

    /* Сюда можно подставить URL фоновой картинки тёмных секций,
       например: --about-bg-1: url('/upload/medialibrary/...../bg.jpg');
       Пока переменные пустые — картинки нет, фон остаётся #1E4687. */
    --about-bg-1: none;   /* none — фоновая картинка не задана */
    --about-bg-3: none;   /* none — фоновая картинка не задана */
    --about-bg-5: none;   /* none — фоновая картинка не задана */
}

/* ===== Новые информационные секции «a-sec» (Mobile First) ===== */
/* Мобильные: одна колонка — картинка по ширине сверху, затем текст.
   Секции монолитные, без скруглений, на всю доступную ширину контейнера */
.a-sec {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 44px 0;
    color: #333;
}

.a-sec__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.a-sec__img {
    min-width: 0;
}

.a-sec__img img {
    display: block;
    width: 100%;
    height: auto;
}

.a-sec__txt {
    min-width: 0;
}

.a-sec__txt h2 {
    font-size: 1.6em;
    line-height: 1.3;
    margin: 0 0 16px;
    color: #222;
    font-weight: 600;
    font-family: 'Ruberoid', Helvetica, sans-serif;
    letter-spacing: -1px;
}

.a-sec__txt p {
    margin: 0 0 14px;
}

.a-sec__txt p:last-child {
    margin-bottom: 0;
}

.a-sec__txt ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

.a-sec__txt ul li {
    margin-bottom: 6px;
}

/* Тёмная секция: сплошной фон #1E4687, белый текст */
.a-sec--dark {
    background-color: rgba(30, 70, 135, .75);
    color: #fff;
}

.a-sec--dark h2 {
    color: #fff;
}

/* Модификаторы фона с картинкой: при пустой CSS-переменной работает
   только сплошной фон #1E4687 (правило ниже не применяется) */
.a-sec--bg-1 {
    background: var(--about-bg-1, none) center/cover no-repeat, rgba(30, 70, 135, .75);
}

.a-sec--bg-3 {
    background: var(--about-bg-3, none) center/cover no-repeat, rgba(30, 70, 135, .75);
}

.a-sec--bg-5 {
    background: var(--about-bg-5, none) center/cover no-repeat, rgba(30, 70, 135, .75);
}

/* Светлая секция: полупрозрачный белый фон с блюром, тёмный текст */
.a-sec--light {
    background: rgba(255, 255, 255, 0);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: #333;
}

.a-sec--light h2 {
    color: var(--color-blue, #0C3881);
}

/* Десктоп: двухколоночная сетка, картинка всегда слева (40–46% ширины) */
@media (min-width: 768px) {
    .a-sec {
        padding: 64px 0;
    }

    .a-sec__grid {
        grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
        column-gap: 44px;
    }
    .a-sec__grid.left-text {
        grid-template-columns: minmax(0, 1fr) minmax(0, 44%);
    }

    .facts__row {
        font-size: 1.1rem;
    }
    .facts__label {
        font-size: 1.5rem;
    }
}

@media (min-width: 992px) {
    .a-sec {
        padding: 80px 0;
    }

    .a-sec__grid {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
        column-gap: 60px;
    }
    .a-sec__grid.left-text {
        grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
    }
}

/* ===== Цветные секции «a-sec» на всю ширину контейнера =====
   Отрицательные поля компенсируют горизонтальные отступы .about-page,
   поэтому тёмная/светлая заливка тянется до краёв контейнера,
   а текст внутри получает собственные отступы. */
.a-sec--dark,
.a-sec--light {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
@media (min-width: 768px) {
    .a-sec--dark,
    .a-sec--light {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}
@media (min-width: 992px) {
    .a-sec--dark,
    .a-sec--light {
    }
}

.a-sec .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}
.a-sec .gallery__item {
    margin: 0;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}
.a-sec .gallery__item a {
    display: block;
    line-height: 0;
    background: #fff;
    border: 1px solid rgba(12, 56, 129, 0.18);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.a-sec .gallery__item img {
    width: 100%;
    height: auto;
    max-height: 275px;
    object-fit: contain;
    display: block;
}
@media (min-width: 768px) {
    .a-sec .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
        gap: 15px;
        list-style: none;
        padding: 0;
        margin: 24px 0 0;
    }
}