@import url('https://fonts.googleapis.com/css2?family=Castoro&family=Inter:opsz@14..32&display=swap');

*{
    scroll-behavior: smooth;
    transition: all 200ms ease;
}

*{
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-style: normal;
}

html, body{
    margin: 0;
    
}

h1, h2, h3, h4, h5, h6{
    font-family: "Castoro", serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
}

h1{
    font-size: 3rem;
}

h1, h2{
    text-align: center;
}

h2{
    margin: 0;
}

a{
    color: inherit;
}

.hidden{
    display: none;
}

::selection {
    background: #e4cb16;
    color: #1c1c1c;
}

.skip-link {
  position: absolute;
  top: -20rem;
  left: 50%;
  transform: translateX(-50%);
  background: #e4cb16;
  color: #1c1c1c;
  padding: 0.5rem 1rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: bold;
  transition: left 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    main {
        animation: fadeIn 1s ease;
    }
}

main{
    min-height: 95vh;
}

ul{
    list-style: none;
    padding: 0;
    margin: 0;
}

span{
    background-color: #e4cb16;
    text-transform: uppercase;
    text-align: left;
    font-size: smaller;
    margin-right: .5rem;
    padding: .2rem .5rem;
    border-radius: 10rem;
}

button{
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: inherit;
    color: inherit;
}

/* HEADER ------------------------------------------------------------------------------------ */

header{
    background-color: rgba(28, 28, 28, 1);
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    transition: all 500ms ease;
}

header img{
    width: 3rem;
}

header nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

#menu-toggle {
    display: none;
}

nav ul{
    display: flex;
    flex-wrap: wrap;
    margin: 0 1rem;
}

nav ul a{
    padding: 1.5rem 1rem;
    display: block;
    box-shadow:0 0 0 0rem #e4cb16 inset;
    text-decoration: none;
}

nav ul a:hover, nav ul .current{
    box-shadow: 0 -1rem 0rem -0.5rem #e4cb16 inset;
}

.current{
    font-weight: 700;
}

@media only screen and (max-width: 768px) {
    header nav{
        align-items: flex-start;
        flex-direction: column;
        padding: .5rem;
        margin-bottom: -.5rem;
    }

    header nav>div{
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    header nav ul{
        opacity: 0;
        pointer-events: none;
        align-self: flex-end;
        max-height: 0;
        margin: 0;
        display: inline;
    }

    #menu-toggle {
        display: flex;
        background: none;
        margin: auto 0;
        border: none;
        flex-direction: column;
        gap: .3rem;
    }

    #menu-toggle img{
        width: 2rem;
        position: static;
    }

    header.nav-expanded #menu-toggle img:nth-child(2){
        opacity: 0;
    }

    header.nav-expanded #menu-toggle img:nth-child(1){
        transform: rotate(45deg);
    }
    header.nav-expanded #menu-toggle img:nth-child(3){
        transform: rotate(-45deg);
        margin-top: -1.2rem;
    }

    #gallery header.nav-expanded,
    #body404 header.nav-expanded{
        background-color: #1c1c1c;
        color: white;
    }
    
    header.nav-expanded{
        background-color: white;
        color: #1c1c1c;
        padding-bottom: 1rem;
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
    }

    header.nav-expanded.hide-header{
        transform: translateY(0);
    }

    header.nav-expanded nav ul{
        opacity: 1;
        pointer-events: all;
        max-height: 20rem;
    }

    header.nav-expanded nav{
        height: auto;
    }

    header nav ul{
        flex-direction: column;
        text-align: right;
        margin-top: 1rem;
    }

    header nav ul a{
        box-shadow: none;
        padding: .5rem;
        border-right: rgba(28, 28, 28, 0) 0.5rem solid;
    }

    header nav ul .current{
        border-right: #e4cb16 0.5rem solid;
        box-shadow: none;
    }

    header nav ul a:hover{
        box-shadow: none;
    }

    .language-switcher{
        padding-top: 2rem;
        align-items: flex-end;
    }
}

.language-switcher .selected{
    border: #e4cb16 0.2rem solid;
    transition: none;
}

.language-switcher button{
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .4rem;
    overflow: hidden;
}

.language-switcher{
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0 1rem;
}

@media (prefers-reduced-motion: no-preference) {
    #gallery{
        header img{
            filter: brightness(0) saturate(100%) invert(7%) sepia(6%) saturate(21%) hue-rotate(322deg) brightness(101%) contrast(90%);
        }

        .scrolled{
            background-color: rgba(28, 28, 28, 1);
            color: white;
        }

        .scrolled img{
            filter: none !important;
        }

        header.nav-expanded img{
            filter: none !important;
        }

        header{
            background-color: rgba(28, 28, 28, 0);
            color: #1c1c1c;
        }
    }

    .hide-header {
        transform: translateY(-100%);
    }
}

.language-switcher img{
    filter: none !important;
    width: 2rem;
}

/* FOOTER ------------------------------------------------------------------------------------ */

footer{
    background-color: #1c1c1c;
    margin-top: 5rem;
    text-transform: uppercase;
    color: white;
    padding: 2rem 4rem;
    border-top: #e4cb16 0.5rem solid;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

@media only screen and (max-width: 768px) {
    footer{
        font-size: smaller;
        text-align: center;
        gap: 2rem;
        justify-content: center;
    }
}

/* GALLERY ----------------------------------------------------------------------------------- */

#gallery .wrapper{
    background-image: url('img/gallery_wrapper.jpg');
    background-size: cover;
    background-position:center;
    background-attachment:initial;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20rem;
    margin-bottom: 5rem;
}

.gallery{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 10rem;
    padding: 1rem 10rem;
    place-items: center;
}

#gallery2{
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

#gallery2 a{
    text-decoration: none;
    padding: 1rem 2rem;
    background-color: #e4cb16;
    border-radius: 10rem;
    text-transform: uppercase;
}

#gallery2 a:hover{
    transform: scale(1.05);
}

.gallery article{
    display: flex;
    max-width: 15rem;
}

.gallery article:hover{
    transform: scale(1.02);
}

.gallery article a{
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
}

.gallery article h2::before, .gallery article h2::after{
    content: '"';
    display: inline;
}

.gallery article div{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.gallery article img{
    max-width: 15rem;
    max-height: 30rem;
    display: block;
}

.gallery article p{
    margin: .5rem;
}

.gallery-condensed{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 3rem;
}

.gallery-condensed a p{
    display: none;
}

.gallery-condensed a h2{
    font-size: .8rem;
    max-width: 10rem;
}

.gallery-condensed img{
    width: 10rem;
}

#view-toggle{
    display: flex;
    justify-content: right;
    border-radius: 10rem;
    width: fit-content;
    background-color: rgba(28, 28, 28, 0.1);
}

#view-toggle button{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 10rem;
    width: 4rem;
}

#view-toggle button.active{
    background-color: #e4cb16;
}

#view-toggle button img{
    height: 1.5rem;
}

@media only screen and (max-width: 768px) {
    #gallery .wrapper{
        height: 30rem;
    }
    
    .gallery{
        grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
        gap: 4rem;
        padding: 1rem;
    }

    .gallery article{
        max-width: 15rem;
    }

    .gallery article img{
        max-width: 15rem;
        max-height: 25rem;
    }

    .gallery-condensed{
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
        gap: 2rem;
        padding: 0 2rem;
    }

    .gallery-condensed img{
        width: 5rem;
    }
}

#about, #map{
    background-color: #1c1c1c;
    color: white;
}

#about main, #map main{
    margin: 8rem 5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

#about main img{
    width: 20rem;
    margin: 2rem;
    height: auto;
    max-width: 85vw;
}

#about h1{
    text-align: left;
}

#about p, #map p{
    max-width: 40rem;
    text-align: justify;
}

@media only screen and (max-width: 768px) {
    #about main{
        margin: 4rem auto;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    #about h1, #about p{
        max-width: 85vw;
    }
}

/* #map{
    overflow-x: hidden;
} */

#map-hover-instruction{
    color: #e4cb16;
    font-weight: bold;
}

#universe{
    background-image: url('img/map.png');
    background-size: cover;
    width: 30rem;
    height: 30rem;
    display: flex;
    position: relative;
    border-radius: 50rem;
}

#universe:hover{
    box-shadow: rgba(228, 203, 22, 0.2) 0 0 5rem 1rem;
}

#universe div{
    position: absolute;
}

#map1{left: 18%;right: 15%;top: 5%;bottom: 75%;}
#map2{left: 3%;right: 80%;top: 18%;bottom: 35%;}
#map3{left: 20%;right: 50%;top: 20%;bottom: 42%;}
#map4{top: 20%;left: 50%;right: 40%;bottom: 65%;}
#map5{left: 65%;right: 5%;top: 22%;bottom: 55%;}
#map6{left: 48%;top: 40%;right: 40%;bottom: 40%;}
#map7{left: 15%;top: 56%;right: 40%;bottom: 30%;}
#map8{left: 60%;top: 45%;right: 5%;bottom: 20%;}
#map9{left: 20%;top: 70%;right: 40%;bottom: 10%;}

#tooltip {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    white-space: nowrap;
    z-index: 10;
    background-color: #e4cb16;
    color: #1c1c1c;
    text-transform: uppercase;
    font-size: large;
    padding: .2rem .5rem;
    border-radius: 10rem;
}

.popup img{
    display: flex;
}

.popup{
    background-color: white;
    color: #1c1c1c;
    border-radius: 1rem;
    margin: 2rem 0;
    padding: 2rem;
    max-width: 35rem;
}

.popup img{
    width: 5rem;
    margin: 1rem;
    display: inline;
}

@media screen and (max-width: 768px) {
    #map main{
        margin: 4rem 2rem;
    }

    #universe{
        width: 80vw;
        height: 80vw;
    }

    #map-hover-instruction{
        display: none;
    }

    .popup{
        display: none;
    }

    #universe:hover{
        box-shadow: none;
    }
}

#body404 main{
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.language-switcher{
    display: none;
}