/* ============================================
   MANYORO FUNERAL SERVICES - GALLERY PAGE STYLES
   ============================================ */

/* Gallery Section */
.gallery-section { background: var(--pure-white); }

/* Filter Buttons */
.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal);
    background: var(--pure-white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.filter-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--pure-white);
    box-shadow: var(--shadow-md);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.gallery-item-tall {
    grid-row: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 8, 0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.gallery-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pure-white);
    margin-bottom: 4px;
}

.gallery-info span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.gallery-zoom {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item:hover .gallery-zoom {
    opacity: 1;
    transform: scale(1);
}

.gallery-zoom:hover {
    background: var(--gold);
    color: var(--pure-black);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 8, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.lightbox.active .lightbox-content img {
    transform: scale(1);
}

.lightbox-caption {
    margin-top: 16px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--pure-white);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--gold);
    color: var(--pure-black);
    border-color: var(--gold);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
    z-index: 10;
}

.lightbox-nav:hover {
    background: var(--gold);
    color: var(--pure-black);
    border-color: var(--gold);
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* CTA Section */
.cta-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 74, 46, 0.85), rgba(10, 10, 8, 0.9));
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 220px;
    }

    .gallery-item-wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery-item-tall {
        grid-row: span 1;
    }

    .gallery-item-wide {
        grid-column: span 2;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }

    .cta-buttons { flex-direction: column; align-items: center; }
    .cta-buttons .btn { width: 100%; max-width: 300px; }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .gallery-item-wide {
        grid-column: span 1;
    }
}
