/* ==========================================================================
   1. MUUTTUJAT JA YLEISTYYLIT
   ========================================================================== */
:root {
    --bg-dark: #f4f6f9;       /* Raikas vaalea harmaa yleistausta */
    --bg-medium: #ffffff;     /* Puhdas valkoinen headerille ja osioille */
    --card-bg: #ffffff;       /* Valkoiset kortit tuomaan kontrastia sisällölle */
    --text-light: #1a1a1a;    /* Tummanharmaa/musta leipäteksti (korkea luettavuus) */
    --text-gray: #555555;     /* Keskiharmaa teksti lisätiedoille */
    --accent-color: #0056b3;  /* Tyylikäs sähkösininen brändiväri logon sävyyn */
    --border-color: #e0e4e8;  /* Pehmeä vaalea reunaviiva */
}

/* KOKO PAKETIN SUURENNUS 10% */
html {
    font-size: 110%; 
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 120px 20px 60px 20px; /* Mitoitettu siististi uuden vaakalogon mukaan */
    box-sizing: border-box;
}

/* ==========================================================================
   2. HEADER, LOGO JA NAVIGAATIO
   ========================================================================== */
.header {
    background: var(--bg-medium);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); /* Kevyt moderni varjo */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

.header-inner {
    max-width: 1100px;
    margin: auto;
    padding: 8px 25px; /* Kompakti pystysuuntainen tila vaakalogon ansiosta */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
}

/* Vaakamallisen logon optimaalinen mitoitus työpöydällä */
.logo-img {
    height: 65px;     
    width: auto;      
    display: block;
    transition: transform 0.2s ease;
}

.logo-img:hover {
    transform: scale(1.02);
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.nav a:hover, .nav a.active {
    background: rgba(0, 86, 179, 0.08);
    color: var(--accent-color);
}

/* HAMBURGER-VALIKON PAINIKE (Mobiili) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
}

/* ==========================================================================
   3. SISÄLTÖALUEET JA KORTIT
   ========================================================================== */
.title-hero {
    text-align: center;
    margin-bottom: 40px;
}

.title-hero h3 ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
    color: var(--text-gray);
}

.service-list-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.service {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}

.service h3 {
    margin-top: 0;
    color: var(--accent-color);
    font-size: 1.4rem;
    border-bottom: 2px solid var(--bg-dark);
    padding-bottom: 10px;
}

.service-list {
    padding-left: 20px;
    margin: 20px 0;
}

.service-list li {
    margin-bottom: 12px;
}

/* ==========================================================================
   4. LOMAKKEET JA PAINIKKEET
   ========================================================================== */
#contact-form label {
    display: block;
    margin-top: 15px;
    font-weight: 500;
    color: var(--text-light);
}

#contact-form input, 
#contact-form textarea, 
#contact-form select {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#contact-form input:focus, 
#contact-form textarea:focus, 
#contact-form select:focus {
    border-color: var(--accent-color);
    outline: none;
}

#contact-form button {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    width: 100%;
    font-size: 1.1rem;
    margin-top: 25px;
    transition: background 0.2s;
}

#contact-form button:hover {
    background: #004085;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* ==========================================================================
   5. TIETOSUOJA JA INFOLAATIKOT
   ========================================================================== */
.policy-info-box, .info-box {
    background: rgba(0, 86, 179, 0.03);
    padding: 20px;
    border-left: 5px solid var(--accent-color);
    margin-top: 25px;
    border-radius: 0 6px 6px 0;
}

.policy-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.policy-date {
    display: block;
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.policy-list {
    padding-left: 20px;
}

.policy-list li {
    margin-bottom: 15px;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer {
    background: var(--bg-medium);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.footer-info {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.footer-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   7. MOBIILIRESPONSIIVISUUS (Kännykät & Tabletit)
   ========================================================================== */
@media (max-width: 768px) {
    .header-inner {
        padding: 8px 20px;
    }

    /* Logo skaalautuu siististi mobiilin yläpalkkiin */
    .logo-img {
        height: 48px;  
    }

    .menu-toggle {
        display: block; /* Hampurilaisvalikko näkyviin */
    }

    .nav {
        display: none; /* Piilotetaan oletuksena */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-medium);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: 15px 25px;
        box-sizing: border-box;
        gap: 10px;
    }

    /* Näytetään valikko, kun JS aktivoi tämän luokan */
    .header.menu-open .nav {
        display: flex;
    }

    .title-hero h3 ul {
        flex-direction: column;
        gap: 10px;
    }

    .service-list-section {
        grid-template-columns: 1fr; /* Kortit allekkain */
    }
}

@media (max-width: 400px) {
    .logo-img {
        height: 45px; /* Erityisen pienet puhelimet */
    }
}
