/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #f5efe4;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: #002405;
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    font-weight: 300;
}

.close-btn:hover {
    opacity: 0.8;
}

/* Gallery Indicator */
.gallery-indicator {
    position: absolute;
    top: 20px;
    left: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1001;
}

/* Slider Container */
.slider-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

/* Side Previews */
.side-preview {
    position: relative;
    height: 60%;
    min-width: 80px; /* Minimum width to prevent too small previews */
    width: 100%; /* Responsive width based on viewport */
    overflow: hidden;
    opacity: 0.4; /* More faded */
    transition: all 0.3s ease;
    flex-shrink: 1; /* Allow shrinking */
}

.side-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Center Image */
.center-image {
    position: relative;
    height: 100%;
    width: 1000px; /* Fixed width for main image */
    max-width: 80vw; /* Prevent overflow on very small screens */
    min-width: 600px; /* Minimum width */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent shrinking */
}

#mainImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Navigation Controls */
.navigation-controls {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    margin-top: 20px;
    width: 1000px;
}

/* Navigation Buttons */
.nav-btn {
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    background: transparent;
}

.nav-btn:hover {
    transform: scale(1.1);
}

/* Slide Indicators */
.slide-indicators {
    display: flex;
    gap: 10px;
}

.indicator {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #002405;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.38;
}

.indicator:hover {
    background: rgba(0, 0, 0, 0.6);
}

.indicator.active {
    background: #002405;
    opacity: 1;
}

/* Slide Counter */
.slide-counter {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    min-width: 60px;
    text-align: center;
}

.slide-indicators-container {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* VIdeo */

#videoContainer iframe {
    width: 100vw;
    height: 100vh;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .center-image {
        width: 800px;
        min-width: 500px;
    }

    .navigation-controls {
        width: 800px;
    }

    .side-preview {
        width: 12vw;
        min-width: 60px;
    }
}

@media (max-width: 1200px) {
    .center-image {
        width: 700px;
        min-width: 400px;
    }

    .navigation-controls {
        width: 700px;
    }

    .side-preview {
        min-width: 50px;
    }
}

@media (max-width: 1000px) {
    .center-image {
        width: 600px;
        min-width: 350px;
    }

    .navigation-controls {
        width: 600px;
    }

    .side-preview {
        width: 8vw;
        min-width: 40px;
    }
}

@media (max-width: 768px) {
    .main-image-container {
        flex-direction: column;
        gap: 20px;
    }

    .side-preview {
        display: none;
    }

    .center-image {
        width: 100%;
        height: 60%;
        min-width: unset;
        max-width: unset;
    }

    .navigation-controls {
        width: 100%;
    }

    .nav-btn {
        height: 40px;
    }

    .close-btn {
        top: 0;
        right: 0;
        width: 90px;
        height: 90px;
        font-size: 24px;
    }

    .gallery-indicator {
        top: 10px;
        left: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .navigation-controls {
        gap: 15px;
    }

    .close-btn {
        width: 65px;
        height: 65px;
    }

    .close-btn img {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .slider-container {
        height: 80vh;
    }

    .side-preview {
        height: 15%;
    }

    .center-image {
        height: 70%;
    }

    .navigation-controls {
        gap: 10px;
    }

    .slide-counter {
        font-size: 14px;
    }
}
