.gallery-hero {
    width: 100%;
    padding: 75px 0 90px;
    background-color: #f1efec;
    background-image: url(../images/bg/bg4.jpg);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    text-align: center;
}

.gallery-hero__title {
    font-family: 'Aboreto', serif;
    font-size: 50px;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 1);
    letter-spacing: 3px;
}

.gallery-section {
    max-width: 1100px;
    margin: 50px auto;
    padding: 10px 20px;
}

.gallery-section h2 {
    font-family: 'Aboreto', serif;
    font-size: 28px;
    color: #373838;
    margin-bottom: 50px;
    text-align: center;
}

/* Collage grid */
.picture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    grid-auto-rows: 120px; /* base row height */
    grid-auto-flow: dense; /* backfill gaps */
}

.picture-grid a {
    display: block;
    position: relative;
}

.picture-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.picture-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Randomize sizes for collage effect */
.picture-grid a:nth-child(1) { grid-row: span 2; grid-column: span 2; }
.picture-grid a:nth-child(2) { grid-row: span 1; grid-column: span 1; }
.picture-grid a:nth-child(3) { grid-row: span 1; grid-column: span 2; }
.picture-grid a:nth-child(4) { grid-row: span 2; grid-column: span 1; }
.picture-grid a:nth-child(5) { grid-row: span 1; grid-column: span 1; }
.picture-grid a:nth-child(6) { grid-row: span 1; grid-column: span 2; }
.picture-grid a:nth-child(7) { grid-row: span 2; grid-column: span 1; }
.picture-grid a:nth-child(8) { grid-row: span 1; grid-column: span 1; }
.picture-grid a:nth-child(9) { grid-row: span 1; grid-column: span 2; }
.picture-grid a:nth-child(10){ grid-row: span 2; grid-column: span 1; }
.picture-grid a:nth-child(11){ grid-row: span 1; grid-column: span 1; }
.picture-grid a:nth-child(12){ grid-row: span 2; grid-column: span 2; }
.picture-grid a:nth-child(13){ grid-row: span 2; grid-column: span 1; }
.picture-grid a:nth-child(14){ grid-row: span 1; grid-column: span 2; }
.picture-grid a:nth-child(15){ grid-row: span 2; grid-column: span 1; }
.picture-grid a:nth-child(16){ grid-row: span 1; grid-column: span 2; }

/* Video grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.video-grid iframe {
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

@media screen and (max-width: 600px) {
    .video-grid iframe {
        height: 180px;
    }
    .picture-grid {
        grid-auto-rows: 100px;
    }
}

/* Lightbox styles */
.lightbox {
    display: none;            /* start hidden */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;            /* full viewport height */
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    
    /* flex centering */
    justify-content: center;
    align-items: center;
}

.lightbox:target {
    display: flex;            /* show when targeted */
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    margin: 0;
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Lightbox close button */
.lightbox .close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}
