h1{
  font-family: var(--font-family-title);
  color: var(--clr-white);
  font-size: var(--font-size-title);
   text-align: center;
    margin-bottom: 3rem;
}

section.gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-auto-rows: 300px;
    justify-content: center;
}

figure {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

figure a{
    width: 100%;
    height: 100%;
}

@media screen and (min-width: 600px){
    .tall {
    grid-row: span 2;
}

.wide {
    grid-column: span 2;
}
}

section:not(.firstPage) figure figcaption{
    transform: 0.3 ease-in-out;
    opacity: 0;
}

section:not(.firstPage) figure:hover figcaption{
    opacity: 1;
}

figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    padding: 0.5rem 0.2rem;
    box-sizing: border-box;
    font-family: var(--font-family-btn);
    font-size: var(--font-size-btn);
    transition: 0.3s ease-in-out;
}

.firstPage figure figcaption{
    bottom: auto;
    left: 50%;
    top: 50%;
    width: auto;
    transform: translate(-50%, -50%);
    padding: 0.5rem 1rem;
}
.firstPage figure:hover figcaption{
    transform-origin: 50% 50%;
    scale: 1.2 1.2;
}

section.title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    margin: 3rem var(--page-padding);
}

section.title button{
    background: none;
    border: none;
    width: 10vw;
}
section.title button img{
    width: 100%;
}

section.title h1{
    padding: 0;
    margin: 0;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 80%;
    max-height: 80%;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}