/* tyylitiedosto koko sivustolle */

/* fonttien tuonti */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Work+Sans:wght@400;600&family=Lato:wght@400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
  

/* perusbodytyyli */
body {
    display: flex;
    justify-content: center;
    flex-direction: column;
    font-family: 'Lato', sans-serif; /* perusfontti, jos ei määritelty */
    margin: 0;
    padding: 0;
    background-color: #F0EDE5; /* vaalea beige */
    color: #4B4B3E; /* tumma oliivi */
}

p {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #5A5A44; /* tummin oliivi */
    letter-spacing: 1px;
}

h2 {
    font-size: 2.2rem;
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    color: #5A5A44;
}

h2 i {
    color: #C6A57B;
    margin-right: 10px;
}

h3 {
    font-family: 'Work Sans', sans-serif;
    font-size: 1.75rem;
    color: #6C6C58; /* vaalea oliivi */
}

hr {
    border: none;
    border-top: 3px double #8FB0A9; /* sinivihreä */
    width: 70%;
    margin: 20px auto;
}

/*  logon tyylit  */

.logo {
    overflow: hidden;
    text-align: center;
    padding: 4% 0;
    height: 20vw; /* viewport width, 20 pros */
}

.logo img {
    height: 100%;
    width: auto;
    transition: transform 0.9s ease; /* pikkunen skaalaus */
}

.logo img:hover {
    transform: scale(1.05); /* pikkunen skaalaus */
}


main {
    min-width: 350px; /* käyttää mielummin skaalausta pienille näytöille */
}


/* footeri */
footer {
    background-color: #4B4B3E; /* tumma oliivi */
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #F0EDE5; /* vaalea beige */
    text-align: center;
    padding: 2rem;
}


/*  #####################################   */

header {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    background-color: #6C7753; /* vaalea oliivi */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 12vh; /* navin korkeus pros */
    position: sticky; /*jää yläreunaan */
    top: 0;
    z-index: 1000;
}

/* navin linkit linkkipalkkiin siististi */
.nav-links {
    display: flex;
    justify-content: space-around;
}

/* navin linkkien muotoilu */
nav a, .mobile-menu {
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2.4px;
    color: #F0EDE5; /* vaalea beige */
    font-size: 1.4vw;
    font-weight: 700; /* boldaus */
    margin: 0 15px; /* sivuille tilaa */
    text-decoration: none;
    padding: 10px 15px;
    position: relative;
    z-index: 1;
    background-image: none; 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

nav a.hover-effect:hover {
    color: #DFD3B5; /* tummempi beige */
    background-image: url('./merkki.svg'); /* hoverimage */
    opacity: 0.5;
}
    
/* hampparin muotoilu */
.menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #F0EDE5; /* vaalea beige */
    margin-left: 1rem;
}

/* navi pienelle näytölle */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background-color: #6C7753; /* vaalea oliivi */
    overflow: hidden;
    /* transition: width 0.3s; */
    flex-direction: column;
    align-items: center;
    padding-top: 2rem; /* verrattuna bodyyn */
    z-index: 1001;
}

.mobile-menu a {
    display: block;
    margin: 1rem 0; /* verrattuna bodyyn */
    color: #F0EDE5; /* vaalea beige */
    text-decoration: none;
    font-size: 1.2rem;
}


/* ### ETUSIVU ### */


/* koko sivun levyiset sectionit */
section {
    padding: 5% 10%;
    border-bottom: 1px solid #ddd; /* lähes valkoinen */
}

/* joka toinen eri värinen */
section:nth-child(odd) {
    background-color: #F9F5EC; /* lämmin valkoinen */
}

section#etusivu {
    background-image: url('./euka.JPG');
    background-size: cover;
    background-position: center;
    padding: 8% 10%;
    position: relative;
    color: #ffffff;
}

section#etusivu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(41, 47, 41, 0.751); 
    z-index: 1;
}

section#etusivu * {
    position: relative;
    z-index: 2;
}

/* nappi */
button {
    background-color: #8FB0A9; /* sinivihreä */
    color: #F0EDE5; /* vaalea beige */
    font-family: 'Lato', sans-serif; /* perusfontti, jos ei määritelty */
    padding: 10px 20px;
    border: none;
    border-radius: 5px; /* pyöristetty */
    cursor: pointer;
    transition: background-color 0.9s ease;
}

button:hover {
    background-color: #C6A57B; /* lämmin beige */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* ### ESITTELY ### */

#esittely {
    display: flex;
    flex-direction: column;
}

.intro-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    justify-items: center;
    width: 100%;
    height: auto;
}

.intro-image {
    width: 50%; /* vain puolikas sivullinen */
    height: auto;
    flex: 1;
    z-index: 1;
}

.profile-picture {
    width: 95%;
    padding: auto;
    object-fit: cover; /* kuva leikkautuu */
    border-radius: 10px; /* pyöristetty kulma */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.intro-text {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: auto;
    flex: 1.5;
    background-color: #fff; /* valkoinen */
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 0;
    font-family: 'Work Sans', sans-serif;
}

.intro-text h3 {
    font-family: 'Montserrat', sans-serif;
    color: #5A5A44; /* vaalea ruskea */
}


/* ### PALVELUT ### */
.services-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.card {
    background-color: #ffffff; /* valkoinen */
    border-radius: 10px; /* pyöristetty kulma */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    flex: 1;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card p {
    font-size: 1rem;
}

.card img {
    width: 100%;
    height: 200px; /* kovakoodattu */
    object-fit: cover; /* leikkaa taustakuvan laatikkoonsa */
    border-radius: 10px; /* pyöristetty reuna */
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ### HINNASTO ### */
#hinnasto {
    display: flex;
    flex-direction: column;
}

#hinnasto div {
    display: flex;
    flex-direction: column;
}

table thead {
    text-align: left;
}

.contact-table, .price-table {
    width: 70vw; 
    border-collapse: collapse;
    background-color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}


.price-table th,
.price-table td, 
.contact-table th,
.contact-table td {
    padding: 15px 20px;
    text-align: left;
    font-family: 'Work Sans', sans-serif;
    font-size: 1.1rem;
    color: #4B4B3E;
    text-wrap: wrap;
}

.contact-table th, .price-table th {
    background-color: #6C7753; 
    color: #F0EDE5;
    font-size: 1.2rem;
    font-weight: 600;
}

.contact-table td, .price-table td {
    border-bottom: 1px solid #ddd;
}

.contact-table tr:nth-child(even), .price-table tr:nth-child(even) {
    background-color: #F9F5EC; 
}

.contact-table tr:last-child td, .price-table tr:last-child tr:last-child td {
    border-bottom: none;
}


/*

### YHTEYDENOTTOLOMAKE ###

*/
    .contact-container {
        width: 70%;
        margin: 50px auto;
        padding: 20px;
        background-color: #ffffff;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        word-wrap: normal;
    }

    .table-container {
        padding: 20px;
        text-align: center;
    }

    /* laatikon otsikko */
    .contact-container h2 {
        font-family: 'Montserrat', sans-serif;
        font-size: 2.3rem;
        font-weight: 600;
        color: #5A5A44;
        text-align: center;
        margin-bottom: 20px;
    }

    .contact-container label {
        font-size: 1.1rem;
        margin-bottom: 10px;
        display: block;
    }

    .contact-container input,
    .contact-container textarea {
        width: 95%;
        padding: 10px;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 10px;
        font-size: 1rem;
    }

    .contact-container input:focus,
    .contact-container textarea:focus {
        outline: none;
        border-color: #C6A57B; /* lämmin beige */
    }

    /* valintakysymys */
    .radio-group {
        display: flex;
        justify-content: space-around;
        justify-items: center;
        flex-wrap: wrap;
    }

    .radio-group label {
        font-size: 1.1em;

    }

    /* lähetä-nappi */
    .contact-container button {
        background-color: #8FB0A9; /* sinivihreä */
        color: #ffffff;
        padding: 12px 20px;
        border: none;
        border-radius: 5px;
        cursor: pointer; /* kertoo että on klikattava */
        font-size: 1.2rem;
        font-family: 'Montserrat', sans-serif;
        width: 100%;
        transition: background-color 0.9s ease;
    }

    .contact-container button:hover {
        background-color: #C6A57B; /* lämmin beige */
    }

    /*
    ### TIETOSUOJAILMOITUS ###
    */

    .privacy-notice {
        font-size: 0.9rem;
        color: #4B4B3E; /* tumma oliivi */
        margin-top: 10px;
        margin-left: 50px;
        margin-right: 50px;
        line-height: 1.4;
        font-family: 'Lato', sans-serif;
    }
    
    .privacy-notice a {
        color: #8FB0A9; /* sinivihreä */
        text-decoration: underline;
    }
    
    .privacy-notice a:hover {
        color: #C6A57B; /* lämmin beige */
    }

    /*
    ### kiittijuttu ###
    */

    .thank-you-container {
        text-align: center;
        margin-top: 50px;
    }
    
    .thank-you-container h2 {
        color: #5A5A44; 
        font-size: 2rem;
    }
    
    .thank-you-container p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .thank-you-container a {
        color: #8FB0A9; /* sinivihreä */
        text-decoration: underline;
        font-weight: bold;
    }


/*
### VERTAILUTAULUKKO ###
*/
    
/* taulukon muotoilu */
.comparison-table {
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

/* otsikkojen ja sisällön muotoilua */
.comparison-table th, .comparison-table td {
    padding: 10px 20px;
    text-align: center;
    font-family: 'Work Sans', sans-serif;
    border-bottom: 1px solid #ddd; /* lähes valkoinen */
    text-wrap: wrap;
}

/* otsikoiden värit */
.comparison-table th {
    background-color: #6C7753; /* vaalea oliivi */
    color: #F0EDE5; /* vaalea beige */
    /* font-size: 1.2em; */
}

/* sisältöjen, eli (?) värit */
.comparison-table td {
    color: #4B4B3E; /* tumma oliivi */
}

.comparison-table .tooltip {
font-size: 0.9em;
color: #6C7753; /* vaalea oliivi */
}

.comparison-table .checkmark {
    color: #4CAF50; /* vihreä */
}

.comparison-table .not-included {
    color: #A0A0A0; /* harmaa */
    text-align: center;
    font-size: 1em;
}

.tooltip {
    position: relative;
    cursor: pointer; /* osoittaa, että on lisätoimintoja */
    color: #4B4B3E; /* tumma oliivi */
    font-weight: bold;
    text-decoration: none;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    background-color: #4B4B3E; /* tumma oliivi */
    color: #fff; /* valkoinen */
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    bottom: 100%; /* (?)-merkin yläpuolelle */
    left: 50%; /* alkaa kirjoittamaan oikealta vasemmalle, ettei mene reunojen yli */
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* (?)-lisätieto pysyy taulukon sisässä */
.tooltip[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* oikean puolen säännöt */
.tooltip[data-tooltip]:hover::after {
    left: auto;
    right: 0; /* oikea reuna tekstistä jää taulukon oikeaan laitan, ettei mene yli */
    transform: translateX(0);
}

/* esimerkkilista */
.example-list {
        list-style-type: disc;
        list-style-position: inside;
        padding-left: 2rem;
        margin-top: 1rem;
    }

.example-list li {
    padding: 2px 0;
    font-size: 1.0rem;
    line-height: 1.6;
    color: #4B4B3E; /* tumma oliivi */
}
.example-list li::marker {
    color: #8FB0A9; /* sinivihreä */
}

/*
### SKAALAUS ###
*/

@media screen and (max-width: 850px) {
    #esittely {
        flex-direction: column;
        justify-content: center;
    }

    .intro-container {
        flex-direction: column;
        align-items: center;
    }

    section {
        padding: 5%
    }

    nav .nav-links {
        display: none; /* navilinkit piiloon */
    }

    .menu-icon {
        display: block; /* menuikoni käyttöön */
    }
    
    .services-container {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }

    .contact-table th, .contact-table td, .price-table th, .price-table td {
        font-size: 1em;
        padding: 2vw 1vw;
        text-align: left;
        word-wrap: break-word;
    }
    .contact-container h2 {
         font-size: 1.3rem;
    }

    .comparison-table th, .comparison-table td {
        font-size: 0.9rem;
        padding: 2vw 1vw;
    }

}


@media screen and (max-width: 600px) {
    .tooltip::after {
        white-space: wrap;
    }
    
h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}
    
}

/* slidemenun avaus */
.mobile-menu.open {
    display: block;
    width: 250px; /* leveys */
    text-align: center;
}