@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/*
  1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
    box-sizing: border-box;
  }
  /*
    2. Remove default margin
  */
  * {
    margin: 0;
  }
  /*
    Typographic tweaks!
    3. Add accessible line-height
    4. Improve text rendering
  */
  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  /*
    5. Improve media defaults
  */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }
  /*
    6. Remove built-in form typography styles
  */
  input, button, textarea, select {
    font: inherit;
  }
  /*
    7. Avoid text overflows
  */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  /*
    8. Create a root stacking context
  */
  #root, #__next {
    isolation: isolate;
  }


/* CSS START */


/* NAVBAR SNIPPET START */

body{
    font-family: 'Open Sans', sans-serif;
}


*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --nav-primary: 0, 0%, 100%;
    --nav-text-color: 0, 0%, 0%;
    --red: 0, 91%, 50%;
    --black: 0, 0%, 13%;
    --nav-height: 3rem;
}

body{
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

/* Header */

header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: white;
    z-index: 5;
}

nav{
    position: relative;
    width: 100%;
    height: 100%;
}


nav::before{
    content: "";
    display: block;
    width: 100%;
    height: 100%;  
    background-color: hsl(var(--nav-primary));  
}
nav::after{
    position: absolute;
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    bottom: 0;
    background-color: hsla(0, 0%, 100%, 0.1);
}

nav .hamburger{
    position: absolute;
    top: 0rem;
    right: 0rem;
    aspect-ratio: 1/1;
    height: 100%;
    will-change: transform;
    transform: rotate(0deg);
    transition: transform 0.5s ease-in-out;
    background-color: hsl(var(--red));
    z-index: 2;
}

nav .hamburger.active{
    transform: rotate(-360deg);
}

nav .hamburger>*{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0.4rem;
    transition: opacity 0.5s ease-in-out;
}


nav .hamburger>*:nth-child(1){ opacity: 1;}
nav .hamburger.active>*:nth-child(1){ opacity: 0;}
nav .hamburger>*:nth-child(2){ opacity: 0;}
nav .hamburger.active>*:nth-child(2){ opacity: 1;}

nav .hamburger, nav li{
    cursor: pointer;
}

nav ul{
    position: absolute;
    display: flex;
    flex-direction: column;
    list-style: none;
    opacity: 0;
}

nav ul, nav::before{
    will-change: transform;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
}

nav .hamburger.active+ul,nav h5.active+ul, nav:has(.hamburger.active)::before{
    transform: translateX(0%);
}

nav li{
    height: var(--nav-height);
    padding-left: 1rem;
    font-size: 1.5rem;
}

nav li h5.active+ul, nav .hamburger+ul{
    position: relative;
    opacity: 1;
}

nav li>h5{
    position: relative;
    height: 3rem;
    width: 100%;
    display: flex;
    align-items: center;
}

nav li:not(:last-child){
    position: relative;
}

@media screen and (min-width: 960px) {
    nav .hamburger{
        display: none;
    }
    nav::before,nav::after{
        display: none;
    }
    nav>ul:first-of-type{
        position: relative;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        top: 0;
        display: flex;
    }
    nav li{
        padding-left: 0;
        text-align: center;
        transition: background-color 0.3s ease-in-out;
        position: relative;
    }
    nav li:hover{        
        background-color: hsla(0, 0%, 100%, 0.2);
    }
    nav li:hover>ul{
        display: flex;
    }
    nav li h5{
        justify-content: center;
    }
    nav ul{
        transform: initial;
        display: none;
        opacity: 1;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        min-height: var(--nav-height);
        width: 100%;
    }

    nav ul ul {
        width: 125%;
    }
    nav ul ul li{
        padding-left: 1rem;
        width: 100%;
    }
    nav ul ul li h5{
        justify-content: flex-start;
    }
    nav ul ul ul{
        top: 0;
        left: 100%;
    }    
}

/* NAVBAR SNIPPET END */

/* NAVBAR START */

a{
    color: inherit;
    font-size: inherit;
    text-decoration: none;
}

header{
    box-shadow: 0px 0px 42px -16px rgba(0,0,0,0.75);
    -webkit-box-shadow: 0px 0px 42px -16px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px 0px 42px -16px rgba(0,0,0,0.75);
}

nav .logo{
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    padding-left: 1rem;
}

nav .logo>img{
    height: 80%;
    object-fit: cover;
}

nav .socials{
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    gap: 0.4rem;
}

nav .socials>a{
    height: 60%;
    aspect-ratio: 1/1;
    border-radius: 5rem;
}

nav .socials>a>img{
    height: 100%;
    object-fit: cover;
    border-radius: 5rem;
}

nav li{
    padding: 0rem 1.5rem;
    font-size: 1rem;
    display: grid;
    place-items: center;
    will-change: background-color;
    transition: color 0.3s ease-in-out, background-color 0.75s ease-in-out;
}

nav li:hover{
    background-color: hsla(var(--black));
    color: white;
}

nav .currentPage{
    color: white;
    background-color: hsl(var(--red));
}

@media screen and (max-width: 960px) {
    .hamburger.active+ul{
        height: calc(100svh - var(--nav-height));
        background-color: hsl(var(--black));
        color: white;
    }
    
    nav li{
        display: flex;        
    }
    
}

@media screen and (min-width: 960px) {
    nav .socials{
        width: initial;
        justify-content: initial;
    }
}

/* NAVBAR END */

/* MAIN START */

main{
    position: relative;
    background-color: hsl(0, 0%, 93%);
    display: flex;
    flex-direction: column;
    align-items: center;
}



main .background{
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    aspect-ratio: 2.5/1;
    width: 100%;
    background-color: white;
}

main .background .hero1{
    background-image: url(../img/hero.jpg);
    opacity: 0;
    animation: background 1s ease-in-out 2s forwards;
}

@keyframes background {
    from{
        opacity: 0;
    }

    to{
        opacity: 1;
    }
}

/* Logo on hero animation */
main .background .hero1 .logo{
    padding: 1rem 2rem;
    width: min(calc(60% - 2rem), 25rem);
    background-color: white;
    opacity: 0;
    animation: logo 0.75s ease-in-out 2.75s forwards;
}

@keyframes logo {
    from{
        opacity: 0;
        transform: translateX(-300px);
    }

    to{
        opacity: 1;
        transform: translateX(0px);
    }
}

/* Hero 2 text */

main .background .hero2{
    background-image: url(../img/hero2.jpg);    
}

@media screen and (max-width: 960px) {
    main .background{
        height: 20rem;
    }
}

main .background .hero2 .text{
    width: min(80%, 20rem);
    background-color: hsla(var(--black), 0.8);
    color: white;
    padding: 2rem;
    text-align: center;
    font-size: 1rem;
}
@media screen and (min-width: 960px) {
    main .background .hero2 .text{        
        font-size: 1.2rem;
    }
}

/* Hero slider */

main .background .hero1, main .background .hero2{
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    transition: transform 0.75s ease-in-out;
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;    
    width: 100%;
    height: 100%;
}

main .background .hero1{
    transform: translateX(0%);
}
main .background .hero2{
    transform: translateX(100%);
}
main .background.slide2 .hero1{
    transform: translateX(-100%);
}
main .background.slide2 .hero2{
    transform: translateX(0%);
}

/* Hero arrows */
main .background .left, main .background .right{
    position: relative;
    background-image: url(../img/arrow_back_ios_white_48dp.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 2rem;
    aspect-ratio: 1/1;
    width: 3rem;
    z-index: 5;
    background-color: hsla(var(--black), 0.9);
    margin: 2rem;
    cursor: pointer;
    opacity: 0;
}

main .background .right{
    background-image: url(../img/arrow_forward_ios_white_48dp.svg);    
    opacity: 1;
}

main .background.slide2 .right{
    opacity: 0;
}

main .background.slide2 .left{
    opacity: 1;
}

main .background .logo img{
    width: 100%;
    object-fit: cover;
}

main section aside{
    grid-area: aside;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: none;
    background-color: transparent;
}

/* Main structure */

main section{
    margin: 2rem 0rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: 
    "welcome welcome aside"
    "welcome welcome aside"
    "nights membership aside";
    width: min(90%, 1080px);
    gap: 2rem;
}

@media screen and (max-width: 960px) {
    main section{
        grid-template-columns: 2fr 1fr;
        grid-template-areas: 
        "welcome aside"
        "welcome aside"
        "nights aside"
        "nights aside"
        "membership aside"
        "membership aside";
        width: min(90%, 1080px);
    }
}

@media screen and (max-width: 768px) {
    main section{
        grid-template-columns: 1fr;
        grid-template-areas: 
        "welcome"
        "nights"
        "membership"
        "aside";
        width: min(90%, 1080px);
    }
}

main section div.img{
    width: 100%;
}
main section div.img img{
    width: 100%;
    object-fit: cover;
}

/* Under shaodw for articles */

main section>*, main section aside>*{
    background-color: white;
    box-shadow: -1px 7px 27px -18px rgba(0,0,0,0.25);
    -webkit-box-shadow: -1px 7px 27px -18px rgba(0,0,0,0.25);
    -moz-box-shadow: -1px 7px 27px -18px rgba(0,0,0,0.25);
    width: 100%;
}

/* Articles headers */

main section h3{
    height: 2.5rem;
    font-weight: 500;
    background-color: hsl(var(--red));
    color: white;
    display: flex;
    align-items: center;
    padding: 0rem 0.5rem;
}

main section h3::before{
    content: "";
    aspect-ratio: 1/1;
    height: 50%;
    display: inline-block;
    background-image: url(../img/card-suits-spades.png);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 0.5rem;
}

main section aside h3{
    background-color: hsl(var(--black));
    color: white;
}

main section aside h3::before{
    background-image: url(../img/card-suits-hearts.png);
}

main section article p, main section article button{
    margin: 1rem;
}

main section article{
    position: relative;
    padding-bottom: 3rem;
}

main section article button{   
    position: absolute;
    left: 0rem;
    bottom: 0rem; 
    border: none;
    color: white;
    padding: 0.25rem 0.75rem;
    background-color: hsl(var(--black));
    cursor: pointer;
}

main section .event{
    grid-area: event;
    display: flex;
    flex-direction: column;
}

/* Event section */

main section .event ul{
    display: flex;
    flex-direction: column;
    list-style: none;
    width: 100%;
    flex-grow: 1;
}

main section .event ul li{
    display: flex;
    width: 100%;
    min-height: 3rem;
    flex-grow: 1;
    background-color: lightgray;
}

main section .event ul li:nth-child(even){
    background-color: white;
}

main section .event ul li>*{
    padding: 0.5rem 0rem;
}

main section .event ul li .time{      
    min-width: 30%;
    margin: 0rem 0.2rem;
    text-align: center;
}

main section .news{
    position: relative;
    grid-area: news;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    padding-top: 3.5rem;
}

main section .news h3{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

main section .news form{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

main section .news form input{
    border: 1px solid hsl(var(--black));
    padding: 0.3rem 0.5rem;
}

main section .news form button{
    border: none;
    color: white;
    background-color: hsl(var(--red));
    cursor: pointer;
    padding: 0.3rem 0rem;
}

/* Grid area positions for main*/

main section .welcome{
    grid-area: welcome;
}
main section .nights{
    grid-area: nights;
}
main section .membership{
    grid-area: membership;
}

footer{
    padding: 1rem 0rem;
    background-color: hsl(var(--black));
    color: white;
    display: flex;
    justify-content: center;
}

/* Footer Container */

footer .container{
    width: min(90%, 1080px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media screen and (min-width: 960px) {
    footer .container{
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Footer Text */

footer .container h5{
    font-size: 1.8rem;
    font-weight: 400;
    color: hsl(var(--red));
}

footer .container div{
    font-size: 1rem;
    font-weight: 300;
}