/* ==============================
   Responsive Gallery Styles
================================ */

/* Gallery Page Layout */
.section__gallery {
    padding: 50px 0 70px;
    background: #fff;
}

.gallery-heading {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 35px;
    color: #222;
    text-align: center;
}

/* Responsive Grid Layout */
.gallery-grid {
    display: grid !important;
    gap: 30px !important;
    width: 100%;
}

/* Desktop (1200px and up) - 4 columns */
@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Large Tablet/Laptop (992px - 1199px) - 3 columns */
@media (min-width: 992px) and (max-width: 1199px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablet (768px - 991px) - 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/* Mobile (576px - 767px) - 2 columns */
@media (min-width: 576px) and (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .gallery-heading {
        font-size: 24px;
        margin-bottom: 25px;
    }
}

/* Small Mobile (less than 576px) - 1 column */
@media (max-width: 575px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 0 10px;
    }
    
    .gallery-heading {
        font-size: 22px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .section__gallery {
        padding: 30px 0 40px;
    }
}

/* Gallery Card */
.gallery-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    transition: transform .25s ease, box-shadow .25s ease;
    min-width: 250px;
    position: relative;
}

.gallery-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform .3s ease;
}

/* Card Hover Effect */
.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* Responsive Image Heights */
@media (max-width: 767px) {
    .gallery-card img {
        height: 180px;
    }
}

@media (max-width: 575px) {
    .gallery-card img {
        height: 200px;
    }
}

/* No Data Message */
.no-data {
    text-align: center;
    font-size: 16px;
    color: #666;
    padding: 40px 20px;
}

@media (max-width: 575px) {
    .no-data {
        font-size: 14px;
        padding: 30px 15px;
    }
}

/* ==============================
   Image Modal / Lightbox
================================ */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity .3s ease;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.image-modal img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform .3s ease, opacity .15s ease;
    opacity: 1;
}

.image-modal.show img {
    transform: scale(1);
}

/* Modal Caption */
.modal-caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    max-width: 80%;
    padding: 10px 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 20px;
}

@media (max-width: 767px) {
    .modal-caption {
        font-size: 14px;
        bottom: 50px;
        padding: 8px 16px;
        max-width: 90%;
    }
}

@media (max-width: 575px) {
    .modal-caption {
        font-size: 12px;
        bottom: 40px;
        padding: 6px 12px;
    }
}

.image-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    transition: background .3s ease, transform .3s ease;
}

.image-modal .close:hover {
    background: rgba(255,255,255,.2);
    transform: rotate(90deg);
}

@media (max-width: 575px) {
    .image-modal .close {
        top: 15px;
        right: 15px;
        font-size: 32px;
        width: 40px;
        height: 40px;
    }
    
    .image-modal img {
        max-width: 95%;
        max-height: 80vh;
    }
}

/* Modal Navigation Arrows */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    transition: background .3s ease, transform .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: rgba(255,255,255,.2);
}

.modal-nav.prev { left: 30px; }
.modal-nav.next { right: 30px; }

.modal-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 767px) {
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-nav.prev { left: 10px; }
    .modal-nav.next { right: 10px; }
}

@media (max-width: 575px) {
    .modal-nav {
        display: none;
    }
}

/* ==============================
   Scroll Gallery (Horizontal)
================================ */
.scroll-gallery {
    background-color : #02c8c8;
    padding: 80px 0;
}
.scroll-gallery .main__container{
    max-width: 100%;
}
.scroll-gallery__title {
    text-align: center;
    color: #fff;
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 45px;
}

.scroll-gallery__wrapper {
    position: relative;
    padding: 0 60px;
}

.scroll-gallery__track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px 25px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-gallery__track::-webkit-scrollbar {
    display: none;
}

.scroll-gallery__card {
    padding:10px 10px 0px;
    min-width: 280px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,.25);
    transition: transform .3s ease;
    text-align: center;
    flex-shrink: 0;
}

.scroll-gallery__card img {
    border-radius: 8px;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.scroll-gallery__card p {
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #0077b6;
    margin: 0;
}

.scroll-gallery__card:hover {
    transform: translateY(-8px);
}

/* Scroll Gallery Arrows */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease, color .3s ease;
}

.scroll-btn.left { left: 0; }
.scroll-btn.right { right: 0; }

.scroll-btn:hover {
    background: #0077b6;
    color: #fff;
}

/* Scroll Gallery Responsive */
@media (max-width: 992px) {
    .scroll-gallery__card {
        min-width: 260px;
    }
    
    .scroll-gallery__wrapper {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    .scroll-btn {
        display: none;
    }
    
    .scroll-gallery__wrapper {
        padding: 0 15px;
    }
    
    .scroll-gallery {
        padding: 60px 0;
    }
    
    .scroll-gallery__title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .scroll-gallery__card {
        min-width: 240px;
    }
    
    .scroll-gallery__card img {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .scroll-gallery {
        padding: 50px 0;
    }
    
    .scroll-gallery__title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .scroll-gallery__card {
        min-width: 200px;
    }
    
    .scroll-gallery__card img {
        height: 160px;
    }
    
    .scroll-gallery__card p {
        font-size: 14px;
        padding: 12px;
    }
}

/* ==============================
   Gallery Card Title Overlay
================================ */
.gallery-card-overlay {
    position: relative;
    overflow: hidden;
}

.gallery-card-overlay .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    padding: 40px 15px 15px;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.gallery-card-overlay:hover .card-overlay {
    transform: translateY(0);
}

.gallery-card-overlay .card-overlay h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

@media (max-width: 575px) {
    .gallery-card-overlay .card-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0,0,0,.6));
        padding: 30px 12px 12px;
    }
    
    .gallery-card-overlay .card-overlay h4 {
        font-size: 14px;
    }
}

/* ==============================
   Gallery Card Info
================================ */
.gallery-card-info {
    padding: 12px 15px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #eee;
}

.gallery-card-info span {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

@media (max-width: 767px) {
    .gallery-card-info {
        padding: 10px 12px;
    }
    
    .gallery-card-info span {
        font-size: 13px;
    }
}

/* ==============================
   Loading Animation
================================ */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.gallery-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0077b6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 575px) {
    .gallery-loading::after {
        width: 30px;
        height: 30px;
    }
}

