/*
 * Стили для страницы "Планы эвакуации: повышение квалификации"
 * Подключается после style.css и dpo.css
 */

/* =============================================
   ГАЛЕРЕЯ ПРИМЕРОВ ПЛАНОВ ЭВАКУАЦИИ
   ============================================= */

.evac-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-card);
    margin-top: var(--gap-card);
}

.evac-gallery__item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--color-fill);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 20px;
}

.evac-gallery__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-accent-bg);
    transition: transform 0.3s ease;
}

.evac-gallery__item:hover .evac-gallery__img {
    transform: scale(1.02);
}

.evac-gallery__desc {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-dark);
    text-align: center;
}

/* =============================================
   ФОН ГЕРО-БЛОКА
   ============================================= */

.hero--evac .hero__bg--evac {
    background: #F5EFE0 url('../images/block-fon/kurs-po-planam-evakuacii.jpg') center/cover no-repeat !important;
}

.hero--evac .hero__bg--evac::before {
    display: none !important;
}

@media (max-width: 768px) {
    .hero--evac .hero__bg--evac {
        background: #F5EFE0 url('../images/block-fon/kurs-po-planam-evakuacii.jpg') center/cover no-repeat !important;
    }
}

/* =============================================
   ИЗОБРАЖЕНИЯ ДЛЯ КАРТОЧЕК ОБУЧЕНИЯ
   ============================================= */

.learning-card__img--evac-1,
.learning-card__img--evac-2,
.learning-card__img--evac-3,
.learning-card__img--evac-4 {
    width: 100%;
    background: var(--color-accent-bg);
    border-radius: var(--radius);
    flex-shrink: 0;
    object-fit: cover;
    max-width: 100%;
    height: 290px;
}

/* =============================================
   АДАПТИВНОСТЬ ДЛЯ ГАЛЕРЕИ
   ============================================= */

@media (max-width: 1200px) {
    .evac-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .evac-gallery {
        grid-template-columns: 1fr;
    }
    
    .learning-card__img--evac-1,
    .learning-card__img--evac-2,
    .learning-card__img--evac-3,
    .learning-card__img--evac-4 {
        height: 200px;
    }
}

/* =============================================
   ЗАТЕМНЕНИЕ В HERO-БЛОКЕ (ТОЛЬКО ЗДЕСЬ)
   ============================================= */

.hero--evac .hero__bg--evac::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.20);
    pointer-events: none;
    z-index: 1;
    transition: background 0.3s ease;
}

.hero--evac .hero__content {
    position: relative;
    z-index: 2;
}

.hero--evac .hero__title,
.hero--evac .hero__desc,
.hero--evac .hero__label {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 255, 255, 0.8);
}

.hero--evac .hero-card__text {
    text-shadow: none;
}

/* =============================================
   ФОН ДЛЯ LABEL ПРИ МАСШТАБИРОВАНИИ
   ============================================= */

.hero--evac .hero__label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

@media (max-width: 1400px) {
    .hero--evac .hero__label {
        background: rgba(245, 239, 224, 0.70);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
}

@media (max-width: 1200px) {
    .hero--evac .hero__label {
        background: rgba(245, 239, 224, 0.85);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

@media (max-width: 960px) {
    .hero--evac .hero__label {
        background: rgba(245, 239, 224, 0.92);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
}

@media (max-width: 823px) {
    .hero--evac .hero__label {
        background: rgba(245, 239, 224, 0.95);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

@media (max-width: 720px) {
    .hero--evac .hero__label {
        background: rgba(245, 239, 224, 0.80);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

@media (max-width: 500px) {
    .hero--evac .hero__label {
        background: rgba(245, 239, 224, 0.80);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* =============================================
   ПЛАВНОЕ ЗАТЕМНЕНИЕ ТЕКСТА hero__desc
   ============================================= */

.hero--evac .hero__desc {
    transition: color 0.3s ease;
}

@media (max-width: 1400px) {
    .hero--evac .hero__desc {
        color: #4a4a4a;
    }
}

@media (max-width: 1200px) {
    .hero--evac .hero__desc {
        color: #3a3a3a;
    }
}

@media (max-width: 960px) {
    .hero--evac .hero__desc {
        color: #2a2a2a;
    }
}

@media (max-width: 823px) {
    .hero--evac .hero__desc {
        color: #1a1a1a;
    }
}

@media (max-width: 720px) {
    .hero--evac .hero__desc {
        color: #111111;
    }
}

@media (max-width: 500px) {
    .hero--evac .hero__desc {
        color: #000000;
    }
}

/* =============================================
   УСИЛЕНИЕ ЗАТЕМНЕНИЯ ПРИ МАСШТАБИРОВАНИИ
   (УМЕНЬШЕНО НА 50% НА МОБИЛЬНЫХ, ЧТОБЫ БЫЛ ВИДЕН РИСУНОК)
   ============================================= */

@media (max-width: 1400px) {
    .hero--evac .hero__bg--evac::after {
        background: rgba(255, 255, 255, 0.20);
    }
}

@media (max-width: 1200px) {
    .hero--evac .hero__bg--evac::after {
        background: rgba(255, 255, 255, 0.22);
    }
}

@media (max-width: 1000px) {
    .hero--evac .hero__bg--evac::after {
        background: rgba(255, 255, 255, 0.25);
    }
}

@media (max-width: 768px) {
    .hero--evac .hero__bg--evac::after {
        background: rgba(255, 255, 255, 0.12) !important;
    }
}

@media (max-width: 500px) {
    .hero--evac .hero__bg--evac::after {
        background: rgba(255, 255, 255, 0.07) !important;
    }
}

/* =============================================
   БЛОК УДОСТОВЕРЕНИЯ — ИСПРАВЛЕНИЕ ОБРЕЗАНИЯ НА МОБИЛЬНЫХ
   ============================================= */

@media (max-width: 768px) {
    .diploma-block {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 16px !important;
    }

    .diploma-block__img {
        min-height: auto !important;
        height: auto !important;
        max-height: 400px !important;
        object-fit: contain !important;
        width: 100% !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 480px) {
    .diploma-block__img {
        max-height: 300px !important;
    }
}

/* =============================================
   БЛОК ПРЕПОДАВАТЕЛЯ — УВЕЛИЧЕННОЕ ПРЯМОУГОЛЬНОЕ ФОТО
   ============================================= */

.teacher {
    grid-template-columns: 1fr auto !important;
    gap: 30px !important;
    align-items: center !important;
    overflow: visible !important;
    position: relative !important;
    padding-right: 20px !important;
}

.teacher__photo {
    width: 120% !important;
    max-width: 120% !important;
    min-width: 120% !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    object-position: center 30% !important;
    border-radius: 16px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
    border: 4px solid #ffffff !important;
    transform: translateX(-10%) !important;
    position: relative !important;
    z-index: 2 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.teacher__photo:hover {
    transform: translateX(-10%) scale(1.02) !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.20) !important;
}

.teacher__info {
    max-width: 580px !important;
    padding-right: 20px !important;
    position: relative !important;
    z-index: 3 !important;
}

.teacher__name {
    font-size: 28px !important;
    font-weight: 700 !important;
}

.teacher__text {
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* =============================================
   АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ (ширина <= 1024px)
   ============================================= */

@media (max-width: 1024px) {
    .teacher {
        gap: 20px !important;
        padding-right: 10px !important;
    }
    
    .teacher__photo {
        width: 110% !important;
        max-width: 110% !important;
        min-width: 110% !important;
        aspect-ratio: 4 / 3 !important;
        transform: translateX(-5%) !important;
    }
    
    .teacher__photo:hover {
        transform: translateX(-5%) scale(1.02) !important;
    }
    
    .teacher__info {
        max-width: 100% !important;
        padding-right: 10px !important;
    }
}

/* =============================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ (ширина <= 768px)
   ============================================= */

@media (max-width: 768px) {
    .teacher {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        text-align: center !important;
        gap: 24px !important;
        overflow: hidden !important;
        padding-right: 0 !important;
    }

    .teacher__info {
        max-width: 100% !important;
        padding-right: 0 !important;
        order: 2 !important;
    }

    .teacher__photo {
        width: 80% !important;
        max-width: 320px !important;
        min-width: auto !important;
        aspect-ratio: 4 / 3 !important;
        transform: translateX(0%) !important;
        order: 1 !important;
        margin: 0 auto !important;
        object-position: center 30% !important;
    }

    .teacher__photo:hover {
        transform: scale(1.02) !important;
    }
}

/* =============================================
   АДАПТАЦИЯ ДЛЯ МАЛЕНЬКИХ ТЕЛЕФОНОВ (<= 480px)
   ============================================= */

@media (max-width: 480px) {
    .teacher__photo {
        width: 90% !important;
        max-width: 280px !important;
        aspect-ratio: 4 / 3 !important;
    }
}

/* =============================================
   БЛОК УДОСТОВЕРЕНИЯ — ИСПРАВЛЕНИЕ ВЫХОДА ЗА БЛОК
   ============================================= */

@media (max-width: 768px) {
    .diploma-block {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 16px !important;
        overflow: hidden !important;          /* обрезаем всё, что вылезает */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .diploma-block__content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        padding: 0 !important;
    }

    .diploma-block__img {
        min-height: auto !important;
        height: auto !important;
        max-height: 350px !important;
        width: 100% !important;
        max-width: 100% !important;
        object-fit: contain !important;
        border-radius: 12px !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .diploma-slider {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .diploma-slider .slick-list {
        overflow: hidden !important;
    }

    .diploma-slider .slick-track {
        display: flex !important;
        align-items: center !important;
    }

    .diploma-slider .slick-slide {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

@media (max-width: 480px) {
    .diploma-block__img {
        max-height: 280px !important;
    }
}
/* =============================================
   БЛОК УДОСТОВЕРЕНИЯ — АДАПТАЦИЯ ПОД ПЛАНШЕТЫ
   ============================================= */

/* Планшеты (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .diploma-block {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 30px !important;
        padding: 30px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .diploma-block__content {
        flex: 0 0 45% !important;
        max-width: 45% !important;
        padding-right: 10px !important;
    }

    .diploma-block__title {
        font-size: 26px !important;
        line-height: 1.3 !important;
    }

    .diploma-block__text {
        font-size: 16px !important;
    }

    .diploma-block__img {
        min-height: auto !important;
        height: auto !important;
        max-height: 350px !important;
        width: 100% !important;
        max-width: 100% !important;
        object-fit: contain !important;
        border-radius: 12px !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .diploma-slider {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .diploma-slider .slick-list {
        overflow: hidden !important;
    }

    .diploma-slider .slick-track {
        display: flex !important;
        align-items: center !important;
    }

    .diploma-slider .slick-slide {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* Маленькие планшеты (600px - 768px) */
@media (min-width: 600px) and (max-width: 768px) {
    .diploma-block {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 20px !important;
    }

    .diploma-block__content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        padding: 0 !important;
    }

    .diploma-block__title {
        font-size: 24px !important;
    }

    .diploma-block__text {
        font-size: 15px !important;
    }

    .diploma-block__img {
        min-height: auto !important;
        height: auto !important;
        max-height: 320px !important;
        width: 100% !important;
        max-width: 100% !important;
        object-fit: contain !important;
        border-radius: 12px !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .diploma-slider {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .diploma-slider .slick-list {
        overflow: hidden !important;
    }

    .diploma-slider .slick-track {
        display: flex !important;
        align-items: center !important;
    }

    .diploma-slider .slick-slide {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* Телефоны (до 600px) */
@media (max-width: 600px) {
    .diploma-block {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 16px !important;
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .diploma-block__content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        padding: 0 !important;
    }

    .diploma-block__title {
        font-size: 22px !important;
    }

    .diploma-block__text {
        font-size: 15px !important;
    }

    .diploma-block__img {
        min-height: auto !important;
        height: auto !important;
        max-height: 280px !important;
        width: 100% !important;
        max-width: 100% !important;
        object-fit: contain !important;
        border-radius: 12px !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .diploma-slider {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .diploma-slider .slick-list {
        overflow: hidden !important;
    }

    .diploma-slider .slick-track {
        display: flex !important;
        align-items: center !important;
    }

    .diploma-slider .slick-slide {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* =============================================
   БЛОК ПРЕПОДАВАТЕЛЯ — АДАПТАЦИЯ ПОД ПЛАНШЕТЫ
   ============================================= */

/* Планшеты (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .teacher {
        grid-template-columns: 1fr 280px !important;
        gap: 30px !important;
        align-items: center !important;
        padding-right: 0 !important;
    }

    .teacher__info {
        max-width: 100% !important;
        padding-right: 15px !important;
        padding-left: 0 !important;
    }

    .teacher__name {
        font-size: 24px !important;
    }

    .teacher__text {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .teacher__photo {
        width: 100% !important;
        max-width: 280px !important;
        min-width: 280px !important;
        aspect-ratio: 4 / 3 !important;
        transform: translateX(0%) !important;
        object-fit: cover !important;
        object-position: center 30% !important;
        border-radius: 16px !important;
        flex-shrink: 0 !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
        border: 4px solid #ffffff !important;
    }

    .teacher__photo:hover {
        transform: scale(1.02) !important;
    }
}

/* Маленькие планшеты (600px - 768px) */
@media (min-width: 600px) and (max-width: 768px) {
    .teacher {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        text-align: center !important;
        gap: 24px !important;
        overflow: hidden !important;
        padding-right: 0 !important;
    }

    .teacher__info {
        max-width: 100% !important;
        padding-right: 0 !important;
        order: 2 !important;
    }

    .teacher__name {
        font-size: 22px !important;
        text-align: center !important;
    }

    .teacher__text {
        font-size: 16px !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }

    .teacher__photo {
        width: 60% !important;
        max-width: 260px !important;
        min-width: auto !important;
        aspect-ratio: 4 / 3 !important;
        transform: translateX(0%) !important;
        order: 1 !important;
        margin: 0 auto !important;
        object-fit: cover !important;
        object-position: center 30% !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
        border: 4px solid #ffffff !important;
    }

    .teacher__photo:hover {
        transform: scale(1.02) !important;
    }
}

/* Телефоны (до 600px) */
@media (max-width: 600px) {
    .teacher {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        text-align: center !important;
        gap: 24px !important;
        overflow: hidden !important;
        padding-right: 0 !important;
    }

    .teacher__info {
        max-width: 100% !important;
        padding-right: 0 !important;
        order: 2 !important;
    }

    .teacher__name {
        font-size: 20px !important;
        text-align: center !important;
    }

    .teacher__text {
        font-size: 15px !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }

    .teacher__photo {
        width: 70% !important;
        max-width: 240px !important;
        min-width: auto !important;
        aspect-ratio: 4 / 3 !important;
        transform: translateX(0%) !important;
        order: 1 !important;
        margin: 0 auto !important;
        object-fit: cover !important;
        object-position: center 30% !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
        border: 4px solid #ffffff !important;
    }

    .teacher__photo:hover {
        transform: scale(1.02) !important;
    }
}