/* =========================================
   World Class Gallery UI (TIGHT FIT)
   ========================================= */

.gallery-wrap {
    /* 🚀 Margin top ko aur negative karke upar dhakela hai */
    margin-top: -120px; 
    
    /* 🚀 Top padding ko zero kar diya hai */
    padding: 0 0 80px 0; 
    
    background: #f4f7fe; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    position: relative;
    z-index: 5; /* Taki yeh dusre sections ke upar rahe */
}

.container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Header Styling (Gap kam kiya) --- */
.g-header {
    text-align: center;
    margin-bottom: 30px; /* Gap kam kiya */
    padding: 0 15px;
}

.g-title {
    font-size: 38px;
    font-weight: 900;
    color: #0f172a;
    text-transform: uppercase;
    margin-bottom: 8px; /* Gap kam kiya */
    letter-spacing: -0.5px;
}

.g-title span { color: #4361ee; }

.g-sub {
    font-size: 16px;
    color: #475569;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 500;
    line-height: 1.5;
}

.g-underline {
    width: 80px;
    height: 4px;
    background: #4361ee;
    margin: 15px auto 0;
    border-radius: 2px;
    position: relative;
}

.g-underline::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 4px;
    background: #ef4444;
    top: 0; left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* --- Smart Auto-Grid --- */
.g-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* --- Premium Gallery Card --- */
.g-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #e2e8f0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
    aspect-ratio: 4 / 3;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Hover Details Overlay --- */
.g-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.g-item:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(67, 97, 238, 0.15); }
.g-item:hover .g-overlay { opacity: 1; }

/* ... (Baki Lightbox wala CSS waisa hi rehne dein) ... */