/* ===========================
   TEXT SECTION STYLES
   Стили для текстовой секции с информацией о компании
   =========================== */

.text-section {
    background-color: #F4F4F4;
    padding: 80px 0;
    position: relative;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР КОНТЕНТА ===== */

/* ===== ЗАГОЛОВКИ СЕКЦИИ ===== */

.text-section-header {
    margin-bottom: 40px;
    text-align: center;
}

.text-section-title {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-heading);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    text-align: left;
}

/* ===== ТЕКСТОВЫЕ БЛОКИ ===== */

.text-section-intro,
.text-section-secondary,
.text-section-conclusion {
    margin-bottom: 40px;
}

.intro-paragraph,
.secondary-paragraph,
.conclusion-paragraph {
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.7;
    color: var(--color-text);
    margin: 0 0 20px 0;
    text-align: justify;
}

.conclusion-paragraph:last-child {
    margin-bottom: 0;
}

/* Выделяем вводный абзац более крупным шрифтом */
.intro-paragraph {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-heading);
}

/* ===== БЛОК СО СПИСКАМИ ===== */

.text-section-lists {
    margin: 50px 0;
}

.text-list-block {
    margin-bottom: 45px;
}

.text-list-block:last-child {
    margin-bottom: 0;
}

/* ===== ЗАГОЛОВКИ СПИСКОВ ===== */

.list-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-heading);
    margin: 0 0 25px 0;
}

/* ===== СТИЛИ СПИСКОВ ===== */

.text-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.text-list-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-left: 0;
}

.text-list-item:last-child {
    margin-bottom: 0;
}

/* ===== КАСТОМНЫЕ МАРКЕРЫ СПИСКОВ ===== */

.list-marker {
    width: 18px;
    height: 18px;
    display: inline-block;
    margin-top: 6px;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
}

/* Добавляем SVG-иконку через псевдоэлемент ::before */
.list-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/home/marker.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ===== ТЕКСТ ЭЛЕМЕНТОВ СПИСКА ===== */

.list-text {
    font-size: clamp(14px, 1.5vw, 17px);
    line-height: 1.6;
    color: var(--color-text);
    flex: 1;
    text-align: justify;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Для планшетов */
@media screen and (max-width: 992px) {
    .text-section {
        padding: 60px 0;
    }

    .text-section-header {
        margin-bottom: 35px;
    }

    .text-section-intro,
    .text-section-secondary,
    .text-section-conclusion {
        margin-bottom: 35px;
    }

    .text-section-lists {
        margin: 40px 0;
    }

    .text-list-block {
        margin-bottom: 35px;
    }

    .list-title {
        margin-bottom: 20px;
    }
}

/* Для мобильных устройств */
@media screen and (max-width: 768px) {
    .text-section {
        padding: 50px 0;
    }

    .text-section-content {
        padding: 0 15px;
    }

    .text-section-title {
        text-align: left;
        margin-bottom: 25px;
    }

    .text-section-header {
        margin-bottom: 30px;
        text-align: left;
    }

    .intro-paragraph,
    .secondary-paragraph,
    .conclusion-paragraph,
    .list-text {
        text-align: left;
    }

    .text-list-item {
        margin-bottom: 15px;
    }

    .list-marker {
        margin-top: 6px;
        margin-right: 12px;
    }
}

/* Для очень маленьких экранов */
@media screen and (max-width: 480px) {
    .text-section {
        padding: 40px 0;
    }

    .text-section-content {
        padding: 0 10px;
    }

    .text-section-intro,
    .text-section-secondary,
    .text-section-conclusion {
        margin-bottom: 25px;
    }

    .text-section-lists {
        margin: 30px 0;
    }

    .text-list-block {
        margin-bottom: 25px;
    }

    .list-title {
        margin-bottom: 15px;
    }

    .text-list-item {
        margin-bottom: 12px;
    }
}

/* ===== УЛУЧШЕНИЕ ЧИТАЕМОСТИ ===== */

/* Оптимизация для устройств с высокой плотностью пикселей */
@media screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi) {

    .text-section-title,
    .list-title,
    .intro-paragraph,
    .secondary-paragraph,
    .conclusion-paragraph,
    .list-text {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===== УЛУЧШЕНИЯ ДОСТУПНОСТИ ===== */

/* Увеличиваем контрастность при фокусе для keyboard navigation */
.text-list-item:focus-within {
    outline: 2px solid var(--color-button-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Улучшаем выделение текста */
.text-section ::selection {
    background-color: var(--color-button-primary);
    color: var(--color-white);
}

.text-section ::-moz-selection {
    background-color: var(--color-button-primary);
    color: var(--color-white);
}

/* ===== АНИМАЦИИ ДЛЯ УЛУЧШЕНИЯ UX ===== */

/* Плавная анимация появления секции */
.text-section {
    animation: textSectionFadeIn 0.8s ease-out;
}

@keyframes textSectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Отключаем анимации для пользователей с предпочтением уменьшенной анимации */
@media (prefers-reduced-motion: reduce) {
    .text-section {
        animation: none;
    }
}

/* ===== ОПТИМИЗАЦИЯ ПРОИЗВОДИТЕЛЬНОСТИ ===== */

/* Используем GPU для плавной анимации */
.text-section {
    will-change: transform, opacity;
}

/* Снимаем will-change после завершения анимации для экономии ресурсов */
.text-section.animation-complete {
    will-change: auto;
}