/* --- Gallery Grid --- */
.gallery-section {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    background: rgba(45, 50, 40, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

.gallery-item:hover .gallery-image {
    transform: scale(1.08);
}

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

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

.gallery-expand-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-expand-btn:hover {
    background: var(--color-primary, #8bc34a);
    border-color: var(--color-primary, #8bc34a);
    transform: scale(1.1);
}

.gallery-caption {
    padding: 16px;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.4;
}

/* --- Lightbox --- */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.gallery-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.gallery-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-caption {
    color: #fff;
    font-size: 1.1rem;
    margin-top: 20px;
    font-weight: 500;
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 100001;
    line-height: 1;
}

.gallery-lightbox-close:hover {
    color: var(--color-primary, #8bc34a);
}

/* --- Home Page Gallery Section --- */
.gallery-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item-home {
    background: rgba(45, 50, 40, 0.4);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.gallery-image-wrapper-home {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

.gallery-item-home:hover .gallery-image-home {
    transform: scale(1.06);
}

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

.gallery-item-home:hover .gallery-overlay-home {
    opacity: 1;
}

.gallery-expand-btn-home {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-expand-btn-home:hover {
    background: var(--color-primary, #8bc34a);
    border-color: var(--color-primary, #8bc34a);
    transform: scale(1.1);
}

.gallery-caption-home {
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

/* --- Page Header --- */
.page-header {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: 80px auto 0;
    padding: 60px 40px;
    background: rgba(45, 50, 40, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    overflow: hidden;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--primary-lime, #8bc34a);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .gallery-grid-home {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
    }

    .page-header {
        padding: 40px 20px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .gallery-lightbox-content img {
        max-height: 70vh;
    }

    .gallery-lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .gallery-grid-home {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .gallery-caption,
    .gallery-caption-home {
        font-size: 0.8rem;
        padding: 8px;
    }
}
