/* =============================================================
   IDEAL LEARNING ACADEMY – GALLERY PAGE ENHANCED STYLES
   Requires style.css (base variables & global rules)
   ============================================================= */

/* ---------- Page Header Override ---------- */
.page-header {
    padding: 80px 0 70px;
    background: linear-gradient(135deg, #0A3D24 0%, #0D5C3B 40%, #1B7A45 100%);
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}
.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.page-header p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    max-width: 550px;
    margin: 0 auto;
}

/* ---------- Gallery Grid ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Overlay on hover (subtle gold tint) */
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(201,168,76,0.0);
    transition: background 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
}

.gallery-item:hover::after {
    background: rgba(201,168,76,0.12);
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;                      /* hidden by default */
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox[style*="display: flex"] {
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0,0,0,0.7);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 40px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 100000;
}
.lightbox-close:hover {
    color: var(--gold-light);
    transform: scale(1.2);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-header h1 {
        font-size: 2.4rem;
    }
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item img {
        height: 250px;
    }
}