/* ============ Company Gallery ============ */

:root {
    --navy: #05103A;
    --ink: #0d1b2a;
    --muted: #5b6b82;
    --accent: #ffb367;
    --line: #e6e9f0;
    --paper: #ffffff;
}


/* Hero */

.gallery-hero {
    position: relative;
    min-height: 300px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
}

.gh-bg {
    position: absolute;
    inset: 0;
    background: url('../images/gallery-hero.jpg') center/cover no-repeat, linear-gradient(180deg, #1b2a4a, #0d1b2a);
    filter: brightness(.8);
}

.gh-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(800px 400px at 50% 10%, rgba(255, 179, 103, .28), transparent 60%), linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .65));
}

.gh-inner {
    position: relative;
    z-index: 2;
    width: min(1100px, 92%);
    text-align: center;
    padding: 34px 0;
}

.gh-title {
    margin: 0 0 14px;
    font-size: clamp(26px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: .02em;
    text-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}


/* Filters inside the hero */

.gh-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s, color .2s;
}

.filter-btn:hover {
    transform: translateY(-1px);
}

.filter-btn.is-active {
    background: #ffb367;
    color: #05103A;
    border-color: #ffb367;
}


/* Gallery grid */

.gallery-wrap {
    background: #f7f8fb;
    padding: clamp(28px, 4.5vw, 56px) 0;
}

.gallery-grid {
    width: min(1200px, 92%);
    margin-inline: auto;
    display: grid;
    gap: clamp(12px, 2vw, 18px);
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    align-items: stretch;
}


/* Card */

.g-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.g-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, .08);
    border-color: #ffd7a8;
}


/* Media */

.g-link {
    display: block;
    position: relative;
}

.g-link img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eef1f6;
}


/* Video stub */

.g-video-stub {
    height: 220px;
    background: linear-gradient(180deg, #0d1b2a, #05103A);
    display: grid;
    place-items: center;
    color: #fff;
}

.g-video-stub i {
    font-size: 48px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .35));
}


/* Caption */

.g-caption {
    padding: 12px 16px;
    color: #243447;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 700;
}


/* Empty */

.g-empty {
    width: min(1200px, 92%);
    margin: 10px auto 0;
    text-align: center;
    color: #52606d;
    background: #fff;
    border: 1px dashed #d6dbe3;
    border-radius: 12px;
    padding: 16px;
}


/* Lightbox */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .78);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none !important;
}

.lb-body {
    max-width: min(1000px, 92vw);
    max-height: 82vh;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}

.lb-body img,
.lb-body video {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    background: #000;
}

.lb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .2s, background .2s, border-color .2s;
}

.lb-close:hover {
    transform: translateY(-1px);
    background: #ffb367;
    color: #05103A;
    border-color: #ffb367;
}

.lb-caption {
    color: #fff;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    padding: 0 12px;
}


/* RTL tweaks */

[dir="rtl"] .gh-title {
    letter-spacing: 0;
}

.g-video-stub {
    height: 180px;
    background: linear-gradient(180deg, #0d1b2a, #05103A);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    color: #fff;
    position: relative;
}

.g-video-stub i {
    font-size: 48px;
    z-index: 2;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .35));
}

.g-video-stub::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    /* تغميق طفيف */
    z-index: 1;
}