/* ==========================================
   GALLERY PAGE
========================================== */

.page-main {
    padding-top: 0;
}

/* Hero */
.gallery-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 90px;
    margin-top: -80px;
    overflow: hidden;
    background: #111;
}

.gallery-hero-bg {
    position: absolute;
    inset: 0;
    background: url("../images/historic/Santosh-Bhartiya-with-Dr.-Manmohan-Singh.jpg") center / cover no-repeat;
    transform: scale(1.05);
}

.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.92) 0%, rgba(139, 30, 63, 0.75) 100%);
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.gallery-hero-content .section-tag {
    color: rgba(255, 255, 255, 0.9);
}

.gallery-hero-content h1 {
    font-size: clamp(28px, 3.8vw, 50px);
    color: #fff;
    margin: 16px 0 18px;
    white-space: nowrap;
    line-height: 1.15;
}

@media (max-width: 600px) {
    .gallery-hero-content h1 {
        white-space: normal;
        font-size: 30px;
    }
}

.gallery-hero-content p {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

/* Filter Tabs */
.gallery-filters {
    padding: 50px 0 10px;
    background: #fff;
}

.gallery-filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-filter-btn {
    padding: 12px 28px;
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Gallery Grid */
.gallery-section {
    padding: 40px 0 90px;
    background: #f8f8f8;
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.gallery-item {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.gallery-item-image {
    position: relative;
    overflow: hidden;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 12px;
}

.gallery-item-image img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
    transition: none;
}

.gallery-item:hover .gallery-item-image img {
    transform: none;
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

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

.gallery-item-category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.gallery-item-overlay h3 {
    font-size: 20px;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.3;
}

.gallery-item-overlay p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}

.gallery-item-caption {
    padding: 18px 20px;
}

.gallery-item-caption h3 {
    font-size: 17px;
    color: #111;
    margin: 0 0 6px;
}

.gallery-item-caption p {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.6;
}

.gallery-zoom-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
    z-index: 3;
}

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

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

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

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: var(--primary);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: var(--primary);
}

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

.lightbox-content {
    max-width: 1100px;
    width: 100%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    margin: 0 auto;
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 20px;
    color: #fff;
}

.lightbox-caption h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.lightbox-caption p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.gallery-item.hidden {
    display: none;
}

/* CTA */
.gallery-cta {
    padding: 70px 0;
    background: #fff;
    text-align: center;
}

.gallery-cta h2 {
    font-size: 34px;
    margin-bottom: 16px;
}

.gallery-cta p {
    font-size: 17px;
    color: #666;
    margin-bottom: 28px;
}

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

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

@media (max-width: 767px) {
    .gallery-hero {
        min-height: 340px;
        padding: 120px 20px 70px;
    }

    .gallery-masonry {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

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