/* ======= VIDEO GALLERY STYLES ======= */

#video-gallery {
    padding: 80px 0;
    background-color: var(--background-light);
}

.gallery-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* Carousel Container */
.gallery-carousel {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    background-color: #f8f8f8;
}

/* Carousel Track */
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

/* Carousel Slide */
.carousel-slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: space-between;
    padding: 20px;
    gap: 20px;
    box-sizing: border-box;
}

/* Gallery Item (Individual Image) */
.gallery-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 0;
    padding-bottom: 45%; /* Reduced from 60% to 45% to match the height reduction */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Carousel Controls with improved contrast */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.carousel-control:hover {
    background-color: #d45f1e;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control:focus {
    outline: 3px solid #d45f1e;
    outline-offset: 2px;
}

/* Pagination Dots */
.carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 20px; /* Added bottom margin to create space with the border */
    padding-bottom: 10px; /* Additional padding at the bottom */
}

.carousel-dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dot.active {
    background-color: var(--primary-color);
}

/* Lightbox Styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 1010;
}

.lightbox-close:hover {
    background-color: #d45f1e;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

/* Navigation arrows for lightbox */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(244, 121, 32, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1010;
    transition: all 0.3s ease;
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-nav:hover {
    background-color: rgba(244, 121, 32, 1);
    transform: translateY(-50%) scale(1.1);
}

#lightbox-title {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 20px;
}

/* No Images Message */
.no-images {
    padding: 30px;
    text-align: center;
    color: #666;
}

/* Responsive styles */
@media (max-width: 992px) {
    .carousel-slide {
        padding: 15px;
        gap: 15px;
    }
}

@media (max-width: 1200px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
    }
    
    .lightbox-prev {
        left: -70px;
    }
    
    .lightbox-next {
        right: -70px;
    }
}

@media (max-width: 768px) {
    .carousel-slide {
        padding: 10px;
        gap: 10px;
    }
    
    .carousel-control {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .lightbox-close {
        top: -35px;
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 20px;
    }
    
    .lightbox-next {
        right: 20px;
    }
    
    #lightbox-title {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .carousel-slide {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .gallery-item {
        padding-bottom: 70%;
    }
    
    .carousel-control {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .carousel-dot {
        width: 8px;
        height: 8px;
    }
    
    #lightbox-title {
        font-size: 16px;
    }
}