/* ===== GALLERY PAGE SPECIFIC STYLES ===== */

/* Hero Section with Wiping Effect */
.gallery-hero {
    position: relative;
    height: 500px;
    margin-top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Wiping Effect for Hero */
.wiping-effect-hero {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.1) 75%, 
        transparent 100%);
    animation: wipeHero 4s infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes wipeHero {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 52px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    z-index: 3;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-indicator i {
    font-size: 20px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* Gallery Section */
.gallery-section {
    padding: 60px 0 80px;
    background: var(--bg-white);
}

/* Gallery Grid - 3 columns on desktop */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.gallery-item.visible {
    opacity: 1;
}

/* Scroll Animations */
.gallery-item:nth-child(3n+1) {
    animation: slideInLeft 0.8s ease forwards;
}

.gallery-item:nth-child(3n+2) {
    animation: slideInUp 0.8s ease forwards;
}

.gallery-item:nth-child(3n) {
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px rgba(193, 154, 107, 0.3);
}

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

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

/* Permanent Image Overlay - Always visible */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.6) 50%,
        transparent 100%);
    padding: 40px 20px 20px;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.view-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    background: rgba(193, 154, 107, 0.9);
    padding: 8px 16px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.view-text i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.view-text:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.view-text:hover i {
    transform: translateX(5px);
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
}

.gallery-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.modal-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.modal-image-container {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-image-container img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.image-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.6);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 10;
}

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

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

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

.modal-nav i {
    transition: transform 0.3s ease;
}

.modal-nav.prev:hover i {
    transform: translateX(-3px);
}

.modal-nav.next:hover i {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .gallery-hero {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-hero {
        height: 400px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .modal-nav.prev {
        left: 15px;
    }
    
    .modal-nav.next {
        right: 15px;
    }
    
    .modal-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-hero {
        height: 350px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .view-text {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .image-counter {
        font-size: 14px;
        padding: 6px 16px;
    }
}