﻿/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
    position: relative; background-color: var(--primary-blue); color: var(--white);
    padding: 80px 20px; text-align: center; border-bottom: 5px solid var(--primary-red); overflow: hidden; 
}
.page-header::before {
    content: ""; position: absolute; top: -15px; left: -15px; right: -15px; bottom: -15px;
    background: url('header bg.jpg') center/cover no-repeat;
    filter: blur(8px); opacity: 0.25; z-index: 1;
}
.page-header .container { position: relative; z-index: 2; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.page-header h1 { font-size: 2.8rem; margin-bottom: 10px; color: var(--white); }
.page-header p { font-size: 1.1rem; opacity: 0.95; color: var(--white); }

/* ==========================================================================
   Gallery Main Layout
   ========================================================================== */
.gallery-wrapper {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--white);
    color: var(--dark-text);
    border: 1px solid #e5e7eb;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: #f9fafb;
    border-color: var(--primary-blue);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    aspect-ratio: 4/3; /* Keeps images beautifully uniform */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 51, 102, 0.7); /* Signature Blue overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2.5rem;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1); /* Zoom effect */
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* ==========================================================================
   Lightbox Modal Styles
   ========================================================================== */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: var(--white);
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Navigation Buttons */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--primary-red);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-btn:hover {
    background: var(--primary-red);
}

.prev-btn { left: 30px; }
.next-btn { right: 30px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .lightbox-btn { width: 45px; height: 45px; font-size: 1.2rem; }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    .lightbox-close { top: 10px; right: 20px; font-size: 2.5rem; }
}