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

:root {
    --primary-blue: #1A62B7;
    --text-dark: #1a1a1a;
    --text-muted: #666;
    --bg-white: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.85);
    --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 15px 45px rgba(0, 0, 0, 0.1);
    --radius-lg: 12px;
}

body {
    background-color: var(--bg-white);
    font-family: poppins;
    color: var(--text-dark);
    margin: 0;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HERO SECTION ===== */
.gallery-hero {
    background-color: var(--primary-blue);
    padding: 140px 0 60px;
    /* Adjusted padding including top navbar space */
    text-align: center;
    margin-bottom: 0;
}

.page-title {
    font-family: poppins;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== CATEGORY FILTERS ===== */
.filter-section {
    padding: 2rem 0 40px;
}

.category-filters {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: thin;
    margin-bottom: 2rem;
}

.category-btn {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 10px 24px;
    border-radius: 10px;
    font-family: poppins;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.category-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.category-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(26, 98, 183, 0.2);
}

/* ===== GALLERY GRID ===== */
.gallery-section {
    padding-bottom: 120px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.gallery-card {
    cursor: pointer;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    box-shadow: var(--shadow-subtle);
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 98, 183, 0.15);
    /* Subtle blue tint */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.overlay-title {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-info {
    padding: 1.5rem;
}

.card-title {
    font-family: poppins;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    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: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
    z-index: 2001;
}

.close-btn:hover {
    transform: scale(1.2) rotate(90deg);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prev-btn {
    left: -80px;
}

.next-btn {
    right: -80px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .prev-btn {
        left: 20px;
    }

    .next-btn {
        right: 20px;
    }

    .nav-btn {
        background: rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 1100px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .page-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1.5rem;
    }

    .gallery-hero {
        padding: 120px 0 60px;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .category-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 1rem 12px;
        margin: 0 -1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-filters::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }

    .lightbox-content {
        max-width: 95%;
    }

    .nav-btn {
        padding: 1rem 0.5rem;
        font-size: 1rem;
    }
}