/* Gallery Page Specific Styles */

:root {
    --gallery-border-radius: 12px;
    --gallery-transition-duration: 0.4s;
    --gallery-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gallery Hero */
/* Gallery Creative Hero */
.gallery-hero {
    padding-top: 160px;
    padding-bottom: 100px;
    background-color: #0d0f12;
    background-image:
        radial-gradient(circle at 90% 10%, rgba(45, 148, 53, 0.2) 0%, transparent 40%),
        linear-gradient(to bottom, rgba(13, 15, 18, 0.8), rgba(13, 15, 18, 0.95)),
        url('../pic/gallery/gallery_7.jpg');
    background-size: 100% 100%, cover, cover;
    background-position: 0 0, center, center;
    background-attachment: fixed;
    text-align: center;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
}

.gallery-hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, #4ade80 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(45, 148, 53, 0.2));
}

.gallery-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Active Nav Link */
.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0 100px;
    background: #fff;
}

.gallery-grid {
    column-count: 3;
    column-gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 30px;
    break-inside: avoid;
    border-radius: var(--gallery-border-radius);
    transition: transform var(--gallery-transition-duration) var(--gallery-transition-timing),
        box-shadow var(--gallery-transition-duration) var(--gallery-transition-timing);
    will-change: transform;
}

.gallery-item:hover {
    transform: translate3d(0, -10px, 0);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--gallery-border-radius);
    position: relative;
    transition: transform var(--gallery-transition-duration) var(--gallery-transition-timing);
    will-change: transform;
}

.gallery-item:hover img {
    transform: scale3d(1.05, 1.05, 1);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    color: white;
    font-size: 1.1rem;
    margin-top: 20px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close {
    top: 30px;
    right: 30px;
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.2rem;
    }

    .gallery-grid {
        column-count: 1;
        column-gap: 20px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }

    .lightbox-content img {
        max-height: 70vh;
    }
}

/* Mobile Menu Active State - optimized for JS class toggle */
@media (max-width: 767px) {
    .nav-links.mobile-active {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
}