/* =========================================
   1. PERUSASETUKSET & MUUTTUJAT
   ========================================= */
:root {
    --primary-color: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FF8C5A;
    --secondary-color: #2D3748;
    --accent-color: #FF9F1C;
    --light-color: #F7FAFC;
    --white: #FFFFFF;
    --gray-light: #EDF2F7;
    --gray: #718096;
    --gray-dark: #2D3748;
    --success: #48BB78;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
    background-color: var(--white);
    padding-top: 70px; /* Tilaa kiinteälle headerille */
}

/* =========================================
   2. HEADER & NAVIGAATIO
   ========================================= */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
    height: 70px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-dark);
}

.logo-icon {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.5rem;
}

.logo-text { color: var(--primary-color); }

/* Navigaatio desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-dark);
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

.btn-primary-nav {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

/* =========================================
   3. YLEISET KOMPONENTIT (Napit, Kortit)
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 3rem 0; }

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--gray-dark);
}

/* Gridit */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Kortit */
.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
}

/* Painikkeet */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.full-width { width: 100%; }

/* =========================================
   4. ETUSIVUN ELEMENTIT (Hero, Features, Hinnasto)
   ========================================= */
.hero {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
    padding: 4rem 20px;
    text-align: center;
    border-bottom: 1px solid var(--gray-light);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-badge {
    background: var(--primary-color);
    color: white;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature { text-align: center; }
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Hinnasto */
.highlight {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.highlight .price { color: white; font-size: 1.2rem; }
.text-center { text-align: center; }

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.pricing-table th, .pricing-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.pricing-table th {
    background: var(--secondary-color);
    color: white;
}

.pricing-table .price {
    color: var(--primary-color);
    font-weight: 700;
}

.note {
    background: #FFF8F0;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
}

/* =========================================
   5. LOMAKKEET & YHTEYSTIEDOT
   ========================================= */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group { margin-bottom: 1rem; }

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e0;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Virhekentän korostus (JS käyttää tätä) */
.input-error {
    border-color: #e53e3e !important;
    background-color: #fff5f5;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.contact-item a { color: var(--gray-dark); text-decoration: none; }

/* =========================================
   6. MODERNI MUUTTOPAS (Siisti Look)
   ========================================= */

/* Taustaväri koko sivulle */
.guide-page {
    background-color: #F7FAFC;
}

/* Hero Guide - Moderni */
.hero-guide {
    position: relative;
    background: url('https://images.unsplash.com/photo-1600585152220-90363fe7e115?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    padding: 6rem 1rem;
    color: white;
    text-align: center;
    margin-bottom: -3rem; /* Nostaa sisältöä heron päälle */
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(45, 55, 72, 0.7));
}

.hero-content-guide {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.category-tag {
    display: inline-block;
    background: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-guide h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-guide .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.6;
}

/* Layout - Korttimainen rakenne */
.layout-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    position: relative;
    z-index: 10;
    padding-bottom: 4rem;
}

.main-article {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-block {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.02);
}

/* Typografia artikkelin sisällä */
.content-block h2 {
    color: var(--gray-dark);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #EDF2F7;
}

.content-block h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
}

.content-block p {
    color: #4A5568;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

/* Sidebar - Sticky & Siisti */
.sidebar-sticky {
    position: sticky;
    top: 90px;
}

.toc-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.toc-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--gray-dark);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #EDF2F7;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    text-decoration: none;
    color: #718096;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.toc-link:hover, .toc-link.active {
    background: #FFF5F0;
    color: var(--primary-color);
    font-weight: 500;
}

.cta-card-sidebar {
    background: linear-gradient(135deg, var(--gray-dark), #1a202c);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.cta-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-card-sidebar h4 { color: white; margin-bottom: 0.5rem; }
.cta-card-sidebar p { color: #A0AEC0; font-size: 0.9rem; margin-bottom: 1.5rem; }

/* Vertailutaulukko (Modern Table) */
.comparison-wrapper {
    overflow-x: auto;
    margin: 2rem -1rem; /* Negatiivinen marginaali mobiilissa */
    padding: 0 1rem;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th {
    text-align: left;
    padding: 1rem;
    color: #718096;
    font-weight: 600;
    border-bottom: 2px solid #EDF2F7;
}

.modern-table th.highlight-th {
    color: var(--primary-color);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
}

.modern-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #EDF2F7;
    color: #4A5568;
}

.modern-table .feature-name { font-weight: 500; color: var(--gray-dark); }

.modern-table .highlight-td {
    background-color: #FFFAF8;
    color: var(--primary-dark);
}

/* Vinkkikortit (Tips Grid) */
.tips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.tip-card {
    background: #F7FAFC;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
}

.tip-icon {
    width: 40px; height: 40px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.tip-card h4 { margin-bottom: 0.5rem; color: var(--gray-dark); }
.tip-card p { font-size: 0.95rem; margin: 0; }

/* Alert Box */
.alert-box {
    display: flex;
    gap: 1rem;
    background: #FFF5F0;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
    color: #2D3748;
}

.alert-box i { color: var(--primary-color); font-size: 1.5rem; margin-top: 2px; }

/* Step Process (Pakkausohjeet) */
.step-process {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.step-num {
    background: var(--primary-color);
    color: white;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step p { margin: 0; font-size: 1rem; }

/* Insurance Box */
.insurance-box {
    background: #F7FAFC;
    padding: 2rem;
    border-radius: 12px;
}

.insurance-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.insurance-row:last-child { margin-bottom: 0; }

.text-success { color: #48BB78; font-size: 1.2rem; margin-top: 4px; }

/* Final CTA Modern */
.final-cta-modern {
    background: var(--secondary-color);
    color: white;
    padding: 3rem;
    text-align: center;
    border-radius: 16px;
    margin-top: 3rem;
    background-image: radial-gradient(circle at top right, #4A5568 0%, #2D3748 100%);
}

.final-cta-modern h3 { color: white; margin-bottom: 1rem; }
.final-cta-modern p { color: #CBD5E0; margin-bottom: 2rem; }

/* Tyylitelty lista */
.styled-list {
    list-style: none;
    margin-top: 1rem;
}
.styled-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}
.styled-list li::before {
    content: "\f00c"; /* FontAwesome Check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--success);
    position: absolute;
    left: 0;
    top: 3px;
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background: var(--gray-dark);
    color: white;
    padding: 3rem 0;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-content h3 { color: var(--primary-color); margin-bottom: 1rem; }
.footer-content a { color: var(--gray-light); text-decoration: none; }
.footer-content ul { list-style: none; }
.footer-bottom { 
    text-align: center; 
    margin-top: 2rem; 
    padding-top: 1rem; 
    border-top: 1px solid #4a5568; 
    font-size: 0.9rem;
}

/* =========================================
   8. MOBIILI & ANIMAATIOT
   ========================================= */

/* Mobiilinappi */
.mobile-call-btn {
    display: none;
}

/* Animaatioluokat (JS) */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Media Queries --- */
@media (max-width: 900px) {
    .layout-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar-wrapper {
        order: 2; /* Sidebar sisällön alle */
    }
    
    .tips-grid { grid-template-columns: 1fr; }
    
    .step {
        border-radius: 12px;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-container { padding: 0 15px; }
    .nav-toggle { display: block; }
    
    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 1rem;
    }
    
    nav.active { display: block; }
    
    nav ul { flex-direction: column; align-items: stretch; }
    nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--gray-light); }
    .btn-primary-nav { text-align: center; margin-top: 0.5rem; }

    .form-row { grid-template-columns: 1fr; }
    
    .hero h1, .hero-guide h1 { font-size: 1.8rem; }
    
    /* Sticky Button Mobiili */
    .mobile-call-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background-color: #25D366;
        color: white;
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 700;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    }
    
    .mobile-call-btn i { margin-right: 10px; font-size: 1.4rem; }
    
    body { padding-bottom: 60px; }
}