.events-poster__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 40px;
}

/* =========================================================
    ОБЩАЯ КАРТОЧКА
========================================================= */

.events-poster__card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}


/* =========================================================
    ОБЩИЙ БЛОК ФОТО
========================================================= */

.events-poster__card-images {
    display: flex;
    gap: 12px;

    width: 100%;
    height: 360px;

    margin-bottom: 20px;

    border-radius: 12px;
}


/* =========================================================
    БОЛЬШОЕ ФОТО
========================================================= */

.events-poster__card-big {
    position: relative;

    flex: 1;
    min-width: 0;

    border-radius: 12px;
    overflow: hidden;
}

.events-poster__card-big img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transform: scale(1);
    transform-origin: center;

    transition: transform 0.4s ease;
}

.events-poster__card-big:hover img {
    transform: scale(1.15);
}


/* =========================================================
    ОБЩАЯ ПРАВАЯ КОЛОНКА
========================================================= */

.events-poster__card-side {
    width: 28%;

    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* =========================================================
    МАЛЕНЬКОЕ ФОТО
========================================================= */

.events-poster__card-small {
    position: relative;

    display: block;

    width: 100%;

    flex: 1;

    border-radius: 12px;
    overflow: hidden;

    text-decoration: none;

    transition: transform 0.2s ease;
}

.events-poster__card-small:hover {
    transform: translateY(-3px);
}

.events-poster__card-small img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transform: scale(1.15);
    transform-origin: center;

    transition: transform 0.4s ease;
}

.events-poster__card-small:hover img {
    transform: scale(1.3);
}


/* =========================================================
    +10
========================================================= */

.events-poster__card-more {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 120px;
    height: 120px;

    flex: 0 0 120px;

    align-self: flex-end;

    border-radius: 12px;

    background: #f1f3f4;

    text-decoration: none;

    transition: transform 0.2s ease;
}

.events-poster__card-more:hover {
    transform: translateY(-3px);
}

.events-poster__card-more span {
    font-size: 24px;
    font-weight: 600;

    color: #9aa0a6;
}

.events-poster__card-images--variant-2 .events-poster__card-more {
    width: 120px;
    height: 120px;

    flex: 0 0 120px;
    align-self: stretch;
}


/* =========================================================
    ВАРИАНТ 1
    
    ┌─────────────────────────────┬──────────┐
    │                             │  фото    │
    │       БОЛЬШОЕ ФОТО          │          │
    │                             ├──────────┤
    │                             │   +10    │
    └─────────────────────────────┴──────────┘
========================================================= */

.events-poster__card-images--variant-1 {
    height: 360px;
}

.events-poster__card-images--variant-1 .events-poster__card-big {
    flex: 1;
}

/* Правая колонка ВАРИАНТА 1 */
.events-poster__card-images--variant-1 .events-poster__card-side {
    width: 120px;
    flex: 0 0 120px;
}

.events-poster__card-images--variant-1 .events-poster__card-side .events-poster__card-small {
    width: 120px;
    flex: 1 1 auto;
}

.events-poster__card-images--variant-1 .events-poster__card-more {
    width: 120px;
    height: 120px;
    flex: 0 0 120px;
    align-self: stretch;
}


/* =========================================================
    ВАРИАНТ 2

    ┌──────────┬────────────────────┬──────────┐
    │  фото    │                    │  фото    │
    ├──────────┤     БОЛЬШОЕ        │          │
    │  фото    │       ФОТО         ├──────────┤
    │          │                    │   +10    │
    └──────────┴────────────────────┴──────────┘
========================================================= */

.events-poster__card-images--variant-2 {
    height: 360px;
}


/* Левая колонка с двумя фото */

.events-poster__card-left {
    width: 20%;

    display: flex;
    flex-direction: column;

    gap: 12px;
}

.events-poster__card-left .events-poster__card-small {
    width: 100%;
    height: calc(50% - 6px);

    flex: none;
}


/* Центральное фото */

.events-poster__card-images--variant-2 .events-poster__card-big {
    flex: 1;
}


/* Правая колонка */

.events-poster__card-images--variant-2 .events-poster__card-side {
    width: 120px;
    flex: 0 0 120px;
}

.events-poster__card-images--variant-2 .events-poster__card-side .events-poster__card-small {
    width: 120px;
    flex: 1 1 auto;
}


/* =========================================================
                                ТЕКСТОВАЯ ИНФОРМАЦИЯ
                            ========================================================= */

.events-poster__card-info {
    display: flex;
    flex-direction: column;

    gap: 20px;
}


/* =========================================================
                                ДАТА + АДРЕС
                            ========================================================= */

.events-poster__contact-wrap {
    display: flex;
    flex-wrap: wrap;

    gap: 35px;

    align-items: center;
}

.events-poster__contact {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    white-space: nowrap;
}

.events-poster__contact img {
    display: block;

    width: 16px;
    height: auto;

    flex-shrink: 0;
}


/* =========================================================
    МОБИЛЬНАЯ ВЕРСИЯ
========================================================= */

@media (max-width: 770px) {

    /* =========================================================
           Список карточек — 1 колонка
        ========================================================= */

    .events-poster__list {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 40px;
    }


    /* =========================================================
           ОБЩЕЕ
        ========================================================= */

    .events-poster__card-images {
        height: auto;
        margin-bottom: 20px;
    }


    /* =========================================================
           ВАРИАНТ 1
           
           ┌──────────────────────┐
           │                      │
           │     БОЛЬШОЕ ФОТО     │
           │                      │
           └──────────────────────┘
           ┌──────────┬───────────┐
           │ маленькое│    +10    │
           └──────────┴───────────┘
        ========================================================= */

    .events-poster__card-images--variant-1 {
        flex-direction: column;
        height: auto;
    }

    /* Большая картинка */
    .events-poster__card-images--variant-1 .events-poster__card-big {
        width: 100%;
        height: 220px;

        flex: none;
    }

    /* Правая колонка превращается в нижнюю строку */
    .events-poster__card-images--variant-1 .events-poster__card-side {
        width: 100%;
        height: 120px;

        flex: none;

        display: flex;
        flex-direction: row;

        gap: 12px;
    }

    /* Маленькое фото */
    .events-poster__card-images--variant-1 .events-poster__card-side .events-poster__card-small {
        width: auto;
        height: 120px;

        flex: 1;
    }

    /* +10 */
    .events-poster__card-images--variant-1 .events-poster__card-more {
        width: 120px;
        height: 120px;

        flex: 0 0 120px;

        align-self: stretch;
    }


    /* =========================================================
           ВАРИАНТ 2
           
           ┌──────────┬───────────┐
           │ маленькое│ маленькое │
           ├──────────┴───────────┤
           │      БОЛЬШОЕ ФОТО    │
           ├──────────────────────┤
           │       фото  │  +10   │
           └──────────────────────┘
        ========================================================= */

    .events-poster__card-images--variant-2 {
        flex-direction: column;
        height: auto;
    }

    /* Левая колонка превращается в верхний ряд */
    .events-poster__card-images--variant-2 .events-poster__card-left {
        width: 100%;
        height: 120px;

        flex: none;

        display: flex;
        flex-direction: row;

        gap: 12px;
    }

    .events-poster__card-images--variant-2 .events-poster__card-left .events-poster__card-small {
        width: calc(50% - 6px);
        height: 120px;

        flex: none;
    }

    /* Большая картинка */
    .events-poster__card-images--variant-2 .events-poster__card-big {
        width: 100%;
        height: 220px;

        flex: none;
    }

    /* Правая колонка */
    .events-poster__card-images--variant-2 .events-poster__card-side {
        width: 100%;
        height: 120px;

        flex: none;

        display: flex;
        flex-direction: row;

        gap: 12px;
    }

    .events-poster__card-images--variant-2 .events-poster__card-side .events-poster__card-small {
        width: auto;
        height: 120px;

        flex: 1;
    }

    /* +10 */
    .events-poster__card-images--variant-2 .events-poster__card-more {
        width: 120px;
        height: 120px;

        flex: 0 0 120px;

        align-self: stretch;
    }


    /* =========================================================
           ТЕКСТ
        ========================================================= */

    .events-poster__contact-wrap {
        flex-direction: column;
        align-items: flex-start;

        gap: 15px;
    }

    .events-poster__contact {
        white-space: normal;
    }
}


.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.gallery-modal__dialog {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.gallery-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.gallery-modal__close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-modal__body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    min-height: 400px;
    max-height: 60vh;
}

.gallery-modal__slider {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-modal__slider img {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
    border-radius: 10px;
}

.gallery-modal__prev,
.gallery-modal__next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    color: #333;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-modal__prev:hover,
.gallery-modal__next:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-modal__prev {
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-modal__next {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-modal__footer {
    padding: 20px 30px;
    background: white;
}

.gallery-modal__counter {
    text-align: center;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.gallery-modal__info {
    text-align: center;
}

.gallery-modal__title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.gallery-modal__contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.gallery-modal__contacts .events-poster__contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.events-poster__card-big,
.events-poster__card-small,
.events-poster__card-more {
    cursor: pointer;
}

@media (max-width: 768px) {
    .gallery-modal__dialog {
        width: 95%;
        max-height: 95vh;
    }

    .gallery-modal__body {
        min-height: 300px;
        max-height: 50vh;
    }

    .gallery-modal__slider img {
        max-height: 45vh;
    }

    .gallery-modal__footer {
        padding: 15px 20px;
    }

    .gallery-modal__title {
        font-size: 18px;
    }

    .gallery-modal__prev,
    .gallery-modal__next {
        width: 35px;
        height: 35px;
    }
}