.header.desktop {
    display: none;
}

.header.mobile {
    display: none;
}

body {
    background: white;
}

.main-wrapper {
    display: block;
    width: 100%;
    max-width: 2000px;
    margin: 0;
    min-height: 90vh;
}


/* =========================================================
   GALLERY
========================================================= */

.gallery {
    position: relative;
    display: block;
    width: 100%;
}


/* RETURN BUTTON */

.gallery .returnbtn {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 40px;
    z-index: 10;
    background: white;
    border: none;
    font-size: 1.235rem;
    line-height: 1;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}


/* GALLERY HEADER */

.gallery .gallery-header {
    position: fixed;
    display: flex;
    left: 0;
    top: 0;
    align-items: center;
    justify-content: left;
    margin-top: 40px;
    width: calc(100% - 60px);
    height: 70px;
    padding: 30px;
    background: #F16822;
    z-index: 10;
}

.gallery-header .logo {
    display: block;
    width: 20%;
}

.gallery-header .logo img {
    height: clamp(30px, 4vw, 70px);
}

.gallery-header #gallery-title {
    display: block;
    width: 80%;
    text-align: right;
    color: white;
    font-family: sans-serif;
    font-size: clamp(26px, 3.5vw, 64px);
    line-height: 1;
    font-weight: bold;
    text-transform: uppercase;
}


/* =========================================================
   GALLERY GRID
========================================================= */

.gallery #gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: 170px;
}

#gallery .gallery-item {
    display: flex;
    align-items: flex-end;
    aspect-ratio: 4 / 3;
    background-size: auto 100%;
    background-position: center;
    opacity: 1;
    transition: 0.3s;
    cursor: pointer;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0);
    overflow: hidden;
    box-sizing: border-box;
}

#gallery .gallery-item:hover {
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.5);
    background-size: auto 107.5%;
}


/* =========================================================
   DESKTOP GALLERY
   4 ITEMS PER NORMAL ROW
========================================================= */

@media screen and (min-width: 1379px) {

    /* Normal 4-column row */
    #gallery > .gallery-item {
        width: calc((100% - 30px) / 4);
        flex: 0 0 calc((100% - 30px) / 4);
    }


    /* 1 extra: 5, 9, 13, etc. */
    #gallery:has(> .gallery-item:nth-child(4n + 1):last-child)
    > .gallery-item:first-child {
        width: 100%;
        flex: 0 0 100%;
        aspect-ratio: 4 / 1;
        background-size: 100% auto;
    }


    /* 2 extra: 6, 10, 14, etc. */
    #gallery:has(> .gallery-item:nth-child(4n + 2):last-child)
    > .gallery-item:nth-child(-n + 2) {
        width: calc((100% - 10px) / 2);
        flex: 0 0 calc((100% - 10px) / 2);
        aspect-ratio: 2 / 1;
        background-size: 100% auto;
    }


    /* 3 extra: 7, 11, 15, etc. */
    #gallery:has(> .gallery-item:nth-child(4n + 3):last-child)
    > .gallery-item:nth-child(-n + 3) {
        width: calc((100% - 20px) / 3);
        flex: 0 0 calc((100% - 20px) / 3);
    }

}


/* =========================================================
   TABLET GALLERY
   3 ITEMS PER NORMAL ROW
========================================================= */

@media screen and (min-width: 873px) and (max-width: 1378px) {

    /* Default: 3 images per row */
    #gallery > .gallery-item {
        width: calc((100% - 20px) / 3);
        flex: 0 0 calc((100% - 20px) / 3);
    }


    /*
     * 1 extra image
     *
     * Examples:
     * 4, 7, 10, 13...
     *
     * Make the FIRST image full width.
     */
    #gallery:has(> .gallery-item:nth-child(3n + 1):last-child)
    > .gallery-item:first-child {
        width: 100%;
        flex: 0 0 100%;
        aspect-ratio: 3 / 1;
    }


    /*
     * 2 extra images
     *
     * Examples:
     * 5, 8, 11, 14...
     *
     * Make the FIRST TWO images 50% each.
     */
    #gallery:has(> .gallery-item:nth-child(3n + 2):last-child)
    > .gallery-item:nth-child(-n + 2) {
        width: calc((100% - 10px) / 2);
        flex: 0 0 calc((100% - 10px) / 2);
        aspect-ratio: 2 / 1;
    }

}


/* =========================================================
   MOBILE GALLERY
========================================================= */

@media screen and (max-width: 872px) {

    #gallery > .gallery-item {
        width: 100% !important;
        flex: 0 0 100%;
        aspect-ratio: 4 / 3;
    }
}


/* =========================================================
   GALLERY LABELS
========================================================= */

#gallery .gallery-item .label {
    display: block;
    padding: clamp(20px, 2vw, 30px) 20px;
    font-size: clamp(20px, 2vw, 30px);
    line-height: 1;
    font-weight: bold;
    color: white;
    filter: drop-shadow(0 0 1rem rgba(0, 0, 0, 0.3));
    transform: scale(1.05);
    transform-origin: left center;
    opacity: 0;
    transition: 0.3s;
}

#gallery .gallery-item:hover .label {
    transform: scale(1);
    opacity: 1;
}


/* =========================================================
   GALLERY POPOVER
========================================================= */

.gallery-popover {
    position: fixed;
    display: none;
    left: 0;
    top: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 110;
}

.gallery-popover.active {
    display: flex;
}

.popover-wrapper {
    display: block;
    width: 100%;
    max-width: 1350px;
    text-align: center;
}

.popover-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

#popover-gallery {
    position: absolute;
    left: 0;
    top: 0;
    width: 10000px;
    height: 100%;
    transform: translateX(0);
    transition: transform 0.5s;
}

#image-label {
    position: absolute;
    text-align: left;
    left: 3%;
    bottom: 4%;
    color: white;
    font-family: sans-serif;
    font-size: clamp(22px, 2.5vw, 48px);
    line-height: 1;
    font-weight: bold;
    filter: drop-shadow(0 0 1rem rgba(0, 0, 0, 0.75));
    z-index: 5;
}

#popover-gallery .popover-gallery-item {
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}


/* =========================================================
   POPOVER CONTROLS
========================================================= */

.controls {
    display: inline-block;
    font-size: 2rem;
    width: 4rem;
    aspect-ratio: 1 / 1;
    border-radius: 100%;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.3));
    border: none;
    transition: background 0.3s;
    cursor: pointer;
}

.controls:hover {
    background: rgba(255, 255, 255, 1);
}

.desktop-controls .controls.next-image {
    position: absolute;
    right: 2%;
}

.desktop-controls .controls.previous-image {
    position: absolute;
    left: 2%;
}

.mobile-controls {
    margin-top: 20px;
}

.mobile-controls .controls.previous-image {
    margin-right: 10px;
}

.mobile-controls .controls.next-image {
    margin-left: 10px;
}


/* DESKTOP CONTROLS */

@media screen and (min-width: 873px) {

    .desktop-controls {
        display: block;
    }

    .mobile-controls {
        display: none;
    }
}


/* MOBILE CONTROLS */

@media screen and (max-width: 872px) {

    .desktop-controls {
        display: none;
    }

    .mobile-controls {
        display: block;
    }
}


/* =========================================================
   GALLERY MENU
========================================================= */

.gallery-menu {
    position: fixed;
    display: flex;
    left: 0;
    top: 0;
    align-items: center;
    width: 100%;
    height: 100vh;
    z-index: 100;
    overflow: hidden;
    transform: translateY(-100vh);
    transition: 1s;
    margin: 0;
    background: black;
}

.gallery-menu.active {
    transform: translateY(0);
}

.menu-item-wrapper {
    position: absolute;
    display: flex;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(0);
    transition: ease 1.5s;
}

.menu-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
}

.menu-item .overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.menu-item .content {
    position: relative;
    display: block;
    width: 70%;
    max-width: 1200px;
    z-index: 2;
}

.menu-item .content .title {
    display: block;
    font-family: adobe-caslon-pro, sans-serif;
    font-size: clamp(50px, 7vw, 130px);
    line-height: 1;
    margin: 0;
    font-weight: bold;
    color: white;
    transform: translateX(0px);
    transition: transform 3s;
}


/* =========================================================
   MENU CONTROLS
========================================================= */

.menu-controls {
    position: absolute;
    display: inline-block;
    width: clamp(50px, 5vw, 100px);
    aspect-ratio: 1 / 1;
    font-size: clamp(20px, 2.5vw, 50px);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 100%;
    cursor: pointer;
    transition: background 0.5s;
}

.menu-controls:hover {
    background: white;
}

.menu-controls.previous {
    left: 2%;
}

.menu-controls.next {
    right: 2%;
}

.logo-wrapper{
    position: absolute;
    top: 3%;
    width: 100%;
    text-align: center;
}

.logo-link img{
    height: 70px;
}


/* =========================================================
   LAUNCH GALLERY BUTTON
========================================================= */

.launch-button-wrapper{
    position: absolute;
    bottom: 5%;
    width: 100%;
    text-align: center;
}

.launch-gallery {
    display: inline-block;
    background: rgba(0,0,0,0);
    border: none;
    color: white;
    filter: drop-shadow(0 0 1rem rgba(0,0,0,0.5));
    font-family: "brandon-grotesque";
    font-size: 1.5rem;
    line-height: 1;
    font-weight: bold;
    text-transform: uppercase;
    padding: 0;
    cursor: pointer;
    margin-top: 10px;
    transform: translateY(0px);
    transition: transform 0.5s;
}

.launch-gallery .icon{
    display: block;
    font-size: 2em;
    line-height: 1;
    margin-top: 0px;
}

.launch-gallery:hover{
    transform: translateY(-15px);
}


/* =========================================================
   FOOTER
========================================================= */
/*
.footer-background {
    position: fixed;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    width: 100%;
    min-height: 50px;
    z-index: -1;
}

.footer {
    position: fixed !important;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    z-index: 110;
    transition: 1s;
}

.footer:hover {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.footer-element {
    color: white !important;
    filter: drop-shadow(0 0 2rem rgba(0, 0, 0, 0.9)) !important;
    font-weight: bold !important;
}

@media screen and (max-width: 872px) {

    .footer.in-gallery {
        background: rgba(0, 0, 0, 0.25);
        backdrop-filter: blur(10px);
    }
}*/