/* Gallery Page Specific Styles */

/* Page Header */
.gallery-header {
    min-height: 50vh;
    background: linear-gradient(rgba(45, 95, 63, 0.7), rgba(255, 153, 51, 0.4)),
                url('https://images.unsplash.com/photo-1488646953014-85cb44e25828?w=1920&h=1080&fit=crop') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: white;
    padding: 120px 20px 60px;
}

/* Gallery Filters */
.gallery-filters {
    background: white;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.gallery-filter-btn {
    padding: 12px 30px;
    border: 2px solid var(--primary-green);
    background: white;
    color: var(--primary-green);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.gallery-filter-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

.gallery-filter-btn.active {
    background: var(--primary-green);
    color: white;
}

/* Gallery Section */
.gallery {
    background: var(--light-cream);
}

/* Gallery Grid Enhancement */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(45, 95, 63, 0.9), transparent 60%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 3rem;
    color: white;
    transform: scale(0);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    max-width: 800px;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    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 {
    top: 20px;
    right: 80px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-orange);
    transform: scale(1.1);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* CTA Section */
.contact-cta {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: white;
}

.contact-cta .section-title {
    color: white;
}

.contact-cta .section-title::after {
    background: var(--primary-orange);
}

.contact-cta .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Loading Animation */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        height: 300px;
    }

    .lightbox-content {
        width: 95%;
    }

    #lightbox-image {
        max-height: calc(90vh - 80px);
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 35px;
    }

    .lightbox-counter {
        top: 15px;
        right: 70px;
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}

@media (max-width: 600px) {
    .gallery-header {
        min-height: 40vh;
        padding: 100px 20px 40px;
    }

    .gallery-filters {
        padding: 20px 0;
    }

    .filter-buttons {
        gap: 10px;
    }

    .gallery-filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item {
        height: 180px;
    }

    .gallery-overlay i {
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 35px;
        height: 35px;
        font-size: 25px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 30px;
    }

    .lightbox-caption {
        font-size: 1rem;
        padding: 15px;
    }

    .lightbox-counter {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}