/* Yleinen tyyli */
body {
    font-family: 'Inter', sans-serif;
    font-size: 16px; /* Default size, adjusts with screen */
    margin: 0;
    padding: 0;
    background-color: white;
    color: black;
}

html {
    scroll-behavior: smooth;
}

.sticky {
    position: sticky;
    top: 0;
    justify-content: space-between;
    z-index: 100;  /* Varmistetaan, että sticky header on muiden päälle */
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 50px;
    background-color: #00719c;
    gap: 20px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hero-content {
    flex: 1;
    max-width: 50%;
    color: white;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.hero-image {
    height: auto;
    border-radius: 10px;
    order: 2;
    max-width: 45%;
}

.cta-btn {
    background-color: #009bd6;
    color: white;
    padding: 10px 20px;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 5px;
}

.cta-btn:hover {
    background-color: #00415a;
}

/* Palvelut Section */
.services {
    padding: 50px 0;
    background-color: #f4f4f4;
    text-align: center;
}

.services h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.service-list {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.service-item {
    background-color: #00719c;
    padding: 10px;
    width: 31%;
    color: white;
    border-radius: 8px;
    text-align: center;
}

.service-item h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.service-item p {
    font-size: 1.2rem;
    max-width: 90%; /* Rajoittaa tekstin leveyttä, voit muokata arvoa */
    margin: 0 auto; /* Keskittää p-elementin vaakasuunnassa */
    text-align: center; /* Keskittää tekstin */
    padding-bottom: 10px;
}

.service-image {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.service-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #009bd6;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.service-button:hover {
    background-color: #00415a;
}

/* About Section */
.about {
    background-color: #ffffff; /* Vaalea tausta */
    padding: 50px 0;
}

.kontti {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Asetellaan kuva ja teksti vierekkäin */
.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Etäisyys kuvan ja tekstin välillä */
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Lisää tyylit kuvalle */
.about-image {
    width: 100%;
    max-width: 400px; /* Kuvan maksimi leveys */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Kuvan varjo */
}

/* Tekstin tyylit */
.text-content {
    flex: 1; /* Teksti vie kaiken jäljelle jäävän tilan */
}

/* Extra Section */
.extra {
    background-color: #00719c; /* Sininen tausta */
    display: flex;
    justify-content: center; /* Tekstin keskittäminen vaakasuunnassa */
    align-items: center; /* Tekstin keskittäminen pystysuunnassa */
    overflow: hidden; /* Piilottaa animaation ulkopuolelle menevän osan */
}

.extra p {
    padding: 5px;
    color: white; /* Valkoinen teksti */
    text-align: center; /* Keskitetty teksti */
    margin: 0;
    white-space: nowrap; /* Estää tekstin rivittymisen */
}


/* Uutisosio */
.news {
    padding: 50px 10px 50px 10px;
    background-color: #00415a; /* Tummansininen tausta */
    text-align: center;
    position: relative;
}

.news h2 {
    color: #ffffff; /* Valkoinen teksti */
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.news p {
    color: #ffffff; /* Valkoinen teksti */
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Uutisten kortit */
.news-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px; /* Lisää tilaa uutiskorteille */
}

.news-item {
    width: calc(33.33% - 25px); /* Kolme korttia per rivi */
    background-color: #ffffff; /* Valkoinen tausta uutiskorteille */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.news-item:hover {
    transform: scale(1.05); /* Pieni zoom-efekti hoverilla */
}

/* Uutiskortin kuva */
.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Uutiskortin teksti */
.news-item-text {
    padding: 20px;
}

.news-item-text h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: #00415a; /* Tummansininen teksti otsikolle */
}

.news-item-text p {
    font-size: 1rem;
    color: #555; /* Tummanharmaa teksti kuvaukselle */
    line-height: 1.4;
}

.news-item a {
    color: #00415a; /* Tummansininen linkki */
    text-decoration: none;
}

.news-item a:hover {
    color: #007bff; /* Vaaleansininen hover-efekti */
    text-decoration: underline;
}

/* Uutisten navigointi nuolit */
.news-navigation {
    display: none; /* Piilotetaan nuolien oletus */
}

.reviews {
    padding: 50px 0;
    background-color: #00719c;
    text-align: center;
}

.reviews h2 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.reviews p {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Contact Section */
.contact {
    padding: 10px;
    background-color: #009bd6; /* Tummansininen tausta */
    text-align: center;
}

.contact h2 {
    color: #ffffff; /* Valkoinen teksti */
    font-size: 2.5rem;
}

.contact p {
    color: #ffffff; /* Valkoinen teksti */
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.highlight-text {
    color: #009bd6; /* Vaihda haluamaksesi väriksi */
    font-weight: bold; /* Halutessasi tee tekstistä lihavoitu */
}

.contact .container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
} 

/* Lomakkeen kenttien erottelu */
.form-group {
    padding-right: 20px;
    margin-bottom: 15px;
    text-align: left;
}

/* Kenttäotsikon tyyli */
.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    font-size: 20px;
}

/* Lomakkeen syötekentät */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #000000;
    border-radius: 5px;
}

/* Tekstialueen ominaisuudet */
.form-group textarea {
    resize: vertical;
}

/* Lähetä painikkeen tyyli */
.submit-btn {
    background-color: #00719c; /* Tummansininen painike */
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-size: 20px;
}

.submit-btn:hover {
    background-color: #005c76; /* Tummentaa väriä hover-tilassa */
}

/* Kentät vierekkäin (etunimi ja sukunimi) */
.form-group-inline {
    display: flex;
    justify-content: space-between;
}

/* Kenttien leveys */
.form-group-inline .form-group {
    flex: 1;
}

/* Varmistaa, että sisäiset inputit eivät veny yli */
.form-group-inline .form-group input {
    width: 100%;
}


/* Kentät vierekkäin (etunimi ja sukunimi) */
.form-group-inline {
    display: flex;
    justify-content: space-between;
}

/* Tekstilaatikko, joka ilmestyy ennen lomaketta */
.text-box {
    background-color: #00415a;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    max-width: 450px;
    margin: auto;
}

/* Tietosuojaselosteen hyväksymisen tyyli */
.checkbox-container {
    text-align: left;
    margin-bottom: 20px;
    font-size: 1rem;
}

.checkbox-container input {
    margin-right: 10px;
}

@media (max-width: 1335px) {
    .services {
        padding: 50px 0;
        background-color: #f4f4f4;
        text-align: center;
    }
    
    .services h2 {
        font-size: 2.5rem;
        margin-bottom: 30px;
    }
    
    .service-list {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        padding-bottom: 50px;
    }
    
    .service-item {
        background-color: #00719c;
        padding: 10px;
        width: 30%;
        color: white;
        border-radius: 8px;
        text-align: center;
    }
    
    .service-item h3 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .service-item p {
        font-size: 1.2rem;
    }
    
    .service-image {
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }
}

/* Mobile responsiveness */
@media (max-width: 850px) {
    .hero {
        display: block; /* Poistetaan flex, koska sitä ei käytetä */
        text-align: center; /* Keskitetään sisältö */
        padding-top: 20px;
    }

    .hero .container {
        width: 100%;
        display: block; /* Poistetaan flex, jotta elementit pinoutuvat päällekkäin */
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 20px; /* Väli tekstin ja kuvan välissä */
    }

    .cta-btn {
        font-size: 1rem;
        padding: 8px 16px;
    }
    
    .hero-image {
        max-width: 100%;
        margin-top: 20px; /* Väli kuvan yläpuolella */
    }
    
    .hero-image img {
        max-width: 100%; /* Skaalaa kuva responsiivisesti */
        height: auto; /* Säilytä kuvasuhde */
        border-radius: 10px;
    }

    .services {
        padding: 25px 0px 0px 0px;
        background-color: #f4f4f4;
        text-align: center;
    }
    
    .services h2 {
        font-size: 2.5rem;
        margin-bottom: 30px;
    }
    
    .service-list {
        flex-direction: column;
        justify-content: space-between;
        flex-wrap: wrap;
        padding-top: 10px;
        gap: 20px;
    }
    
    .service-item {
        background-color: #00719c;
        padding: 0px;
        width: 100%;
        height: 100%;
        color: white;
        border-radius: 8px;
        text-align: center;
    }
    
    .service-item h3 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .service-item p {
        font-size: 1.2rem;
    }
    
    .service-image {
        width: 80%;
        height: auto;
        margin-bottom: 20px;
    }

    .service-button {
        display: block;
        align-items: center; /* Keskittää kaiken sisällön */
        max-width: 50px;
        margin: auto;
        margin-bottom: 20px;
    }

    .about {
        padding: 5px;
    }

    .about-content {
        flex-direction: column-reverse; /* Kuvan ja tekstin järjestyksen vaihtaminen, kuva menee alle */
        text-align: center; /* Keskittää tekstin */
    }

    .about h2 {
        font-size: 2rem;
    }

    .about p {
        font-size: 1.1rem;
    }

    .about-image {
        max-width: 90%; /* Skaalaa kuvaa pienemmillä näytöillä */
        margin-bottom: 20px; /* Lisää tilaa kuvan ja tekstin väliin */
    }

    .news {
        padding: 20px 0px 50px 0px;
    }

    .news-item {
        width: 70%; /* Yksi uutinen per rivi */
    }

    /* Piilotetaan kaikki uutiset paitsi keskimmäinen */
    .news-item:nth-child(1) {
        display: none; /* Piilotetaan uutinen 1 */
    }
    .news-item:nth-child(3) {
        display: none; /* Piilotetaan uutinen 3 */
    }

    .news-item:nth-child(2) {
        display: block; /* Näytetään uutinen 2 */
    }

    .news-navigation {
        position: absolute;
        top: 60%; /* Adjust this if you want to move the arrows up or down */
        left: 0;
        right: 0;
        transform: translateY(-50%);
        display: flex;
        justify-content: space-between; /* Place arrows on both sides */
        padding: 0px 5px 0px 5px;
    }

    .prev, .next {
        font-size: 2rem;
        background-color: rgba(255, 255, 255, 0.7);
        padding: 15px;
        border-radius: 50%;
        cursor: pointer;
    }

    .prev:hover, .next:hover {
        background-color: rgba(0, 113, 156, 0.8);
    }
}

@media (max-width: 650px) {
    .extra p {
        transform: translateX(0);
        animation: slideInOut 10s linear infinite; /* Animaatio, joka liikuttaa tekstiä */
    }
}

@keyframes slideInOut {
    0% {
        transform: translateX(60%); /* Teksti alkaa vasemmalta ulkopuolelta */
    }
    100% {
        transform: translateX(-70%); /* Teksti menee oikealle ulkopuolelle */
    }
}

@media (max-width: 500px) {
    .hero {
        padding: 10px 10px 40px 10px;
    }
    
    .hero-image {
        
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    .news-item {
        width: 65%; /* Yksi uutinen per rivi */
    }
}