/* =========================================================
   INTERSAFE — GALLERY PAGE 2026
   Professional gallery using canonical brand tokens.
   ========================================================= */

.gl-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: clamp(72px, 9vw, 120px) 0 clamp(64px, 7vw, 96px);
    background:
        linear-gradient(90deg, rgba(16,20,24,0.94) 0%, rgba(16,20,24,0.74) 52%, rgba(16,20,24,0.34) 100%),
        url('https://intersafearmored.com/uploads/website-images/CIVILIAN-ARMORED-VEHICLES.webp') center / cover no-repeat;
}
.gl-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(70% 70% at 50% 40%, #000 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 0%, transparent 100%);
    pointer-events: none;
}
.gl-hero > .container { position: relative; z-index: 1; }
.gl-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--intersafe-gold-soft);
}
.gl-hero__eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--intersafe-gold);
}
.gl-hero__title {
    margin: 16px 0 0;
    font-family: var(--DMSans, "Barlow", sans-serif);
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
}
.gl-hero__title .accent { color: var(--intersafe-gold); }
.gl-hero__lead {
    max-width: 640px;
    margin: 18px 0 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
}
.gl-breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 12px;
}
.gl-breadcrumb a { color: rgba(255,255,255,0.78); text-decoration: none; }
.gl-breadcrumb a:hover { color: var(--intersafe-gold-soft); text-decoration: underline; }
.gl-breadcrumb .active { color: var(--intersafe-gold-soft); font-weight: 600; }

/* ---------- Section ---------- */
.gallery-section {
    padding: clamp(56px, 6.5vw, 96px) 0;
    background: linear-gradient(180deg, var(--intersafe-soft) 0%, #fff 100%);
}

/* Filter Tabs */
.gallery-filter-btn {
    background: #fff;
    color: var(--intersafe-muted);
    border: 1px solid var(--intersafe-line);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.gallery-filter-btn:hover, .gallery-filter-btn.active {
    background: linear-gradient(135deg, var(--intersafe-olive), var(--intersafe-olive-dark));
    color: #fff;
    border-color: var(--intersafe-olive);
    box-shadow: 0 4px 20px rgba(77, 84, 66, 0.25);
    transform: translateY(-2px);
}

/* Gallery Card */
.gallery-card {
    background: #fff;
    border: 1px solid var(--intersafe-line);
    border-radius: var(--intersafe-radius);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--intersafe-shadow);
}
.gallery-card:hover {
    transform: translateY(-8px);
    border-color: rgba(77, 84, 66, 0.35);
    box-shadow: 0 15px 35px rgba(16, 20, 24, 0.15), 0 0 25px rgba(201, 165, 91, 0.15);
}
.gallery-thumb-box {
    position: relative;
    width: 100%;
    height: 240px;
    background: var(--intersafe-soft-2);
    overflow: hidden;
    cursor: pointer;
}
.gallery-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-thumb-img { transform: scale(1.08); }

.video-placeholder-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--intersafe-olive) 0%, var(--intersafe-olive-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
}
.video-placeholder-bg .bg-icon { font-size: 72px; }

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 20, 24, 0.55);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay { opacity: 1; }

.gallery-icon-btn, .gallery-play-btn {
    width: 52px;
    height: 52px;
    background: var(--intersafe-gold);
    color: var(--intersafe-ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px rgba(201, 165, 91, 0.6);
    transition: transform 0.3s ease;
}
.gallery-play-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
    padding-left: 3px;
}
.gallery-card:hover .gallery-icon-btn,
.gallery-card:hover .gallery-play-btn { transform: scale(1.15); }

.gallery-type-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}
.image-badge {
    background: rgba(16, 20, 24, 0.85);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}
.video-badge {
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gallery-card-body {
    padding: 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.gallery-title {
    color: var(--intersafe-ink);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gallery-date { color: var(--intersafe-muted); font-size: 12px; }

/* Modals */
.gallery-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.92);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.gallery-modal-overlay.active { display: flex; }
body.gallery-modal-open { overflow: hidden; }
.gallery-modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
}
.video-modal-content { max-width: 850px; }
.gallery-modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.gallery-modal-close:hover { background: #ef4444; }

@media (max-width: 767.98px) {
    .gallery-section { padding: 44px 0; }
}
