/* Gallery Page Specific Styles */

/* Hero Section override or extension */
.gallery-hero {
    background: var(--bg-light);
    padding: 6rem 20px 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero h1 {
    font-size: 3rem;
    color: var(--royal-blue);
    margin-bottom: 1rem;
}

.gallery-hero p {
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 3rem;
    padding: 0 20px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 10px 24px;
    border-radius: 50px;
    color: var(--royal-blue);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--royal-blue);
    color: white;
    border-color: var(--royal-blue);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.filter-btn.active {
    background: var(--gradient-saffron);
    border-color: transparent;
}

/* Gallery Grid */
.gallery-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px 6rem;
    min-height: 50vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}

@media (min-width: 576px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: #e2e8f0;
    opacity: 0; /* Hidden initially for GSAP */
    transform: translateY(20px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-category {
    color: var(--imperial-gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--pune-saffron);
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: var(--pune-saffron);
}

.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }

@media (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
