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

html, body {
    overflow-x: hidden;
}

html {
    background-color: #F3EFE8;
    font-size: 25px;
/* Uusia, testaile */
    /* max-width: 80%; */
    margin: 0 auto;
    line-height: 2;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0 auto;
    /* margin-top: 10px; */
    /* overflow: auto; */
}

main {
    position: relative;
}

footer {
    /* Removed position: absolute and flex: 1 1 15% */
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center; /* Vertically centers the content within the footer */
    margin: 0 auto; /* Horizontally centers the footer within the body */
    /* padding-top: 8px; */
    text-align: center;
    border-top: 1px #230202 solid;
    font-size: 25px;
    /* font-family: 'Alegreya Sans SC', sans-serif; */
    font-family: 'Source Sans 3', sans-serif;

    z-index: 10;
    padding-bottom: 20px;
    color: #230202;
    line-height: 1.5;
    font-weight: bold;
    /* font-style: italic; */
}


p {
    margin: 10px 0;
}


h1 {
    font-size: 34px;
    margin: 20px;
    padding: 0 30px;
    /* font-family: 'Alegreya Sans SC', sans-serif; */
    font-family: 'Source Sans 3', sans-serif;
    text-align: center;
    /* background-color: #bda18c; */
}

h2 {
    font-size: 30px;
    /* font-family: 'Alegreya Sans SC', sans-serif; */
    font-family: 'Source Sans 3', sans-serif;
    text-align: center;
    /* padding-bottom: 10px; */
    font-style: italic;
}

#about-me h2 {
    padding-top: 10px;
}

h3 {
    font-size: 26px;
    /* margin: 10px; */
    font-family: 'Source Sans 3', sans-serif;
    /* font-family: 'Alegreya Sans SC', sans-serif; */    
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px #230202 solid;
    padding: 10px 20px;
}

#logo {
    font-size: 30px;
    /* font-weight: bold; */
    color: #230202;
    /* font-family: 'Alegreya Sans SC', sans-serif; */
    font-family: 'Source Sans 3', sans-serif;
    margin-left: 30px;
    font-style: italic;
    font-weight: normal;
}

.navigation-items {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    justify-content: flex-end;
}

.navigation-item {
    margin-right: 20px;
    /* dropdow */
    position: relative;
}

a {
    text-decoration: none;
    color: #230202;
    margin-left: 0px;
    color: #230202;
    /* font-weight: bold; */
    font-size: 24px;
    transition: color 0.2s ease;
}

a:hover {
    color: white;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #F2F2F2;
    box-shadow: 0 8px 16px rgba(0,0,0, 0.2);
    z-index: 1;
    transition: max-height 0.5s ease-in-out;
    overflow: hidden;
    max-height: 0;
}

.dropdown-content a {
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    color: #230202;
}

.dropdown-content a:hover {
    background-color: #bb7862;
    color: white;
}

.navigation-item:hover .dropdown-content {
    max-height: 300px;
}

.contact-items {
    display: inline-flex;
    margin: 0 auto;
    flex-direction: row;
    list-style-type: none;
}

li {
    margin: 8px;    
}


.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px;
    justify-content: space-around;
    overflow: visible;
}

.booking, .instagram {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.instagram  {
    opacity: 0.8;
}

.booking {
    font-weight: bold;
}

.booking .contact {
    white-space: nowrap;
    word-break: keep-all;
}

#tagline, #services, #sensotagline {
    /* margin: 0 30px;  */
    /* padding: 10px 30px; */
    /* border-radius: 100px; */
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    text-align: center;
    /* background-color: #bda18c; */
    /* background-color: #eae0ca; */
    z-index: 10;
     padding: 40px 20px;
     opacity: 0.8;
}

#tagline h1 {
    font-size: 34px;
    /* margin: 0 0 20px 0;  */
    padding: 0;
    font-family: 'Source Sans 3', sans-serif;
    text-align: center;
    font-weight: normal; 
}

#tagline h2 {
    font-size: 24px; 
    font-family: 'Source Sans 3', sans-serif;
    text-align: center;
    font-style: italic;
    font-weight: normal;
    margin: 0; 
}

#about-me {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.8;
     /* padding-bottom: 20px; */
    /* height: 40vh;
    justify-content: space-between; */
}

#header {
    /* background: url("Emmi\ etusivuL.jpg") no-repeat center; */
    background-color: #A38470;        
    /* opacity: 0.6; */
    color: white;
    text-align: center;    
}

/* #about-me img {
    max-width: 100%; */
    /* padding-bottom: 10px; */
/* } */

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    /* max-height: 100vh; */
    padding: 20px auto;
    margin: 20px
}

.image-container img {    
    /* width: 100vh; */
    height: 100vh;
    /* border-radius: 120px; */
}


#insta {
    display: block;
    width: 100%;
    height: auto;
    text-align: center;
}

#insta img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

#madeby {
    display: none;
    color: #230202;
    position: absolute;
    bottom: 0;
}

.text {
    /* background-color: #eae0ca; */
    background-color: #bb7862;
    font-family: 'Source Sans 3', sans-serif;
    padding: 20px;
    /* margin: 20px 0px; */
}

.text p {
    /* font-weight: bold; */
    /* margin-left: 50px; */
    margin-right: 20px;
}

.text ul {
    list-style-type: disc;
    margin: 20px 0;
    padding-left: 50px;
}

.text ul li {
    margin-bottom: 8px;   
}

.text a {
    font-size: 20px;
    font-style: italic;
    font-weight: bold;
}

.contact-form {
    background-color: white;
    max-width: 100%;
    margin: 50px 50px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    margin-top: 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    height: 200px;
}

button[type="submit"] {
    background-color: #F2F2F2;
    color: #230202;
    font-size: large;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: #e0e0e0;
}

/* #blog-header {
    background-color: #eae0ca;
    padding: 40px 20px;
    text-align: center;
}

#blog-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
} */

#blog-posts {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-post-preview {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.blog-post-preview h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: normal
}

.post-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.post-excerpt {
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    padding: 5px 10px;
    /* background-color: #eae0ca; */
    color: #230202;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.blog-post {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 40px 0;
}

.blog-post h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: normal;
}

.post-content {
    line-height: 1.6;
    /* background-color: #eae0ca; */
    background-color: #bb7862;
    padding: 20px;
}

.post-content h2 {
    font-size: 28px;
    margin: 30px -20px 15px;  /* Negative left and right margin to extend full-width */
    padding: 10px 20px;
    font-weight: normal;
    background-color: #F2F2F2;
}

.post-content p {
    margin-bottom: 20px;
}

.etuYlaNappula {
    background-color: #F3EFE8;
    color: #230202;
    font-size: large;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 40px;
}

.etuYlaNappula:hover {
    background-color: #E1D7CB;
}

.etuValiNappula {
    display: inline-block;
    margin: 20px 20px 40px;
    background-color: #F3EFE8;
    color: #230202;
    font-size: large;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.etuValiNappula:hover {
    background-color: #E1D7CB;
}

#second {
    position: relative;
    background: url("sensomotorinen\ valmennusL.jpg") no-repeat center;
    background-size: cover;
    min-height: 400px;
    color: #230202;
}

#second::before {
    content: "";
    position: absolute;
    top: 0; right:0; bottom: 0; left: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

#second > * {
    position: relative;
    z-index: 2;
}

.ekaX {
    padding: 10px;
    background-color: #A38470;
}

.ekaX li{
    margin-left: 40px;
}


#eka h2, p {
    /* align to left and take up 60 of the parent container */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 60%;
    padding-left: 20px;
    margin-left: 0;
    /* margin-top: 20px; */
    text-align: left;
}

#eka p {
    margin-left: 0;
}

#eka h3 {
    padding-left: 20px;
}

#kolmas {
    /* align with flex to left and take up 60% */
    display: flex;
    align-items: stretch;
    gap: 100px;
    padding: 0;
    background-color: #EDE0D4;
    /* background-color: #CCBAA9; */
}

.left-col {
    flex: 0 0 40%;
    max-width: 40%;
}

.left-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* height: auto; */
    display: block;
}

.right-col {
    flex: 1;
    padding: 20px 0;
}

.right-col h3 {
    margin: 20px 20px;
    text-align: left;
}

.right-col h2 {
    margin: 0 20px;
    text-align: left;
}

#call_action {
    /* everything to center */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#call_action p {
    display: block;
    margin: 20px 0;
}

#serv {
    /* background-color: #eae0ca; */
    background-color: #A38470;
    padding: 20px 0;
    margin: 0;
    text-align: center;
}

#serv h2 {
    margin-bottom: 20px;
}

.service-columns {
    display:flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* justify-content: center;
    margin: 0 auto; */
}

.service-item img {
    display: block;
    max-width: 200px;
    max-height: auto;
    margin-bottom: 10px;
}


#viides {
    position: relative;
    background: url("Emmi\ manuaalinen\ terapia\ 1L.jpg") no-repeat center;
    background-size: cover;
    min-height: 400px;
    color: #230202;
}
    
#viides::before {
    content: "";
    position: absolute;
    top: 0; right:0; bottom: 0; left: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

#viides > * {
    position: relative;
    z-index: 2;
}

footer a:hover, nav a:hover {
    color: #bb7862;
}

a img {
    max-width: 100%;
    height: auto;
    border-radius: 100px;
}

#kaynnit{
    background-color: #bb7862;
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
}

#left #right
{
    width: 50%;
}


#keskari
{
    background-color: #bb7862;   
}

#keskari h3, #keskari p {
    /* Take 70% of container and center*/
    width: 60%;
    margin: 20px auto;
    text-align: center;

}

#keskariX
{
    background-color: #A38470;   
}

#keskarix h3, #keskariX p {
    /* Take 70% of container and center*/
    width: 70%;
    margin: 0 auto;
    text-align: center;
}

#etenee h1 {
    text-align: center;
    margin: 20px auto;
    width: 100%;
}

#etenee {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#etenee .h3-container {
    display: flex;
    justify-content: space-between;
    /* width: 60%; */
}

#etenee h3 {
    flex: 1;
    text-align: center;
    margin: 0 10px;
}

#neljas {
    display: flex;
    align-items: stretch;
    gap: 100px;
    padding: 0;
    background-color: #EDE0D4;    
    min-height: 60vh;
    padding-bottom: 0px;
}

#neljas .right-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Make responsive to smaller screensizes */
@media (max-width: 1000px) {
    html {
        max-width: 100%;
    }

    body {
        max-width: 100%; 
        margin-top: 5px; 
        padding: 0;
    }

    nav {
        display:flex;
        flex-direction: row;
        align-items: flex-start;
        padding: 10px 0px;
    }

    #logo {
        margin-bottom: 10px;
    }

    .navigation-items {
        display: flex;
        flex-direction: row; 
        list-style-type: none;
        padding: 0;
        margin: 0;
        width: 100%
    }

    .navigation-item {
        margin: 10px 20px;
    }

    a {
        text-decoration: none;
        color: #230202;
        font-size: 20px;
        transition: color 0.2 ease;
    }
    
    .text, p {
        margin-bottom: 0;
    }
    
    h1 {
        font-size: 30px; 
        margin-top: 10px;
    }

    h2 {
        font-size: 28px;
        margin: 10px;
    }

    h3 {
        font-size: 24px;
        margin: 10px;
    }

    p, footer {
        font-size: 20px; 
    }


    footer {
        padding: 20px 0px;
    }

    .booking, .instagram, .contact-info {
        align-items: center;
    }

    #tagline, #services {
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        z-index: 10;
    }

    #serv a {
        margin: 10px;
    }

    .etuValiNappula {
        text-align: center;
    }


}

/* Styles for smaller screens */
@media (max-width: 820px) {
    html {
        max-width: 100%;
    }
    
    body {
        max-width: 100vh; 
        margin-top: 5px; 
        padding: 0;
    }

    #header {        
        /* background: url("EmmiH3.jpg") no-repeat center;
        background-size: cover;
        min-height: 600px;
        padding: 2rem; */
        background: none;
        background-color: #A38470;        
        /* opacity: 0.6; */
        color: white;
        text-align: center;
    }
    

    #eka h2, p {
        width: 100%;
    }

    #tagline {
        padding: 20px;
    }

    #tagline h1 {
        font-size: 30px;
        line-height: 1.5;
    }
    
    #tagline h2 {
        font-size: 20px;
    }
    
    .blog-post-preview h2 {
        font-size: 24px;
    }

    li {
        font-size: 20px;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0px;
    }

    .navigation-items {
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .navigation-item {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    .navigation-item a {
        font-size: 18px;
    }

    /* #about-me img {
        max-width: 100%;
    } */

    #serv {
        max-width: 100%;
        flex-direction: column;
        /* margin-top: 20px; */
        padding: 20px 20px;
    }

    #serv a {
        margin: 10px 20px;
    }

    footer {
        flex-direction: column;
    }
        
    #kolmas {
        flex-direction: column;
        gap: 20px;
    }

    #neljas {
        flex-direction: column;
        gap: 20px;
    }

    .left-col {
        flex: none;
        max-width: 100%;
    }

    .left-col img {
        height: auto;
    }

    .right-col {
        flex: none;
        width: 100%;
    }

    .right-col h3, .right-col h2 {
        text-align: left;
        margin: 10px 20px;
    }

    .etuValiNappula {
        text-align: center;
    }

    #kaynnit, .h3-container {
        flex-direction: column;
        gap: 20px;
    }

    #etenee img {
        /* center of the container */
        margin: 0 auto;
    }

    #keskari {
        padding: 20px;
        width: auto;
        text-align: left !important ;
    }

    #keskari h3, #keskari p, #keskari h1 {
        width: 100%;
        /* margin: 20px 0; */
        text-align: left;
        padding: 0 20px;
    }

    #keskari h1 {
        margin: 20px 0;
    }


}