@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300..800&display=swap');

/* Base Styles */
body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.modal-backdrop.show {
    opacity: 0.5 !important;
    background: #000 !important;
    z-index: 1040 !important;
}

.notification-container {
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 9999;
    max-width: 280px;
    width: auto;
}

.notification-alert {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 0.925rem;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.notification-alert.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-alert.hide {
    opacity: 0;
    transform: translateY(-40px);
}

.notification-alert .btn-close {
    padding: 6px;
    margin-left: 12px;
    font-size: 0.8rem;
}

/* Swiper Container */
.gallery-swiper {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 0;
    cursor: default !important;
    touch-action: auto !important;
    overscroll-behavior: auto !important;
    -webkit-overflow-scrolling: auto !important;
}

.gallery-swiper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 1) 100%);
    z-index: 1;
}

.gallery-swiper .swiper-slide {
    pointer-events: none !important;
    -webkit-user-drag: none;
    user-select: none;
}

.gallery-swiper .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.gallery-swiper img {
    display: block;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    -webkit-user-drag: none;
}

/* Overlay Text */
.gallery-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    animation: fadeInUp 1s ease-in-out;
    width: 90vw;
    padding: 0 5%;
    box-sizing: border-box;
    pointer-events: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default !important;
}

.gallery-overlay-text h1 {
    margin-top: 0;
    font-size: 4em;
    margin-bottom: 10px;
    line-height: 1.2;
    transform: translateY(-8px);
}

.gallery-overlay-text p {
    margin-top: 0;
    font-size: 1.5em;
    margin: 0 auto;
    max-width: 80%;
}

/* Scroll Down Arrow */
.scroll-down-arrow {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.scroll-down-arrow:hover {
    color: #fff;
    transform: translate(-50%, 5px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }
    40% {
        transform: translate(-50%, -15px);
    }
    60% {
        transform: translate(-50%, -7px);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 768px) {
    .scroll-down-arrow {
        bottom: 30px;
        font-size: 2rem;
    }
    
    .gallery-overlay-text h1 {
        font-size: 2.8em;
    }
    
    .gallery-overlay-text p {
        font-size: 1.25em;
    }
}

/* Gallery Content */
.gallery-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

.gallery-main {
    padding: 100px 20px 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.gallery-title {
    font-size: 3rem;
    color: #2a4365;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.gallery-lead {
    font-size: 1.25rem;
    color: #4a5568;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Gallery Grid */
.gallery-grid {
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    aspect-ratio: 1/1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

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

.image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-hover {
    opacity: 1;
}

.image-hover i {
    color: white;
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90vw;
    height: 90vh;
    max-width: 90vw;
    max-height: 90vh;
    margin: 0 auto;
    position: relative;
    min-height: 300px;
    min-width: 300px;
}

#galleryModal .modal-body {
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

#galleryModal .modal-dialog {
    max-width: 95vw;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050 !important;
}

#galleryModal .modal-content {
    background: transparent !important;
    border: none !important;
    pointer-events: none !important;
    overflow: hidden;
}

#galleryModal .modal-content > * {
    pointer-events: auto !important;
}

#galleryModal .btn-close {
    position: absolute; /* Changed from fixed */
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 50%;
    padding: 10px !important;
    z-index: 1060;
    transition: all 0.3s ease;
    opacity: 1 !important;
    background-image: none !important;
}

#galleryModal .btn-close::after {
    content: "×";
    font-size: 1.5rem;
    line-height: 1;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#galleryModal .btn-close:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

#modalImage {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: inherit !important;
    overflow: hidden;
    width: 100%;
    height: 100%;
    background: transparent;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    pointer-events: none;
    z-index: 1000;
    border-radius: 12px;
    opacity: 1 !important; /* Force visibility */
}
.loading-overlay i {
    font-size: 3rem;
    color: white;
    text-shadow: white;
    animation: spin 1s linear infinite;
    position: static; /* Remove any positioning */
    margin: 0; /* Reset margins */
}

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

/* Load More Button */
.btn-load-more {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: #2a4365;
    border: none;
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(42, 67, 101, 0.3);
}

/* Navigation Arrows */
.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: 15px;
}

.next-arrow {
    right: 15px;
}

/* Prevent Layout Shift */
body.modal-open {
    padding-right: 0 !important;
    overflow-y: scroll !important;
}

/* Responsive */
@media (max-width: 992px) {
    .gallery-main {
        padding: 80px 15px 40px;
    }
    
    .gallery-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .scroll-down-arrow {
        bottom: 200px;
    }
}

@media (max-width: 576px) {
    .gallery-main {
        padding: 60px 10px 30px;
    }
    
    .btn-load-more {
        width: 100%;
    }
    
    .gallery-overlay-text h1 {
        font-size: 2.2em;
    }
    
    .gallery-overlay-text p {
        font-size: 1.1em;
    }
}