/* ================================
   GALLERY SECTION REDESIGN
================================ */

.gallery {
    background-color: #0d161d; /* Matches the dark theme carefully */
    color: #ffffff;
    text-align: center;
    padding: 6rem 1rem;
}

.gallery h2 {
    font-size: clamp(2.2rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
    color: #f5c98a; 
}

.gallery-subtitle {
    margin-bottom: 3rem;
    color: #a3b8c2;
}

.gallery-grid {
    display: grid;
    /* Create a staggered masonry-like 4-column layout */
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #1a1e24; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Unique sizing for standard masonry impact */
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 2; }
.gallery-item:nth-child(3) { grid-column: span 1; }
.gallery-item:nth-child(4) { grid-column: span 1; }
.gallery-item:nth-child(5) { grid-column: span 2; }
.gallery-item:nth-child(6) { grid-column: span 2; }

/* Responsive break: Tablet */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
    .gallery-item:nth-child(2) { grid-column: span 1; }
    .gallery-item:nth-child(3) { grid-column: span 1; }
    .gallery-item:nth-child(4) { grid-column: span 2; }
    .gallery-item:nth-child(5) { grid-column: span 1; }
    .gallery-item:nth-child(6) { grid-column: span 1; }
}

/* Responsive break: Mobile */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }
    .gallery-item { grid-column: span 1 !important; grid-row: span 1 !important; }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
    filter: brightness(0.85); /* Slightly dims when not hovered */
}

.gallery-item:hover img {
    transform: scale(1.08); /* Smooth zoom effect */
    filter: brightness(1.1); /* Highlights the image */
}

/* Elegant gold hover overlay from bottom */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(245, 201, 138, 0.4), transparent);
    opacity: 0;
    z-index: 2;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img[src=""],
.gallery-item img:not([src]) {
    opacity: 0; 
}
