/* /modules/absd-block/absd-block.css */

/* --- 1. БАЗОВАЯ СТРУКТУРА МОДУЛЯ --- */
.absd-section { 
    padding: 40px 0; 
    position: relative; 
}

.absd-block__body { 
    display: flex; 
    position: relative; 
    align-items: flex-start; 
    gap: 40px; 
}

.absd-block__title { 
    margin-bottom: 30px; 
    text-align: center; 
}

.absd-block__content { 
    width: 75%; 
    z-index: 2; 
}

.absd-block__img-wrapper { 
    width: 25%; 
    position: relative;
    display: flex; /* Позволяет использовать justify-content */
}

.absd-block__img { 
    /* width: 100%;  <-- УДАЛИТЕ ИЛИ ЗАКОММЕНТИРУЙТЕ ЭТУ СТРОКУ */
    max-width: 100%; /* Картинка не выйдет за пределы 30% колонки */
    max-height: 350px;
    height: auto; 
    object-fit: contain; 
    transition: transform 0.3s ease, filter 0.3s ease; 
}

/* --- 2. ЛОГИКА МОДАЛЬНОГО ОКНА --- */
.has-modal .absd-block__img { 
    cursor: pointer; 
}

.has-modal .absd-block__img:hover { 
    transform: scale(1.03); 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)); 
}

/* --- 3. ПОЗИЦИОНИРОВАНИЕ (Варианты I и II) --- */
/* Текст слева, изо справа (по умолчанию) */
.pos-text-img .absd-block__body { 
    flex-direction: row; 
}

/* Изо слева, текст справа */
.pos-img-text .absd-block__body { 
    flex-direction: row-reverse; 
}

/* Если ТЕКСТ слева, ИЗО справа (по умолчанию) -> прижимаем картинку ВПРАВО */
.pos-text-img .absd-block__img-wrapper { 
    justify-content: flex-end; 
}

/* Если ИЗО слева, ТЕКСТ справа -> прижимаем картинку ВЛЕВО */
.pos-img-text .absd-block__img-wrapper { 
    justify-content: flex-start; 
}

/* --- 4. ЦВЕТОВЫЕ ТЕМЫ (Наследуют шрифты из global.css) --- */

/* Тема 1: Белый фон+зеленый маркер */
.theme-white { background-color: #ffffff; }
.theme-white .absd-block__title, 
.theme-white p, 
.theme-white li { color: #1a1a1a !important; }
.theme-white .komplekt-ul li:before { background-color: #167f2b; }

/* Тема 1: Белый фон+синий маркер */
.theme-white-marker-blue { background-color: #ffffff; }
.theme-white-marker-blue .absd-block__title, 
.theme-white-marker-blue p, 
.theme-white-marker-blue li { color: #1a1a1a !important; }
.theme-white-marker-blue .komplekt-ul li:before { background-color: #282e6a; }

/* Тема 2: Серый фон+зеленый маркер */
.theme-grey { background-color: #eaeaea; }
.theme-grey .absd-block__title, 
.theme-grey p, 
.theme-grey li { color: #1a1a1a !important; }
.theme-grey .komplekt-ul li:before { background-color: #167f2b; }

/* Тема 2: Серый фон+синий маркер */
.theme-grey-marker-blue { background-color: #eaeaea; }
.theme-grey-marker-blue .absd-block__title, 
.theme-grey-marker-blue p, 
.theme-grey-marker-blue li { color: #1a1a1a !important; }
.theme-grey-marker-blue .komplekt-ul li:before { background-color: #282e6a; }

/* Тема 3: Синий фон (Инверсия текста и маркеров) */
.theme-blue { background-color: #282e6a; }
.theme-blue .absd-block__title, 
.theme-blue p, 
.theme-blue li { color: #ffffff !important; }
.theme-blue .komplekt-ul li:before { background-color: #ffffff; }

/* Тема 4: Зеленый фон */
.theme-green { background-color: #167f2b; }
.theme-green .absd-block__title, 
.theme-green p, 
.theme-green li { color: #fff !important; }
.theme-green .komplekt-ul li:before { background-color: #fff; }

/* --- 5. СПИСКИ С МАРКЕРАМИ --- */
.komplekt-ul { 
    list-style: none; 
    padding: 0; 
    margin: 20px 0; 
}

.komplekt-ul li { 
    position: relative; 
    padding-left: 30px; 
    margin-bottom: 12px; 
}

.komplekt-ul li:before { 
    content: ""; 
    position: absolute; 
    left: 0; 
    top: 15px; /* Выравнивание по центру первой строки */
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    transform: translateY(-50%); 
}

/* --- 6. МОДАЛЬНОЕ ОКНО --- */
.absd-modal { 
    display: none; 
    position: fixed; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0.85); 
    z-index: 200000; 
    justify-content: center; 
    align-items: center; 
}

.absd-modal--active { 
    display: flex !important; 
}

.absd-modal__content { 
    max-width: 90%; 
    max-height: 90%; 
    object-fit: contain; 
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.absd-modal__close { 
    position: absolute; 
    top: 20px; right: 30px; 
    color: #fff; 
    font-size: 60px !important;
    cursor: pointer; 
    line-height: 0.5;

}


/* --- 7. АДАПТИВНОСТЬ (Мобильные и планшеты) --- */
@media (max-width: 1023px) {
    .absd-block__body { 
        flex-direction: column-reverse !important; /* Текст всегда под картинкой */
        align-items: center; 
        gap: 20px;
    }
    .absd-block__content, 
    .absd-block__img-wrapper { 
        width: 100%; 
        justify-content: center !important; /* Принудительный центр на мобилках */
        margin-bottom: 20px;
    }
    .absd-block__img {
        max-width: 300px; /* Ограничиваем ширину, чтобы на мобильных не была огромной */
        width: auto;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .absd-block__img {
        max-width: 225px; /* Ограничиваем ширину, чтобы на мобильных не была огромной */
        width: auto;
        margin: 0 auto;
    }    
}  

@media (max-width: 400px) {
    .absd-block__img {
        max-width: 225px; /* Ограничиваем ширину, чтобы на мобильных не была огромной */
        width: auto;
        margin: 0 auto;
    }    
}   