/* gallery.css */

.header-gallery {
    background-image: url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?q=80&w=2070&auto=format&fit=crop');
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.7) 100%);
}

.page-header {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.header-content h1 {
    color: white;
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header-content p {
    color: rgba(255, 255, 255, 0.753);
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Masonry Layout --- */
.gallery-masonry {
    column-count: 3;
    column-gap: 2rem;
    padding: 2rem 0;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .header-content h1 {
        font-size: 3.5rem;
    }
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.8rem;
    }
    .header-content p {
        font-size: 1.1rem;
    }
    .gallery-masonry {
        column-count: 1;
        gap: 1.5rem;
    }
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
    #lightbox-caption {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 2.2rem;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    cursor: pointer;
}

.gallery-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    transition: box-shadow 0.4s ease;
}

.gallery-card img {
    width: 100%;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 43, 43, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    color: var(--primary-white);
    padding: 20px;
    text-align: center;
}

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

.gallery-overlay i {
    font-size: 2rem;
    margin-bottom: 1rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-overlay span {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.gallery-card:hover .gallery-overlay i,
.gallery-card:hover .gallery-overlay span {
    transform: translateY(0);
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-gold);
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 1.5rem;
}