
html{
    scroll-behavior: smooth;
}


:root{
    --bg-dark: oklch(0.94 0 20);
    --bg: oklch(0.96 0 20);
    --bg-light: oklch(1 0 20);
    --text: oklch(0.15 0 20);
    --text-muted: oklch(0.4 0 20);
    --highlight: oklch(1 0 20);
    --border: oklch(0.6 0 20);
    --border-muted: oklch(0.7 0 20);
    --primary: oklch(0.4 0.1 20);
    --secondary: oklch(85.876% 0.14591 205.869);
    --danger: oklch(0.5 0.05 30);
    --warning: oklch(0.5 0.05 100);
    --success: oklch(0.5 0.05 160);
    --info: oklch(0.5 0.05 260);
    --shadow: 0px 2px 2px hsla(0, 0%, 0%, 0.07), 0px 4px 4px hsla(0, 0%, 0%, 0.15);
    --gradient: linear-gradient(0deg, var(--bg) 95%, var(--bg-light));
    --gradient-hover: linear-gradient(0deg, var(--bg), var(--bg-light));

    --ff: "DM Sans", sans-serif;
    --ff-fancy: "Book Antiqua";

    --h1: bold 2.5rem/1.4em var(--ff);
    --h2: bold 1rem/1.4em var(--ff);
    --p: 1rem/1.4em var(--ff);
    --p2: .875rem/1.4em var(--ff);
    
    --gray100: hsl(0, 0, 100);
    --gray70: hsl(0, 0, 70);
    --gray0: hsl(0, 0, 0);
}

body.dark{
    --bg-dark: oklch(0.1 0 20);
    --bg: oklch(0.15 0 20);
    --bg-light: oklch(0.2 0 20);
    --text: oklch(0.96 0 20);
    --text-muted: oklch(0.76 0 20);
    --highlight: oklch(0.5 0 20);
    --border: oklch(0.4 0 20);
    --border-muted: oklch(0.3 0 20);
    --primary: oklch(0.76 0.1 20);
    --secondary: oklch(0.76 0.1 200);
    --danger: oklch(0.7 0.05 30);
    --warning: oklch(0.7 0.05 100);
    --success: oklch(0.7 0.05 160); 
    --info: oklch(0.7 0.05 260);
}

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'open sans', Helvetica, Arial, sans-serif;

    overflow-y:initial;

    font-family: var(--ff);
}
body{
    overflow-x: hidden;
    overflow-x: clip !important;    

    background-image: url("../kuvat/punainen-puu-tausta-käännetty.webp");
    background-size: 400px;
}
.overlay{
    width: 100vw;
    height: 100%;
    position: absolute;
    z-index: 100;
    background-color: #000000;
    color: #333333;
    top: 0;
    left: -100vw;
    opacity: 0;
    visibility: hidden;
    transition: all 1s ease;
    display: flex;

    padding-top: 200px;

    cursor: pointer;

    display: none;
}
.overlay-is-active{
    opacity: 0.3;
    visibility: visible;

    display: block;
}

.hidden{
    opacity: 0;
    transform: translateX(-10%);
    filter: blur(5px);
    transition: opacity 0.3s, transform 0.3s, filter 0.3s;
    
}

.show{
    opacity: 1;
    transform: translateX(0);
    filter: blur(0px);
}

.first h2{
    margin-bottom: 50px;
    font: var(--h2);
    font-size: 1.2rem;
    text-align: center;
}

.first h1:nth-child(2){
    text-align: center;
    font: var(--h1);
    font-size: 1.6rem;
    margin-top: 50px;
    padding: 2% 10%;
}

/*#region NAVBAR*/

.navbar{
    height: 80px;
    display: flex;
    align-items: center;
    top: 0;
    width: 100%;
    user-select: none;
    position: fixed;

    list-style: none;
    z-index: 999;
}
.navbar-container{
    display: flex;
    height: 80px;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* #region LIPUT */


.liput{
    width: 190px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 11%;
}

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

.liputCont a{
    width: 30px;
    height: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    border: 0px solid transparent;
    transition: all .3s ease, border .1s ease;
    box-shadow: var(--shadow), 0px 0px 6px hsla(0, 0%, 0%, 0.6);
    text-decoration: none;
    margin: 0;
    padding: 0;
}

.liputCont a img{
    width: 100%;
    height: 100%;
}

.liputCont a:hover{
    border: 2px solid #fff;
    scale: 1.3 1.3;
}
/* #endregion */

.navbar__menu{
    z-index: 999;
    position: absolute;
    right: calc(11% + 10px);
    display: flex;
    align-items: center;
    height: 80px;
}

.navButton{
    background: transparent;
    font: var(--h2);
    color: #000000;
    letter-spacing: 1px;
    transform: translate(0, 10%);
    border: none;
    border-radius: 5px;
    transition: all 0.2s ease;

    text-shadow: 0px 0px 5px hsla(0, 0%, 100%, .4);
}

.navButton:hover{
    scale: 1.1 1.1;
}

/*#endregion*/

/* #region FIRST */

.first{
    background: #FFF;
    width: 80%;
    margin: auto;
    border-radius: 5px 5px 0 0;

    margin-top: 80px;
}

.firstCont{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 7% 7%;
    padding-bottom: 0;
}

.firstCont h1{
    font: var(--h1);
    text-align: center;
    width: 100%;
}

.firstCont p{
    color: hsl(0, 0%, 50%);
    margin: 5px 0;
    margin-bottom: 50px;
    text-align: center;
}


.sijainti button{
    background-color: #E22222;
    border: none;
    border-radius: 5px;
    height: 50px;
    width: 170px;
    margin: 30px 0;
    margin-bottom: 40px;
    color: #fff;
    font-size: 14px;
    font-family: "DM Sans", sans-serif;

    transition: all 0.2s ease;

    cursor: pointer;

    position: relative;
    overflow: hidden;

    &:before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0%;
        height: 100%;
        background-color: turquoise;
        transition: all .3s;
        z-index: -1;
    }
    &:hover {
        color: #1d1d1d;
        &:before {
        width: 100%;
        }
    }
}

.sijainti a{
    width: fit-content;
    margin: auto;
    display: block;
}

/* #endregion */

/* #region HH */


.HH_Cards{
    width: 100%;
    height: 120vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.row, .row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 45%;
    width: 100%;

}

.HH_Card{
    width: 48%;

    height: 100%;
    padding: 30px 0;
    margin: 10px 0;


    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: space-around;

    border-radius: 5px;
}

.text{
    display: flex;
    align-items: center;
    justify-content: center;
}

.HH_Card h2{
    font: var(--h2);
    width: calc(100% - 90px);
    padding: 0 20px;
    margin: 0;
}

.HH_Card i{
    margin: 30px;
    font-size: 30px;
}

.HH_img{
    width: 48%;
    height: 100%;
    background-position: 100% 20%;
    background-size: cover;
    background-repeat: no-repeat;

    margin: 10px 0;
    border-radius: 5px;


    filter: brightness(100%) contrast(110%);
}

.HH_img:nth-child(1){
    background-image: url("../kuvat/Mökkeröinen.jpg");
}

.HH_img:nth-child(2){
    background-image: url("../kuvat/Mökkeröinen_terassi.jpg");
}

/* #endregion */

/* #region ML */

.dd{
    width: 80%;
    margin: auto;
    background-color: #fff;
    padding: 150px 0;
}

.dd.active{
    padding-bottom: 0;
}

.ddBtn{
    display: flex;
    margin: auto;
    padding: 0 20px;
    width: fit-content;
    height: 60px;
    align-items: center;
    color: #fff;
    cursor: pointer;
    background-color: #E22222;

    user-select: none;

    border-radius: 5px;

    transition: all 0.2s ease;

    font: var(--p);
}

.arrow{
    font-size: 24px;
    margin-left: 10px;
    rotate: -90deg;

    transition: all 0.3s ease;
}

.arrow.active{
    rotate: 450deg;
}

.ddBtn:hover{
    background-color: turquoise;
    color: #2f2f2f;
}

.dd h2{
    font: var(--h2);
    font-size: 1.5rem;
}

.ML_Cards{
    padding: 7%;
    padding-top: 0%;
    width: 100%;
    height: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    display: none;
}

.ML_Cards.active{
    display: flex;
}

.ML_Card{
    width: 30%;
    margin: 20px 0;
}

.ML-img{
    min-width: 100%;
    height: auto; /* Temporary */
    padding-bottom: 100%; /* Temporary */
    background-color: #8e8c89;
    border-radius: 5px;
}

.ML_Card h2{
    font: var(--h2);
    margin-top: 10px;
}

#huussi.ML-img{
    background-image: url("../kuvat/huussi.jpg");
    background-size: cover;
    background-position: center 30%;
}

#keittio.ML-img{
    background-image: url("../kuvat/keittiö.jpg");
    background-size: cover;
    background-position: center;
}

#makuuhuone.ML-img{
    background-image: url("../kuvat/makuuhuone.jpg");
    background-size: cover;
    background-position: center;
}

#sauna.ML-img{
    background-image: url("../kuvat/sauna.jpg");
    background-size: cover;
    background-position: center;
}

#piha1.ML-img{
    background-image: url("../kuvat/piha1.jpg");
    background-size: cover;
    background-position: center;
}

#piha2.ML-img{
    background-image: url("../kuvat/piha2.jpg");
    background-size: cover;
    background-position: center;
}

/* #endregion */

/* #region SIJAINTI */

.sijainti{
    width: 80%;
    margin: auto;
    background-color: #fff;
}

.sijaintiCont{
    padding: 7%;
}

.sijaintiCont h1{
    font: var(--h1);
}

.sijaintiCont2{
    display: flex;
    height: 500px;
}

.map{
    width: 60%;
    padding-right: 5%;
}

.map iframe{
    width: 100%;
    border-radius: 5px;
    height: 100%;
}

.sijaintiText{
    width: 40%;
    position: relative;
}

.sijaintiText h2{
    font: var(--h1);
    font-size: 1.5rem;
}

.sijaintiText p{

    margin: 10px 0;
    font: var(--p);
    padding: 7px 8px;

    border: 2px hsl(0, 0%, 84%) solid;

    border-radius: 5px;


    transition: all 0.3s ease;

    cursor: pointer;
}

.sijaintiText p:hover{
    color: #1d1d1d;
    scale: 1.06 1.06;
}

.sijaintiText .isactive{
    border: 1px #808080 solid;
    background-color: #E22222 ;
    color: #fff !important;
}


.sijaintiP.pm{
    position: absolute;
    width: 100%;
    bottom: 0;
    margin: 0;
}


/* #endregion */


/* #region YHTEYSTIEDOT */


.yhteystiedot{
    height: 50vh;
    width: 80%;
    display: flex;
    background: var(--bg-dark);
    margin: auto;
    border-radius: 0 0 5px 5px;

    margin-bottom: 80px;
}

.ytCont{
    display: flex;
    width: 100%;
    align-items: center;
    padding: 7% ;
}

.ytLeft{

    display: flex;

    width: 70%;
}


.yts{
    display: flex;
    flex-direction: column;
    width: 50%;
}

.ytLeft h1{
    font: var(--p);
    font-weight: bold;
}

.yts h2{
    font: var(--p);
}

.yt{
    width: 100%;
    margin: 5px 0;
}

.ytRight{
    width: 30%;
    height: 100%;
    display: flex;
    justify-content: right;
    align-items: center;
}

.ytRight img{
    width: 70%;
    height: auto;
}

/* #endregion */

@media(max-width: 1000px){
    .HH_Card{
        width: 100%;
        transition-delay: 0ms !important;
    }

    .text{
        flex-direction: column;
        text-align: center;
    }
 
    .HH_img{
        width: 100%;
        height: 100%;
        min-height: 300px;
        transition-delay: 0ms !important;
    }

    .row{
        flex-wrap: wrap;
    }

    .row:nth-child(2){
        flex-direction: column-reverse;
    }

    .HH_Cards{
        height: fit-content;
    }
}

@media (max-width: 800px){
    .first, .ML, .sijainti, .yhteystiedot, .dd{
        width: 90%;
    }
}


@media (max-width: 700px){
    .first, .yhteystiedot, .sijainti{
        width: 100%;
        margin-bottom: 0;
    }

    body{
        background-color: #fff;
        background-image: none;
    }

    .liput{
        left: 6%;
    }

    .navbar__menu{
        right: 6%;
    }
}

@media (max-width: 650px){
    .ML_Card{
        width: 45%;
    }

    .ML_Card:nth-child(2){transition-delay: 200ms !important;}
    .ML_Card:nth-child(3){transition-delay: 0ms !important;}
    .ML_Card:nth-child(4){transition-delay: 200ms !important;}
    .ML_Card:nth-child(5){transition-delay: 0ms !important;}
    .ML_Card:nth-child(6){transition-delay: 200ms !important;}

}

@media (max-width: 600px){
    .yhteystiedot{
        height: 70vh;
    }

    .ytCont{
        flex-wrap: wrap;
    }

    .ytLeft{
        width: 100%;
        flex-wrap: wrap;
    }

    .ytRight{
        width: 100%;
        height: 40%;

        justify-content: center;
    }

    .ytRight img{
        height: 100%;
        width: auto;
    }


    .yts{
        width: 100%;
        text-align: center;
    }

    .yts:nth-child(2){margin-top: 20px;}

    .sijaintiCont2{ 
        flex-direction: column;
        height: fit-content;
    }

    .map{
        width: 100%;
        padding: 0;
        height: 50vh;
    }

    .sijaintiText{
        width: 100%;
        margin-top: 20px;
    }

    .sijaintiP.pm{
        position: static;
    }

}

@media (max-width: 400px){
    .liput{
        width: 170px;
    }
}

@media(max-width: 350px){
    .liput{
        width: 160px;
        left: 3%;
    }

    .navbar__menu{
        right: 3%;
    }
}

