/* gallery.css - Modern Gallery Page */

.gallery-header {
    width: 100%;
    background: #53575C;
    padding: 5rem 3rem 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(132, 31, 50, 0.2), transparent 70%);
    pointer-events: none;
}

.gallery-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #9D9FA2;
    margin-bottom: 1.2rem;
}

.gallery-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.gallery-divider {
    width: 50px;
    height: 3px;
    background: #841F32;
    margin: 0 auto 1.5rem auto;
}

.gallery-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 2rem 1rem 2rem;
    background: #f5f5f5;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #9D9FA2;
    color: #53575C;
    padding: 0.6rem 1.6rem;
    border-radius: 60px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: #841F32;
    color: #841F32;
}

.filter-btn.active {
    background: #841F32;
    border-color: #841F32;
    color: #FFFFFF;
}

.gallery-section {
    width: 100%;
    background: #f5f5f5;
    padding: 2.5rem 2rem 6rem 2rem;
}

.gallery-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    background: #53575C;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-item figcaption {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(132, 31, 50, 0.85), rgba(132, 31, 50, 0.3) 60%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover figcaption { opacity: 1; }

.gallery-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #841F32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-icon { transform: scale(1); }

.gallery-tall { grid-row: span 2; }
.gallery-wide { grid-column: span 2; }

.gallery-item.hidden { display: none; }

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 20, 0.96);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.open { display: flex; opacity: 1; }

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxFade 0.3s ease;
}

@keyframes lightboxFade {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #841F32;
    border-color: #841F32;
    transform: scale(1.1);
}

.lightbox-close { top: 2rem; right: 2rem; }
.lightbox-prev { left: 2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 2rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.1); }

@media (max-width: 1000px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 160px; }
}

@media (max-width: 700px) {
    .gallery-header { padding: 4rem 1.5rem 3rem 1.5rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 0.6rem; }
    .gallery-wide { grid-column: span 2; }
    .gallery-tall { grid-row: span 2; }
    .gallery-section { padding: 2rem 1rem 4rem 1rem; }
    .lightbox-prev, .lightbox-next { width: 42px; height: 42px; font-size: 0.95rem; }
    .lightbox-prev { left: 1rem; }
    .lightbox-next { right: 1rem; }
    .lightbox-close { top: 1rem; right: 1rem; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
    .filter-btn { padding: 0.5rem 1.2rem; font-size: 0.8rem; }
    .gallery-icon { width: 42px; height: 42px; font-size: 0.95rem; }
}