/* ========================================
   GALLERY PAGE — Premium Stylesheet
   ======================================== */

/* ===== HERO ===== */
.gal-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    background: #060c1a;
    overflow: hidden;
}

.gal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 50%, rgba(0,114,188,0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(0,114,188,0.08) 0%, transparent 50%);
}

.gal-hero-overlay {
    position: absolute;
    inset: 0;
    background: url('../images/services-hero.png') center center / cover no-repeat;
    opacity: 0.06;
}

.gal-hero .container {
    position: relative;
    z-index: 2;
    padding-top: 110px;
    padding-bottom: 60px;
}

.gal-hero-content { max-width: 680px; }

.gal-hero-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #60a5fa;
    background: rgba(0,114,188,0.15);
    border: 1px solid rgba(0,114,188,0.3);
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 28px;
}

.gal-hero-content h1 {
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.gal-accent {
    color: #0072BC;
    margin-left: 12px;
}

.gal-hero-content p {
    font-size: 17px;
    color: rgba(255,255,255,0.6);
    line-height: 1.75;
    margin-bottom: 32px;
    max-width: 520px;
}

.gal-hero-count {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.gal-count-num {
    font-size: 42px;
    font-weight: 800;
    color: #0072BC;
    line-height: 1;
}

.gal-count-label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}

.gal-hero-scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.25);
    font-size: 18px;
    animation: galBounce 2s infinite;
}

@keyframes galBounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== GALLERY GRID ===== */
.gal-section {
    background: #f5f7fa;
    padding: 70px 0 100px;
}

.gal-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.gal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.gal-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #1a2332;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.35s cubic-bezier(.25,.8,.25,1), box-shadow 0.35s;
}

.gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(.25,.8,.25,1), opacity 0.3s;
}

.gal-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

.gal-item:hover img { transform: scale(1.06); }

.gal-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gal-item:hover .gal-item-overlay { opacity: 1; }

.gal-item-overlay i {
    color: #fff;
    font-size: 18px;
    background: rgba(0,114,188,0.8);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.gal-item:hover .gal-item-overlay i { background: #0072BC; }

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.96);
    backdrop-filter: blur(12px);
}

.lb-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
}

.lb-img-wrap {
    max-width: 88vw;
    max-height: 82vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lb-img-wrap img {
    display: block;
    max-width: 88vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    transition: opacity 0.2s;
}

.lb-counter {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
}

.lb-close {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 10;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(6px);
}

.lb-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

.lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(6px);
}

.lb-nav:hover { background: #0072BC; border-color: #0072BC; }

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lb-next:hover { transform: translateY(-50%) translateX(2px); }

/* ===== RTL ===== */
html[dir="rtl"] .gal-hero-content { text-align: right; }
html[dir="rtl"] .gal-accent { margin-left: 0; margin-right: 12px; }
html[dir="rtl"] .gal-hero-content p { margin-left: auto; margin-right: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .gal-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .gal-hero .container { padding-top: 90px; }
    .gal-hero-content h1 { font-size: clamp(28px, 7vw, 42px); }
    .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .lb-nav { width: 42px; height: 42px; font-size: 15px; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .gal-section { padding: 50px 0 70px; }
}

@media (max-width: 480px) {
    .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gal-item { border-radius: 10px; }
    .lb-img-wrap { border-radius: 10px; }
}
