/*                  *******YLEISET*******                     */

/*          FONTIT          */

/*otsikko fontti*/
.castoro-titling-regular {
  font-family: "Castoro Titling", serif;
  font-weight: 400;
  font-style: normal;
}

/*mietelause fontti*/
.allura-regular {
  font-family: "Allura", cursive;
  font-weight: 400;
  font-style: normal;
}

/*yleinen fontti*/
.cormorant-upright-light {
  font-family: "Cormorant Upright", serif;
  font-weight: 300;
  font-style: normal;
}

.cormorant-upright-regular {
  font-family: "Cormorant Upright", serif;
  font-weight: 400;
  font-style: normal;
}

.cormorant-upright-medium {
  font-family: "Cormorant Upright", serif;
  font-weight: 500;
  font-style: normal;
}

.cormorant-upright-semibold {
  font-family: "Cormorant Upright", serif;
  font-weight: 600;
  font-style: normal;
}

.cormorant-upright-bold {
  font-family: "Cormorant Upright", serif;
  font-weight: 700;
  font-style: normal;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column; /*header, main, nav ja footer päällekkäin*/
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

h1 {
    padding: 15px 0px 15px; 
    align-self: center;
    font-family: Castoro Titling;
}

h2 {
    padding: 15px 0px 15px;
    font-family: Castoro Titling;
}

h3 {
    font-family: Castoro Titling;
}

p {
    padding: 5px;
    font-family: Cormorant Upright;
    font-size: 20px;
}

a {
    font-family: "Cormorant Upright";
    color:rgb(107, 68, 68);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-style: wavy;
    text-decoration-color: rgb(107, 68, 68);
}

a:hover {
    color:rgb(121, 83, 83);
}

.motto {
    padding: 20px 0px;
    align-self: center;
    font-family: Allura;
    font-size: 60px;
}

.paragraph {
    display: flex;
    flex-direction: column;
    margin: auto;
    width: 100%;
    max-width: 1000px;
    align-items: center;
    padding: 0px 5px 15px;

}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 1em;
}

section {
    width: 100%;     
    max-width: 900px;
}

ul {
    margin: 10px;
}

.list {
    padding-left: 15px;
}

li {
    padding: 3.5px;
    font-family: "Cormorant Upright";
    font-size: 20px;
}

button {
    border: 1px solid rgb(121, 83, 83);
    border-radius: 15px;
    color: white;
    background-color: rgb(175, 143, 143);
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 20px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
}

button:hover {
    background-color: rgb(121, 83, 83);   
}

.PortfolioButton {
    border: 1px solid rgb(141, 139, 139);
    border-radius: 15px;
    color: rgb(54, 54, 54);
    background-color: rgb(216, 216, 216);
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 20px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
}

.PortfolioButton:hover {
    background-color: rgb(54, 54, 54);  
    color: rgb(216, 216, 216);
}

.tail {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.tail img {
    width: 100%;
    max-width: 750px;
    height: auto;
}


/*                  *******HEADER********                     */

.header {
    display: flex;
    flex-direction: column;
    background-color: rgb(255, 255, 255);
    color: rgb(255, 251, 230);
    padding: 0; 
    position: relative;
}

/*Burilaisen logiikka, piilota checkbox ja ikoni oletuksena (desktop)*/
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;  /*näkyy vasta mobiilisssa*/
}

.closed {
    display: none;
}

.logo {
    display: flex;
    justify-content: center;
    width: 100%;
}

.logo img {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: auto;
}

.social {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px
}

.social img {
    max-width: 35px;
    height: auto;
}

/*                  ******NAVIGAATIO*****                      */

.navigation {
    background-color: rgb(255, 255, 255);
    padding: 20px;
}

.navigation ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 5px;
}

.navigation ul li a {
    display: block;
    text-decoration: none;
    padding: 1em;
    color: rgb(59, 59, 59);
    transition: color 0.5s ease;
}

.navigation ul li a:hover {
    color: rgb(121, 83, 83);
}

footer {
    border-top: black;
    border-top-style: dotted;
    border-width: 1px;
    background-color: rgb(228, 220, 217);
    color:rgb(59, 59, 59);
    text-align: center;
    padding: 0.75em;
}

/*                  ******ETUSIVU*****                      */

.etusivu {
    align-items: flex-start;
    padding: 0;
}


.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 1600 / 1067;
    margin: 0 auto;
    overflow: hidden;
}


/* Individual slides */
.mySlides {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

/* Visible slide */
.mySlides.active {
    opacity: 1;
    z-index: 1;
}

/* Images */
.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Caption */
.text {
    color: white;
    font-size: 16px;
    position: absolute;
    top: 20px;
    width: 100%;
    text-align: center;
}

/* Number text */
.numbertext {
    color: white;
    font-size: 12px;
    position: absolute;
    top: 10px;
    left: 10px;
}

.slidePrev, .slideNext {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;

    border: none;
    border-radius: 0;
    margin: 0;
    padding: 20px 15px;

    background-color: rgba(0, 0, 0, 0.25);
    color: white;

    font-size: 30px;
    cursor: pointer;

    transition: background-color 0.3s ease;
}

.slidePrev {
    left: 0;
}

.slideNext {
    right: 0;
}

.slidePrev:hover, .slideNext:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.indexSection {
    width: 100%;
    max-width: none;
    background-image: linear-gradient(rgb(240, 237, 232), rgb(236, 231, 227), rgb(228, 220, 217));
}

.indexBox {
    display: flex;
    justify-content: space-between;
}

.indexImg img {
    display: block;
    max-width: 100%;
    height: auto;
}

.indexContact {
    padding: 15px 10px 0px 0px;
}

.indexContact a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.indexContact img {
    width: 30px;
    height: 30px;
    display: block;
}

/*                  ******HINNASTO*****                      */

.card {
  /* Add shadows to create the "card" effect */
    display: flex;
    width: 100%;
    max-width: 1000px; 
    margin: 15px 0px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    transition: 0.3s;
    align-items: center;
}

.cardimage {
    flex: 1;
    display: flex;
}

.cardimage img {
    display: block;
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
}

/* On mouse-over, add a deeper shadow */
.card:hover {
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

/* Add some padding inside the card container */
.cardcontainer {
  flex: 1;
  text-align: left;
}

.cardcontainer p {
    padding: 2.5px;
}

/*                  ******YHT OTTO*****                      */

.contact {
    display: flex;
    align-items: center;
}

.contact img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.yhtotto {
    padding: 10px;
}



/*                  ******PORTFOLIO*****                      */

.portfolioPage {
    padding: 0;
}

.portfolioPage .indexSection {
    margin-top: 15px; 
}

.portfolioGrid {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-left: auto;
    margin-right: auto;
}

/* Style the Image Used to Trigger the Modal */
.portfolioImg {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.portfolioImg:hover {opacity: 0.7;}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 9999; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

/* Modal Content (Image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* Caption of Modal Image*/
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content, #caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media (max-width: 700px){
  .modal-content {
    width: 100%;
  }
}

/*                  ******MEDIA QUERYT*****                      */

/******TABLETTI*****/

@media (max-width: 900px) {
    .portfolioGrid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
        margin: 0 auto;
    }

    .motto {
        font-size: 40px;
    }

    .social {
        top: 10px;
    }

    .social img {
    width: 25px;
    height: 25px;
    }

}

/******PUHELIN*****/

@media (max-width: 600px) {

    /*Hampurilais menu puhelimelle*/
    .header{
        position: relative;
        top: 0;
        z-index: 1000;
    }

    .navigation {
        position: sticky;
    }

    /*Näytä ikoni mobiilissa
    .nav-toggle-label {
        display: block;
        cursor: pointer;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 1001;
    }*/

    .nav-toggle-label {
        display: none;
    }

    .header.header-scrolled .nav-toggle-label {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        height: 65px;

        justify-content: flex-end;
        align-items: center;
        padding-right: 20px;

        background-color: #fcfcfc;
        z-index: 2000;
    }

    .nav-toggle-label img {
        width: 32px;
        height: 32px;
        display: block;
    }


    /* Piilota normaali nav-valikko mobiilissa oletuksena */
    .navigation {
        position: absolute;
        top: 100%;        /* just below header */
        left: 0;
        right: 0;
        background-color: #fcfcfc;
        /*Navi avautuu smoothisti pikkuhiljaa*/
        max-height: 0;    /* alkaa sulkeutuneena */
        overflow: hidden; /* Piilota menu avautuessaan */
        opacity: 0;
        transform: translateY(-10px);
        transition:
            max-height 0.4s ease,
            opacity 0.4s ease,
            transform 0.4s ease;
        z-index: 10;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
    }

    .nav-list li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .nav-list li a {
        display: block;
        padding: 10px 20px;
    }

    /* kun checkbox on true, avaa smootisti */
    .nav-toggle:checked ~ .navigation {
        max-height: 100vh;        /* tarpeeksi iso näyttämään kaikki linkit */
        opacity: 1;
        transform: translateY(0);
    }

    .nav-toggle:checked + .nav-toggle-label .burger {
        display: none;
    }

    .nav-toggle:checked + .nav-toggle-label .closed {
        display: block;
    }

    .nav-toggle-label .closed {
        display: none;
    }

    .header.header-scrolled .nav-toggle-label {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        height: 65px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding-right: 20px;
        background-color: #fcfcfc;
        box-shadow: 0 2px 5px rgba(0,0,0,.15);
        z-index: 2000;
    }

    .header.header-scrolled .navigation {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        z-index: 1999;
    }

/*HAMPURILAIS VALIKON ASETUKSET LOPPUU TÄHÄN*/


    h1, h2, h3 {
        padding: 10px 15px 10px;
        text-align: center;
    }


    .slidePrev, .slideNext {
        font-size: 22px;
        padding: 15px 10px;
    }

    ul .nav-list {
        margin: 0;
    }

    .mobileHide {
        display: none;
    }

    .social img {
        width: 25px;
        height: 25px;
    }

    .motto {
        font-size: 35px;
    }

    .social {
        top: 70px;
    }

    .indexBox {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: 20px;
    }

    .indexContact {
        text-align: center;
        width: 100%;
    }

    .indexContact a {
        justify-content: center;
    }

/******HINNASTO*****/

    .hinnasto {
        margin: 0;
    }

    .card {
        display: flex;
        flex-direction: column;
        margin: 10px 0;
        text-align: center;
        max-width: 600px;
        width: 100%;
        box-shadow: none;

    }

    .cardcontainer {
        text-align: center;
    }

/******PORTFOLIO*****/
    .portfolioGrid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }

/******YHT OTTO*****/

    .contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact li {
        list-style: none;
    }

}
