/* ============================================
   GALLERY PAGE STYLES — gallery.css
   Mr. B | Bhupesh Dave — Gallery
   ============================================ */

/* --- Hero Section --- */
.gallery-hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vw;
    max-width: 700px;
    max-height: 700px;
    background: radial-gradient(circle, rgba(201,160,42,0.07) 0%, rgba(7,7,14,0) 65%);
    pointer-events: none;
    z-index: 0;
}

.gallery-hero .container {
    position: relative;
    z-index: 1;
}

.gallery-hero-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
    display: inline-block;
}

.gallery-hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.gallery-hero p {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    color: var(--text-muted, #9494a0);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.65;
}

/* --- Sticky Controls Bar --- */
.gallery-controls {
    position: sticky;
    top: 72px;
    z-index: 50;
    background: rgba(7,7,14,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 1rem 0;
    margin-bottom: 3rem;
}

.gallery-controls-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* Search Bar */
.gallery-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.gallery-search-wrap i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 0.95rem;
    pointer-events: none;
}

.gallery-search {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: #f5f5f7;
    padding: 0.75rem 1.1rem 0.75rem 2.8rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.93rem;
    transition: all 0.25s ease;
    outline: none;
}

.gallery-search:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 3px rgba(201,160,42,0.18);
}

.gallery-search::placeholder {
    color: rgba(255,255,255,0.3);
}

/* Filter Pills */
.gallery-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    padding: 0.5rem 1.15rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    outline: none;
}

.filter-pill:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
    transform: translateY(-1px);
}

.filter-pill.active {
    background: linear-gradient(135deg, #e5be48 0%, #c9a02a 100%);
    border-color: var(--gold);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(201,160,42,0.4);
}

.filter-pill i {
    font-size: 0.78rem;
}

/* Results Count */
.gallery-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin-left: auto;
    white-space: nowrap;
}

/* --- Gallery Grid --- */
.gallery-section {
    padding: 0 0 6rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

/* Type section headers */
.gallery-type-label {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
}

.gallery-type-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(201,160,42,0.3), transparent);
}

/* --- Gallery Cards --- */
.gallery-card {
    background: rgba(18,18,26,0.8);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    animation: cardFadeIn 0.4s ease both;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-card:hover {
    border-color: rgba(201,160,42,0.35);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,160,42,0.2);
}

/* Card Thumbnail */
.gallery-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.gallery-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

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

/* Play overlay for videos */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.gallery-card:hover .play-overlay {
    background: rgba(0,0,0,0.15);
}

.play-btn-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e5be48, #c9a02a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(201,160,42,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover .play-btn-circle {
    transform: scale(1.12);
    box-shadow: 0 0 45px rgba(201,160,42,0.8);
}

.play-btn-circle i {
    color: #000;
    font-size: 1.2rem;
    margin-left: 3px;
}

/* PDF card thumbnail */
.pdf-thumb {
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(220,38,38,0.12) 0%, rgba(15,15,25,0.8) 100%);
    border-bottom: 1px solid rgba(220,38,38,0.2);
    gap: 0.75rem;
    transition: background 0.3s ease;
}

.gallery-card:hover .pdf-thumb {
    background: linear-gradient(135deg, rgba(220,38,38,0.2) 0%, rgba(20,20,35,0.9) 100%);
}

.pdf-icon-big {
    font-size: 3rem;
    color: #ef4444;
    filter: drop-shadow(0 0 16px rgba(239,68,68,0.5));
    transition: transform 0.3s ease;
}

.gallery-card:hover .pdf-icon-big {
    transform: scale(1.1);
}

.pdf-ext-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ef4444;
    text-transform: uppercase;
    background: rgba(239,68,68,0.12);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(239,68,68,0.25);
}

/* Card type badge */
.card-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    z-index: 2;
}

.badge-video {
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.badge-news {
    background: rgba(201,160,42,0.85);
    color: #000;
    border: none;
}

.badge-pdf {
    background: rgba(239,68,68,0.85);
    color: #fff;
    border: none;
}

/* Card Body */
.gallery-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.97rem;
    font-weight: 600;
    color: #f5f5f7;
    margin-bottom: 0.4rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-card-desc {
    font-family: 'Lora', serif;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.9rem;
}

.gallery-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.gallery-card-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

.gallery-card-action {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.2s ease;
}

.gallery-card:hover .gallery-card-action {
    gap: 0.6rem;
}

/* --- Empty State --- */
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
}

.gallery-empty i {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.1);
    margin-bottom: 1.25rem;
    display: block;
}

.gallery-empty h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.5rem;
}

.gallery-empty p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.2);
}

/* --- Lightbox (Video + Image) --- */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-inner {
    position: relative;
    width: 100%;
    max-width: 900px;
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.active .lightbox-inner {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    z-index: 2;
    outline: none;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.18);
    transform: scale(1.1);
}

.lightbox-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
}

.lightbox-video-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.lightbox-image-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    text-align: center;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 14px;
}

.lightbox-title {
    margin-top: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f7;
    text-align: center;
}

/* --- PDF Viewer Modal --- */
.pdf-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pdf-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(12,12,20,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.pdf-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f5f7;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pdf-modal-title i {
    color: #ef4444;
}

.pdf-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pdf-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    outline: none;
    text-decoration: none;
}

.pdf-btn-download {
    background: linear-gradient(135deg, #e5be48, #c9a02a);
    color: #000;
    border: none;
    font-weight: 700;
}

.pdf-btn-download:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.pdf-btn-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
}

.pdf-btn-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.pdf-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 120px 0 50px;
    }

    .gallery-hero h1 {
        font-size: 2.4rem;
    }

    .gallery-controls-inner {
        gap: 0.75rem;
    }

    .gallery-search-wrap {
        max-width: 100%;
        flex: 1 1 100%;
        order: -1;
    }

    .gallery-filters {
        order: 1;
        width: 100%;
        justify-content: flex-start;
    }

    .gallery-count {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .lightbox-inner {
        max-width: 100%;
    }

    .lightbox-close {
        top: -2.5rem;
    }

    .pdf-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
