/* ============================================ */
/* GALLERY PAGE STYLING */
/* ============================================ */

/* Active Navigation */
.nav-menu a.nav-link {
    position: relative;
    display: inline-block;
}

.nav-menu a.nav-link.active {
    color: var(--primary-color);
}

.nav-menu a.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        width: 0;
        left: 50%;
    }
    to {
        width: 100%;
        left: 0;
    }
}

/* ============================================ */
/* INTRO GALLERY */
/* ============================================ */
#gallery-intro {
    background: linear-gradient(180deg, #ffffff 0%, var(--light-color) 100%);
    padding: 40px 0;
}

#gallery-intro .section-subtitle {
    max-width: 700px;
    margin: -1.5rem auto 0 auto;
}

/* ============================================ */
/* FILTER BUTTONS */
/* ============================================ */
#gallery-filter {
    border-top: 4px solid var(--secondary-color);
    border-bottom: 4px solid var(--secondary-color);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.8rem 1.8rem;
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(59, 124, 202, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #5a9ad8);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(59, 124, 202, 0.4);
}

.filter-btn i {
    font-size: 1rem;
}

/* ============================================ */
/* GALLERY GRID */
/* ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
}

.gallery-item.hide {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.gallery-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Gallery Image */
.gallery-image {
    position: relative;
    overflow: hidden;
    height: 280px;
    cursor: pointer;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 124, 202, 0.85), rgba(243, 156, 18, 0.75));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content i {
    font-size: 3.5rem;
    color: #fff;
    animation: zoom-pulse 1.5s infinite;
}

@keyframes zoom-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Gallery Info */
.gallery-info {
    padding: 1.5rem;
}

.gallery-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), #5a9ad8);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.gallery-category i {
    font-size: 0.9rem;
}

.gallery-info h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    font-weight: 700;
    line-height: 1.4;
}

.gallery-info p {
    color: var(--grey-color);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================ */
/* LOAD MORE BUTTON */
/* ============================================ */
.gallery-load-more {
    text-align: center;
}

.gallery-load-more .btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    box-shadow: 0 5px 20px rgba(59, 124, 202, 0.3);
}

.gallery-load-more .btn i {
    margin-right: 0.5rem;
}

/* ============================================ */
/* STATISTIK PROYEK */
/* ============================================ */
#project-stats {
    background: linear-gradient(135deg, rgba(59, 124, 202, 0.03), rgba(243, 156, 18, 0.03));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    background: #fff;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #5a9ad8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 8px 25px rgba(59, 124, 202, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    background: linear-gradient(135deg, var(--secondary-color), #f5b041);
    transform: rotateY(360deg);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
}

.stat-icon i {
    font-size: 2.2rem;
    color: #fff;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--grey-color);
    font-weight: 600;
}

/* ============================================ */
/* LIGHTBOX MODAL */
/* ============================================ */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1.6;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .filter-buttons {
        gap: 0.8rem;
    }

    .filter-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-image {
        height: 250px;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .lightbox {
        padding: 20px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        width: 90%;
        bottom: 15px;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .gallery-image {
        height: 220px;
    }

    .gallery-info {
        padding: 1.2rem;
    }

    .gallery-info h3 {
        font-size: 1.1rem;
    }

    .gallery-info p {
        font-size: 0.85rem;
    }

    .stat-icon {
        width: 70px;
        height: 70px;
    }

    .stat-icon i {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }
}