﻿/* Gallery wrapper */
.gallery {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    /* FIXED HEIGHT */
    height: 60vh; /* total height of gallery */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* main image on top, thumbnails at bottom */
}

/* Main image container */
.main-image-container {
    width: 100%;
    flex: 1; /* take all remaining space above thumbnails */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

    /* Main image */
    .main-image-container img {
        max-width: 90%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 6px;
        transition: opacity 0.4s ease;
    }
/* Gallery navigation arrows */
/* Gallery navigation arrows (namespaced) */
.gallery .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(2, 114, 35, 1);
    color: #fff;
    border: none;
    width: 50px; /* fixed width */
    height: 50px; /* fixed height = circle */
    font-size: 2rem; /* icon size */
    cursor: pointer;
    border-radius: 50%; /* perfect circle */
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: background 0.3s ease, transform 0.2s ease;
}

    /* Only hover scales the circle, no movement on click */
    .gallery .nav-arrow:hover {
        background: rgba(108, 160, 46, 1);
        transform: translateY(-50%) scale(1.1); /* hover scale only */
    }

    .gallery .nav-arrow.prev {
        left: 1%;
    }

    .gallery .nav-arrow.next {
        right: 1%;
    }

/* Mobile adjustment */
@media (max-width: 600px) {
    .gallery .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}


/* Thumbnails container */
.thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-top: 0.5rem;
    flex-shrink: 0; /* keep thumbnails height fixed */
}

    .thumbnails img {
        height: 60px;
        cursor: pointer;
        opacity: 0.6;
        border-radius: 4px;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

        .thumbnails img:hover {
            opacity: 0.9;
            transform: scale(1.05);
        }

        .thumbnails img.active {
            opacity: 1;
            outline: 0px solid #000;
        }

/* Responsive thumbnails */
@media (max-width: 900px) {
    .thumbnails img {
        height: 60px;
    }
}

@media (max-width: 600px) {
    .thumbnails img {
        height: 60px;
    }
}
