* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
   overflow-x: hidden;
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   background: linear-gradient(160deg, #eef4fa 0%, #f4f7fa 60%, #ddeaf5 100%);
}

.head {
    width: 100%;
    min-height: 90vh; 
    padding: 60px 20px; 
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
   background-image: 
        linear-gradient(to bottom, rgba(0,0,0,0.65) 100%, rgba(0,0,0,0.65) 60%, rgba(0,0,0,0.95) 90%),
        url("../images/ulko.jpeg");
     background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;

    /* Tämä pakottaa kuvan keskipisteen täsmälleen keskelle */
background-position: 50% 50%; 

/* Jos haluat laskea kuvaa: */
background-position: center 100%;
}


.head h1 {
    color: #fff;
    font-size: clamp(28px, 6vw, 52px); 
    margin: 0 0 14px 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    letter-spacing: 1px;
    font-weight: 800;
    line-height: 1.2;
    max-width: 900px; 
}

.head h3 {
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin-bottom: 30px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    max-width: 80%; 
}

.button1 {
    background-color: transparent;
    border: 2px solid #fff;
    padding: 12px 36px;
    border-radius: 30px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.button1:hover {
    background-color: #fff;
    color: #2a6ea6;
    transform: translateY(-2px);
}

.service {
    padding: 80px 20px 100px;
    position: relative;
    overflow: hidden;
}

.service::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.services-header {
    text-align: center;
    margin-bottom: 56px;
}

.services-eyebrow {
    display: inline-block;
    background: linear-gradient(135deg, #5694bd, #2a6ea6);
    color: #fff;
    border-radius: 30px;
    padding: 7px 22px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
     margin-top: 40px;
}

.services-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #1a3c5a;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.services-subtitle {
    color: #5a7a90;
    font-size: 1.05rem;
    margin: 0 auto;
    max-width: 480px;
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    max-width: 1060px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(30, 70, 120, 0.08);
    border: 1px solid rgba(86,148,189,0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 48px rgba(30, 70, 120, 0.16);
}

.feature-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.feature-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(20, 55, 90, 0.55) 100%);
}

.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.feature-card:hover .feature-img img {
    transform: scale(1.07);
}

.card-body {
   padding: 24px 24px 28px; 
   display: flex; 
   flex-direction: column;
   flex: 1;
}

.feature-card h3 {
    color: #1a3c5a;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-card h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, #5694bd, #2a6ea6);
    border-radius: 4px;
    flex-shrink: 0;
}

.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #3a5a70;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 7px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.service-list li:hover {
    background: #f0f6fb;
}

.service-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #5694bd, #2a6ea6);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.card-cta {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    color: #2a6ea6;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: gap 0.2s;
    margin-top: auto;
    
}

.card-cta:hover {
    gap: 10px;
}

.card-cta::after {
    content: '→';
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.features .feature-card:nth-child(1) { transition-delay: 0s; }
.features .feature-card:nth-child(2) { transition-delay: 0.15s; }
.features .feature-card:nth-child(3) { transition-delay: 0.30s; }

.why-us {
    padding: 90px 20px 100px;
    position: relative;
    overflow: hidden;
}

.why-us::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, #f4f7fa, #fff);
    pointer-events: none;
}

.why-us-inner {
    max-width: 1060px;
    margin: 0 auto;
}

.why-us-text {
    text-align: center;
    margin-bottom: 56px;
}

.why-eyebrow {
    display: inline-block;
    background: linear-gradient(135deg, #5694bd, #2a6ea6);
    color: #fff;
    border-radius: 30px;
    padding: 7px 22px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.why-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #1a3c5a;
    font-weight: 700;
    margin: 0 0 14px;
    letter-spacing: -0.4px;
}

.why-desc {
    color: #5a7a90;
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.trust-card {
    border: 1px solid rgba(86,148,189,0.15);
    border-radius: 18px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
        background: #fff;
}

.trust-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5694bd, #2a6ea6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.trust-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(30,70,120,0.12);
}

.trust-card:hover::after {
    transform: scaleX(1);
}

.trust-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}

.trust-card h4 {
    color: #1a3c5a;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.trust-card p {
    color: #5a7a90;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.trust-grid .trust-card:nth-child(1) { transition-delay: 0s; }
.trust-grid .trust-card:nth-child(2) { transition-delay: 0.1s; }
.trust-grid .trust-card:nth-child(3) { transition-delay: 0.2s; }
.trust-grid .trust-card:nth-child(4) { transition-delay: 0.3s; }


@media (max-width: 700px) {
    .trust-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .trust-card {
        padding: 22px 16px;
    }

    .cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .trust-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 600px) {
    .head {
        min-height: 400px;
        padding: 80px 30px;
        height: auto; 
    }


    .head {
        min-height: 60vh; /* Pienempi korkeus pienillä näytöillä */
        padding: 40px 20px;
    }
    
    .head h3 {
        letter-spacing: 1px; /* Vähennetään välistystä, jotta teksti mahtuu paremmin */
    }


    .button1 {
        padding: 10px 28px;
        font-size: 0.9rem;
    }

    .service {
        padding: 10px 12px 40px;
    }

    .services {
        font-size: 1rem;
        margin-top: 30px;
    }

   .features, .trust-grid {
        grid-template-columns: 1fr !important;
        width: 100%;
        gap: 16px;
   }

    .feature-card {
        border-radius: 12px;
    }

    .feature-img {
        height: 180px;
    }
}