/* --- 1. Väripaletti & Reset --- */
:root {
    /* Maanläheiset sävyt */
    --color-wheat-light: #fdfbf7;   /* Vaalea kerma */
    --color-wheat-mid: #e8e4dc;     /* Hiekka/beige */
    --color-earth-brown: #4a4036;   /* Multa/ruskea */
    --color-earth-dark: #2e2620;    /* Tumma turve */
    
    /* Aksentti */
    --color-red: #d63031;           /* Kirkas punainen */
    --color-red-hover: #b71c1c;     /* Tummempi punainen */
    
    /* Fontit & Mitat */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --radius: 4px;
    --shadow: 0 4px 15px rgba(46, 38, 32, 0.08);
    --header-height: 80px;
}

html {
    scroll-behavior: smooth; /* Mahdollistaa pehmeän vierityksen */
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-wheat-light);
    color: var(--color-earth-brown);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-earth-dark);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Tämä estää otsikon jäännin headerin alle kun klikkaa linkkiä */
section[id] {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

/* --- 2. Header --- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-wheat-mid);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}


.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.logo-link {

    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-earth-dark);
    line-height: 1;
}

/* --- Mobiili: Pinotaan allekkain ja keskitetään --- */
@media (max-width: 768px) {
    .logo-link {
        flex-direction: column; /* Logo ylös, teksti alas */
        gap: 6px;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
}

/* --- Erittäin pieni näyttö: Pienennetään vielä lisää --- */
@media (max-width: 480px) {
    .logo-img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
}

.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-earth-brown);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
}

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

/* Punainen alleviivaus aktiiviselle linkille */
.main-nav a.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-red);
    position: absolute;
    bottom: -4px;
    left: 0;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-earth-dark);
    cursor: pointer;
}

/* --- 3. Hero --- */
.hero-section {
    /* Lämmin taustaliuku */
    background: linear-gradient(to bottom, #fdfbf7 0%, #e8dfd2 100%);
    padding: 6rem 0 5rem 0;
    text-align: center;
    border-bottom: 1px solid #dcd6ce;
}

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

.hero-title .highlight {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-red);
    display: block;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-earth-brown);
    opacity: 0.85;
}

/* --- 4. Cards (Icon images) --- */
.cards-section {
    padding: 2rem 0 5rem 0;
}

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

.feature-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-wheat-mid);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--color-red);
}

.icon-circle {
    width: 190px;
    height: 190px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--color-wheat-mid);
    transition: border-color 0.3s;
    flex-shrink: 0; /* Estää kutistumisen */
}

.feature-card:hover .icon-circle {
    border-color: var(--color-red);
}

.card-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feature-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    color: var(--color-earth-dark);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--color-earth-brown);
}

/* --- 5. Content Section (Tutkimus) --- */
.content-section {
    padding: 5rem 0;
}

.bg-white {
    background: #fff;
    border-top: 1px solid var(--color-wheat-mid);
    border-bottom: 1px solid var(--color-wheat-mid);
}

.text-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.text-block h2 {
    margin-bottom: 1.5rem;
    color: var(--color-red); /* Punainen otsikko */
}

.text-block p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.mt-large {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px dashed var(--color-wheat-mid); /* Erotinviiva osioiden väliin */
}

/* --- 6. About Section (Tiimi) --- */
.about-section {
    padding: 5rem 0;
    background: var(--color-wheat-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-content h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-content .lead {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-earth-dark);
}

.team-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-row {
    background: #fff;
    padding: 1.5rem;
    border-left: 4px solid var(--color-earth-brown);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.member-row:hover {
    transform: translateX(5px); /* Pieni efekti hoverissa */
}

.member-info strong {
    display: block;
    font-size: 1.1rem;
    color: var(--color-earth-dark);
}

.member-info small {
    color: var(--color-red);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* --- LATEST NEWS SECTION --- */
.latest-news-card {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 2rem;
    border: 1px solid #eee;
}

.latest-news-card .news-thumb {
    flex: 0 0 200px; /* Kiinteä leveys kuvalle desktopilla */
    height: 150px;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f4f4f4;
}

.latest-news-card .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.latest-news-card .news-thumb:hover img {
    transform: scale(1.05);
}

.latest-news-card .news-content {
    flex: 1;
}

.latest-news-card small {
    color: var(--color-rust);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
}

.latest-news-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
}

.latest-news-card h3 a {
    color: var(--color-earth-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.latest-news-card h3 a:hover {
    color: var(--color-rust);
}

.latest-news-card p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.latest-news-card .read-more {
    font-weight: 600;
    color: var(--color-rust);
    text-decoration: none;
}

.latest-news-card .read-more:hover {
    text-decoration: underline;
}

/* Mobiilityylit uutiskortille */
@media (max-width: 768px) {
    .latest-news-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .latest-news-card .news-thumb {
        width: 100%;
        height: 200px;
        flex: none;
    }
    
    .latest-news-card h3 {
        font-size: 1.3rem;
    }
}


/* --- 8. Contact --- */
.contact-section {
    background: var(--color-red);
    color: var(--color-wheat-light);
    padding: 5rem 0;
}

.contact-section h2 {
    color: var(--color-wheat-light);
    text-align: center;
    margin-bottom: 3rem;
}

.contact-section a {
    color: var(--color-wheat-light);
    border-bottom: 1px dotted rgba(255,255,255,0.5);
}

.contact-section a:hover {
    color: var(--color-wheat-mid);
    border-bottom-color: var(--color-red);
}

.contact-flex {
    display: flex;
    justify-content: center;
    gap: 4rem;
    text-align: left;
}

.contact-block h3 {
    color: var(--color-wheat-light);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.contact-block ul li {
    margin-bottom: 0.5rem;
}

/* --- 9. Footer --- */
.site-footer {
    background: var(--color-earth-dark); 
    color: #dcd6ce;       /* Hiekan sävyinen teksti */
    text-align: center;
    padding: 2rem 0;
    font-size: 0.85rem;
}

/* Kaikki alasivut */

.page-header {
    background-color: var(--color-wheat-mid);
    padding: 2rem 0;
    text-align: center;
}
/* Johdanto.html alasivu */



        .breadcrumb {
            font-size: 0.9rem;
            color: var(--color-earth-brown);
            margin-bottom: 0.5rem;
        }
        .breadcrumb a {
            font-weight: 600;
            color: var(--color-earth-dark);
        }
        .breadcrumb a:hover {
            color: var(--color-red);
        }
        
        .article-content {
            background: #fff;
            padding: 3rem;
            margin-top: -30px; /* Nostetaan hieman headerin päälle */
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 4rem;
        }

        .article-content h2 {
            color: var(--color-earth-dark);
            margin-top: 2rem;
            margin-bottom: 1rem;
            font-size: 1.5rem;
        }
        
        .article-content p {
            margin-bottom: 1.2rem;
            font-size: 1.05rem;
            color: #333;
        }

        .highlight-box {
            background-color: var(--color-wheat-light);
            border-left: 4px solid var(--color-red);
            padding: 1.5rem;
            margin: 2rem 0;
            font-style: italic;
        }

        .reference-list {
            margin-top: 3rem;
            padding-top: 1rem;
            border-top: 1px solid var(--color-wheat-mid);
            font-size: 0.85rem;
            color: #666;
        }

        /* Kuvan asettelu tekstin sekaan */
        .content-image-right {
            float: right;
            width: 50%;
            margin-left: 2rem;
            margin-bottom: 1rem;
            border-radius: var(--radius);
        }

        @media (max-width: 768px) {
            .article-content {
                padding: 1.5rem;
                margin-top: 0;
            }
            .content-image-right {
                float: none;
                width: 100%;
                margin: 1.5rem 0;
            }
        }
    




/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .header-wrapper {
        padding: 0 1rem;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 1.5rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        text-align: center;
        border-bottom: 1px solid var(--color-wheat-mid);
    }
    
    .main-nav.open {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-flex {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    /* Pienennetään kuvia mobiilissa hieman */
    .icon-circle {
        width: 150px;
        height: 150px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .section-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }
}



/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px; /* Pyöristetyt kulmat */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    cursor: pointer;
}

/* Ensisijainen nappi (Rust/Punainen) */
.btn-primary {
    background-color: var(--color-rust);
    color: #fff;
}

.btn-primary:hover {
    background-color: #b82526; /* Hieman tummempi sävy hoverissa */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(214, 48, 49, 0.3);
}

/* Toissijainen nappi (Läpinäkyvä/Reunustettu) */
.btn-secondary {
    background-color: transparent;
    color: var(--color-earth-dark);
    border-color: var(--color-earth-dark);
}

.btn-secondary:hover {
    background-color: var(--color-earth-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* Mobiilissa napit allekkain */
@media (max-width: 768px) {
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* --- Designer Credit (Footer) --- */
.designer-credit {
    margin-top: 1.5rem;
    padding-top: 1rem;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* Väli tekstin ja logon välissä */
    font-size: 0.85rem;
    color: rgba(220, 214, 206, 0.7); /* Hieman himmeämpi teksti kuin pääteksti */
}

.designer-logo {
    height: 50px; 
    width: auto;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.designer-credit a {
    display: flex;
    align-items: center;
    border-bottom: none !important; /* Poistaa alleviivauksen linkistä */
}

/* Hover-efekti: Logo kirkastuu ja suurenee hieman */
.designer-credit a:hover .designer-logo {
    opacity: 1;
    transform: scale(1.05);
}

/* Mobiilissa voidaan pitää samana, tai halutessa pinota päällekkäin */
@media (max-width: 480px) {
    .designer-credit {
        flex-direction: column;
        gap: 8px;
    }
}

/* blogisivun tyylit */



        
        .article-container {
            background: #fff;
            max-width: 800px;
            margin: -40px auto 4rem auto; /* Nostetaan headerin päälle */
            padding: 3rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            position: relative; 
        }

        .article-meta-info {
            text-align: center;
            color: var(--color-earth-brown);
            font-size: 0.9rem;
            margin-bottom: 2rem;
            border-bottom: 1px solid var(--color-wheat-mid);
            padding-bottom: 1rem;
        }

        .article-body {
            line-height: 1.8;
            font-size: 1.05rem;
            color: #333;
        }
        
        .article-body p {
            margin-bottom: 1.5rem;
        }

        .article-body h2, .article-body h3 {
            margin-top: 2.5rem;
            margin-bottom: 1rem;
            color: var(--color-earth-dark);
        }

        .content-image-wrapper {
            margin: 2.5rem 0;
            text-align: center;
        }
        
        .content-image-wrapper img {
            max-width: 100%;
            height: auto;
            border-radius: 4px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .image-caption {
            font-size: 0.9rem;
            color: #666;
            font-style: italic;
            margin-top: 0.5rem;
            display: block;
        }

        .reference-section {
            margin-top: 4rem;
            padding-top: 2rem;
            border-top: 1px solid #eee;
            font-size: 0.85rem;
            color: #666;
            background: #fdfdfd;
            padding: 1.5rem;
            border-radius: 4px;
        }

        .reference-section h4 {
            margin-bottom: 1rem;
            color: #444;
            text-transform: uppercase;
            font-size: 0.8rem;
            letter-spacing: 1px;
        }

        .reference-section ol {
            padding-left: 1.2rem;
        }
        
        .reference-section li {
            margin-bottom: 0.5rem;
        }

        @media (max-width: 768px) {
            .article-container {
                padding: 1.5rem;
                margin-top: 0;
            }
        }
    