/* =============================================
   GALLERY STYLES
   Добавьте этот код в main.css
   ============================================= */

/* ========== GALLERY LIST PAGE ========== */
.gallery-section {
    padding-bottom: 80px;
}

.gallery-card {
    display: block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-decoration: none;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

.gallery-card__image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

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

.gallery-card:hover .gallery-card__image img {
    transform: scale(1.1);
}

.gallery-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 25px 25px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-card:hover .gallery-card__overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-card__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.gallery-card__count {
    font-size: 14px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-card__count i {
    font-size: 16px;
}

.gallery-card__icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7) rotate(-10deg);
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.gallery-card:hover .gallery-card__icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.gallery-card__icon i {
    font-size: 18px;
    color: #F5A623;
}

/* ========== GALLERY DETAIL PAGE ========== */
.gallery-detail {
    padding-bottom: 80px;
}

.gallery-carousel {
    margin-top: 30px;
}

/* Thumbnails */
.gallery-thumbnails {
    position: relative;
    margin-bottom: 20px;
    padding: 0 50px;
}

.gallery-thumbnails__container {
    overflow: hidden;
    border-radius: 12px;
}

.gallery-thumbnails__track {
    display: flex;
    gap: 15px;
    transition: transform 0.4s ease;
}

.gallery-thumbnails__item {
    flex: 0 0 auto;
    width: 180px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.gallery-thumbnails__item:hover {
    transform: translateY(-3px);
}

.gallery-thumbnails__item.active {
    border-color: #F5A623;
}

.gallery-thumbnails__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-thumbnails__item:hover img {
    transform: scale(1.1);
}

.gallery-thumbnails__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-thumbnails__nav:hover {
    background: #F5A623;
    border-color: #F5A623;
    color: #fff;
}

.gallery-thumbnails__nav._prev {
    left: 0;
}

.gallery-thumbnails__nav._next {
    right: 0;
}

/* Main Image */
.gallery-main {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 16/9;
    max-height: 600px;
}

.gallery-main__link {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-main__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-main__image:hover {
    transform: scale(1.02);
}

.gallery-main__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gallery-main__nav:hover {
    background: #F5A623;
    color: #fff;
}

.gallery-main__nav._prev {
    left: 30px;
}

.gallery-main__nav._next {
    right: 30px;
}

.gallery-main__nav i {
    font-size: 20px;
}

.gallery-main__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.gallery-main__hint {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-main__hint i {
    color: #F5A623;
    font-size: 16px;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.gallery-empty i {
    font-size: 60px;
    color: #e5e5e5;
    margin-bottom: 20px;
    display: block;
}

.gallery-empty h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.gallery-empty p {
    font-size: 16px;
}

/* Fancybox Custom */
.fancybox__container {
    --fancybox-bg: rgba(0, 0, 0, 0.95);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .gallery-thumbnails__item {
        width: 150px;
        height: 85px;
    }

    .gallery-thumbnails {
        padding: 0 45px;
    }
}

@media (max-width: 768px) {
    .gallery-thumbnails__item {
        width: 120px;
        height: 70px;
    }

    .gallery-thumbnails__track {
        gap: 10px;
    }

    .gallery-thumbnails {
        padding: 0 40px;
    }

    .gallery-main__nav {
        width: 45px;
        height: 45px;
    }

    .gallery-main__nav._prev {
        left: 15px;
    }

    .gallery-main__nav._next {
        right: 15px;
    }

    .gallery-main__hint {
        display: none;
    }
}

@media (max-width: 576px) {
    .gallery-thumbnails__item {
        width: 100px;
        height: 60px;
    }

    .gallery-thumbnails__nav {
        width: 35px;
        height: 35px;
    }

    .gallery-thumbnails {
        padding: 0 38px;
    }
}