/* Event Gallery Component Styles */

/* Section Container */
.event-gallery-section {
    background-color: #111E0A;
    padding: 40px 0;
    margin: 20px 0;
}

.event-gallery-heading {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 30px;
}

.event-gallery-heading i {
    color: #e31818;
}

.gallery-section-title {
    text-align: left;
    font-size: 1.8rem;
    color: #ffd700;
    margin: 0;
    font-weight: 600;
}

/* Gallery Container - Grid Layout */
.event-gallery-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main Image Display */
.gallery-main-image {
    position: relative;
    background-color: #1a2a0a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
    background: linear-gradient(90deg,
            #1a2a0a 0%,
            #2a3a1a 20%,
            #3a4a2a 40%,
            #2a3a1a 60%,
            #1a2a0a 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.gallery-image.active {
    opacity: 1;
    pointer-events: auto;
    animation: none;
    background: none;
}

/* Skeleton Loading Animation */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Navigation Buttons */
.gallery-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(176, 176, 176, 0.19);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(253, 253, 253, 0.46);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.0rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav-button:hover {
    background: rgba(255, 255, 255, 0.96);
    color: #e31818;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-button.prev {
    left: 20px;
}

.gallery-nav-button.next {
    right: 20px;
}

.gallery-nav-button:active {
    transform: translateY(-50%) scale(0.95);
}

/* Image Counter */
.gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(176, 176, 176, 0.19);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(253, 253, 253, 0.46);
    color: #fff;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    z-index: 100;
}

/* Thumbnail Sidebar */
.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* Custom Scrollbar */
.gallery-thumbnails::-webkit-scrollbar {
    width: 8px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #1a2a0a;
    border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #e6c200;
}

/* Thumbnail Items */
.thumbnail-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background-color: #1a2a0a;
}

.thumbnail-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    pointer-events: none;
}

.thumbnail-item:hover .thumbnail-overlay {
    background: rgba(255, 215, 0, 0.2);
}

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

.thumbnail-item.active {
    border-color: #ffd700;

}

.thumbnail-item.active .thumbnail-overlay {
    background: rgba(255, 215, 0, 0.1);
}

/* Loading State */
.gallery-image[loading="lazy"] {
    background: linear-gradient(90deg, #1a2a0a 25%, #2a3a1a 50%, #1a2a0a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-gallery-section {
    animation: fadeIn 0.8s ease-out;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .event-gallery-container {
        grid-template-columns: 1.5fr 1fr;
        gap: 20px;
    }

    .thumbnail-item img {
        height: 120px;
    }
}

@media (max-width: 768px) {
    .event-gallery-section {
        padding: 40px 0;
    }

    .gallery-section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .event-gallery-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-thumbnails {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-right: 0;
        padding-bottom: 5px;
    }

    .gallery-thumbnails::-webkit-scrollbar {
        height: 8px;
        width: auto;
    }

    .thumbnail-item {
        min-width: 150px;
        flex-shrink: 0;
    }

    .thumbnail-item img {
        height: 100px;
    }

    .gallery-nav-button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-nav-button.prev {
        left: 10px;
    }

    .gallery-nav-button.next {
        right: 10px;
    }

    .gallery-counter {
        bottom: 15px;
        right: 15px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-section-title {
        font-size: 1.75rem;
    }

    .main-image-wrapper {
        padding-bottom: 75%;
        /* 4:3 aspect ratio for mobile */
    }

    .thumbnail-item {
        min-width: 120px;
    }

    .thumbnail-item img {
        height: 80px;
    }

    .gallery-nav-button {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}