/* =========================
   Fonts
========================= */

@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend.ttf') format('truetype');
}


/* =========================
   Global
========================= */

body {
    margin: 0;
    padding: 0;
    background-image: url('../images/background2.jpg');
    background-size: cover;
    background-repeat: repeat-y;
    font-family: 'Lexend', sans-serif;
    color: white;
}


/* =========================
   Header
========================= */

header {
    text-align: center;
    padding-top: 10rem;
}

header h1 {
    font-size: 2.5rem;
    letter-spacing: 0.310em;
    font-weight: bold;
}


/* =========================
   Gallery Layout
========================= */

#gallery {
    margin-top: 10rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1rem;
}


/* =========================
   Gallery Items
========================= */

.gallery-item {
    position: relative;
    width: 33.33%;
}

.gallery-item a {
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
}


/* Image preserves original aspect ratio */

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;

    opacity: 0;
    transition: opacity 0.4s ease;

    position: relative;
    z-index: 1;
}


/* Centered Text */

.label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.3em;
    color: white;

    z-index: 2;
    pointer-events: none;
}


/* Hover reveal */

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


/* =========================
   Footer
========================= */

footer {
    padding: 2rem;
    text-align: center;
}


/* =========================
   Mobile
========================= */

@media (max-width: 600px) {

    header {
        padding-top: 4rem;
    }

    #gallery {
        flex-direction: column;
        align-items: center;
        margin-top: 4rem;
    }

    .gallery-item {
        width: 100%;
        max-width: 600px;
    }

    footer {
        padding: 1rem 0;
    }
}
