/* ============================================
   КНОПКА НАЗАД
   ============================================ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #5a5a5a;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding: 8px 0;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #2c2c2c;
}

/* ============================================
   СТРАНИЦА ГАЛЕРЕИ (.gallery-page)
   ============================================ */
.gallery-page {
    min-height: 100vh;
    padding: 2rem;
}

.gallery-page .container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.gallery-page h1 {
    font-size: 2.2rem;
    font-weight: 300;
    color: #2c2c2c;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    letter-spacing: -0.3px;
}

.gallery-page .event-date {
    font-size: 0.9rem;
    font-weight: 400;
    color: #8a8a8a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-page .event-description {
    background: #f0f0f0;
    padding: 2rem 3rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.gallery-page .event-description p {
    color: #797979;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
}

/* ============================================
   ГАЛЕРЕЯ (сетка)
   ============================================ */
.gallery-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-page .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* Стили для карточек фото */
.gallery-item {
    background: #ffffff;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.gallery-item a {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Подпись под фото */
.photo-caption {
    padding: 0.75rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: #5a5a5a;
    text-align: center;
    background: #fafaf8;
    border-top: 1px solid #e8e8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Нет фото */
.no-photos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #9a9a9a;
    font-weight: 400;
    background: #fafaf8;
    border-radius: 12px;
    border: 1px dashed #d0d0d0;
}

.no-photos p {
    font-size: 1rem;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 1000px) {
    .gallery-page .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-page {
        padding: 1rem;
    }

    .gallery-page .container{
        padding: 0rem;
    }

    .gallery-page h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 700px) {
    .gallery-page .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-page h1 {
        font-size: 1.5rem;
    }

    .gallery-page .event-description {
        padding: 1.2rem 1.5rem;
    }

    .container {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .gallery-page .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .container {
        padding: 0;
    }
    .gallery-page h1 {
        font-size: 1.3rem;
        font-weight: 400;
    }

    .gallery-page .event-description {
        padding: 1rem;
    }
}

.my-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.my-lightbox-overlay.active {
    display: flex;
}

.my-lightbox-overlay img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
}

.my-lightbox-overlay .close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 44px;
    font-weight: 300;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    transition: all 0.3s ease;
    z-index: 10000;
    line-height: 1;
    user-select: none;
    opacity: 0.7;
}

.my-lightbox-overlay .close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
    color: #ff4444;
}

.my-lightbox-overlay .prev,
.my-lightbox-overlay .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 50px;
    cursor: pointer;
    padding: 25px 18px;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 10000;
    font-family: 'Arial', sans-serif;
    border-radius: 8px;
}

.my-lightbox-overlay .prev:hover,
.my-lightbox-overlay .next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.my-lightbox-overlay .prev {
    left: 20px;
}

.my-lightbox-overlay .next {
    right: 20px;
}

.my-lightbox-overlay .caption {
    color: #ccc;
    font-size: 16px;
    margin-top: 18px;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-align: center;
    max-width: 80%;
}

.my-lightbox-overlay .counter {
    position: absolute;
    bottom: 70px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: 'Segoe UI', Arial, sans-serif;
    letter-spacing: 1px;
}

@media (max-width: 700px) {
    .my-lightbox-overlay .prev,
    .my-lightbox-overlay .next {
        font-size: 30px;
        padding: 15px 10px;
    }
    .my-lightbox-overlay .prev {
        left: 5px;
    }
    .my-lightbox-overlay .next {
        right: 5px;
    }
    .my-lightbox-overlay .close-btn {
        font-size: 32px;
        top: 15px;
        right: 20px;
    }
    .my-lightbox-overlay img {
        max-height: 70%;
    }
    .my-lightbox-overlay .counter {
        bottom: 50px;
    }
}