/* =============================================
   PHOTO GALLERY - HOMEPAGE
   ============================================= */

.photo-gallery-section {
    padding: 60px 0;
    background: var(--bg-color, #ffffff);
}

.photo-gallery-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.photo-gallery-section .section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--heading-color, #1c1e21);
    margin: 0;
}

.photo-gallery-section .section-header p {
    color: var(--gray-600, #6b7280);
    margin: 5px 0 0;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.photo-gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--card-bg, #f8f9fa);
}

.photo-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

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

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

.photo-gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

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

.photo-gallery-item .gallery-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.photo-gallery-item .gallery-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 28px;
    opacity: 0;
    transition: opacity 0.3s;
    background: rgba(125, 60, 255, 0.85);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.photo-gallery-item:hover .gallery-zoom {
    opacity: 1;
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-direction: column;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox .lightbox-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 92%;
    max-height: 85vh;
}

.gallery-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.6);
}

.gallery-lightbox .lightbox-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    color: #1c1e21;
    font-size: 28px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gallery-lightbox .lightbox-close:hover {
    background: var(--primary, #7d3cff);
    color: #fff;
    transform: scale(1.08);
}

.gallery-lightbox .lightbox-caption {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50px;
    margin-top: 15px;
    max-width: 92%;
}

/* Dark mode */
[data-theme="dark"] .photo-gallery-section {
    background: var(--dark-bg, #121212);
}

[data-theme="dark"] .photo-gallery-section .section-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .photo-gallery-item {
    background: var(--dark-card, #1f2940);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

@media (max-width: 768px) {
    .photo-gallery-section {
        padding: 40px 0;
    }

    .photo-gallery-section .section-header h2 {
        font-size: 22px;
    }

    .photo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .photo-gallery-item .gallery-title {
        font-size: 13px;
    }

    .photo-gallery-item .gallery-zoom {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .photo-gallery-section {
        padding: 30px 0;
    }

    .photo-gallery-section .section-header h2 {
        font-size: 20px;
    }

    .photo-gallery-section .section-header p {
        font-size: 13px;
    }

    .photo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .photo-gallery-item .gallery-overlay {
        padding: 10px;
    }

    .photo-gallery-item .gallery-title {
        font-size: 12px;
    }
}
