/* Yleiset ja Värimäärittelyt */
:root {
    --bg-color: #1a1a1a;
    --card-color: #2a2a2a;
    --primary-accent: #FFD700; /* Rebel Yellow */
    --primary-darker: #e6c200;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.1rem;
    overflow-x: hidden; /* Estää kaiken sivuttaissuuntaisen vierityksen */
}

h1, h2, h3 { font-family: 'Exo 2', sans-serif; color: var(--heading-color); line-height: 1.2; font-weight: 700; }
h1 { font-size: 4rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 1.5rem; }

section { padding: 100px 40px; }
.container { max-width: 1100px; margin: 0 auto; text-align: center; }
.section-title { text-align: center; margin-bottom: 4rem; }
.subtitle { max-width: 600px; margin: 0 auto 3rem auto; color: #aaa; text-align: center; }
.section-title + .subtitle { margin-top: -3rem; }

/* Yleiset kuva-asetukset ja animaatiot */
img {
    max-width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

img.loaded {
    opacity: 1;
}

/* Navigaatiopalkki */
.navbar { display: flex; justify-content: center; align-items: center; padding: 1.5rem 2.5rem; position: fixed; width: 100%; top: 0; z-index: 100; background: rgba(26, 26, 26, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); }
.nav-menu { display: flex; list-style: none; gap: 3rem; align-items: center; }
.nav-menu li a { text-decoration: none; color: var(--text-color); font-weight: 700; transition: color 0.3s ease; font-size: 1.1rem; }
.nav-menu li a:hover { color: var(--primary-accent); }

/* Kielivalitsin */
.lang-switcher a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: all 0.3s ease;
}
.lang-switcher a:hover {
    background-color: var(--primary-accent);
    color: var(--bg-color);
    border-color: var(--primary-accent);
}
.lang-switcher i {
    font-size: 1rem;
}


/* Hero-osio */
.hero { min-height: 90vh; display: flex; align-items: center; justify-content: center; text-align: center; background-size: cover; background-position: center; position: relative; padding: 80px 20px; background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/paakuva.webp'); }
.hero-content { position: relative; z-index: 2; }
.hero h1 { text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }
.hero p { max-width: 600px; margin: 1.5rem auto; font-size: 1.2rem; }

/* Suosituimmat palvelut -osio */
.popular-services { background-color: var(--card-color); }
.popular-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.popular-card-link {
    text-decoration: none;
    color: inherit;
}
.popular-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border: 1px solid var(--primary-accent);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    height: 100%;
}
.popular-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.popular-card i, .popular-icon { font-size: 3rem; color: var(--primary-accent); margin-bottom: 1.5rem; }
.popular-icon i { margin: 0 0.5rem; }
.popular-card h3 {
    color: var(--heading-color);
    font-size: 1.4rem;
    word-break: break-word;
}

/* Yksittäisen palvelu- ja tietosivun tyylit */
.service-hero { text-align: center; padding: 180px 40px 100px 40px; position: relative; }
#palvelu-hero { background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/kansikuva.webp') no-repeat center center/cover; }
#tietoa-hero { background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/kansikuva2.webp') no-repeat center center/cover; }
.service-hero h1 { margin-bottom: 1rem; position: relative; z-index: 2; }
.service-hero .subtitle { position: relative; z-index: 2; }
.service-content { padding: 80px 40px; background-color: var(--bg-color); }
.content-wrapper { max-width: 800px; margin: 0 auto; }
.content-wrapper h2 { border-bottom: 2px solid var(--primary-accent); padding-bottom: 1rem; margin-bottom: 2rem; text-align: left; }
.content-wrapper h3 { margin-top: 3rem; margin-bottom: 1.5rem; text-align: left; }
.service-list { list-style: none; margin-left: 0; text-align: left; }
.service-list li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; font-size: 1.1rem; }
.service-list i { color: var(--primary-accent); margin-top: 5px; }

.content-wrapper .service-list {
    margin-top: 2rem;
}

/* AIKAJANA-TYYLIT */
.timeline-container { position: relative; max-width: 1000px; margin: 0 auto; }
.timeline-container::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--card-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-item { padding: 10px 40px; position: relative; width: 50%; }
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--heading-color);
    border: 4px solid var(--primary-accent);
    top: 15px;
    border-radius: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item:nth-child(odd)::after { right: -10px; }
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-content { padding: 2rem; background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 8px; position: relative; }
.timeline-content h3 { margin-top: 0; color: var(--primary-accent); }
.timeline-image img { width: 100%; height: auto; margin-top: 1rem; border-radius: 8px; }

/* AIKAJANA-ANIMAATIOT */
.timeline-item {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    opacity: 0;
}

.timeline-item:nth-child(odd) {
    transform: translateX(-30px);
}

.timeline-item:nth-child(even) {
    transform: translateX(30px);
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Palvelut-osio */
.services { background-color: var(--bg-color); }
.service-grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 3rem; max-width: 1200px; margin: 0 auto; text-align: left; }
.service-column h3 { border-bottom: 2px solid var(--primary-accent); padding-bottom: 1rem; margin-bottom: 2rem; color: var(--heading-color); }

/* Miksi-osio */
.why-us {
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url('images/taustakuva2.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.feature-list { display: flex; justify-content: space-around; gap: 2rem; margin-top: 4rem; flex-wrap: wrap; }
.feature-item { flex-basis: 300px; text-align: center; }
.feature-item i { font-size: 3rem; color: var(--primary-accent); margin-bottom: 1.5rem; }
.feature-item h3 { margin-bottom: 1rem; }

/* Yhteystiedot-osio */
.contact { background-color: var(--card-color); }
.contact-info { margin-top: 2rem; }
.phone-number { font-family: 'Exo 2', sans-serif; font-size: 3rem; font-weight: 700; color: var(--primary-accent); text-decoration: none; }
.whatsapp-button { display: inline-flex; align-items: center; gap: 1rem; padding: 12px 25px; background-color: #25D366; color: #fff; border-radius: 50px; text-decoration: none; font-weight: 700; margin-top: 1.5rem; transition: background-color 0.3s ease; }
.whatsapp-button:hover { background-color: #1EBE57; }
.whatsapp-button i { font-size: 1.5rem; }

/* Yhteydenottolomake */
.contact-form { max-width: 600px; margin: 0 auto; text-align: left; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-color); }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid var(--border-color); background-color: var(--bg-color); color: var(--text-color); border-radius: 8px; font-family: 'Roboto', sans-serif; font-size: 1.1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-accent); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2); }
.cta-button { display: inline-block; width: 100%; padding: 15px 30px; background-color: var(--primary-accent); color: #1a1a1a; text-decoration: none; border-radius: 5px; font-weight: 700; transition: all 0.3s ease; font-family: 'Roboto', sans-serif; margin-top: 1rem; border: none; cursor: pointer; font-size: 1.1rem; }
.cta-button:hover { background-color: var(--primary-darker); }

/* Fiksumpi outline-painike */
.cta-button-outline {
    display: inline-block;
    padding: 15px 30px;
    background-color: transparent;
    color: var(--primary-accent);
    border: 2px solid var(--primary-accent);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    font-size: 1.1rem;
}

.cta-button-outline:hover {
    background-color: var(--primary-accent);
    color: #1a1a1a;
}

/* Footer */
.footer { padding: 2rem; text-align: center; background-color: var(--bg-color); border-top: 1px solid var(--border-color); }
.footer p { margin-bottom: 0.5rem; color: #888; font-size: 0.9rem; }
.footer-link {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
    text-decoration: underline;
}
.footer-link:hover { color: var(--primary-accent); }

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 70px;
    width: auto;
    margin: 0 auto;
}

/* Sosiaalisen median linkit */
.footer-socials {
    margin: 0.5rem 0;
}

.footer-socials a {
    color: var(--text-color);
    font-size: 2rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: var(--primary-accent);
}

.footer-meta-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* --- Mobiilinavigaatio --- */
.mobile-nav {
    display: none;
}

/* Responsiivisuus */
@media (max-width: 900px) {
    .timeline-container::before { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0%; }
    .timeline-item:nth-child(odd)::after, .timeline-item:nth-child(even)::after { left: 15px; }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }
    
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    section { padding: 80px 20px; }
    
    .navbar {
        display: none;
    }
    
    .phone-number { font-size: 2.2rem; }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .popular-card {
        min-height: 0;
        padding: 2rem 1.5rem;
    }

    .popular-card i, .popular-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .popular-card h3 {
        font-size: 1.1rem;
    }

    main {
        padding-bottom: 0;
    }

    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: var(--card-color);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-color);
        flex-grow: 1;
        height: 100%;
        transition: color 0.3s ease;
    }

    .mobile-nav a i {
        font-size: 1.6rem;
        margin-bottom: 5px;
    }

    .mobile-nav a span {
        font-size: 0.8rem;
        font-family: 'Roboto', sans-serif;
    }
    
    .mobile-nav a:hover {
        color: var(--primary-accent);
    }
}

/* --- Pehmeät animaatiot sivun lataukseen --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1,
.service-hero h1 {
    animation: fadeInUp 1s ease-out forwards;
}

.hero p,
.service-hero .subtitle {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

/* Hinnasto-osio */
.price-list-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    flex-wrap: wrap;
}
.price-item {
    background-color: var(--card-color);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 280px;
}

.price-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-accent);
}

.price-item h4 {
    color: var(--heading-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.price-item .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-accent);
    font-family: 'Exo 2', sans-serif;
}
.price-note {
    max-width: 700px;
    margin: 3rem auto 0 auto;
    font-style: italic;
    color: #aaa;
    line-height: 1.7;
}

/* Pienet ikonien säädöt */
.fa-road, .fa-cogs {
    font-size: 3rem;
    color: var(--primary-accent);
    margin-bottom: 1.5rem;
}