/* --- GALLERY PAGE SPECIFIC STYLES (IMAGE GRID ONLY) --- */

.gallery-page-content {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.gallery-heading {
    color: var(--dark-navy);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery-subheading {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 50px;
    
    /* Animation initial state (staggered) */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

/* --- IMAGE GRID LAYOUT --- */
.image-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 20px; /* Reduced gap for image-heavy layout */
    padding-top: 20px;
}

.gallery-image-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    
    /* Animation initial state (for staggered reveal) */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.gallery-image-card:hover {
    transform: scale(1.02); /* Slight scale up on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-image-card.visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-image-card img {
    width: 100%;
    /* Maintain aspect ratio better by setting min-height and object-fit */
    min-height: 250px; 
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Animation classes for headings */
.gallery-heading.visible, 
.gallery-subheading.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-heading {
        font-size: 2rem;
    }
    .gallery-subheading {
        font-size: 1rem;
    }
}