/* ============================================================
   VMS GALLERY PAGE STYLES
   Isolated stylesheet for maximum mobile/tablet responsiveness
============================================================ */

/* Hero Section */
.gallery-hero {
    background-image: linear-gradient(rgba(33, 48, 100, 0.82), rgba(15, 23, 42, 0.88)), url('https://images.unsplash.com/photo-1546410531-bb4caa6b424d?auto=format&fit=crop&w=1920&q=80');
    height: 320px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 0 20px;
}
.gallery-hero-content {
    z-index: 2;
}
.gallery-hero-title {
    color: #ffffff;
    font-size: 3.2rem;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-weight: 800;
    letter-spacing: 1.5px;
    margin: 0 0 12px 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.35);
    line-height: 1.2;
}
.gallery-hero-breadcrumbs-wrap {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
}
.gallery-hero-breadcrumbs {
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin: 0;
    text-transform: uppercase;
}
.gallery-hero-breadcrumbs a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}
.gallery-hero-breadcrumbs a:hover {
    color: var(--accent-color, #C5A551);
}
.gallery-hero-breadcrumbs span {
    color: #ffffff;
}

/* Gallery Section Layout */
.gallery-section-wrap {
    background-color: #f8fafc;
    padding: 40px 5% 85px;
}

/* Gallery Filter Segment Controllers */
.gallery-filter-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px auto 45px;
    flex-wrap: wrap;
    max-width: 1000px;
}
.filter-btn {
    background-color: var(--bg-white, #ffffff);
    color: var(--primary-color, #213064);
    border: 1.5px solid var(--border-color, #e2e8f0);
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}
.filter-btn:hover {
    color: var(--primary-color, #213064);
    border-color: var(--primary-color, #213064);
    transform: translateY(-1px);
}
.filter-btn.active {
    background-color: var(--primary-color, #213064);
    color: white !important;
    border-color: var(--primary-color, #213064);
    box-shadow: 0 4px 10px rgba(26, 86, 219, 0.25);
}

/* Gallery Cards Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    height: 280px;
    box-shadow: 0 10px 15px -3px rgba(33, 48, 100, 0.05), 0 4px 6px -2px rgba(33, 48, 100, 0.02);
    border: 1.5px solid var(--border-color, #e2e8f0);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0) 100%);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(33, 48, 100, 0.1), 0 10px 10px -5px rgba(33, 48, 100, 0.04);
    border-color: var(--primary-color, #213064);
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}
.gallery-overlay h4 {
    color: white;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    text-align: left;
}
.gallery-overlay p {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
    text-align: left;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES
============================================================ */
@media (max-width: 992px) {
    .gallery-hero {
        height: 260px;
    }
    .gallery-hero-title {
        font-size: 2.6rem;
    }
    .gallery-section-wrap {
        padding: 30px 18px 60px;
    }
    .gallery-filter-container {
        margin: 25px auto 35px;
        gap: 8px;
    }
    .filter-btn {
        padding: 8px 18px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        height: 220px;
    }
    .gallery-hero-title {
        font-size: 2.1rem;
    }
    .gallery-hero-breadcrumbs-wrap {
        padding: 6px 18px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    .gallery-item {
        height: 240px;
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        height: 180px;
    }
    .gallery-hero-title {
        font-size: 1.7rem;
    }
    .gallery-filter-container {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        margin-bottom: 25px;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    /* Hide scrollbar for Chrome, Safari and Opera */
    .gallery-filter-container::-webkit-scrollbar {
        display: none;
    }
    /* Hide scrollbar for IE, Edge and Firefox */
    .gallery-filter-container {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    .filter-btn {
        flex-shrink: 0;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item {
        height: 220px;
    }
}
