.gallery-page {
    background-color: #f9fafb; /* Matches 'features' and 'news' background */
    min-height: 80vh;
}

/* Typography to match index.css headings */
.section-title {
    text-align: center;
    font-size: 32px; /* Matches h2 in index.css */
    color: #1e3c72;
    margin-bottom: 10px;
}

.gallery-subtitle {
    text-align: center;
    color: #555;
    margin-bottom: 40px;
    font-size: 18px;
}

/* Filter Buttons */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: white;
    border: 1px solid #ccc;
    border-radius: 25px; /* Matches .btn radius */
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #1e3c72; /* Primary Blue */
    color: #ffd700; /* Gold Accent */
    border-color: #1e3c72;
    box-shadow: 0 4px 10px rgba(30, 60, 114, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Card Style for Images */
.gallery-item {
    display: block;
    text-decoration: none;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Matches .feature-card */
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Image Container to enforce aspect ratio */
.img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3; /* Consistent rectangular shape */
    overflow: hidden;
    background: #eee;
}

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

.gallery-item:hover img {
    transform: scale(1.1); /* Slight zoom on hover */
}

/* Load More Container */
.load-more-container {
    text-align: center;
    margin-top: 50px;
}

/* Refine Load More Button to match index.css .btn exactly */
#load-more-btn {
    /* .btn style is inherited from index.css, but we ensure padding here */
    padding: 12px 40px; 
    cursor: pointer;
    border: none;
    font-size: 16px;
}

/* --- Lightbox --- */
#lightbox {
    /* Default display is handled by inline style or JS, 
       but z-index ensures it's on top */
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

#lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 5px;
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    background: none;
    border: none;
}

#lightbox-close:hover {
    color: #ffd700;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 10px;
    }
    
    .img-wrapper {
        aspect-ratio: 1 / 1; /* Square on mobile */
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}