.gallery-section {
    padding: 10px 110px;    
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* Wrapper adjustments */
.gallery-wrapper {
    width: 100%;
    padding: 20px 0;
    margin: 0;
    overflow: visible;
}

/* Default (for more than 3 items) — Swiper behavior */
.gallery-container.swiper {
    width: 100%;
    padding: 50px 0;
    overflow: hidden;
}

.gallery-wrapper.swiper-wrapper {
    transition-timing-function: linear !important;
}

/* Gallery item container */
.gallery-item.swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    height: auto;
    max-height: 400px;
    box-sizing: border-box;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Image styling */
.gallery-image {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8f8f8;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Hover animation */
.gallery-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 15px rgba(241, 151, 99, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ===============================================
   Dynamic Layout: 3 or fewer items (Grid Layout)
   =============================================== */

.gallery-container.small-gallery .gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* space between items */
}

.gallery-container.small-gallery .gallery-item.swiper-slide {
    flex: 0 0 33.333%;     /* 3 per row */
    max-width: 33.333%;
    min-width: 300px;      /* prevent collapsing */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.gallery-container.small-gallery .gallery-image img {
    object-fit: cover;
}

.gallery-next{
    margin-top: 1px !important;
    right: 0.1px !important;
    height: 40px !important;
    width: 40px !important;
    border-radius: 50%;
    color: #fff !important;
    z-index: 100;
    background: linear-gradient(to right, #B22222, #7A0000);
    transition: all 0.3s ease;
}

.gallery-prev{
    margin-top: 1px !important;
    left: 0.19px !important;
    height: 40px !important;
    width: 40px !important;
    border-radius: 50%;
    color: #fff !important;
    z-index: 100;
    background: linear-gradient(to left, #B22222, #7A0000);
    transition: all 0.3s ease;
}

.gallery-next::before,
.gallery-next::after,
.gallery-prev::before,
.gallery-prev::after
{
    font-size: 20px !important; 
    color: #fff
}

.gallery-next:hover,
.gallery-prev:hover
{
   transform: translateY(-3px);
   box-shadow: 0 8px 15px rgba(241, 151, 99, 0.3)
}

.swiper-pagination-bullet,
.swiper-pagination-bullet  {
    height: 15px;
    width: 15px;
    background: #ffad5c!important;
}

/* === GALLERY HOVER LOGIC (DESKTOP ONLY) === */

/* Only apply this logic on screens larger than tablets (Desktop) */
@media screen and (min-width: 1025px) {
    
    /* 1. Hide arrows by default */
    .gallery-next,
    .gallery-prev {
        opacity: 0;            /* Fully transparent */
        visibility: hidden;    /* Cannot be clicked */
        transform: scale(0.8); /* Slight shrink effect */
    }

    /* 2. When hovering the container, show the arrows */
    .gallery-container:hover .gallery-next,
    .gallery-container:hover .gallery-prev {
        opacity: 1;
        visibility: visible;
        transform: scale(1);   /* Return to normal size */
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .gallery-container.small-gallery .gallery-item.swiper-slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 600px) {
    .gallery-container.small-gallery .gallery-item.swiper-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* === HIDE NAVIGATION ON MOBILE/TABLET === */
/* This ensures buttons are completely removed from flow on smaller screens */
@media screen and (max-width: 1024px) {
    .gallery-next,
    .gallery-prev {
        display: none !important;  /* Completely removes element */
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important; /* Ensures no interaction even if display fails */
    }
}