/* PERUSASETUKSET */
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    overflow-y: scroll;
}
body { 
    font-family: 'Fira Sans', sans-serif; 
    background-color: #f9f9f9; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
    color: #333;
}
a { text-decoration: none; color: inherit; }
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
}
.content-wrapper { 
    flex: 1; 
    padding-top: 30px; 
    padding-bottom: 50px; 
}

/* YLÄPALKKI (NAVBAR) */
.navbar { 
    background-color: #005b96; 
    height: 75px; 
    position: sticky; 
    top: 0; 
    z-index: 1000;
}
.nav-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    padding: 0 20px;
}
.nav-logo { max-height: 55px; width: auto; display: block; }

.nav-center-right { 
    display: flex; 
    align-items: center; 
    margin-left: auto; 
    width: 60%;
    justify-content: flex-end;
}
.nav-links { display: flex; gap: 40px; margin-right: 40px; }
.nav-links a { color: white; font-weight: 400; font-size: 1rem; }

#search-input { 
    padding: 8px 15px; 
    border-radius: 20px; 
    border: none; 
    outline: none;
    width: 180px;
}

/* ETUSIVU LAYOUT */
#front-page-layout { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 30px; 
    margin-top: 20px;
}
.img-container-32 { width: 100%; aspect-ratio: 3/2; overflow: hidden; margin-bottom: 20px; }
.img-container-32 img { width: 100%; height: 100%; object-fit: cover; }
.main-article-card h2 { margin-bottom: 10px; line-height: 1.2; cursor: pointer; }
.main-article-card p { line-height: 1.5; }

.side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.side-card { cursor: pointer; }
.side-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; margin-bottom: 10px; }
.side-card h4 { font-size: 0.85rem; line-height: 1.3; font-weight: 700; }

/* ARKISTO & HAKU */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; margin-top: 20px; }
.news-card { cursor: pointer; }
.news-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; margin-bottom: 10px; }

/* AVATTU UUTINEN */
.article-page-layout { 
    display: grid; 
    grid-template-columns: 3fr 1fr; 
    gap: 40px; 
    margin-top: 20px;
}
.article-hero-img { 
    width: 100%; 
    max-width: 100%; 
    height: auto; 
    margin-bottom: 25px; 
    display: block; 
}
.full-article h1 { font-size: 1.8rem; margin-bottom: 20px; line-height: 1.3; }
.article-ingress { font-weight: 700; margin-bottom: 1.5rem; line-height: 1.6; }
.article-body p { margin-bottom: 1.5rem; line-height: 1.6; }
.article-author { font-style: italic; font-weight: bold; font-size: 0.85rem; margin-top: 20px; }

.share-box { margin-top: 1.5rem; }
.share-box p { font-size: 0.9rem; font-weight: bold; margin-bottom: 8px; }
.share-links { display: flex; gap: 15px; align-items: center; }
.share-links img { width: 45px; height: 45px; cursor: pointer; } 
.divider { border-bottom: 1px solid #ddd; width: 60px; margin-top: 15px; }

/* SIVUPALKKI (LATEST SIDEBAR) */
.sidebar-main-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.sidebar-item { padding: 12px 0; border-bottom: 1px solid #eee; cursor: pointer; }
.sidebar-item p { font-size: 0.9rem; font-weight: 400; line-height: 1.4; }

/* ALAPALKKI (FOOTER) */
.footer { background-color: #1a1a1a; color: #ccc; padding: 40px 0; margin-top: auto; }
.footer-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-logo { height: 50px; }
.footer-copyright { font-size: 0.9rem; }
.footer-contact { text-align: right; line-height: 1.4; }
.email-text { font-size: 0.8rem; }

/* MOBIILINÄKYMÄ (ALLE 768px) */
.hamburger { display: none; background: none; border: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 25px; height: 3px; background-color: white; }

@media (max-width: 768px) {
    .hamburger { display: flex; position: absolute; left: 20px; }
    
    .nav-center-right { 
        display: none; 
        position: absolute; 
        top: 75px; 
        left: 0; 
        width: 100%; 
        background: #005b96; 
        flex-direction: column; 
        padding: 30px 0;
        align-items: center; /* Keskittää linkit ja haun */
        justify-content: center;
        text-align: center;
    }
    
    .nav-center-right.active { display: flex; }
    
    .nav-links { 
        flex-direction: column; 
        gap: 25px; 
        margin-right: 0; 
        margin-bottom: 30px; 
        width: 100%;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        width: 100%;
    }

    .search-container {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0 20px;
    }

    #search-input { 
        width: 80%; 
        max-width: 300px;
    }
    
    .nav-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 15px; 
        height: 45px; 
    }
    
    /* Layoutit allekkain mobiilissa */
    #front-page-layout, .article-page-layout { grid-template-columns: 1fr; }
    .side-grid { grid-template-columns: 1fr 1fr; }
    
    .footer-container { flex-direction: column; gap: 25px; text-align: center; }
    .footer-contact { text-align: center; }
}
