/* Стили для страницы галереи */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #000000;
    color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-top: 80px;
}

main {
    flex: 1;
    padding: 0;
}

/* Герой секция для галереи */
.gallery-hero {
    min-height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)),
                url('../Image/travel/photo_2025-08-12_08-33-01.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.gallery-hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #4169E1, #32CD32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gallery-hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 30px;
}

.stats-badge {
    display: inline-flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4169E1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Основная галерея */
.gallery-main {
    padding: 80px 20px;
    background: #000000;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Фильтры по городам */
.city-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0 20px;
}

.city-filter-btn {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.city-filter-btn:hover {
    background: rgba(65, 105, 225, 0.2);
    border-color: #4169E1;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.city-filter-btn.active {
    background: linear-gradient(135deg, #4169E1, #32CD32);
    color: #FFFFFF;
    border-color: transparent;
}

.city-filter-btn i {
    font-size: 1.1rem;
}

/* Сетка галереи */
.masonry-grid {
    columns: 4;
    column-gap: 20px;
    padding: 0 10px;
}

@media (max-width: 1200px) {
    .masonry-grid {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        columns: 2;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        columns: 1;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #121212;
    transition: all 0.4s ease;
    cursor: pointer;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    width: 100%;
    display: block;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Задержки анимации */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(65, 105, 225, 0.15),
                0 0 0 1px rgba(65, 105, 225, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Разные размеры фотографий */
.gallery-item {
    height: 300px;
}

.gallery-item.tall {
    height: 450px;
}

.gallery-item.wide {
    height: 250px;
}

.gallery-item.extra-wide {
    height: 350px;
}

/* Оверлей с информацией */
.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 25px;
}

.gallery-item:hover .photo-overlay {
    opacity: 1;
}

.photo-info {
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
    width: 100%;
}

.gallery-item:hover .photo-info {
    transform: translateY(0);
}

.photo-info h3 {
    color: #FFFFFF;
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.photo-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.photo-date {
    color: #4169E1;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.photo-date::before {
    content: '📅';
    font-size: 0.9rem;
}

/* Кнопка "Показать еще" */
.load-more {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 45px;
    background: linear-gradient(135deg, #4169E1, #32CD32);
    color: #FFFFFF;
    border: none;
    border-radius: 35px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(65, 105, 225, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(65, 105, 225, 0.4);
}

.load-more-btn i {
    font-size: 1.3rem;
}

/* Статистика внизу */
.gallery-stats {
    margin-top: 80px;
    padding: 40px;
    background: rgba(18, 18, 18, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(65, 105, 225, 0.1);
    border-color: #4169E1;
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(65, 105, 225, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-icon i {
    font-size: 1.8rem;
    color: #4169E1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Модальное окно */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.modal-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 25px 25px;
    color: #FFFFFF;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.modal-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.modal-date {
    color: #4169E1;
    font-size: 0.95rem;
    font-weight: 500;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .gallery-hero h1 {
        font-size: 2.8rem;
    }

    .gallery-hero p {
        font-size: 1.1rem;
    }

    .stats-badge {
        flex-direction: column;
        gap: 20px;
        padding: 15px 30px;
    }

    .city-filters {
        gap: 10px;
    }

    .city-filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .gallery-main {
        padding: 40px 15px;
    }

    .gallery-item {
        height: 250px;
    }

    .gallery-item.tall {
        height: 350px;
    }

    .gallery-item.wide {
        height: 200px;
    }

    .gallery-item.extra-wide {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 2.2rem;
    }

    .gallery-hero p {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .load-more-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
}