/* ==================================================
   1. Sivuston tausta ja sisältöpaneeli
   ================================================== */

/* Sivuston taustakuva */
body {
    background-color: #dbe7ed;
    background-image: url("/images/Kuvat/Etusivu/haapasaari-tausta.jpeg");
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* Keskitetty vaalea sisältöalue */
.site-grid {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 0 30px rgba(18, 45, 65, 0.20);
}

/* Sisältöalueen sisämarginaali */
.container-component {
    padding-top: 0.0rem;
    padding-right: 2rem;
    padding-bottom: 1.5rem;
    padding-left: 2.0rem !important;
}

/* Katkaisee kuvan ympärille kiertyvän tekstin */
.clear-float {
    clear: both;
    display: block;
    width: 100%;
}

/* ==================================================
   2. Etusivun Ajankohtaista ja Tulevia tapahtumia
   ================================================== */

/* Kevyet etusivun nostot */
.etusivu-ajankohtaista,
.etusivu-tapahtumat {
    overflow: visible;
    background: rgba(255, 255, 255, 0.55);
    border: 0;
    border-top: 2px solid #2458a6;
    border-radius: 0;
    box-shadow: none;
}

/* Moduulien otsikkoalueet */
.etusivu-ajankohtaista .card-header,
.etusivu-tapahtumat .card-header {
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(36, 88, 166, 0.18);
}

/* Moduulien otsikot */
.etusivu-ajankohtaista .card-header h3,
.etusivu-tapahtumat .card-header h3,
.etusivu-ajankohtaista > h3,
.etusivu-tapahtumat > h3 {
    margin: 0;
    color: #182a3a;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

/* Moduulien sisältöalueet */
.etusivu-ajankohtaista .card-body,
.etusivu-tapahtumat .card-body {
    padding: 0.55rem 0.75rem 0.8rem;
}

/* Ajankohtaista-listan rakenne */
.etusivu-ajankohtaista ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.etusivu-ajankohtaista li {
    margin: 0 !important;
    padding: 0 !important;
}

/* Molempien moduulien linkkiotsikot */
.etusivu-ajankohtaista a,
.etusivu-tapahtumat a {
    font-family: inherit !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.3;
}

/* Ajankohtaista-linkkien välit ja väri */
.etusivu-ajankohtaista a {
    display: block;
    margin: 0 !important;
    padding: 0.35rem 0 !important;
    color: #174ea6;
    text-decoration: none;
}

.etusivu-ajankohtaista a:hover,
.etusivu-ajankohtaista a:focus {
    color: #174175;
    text-decoration: underline;
}


/* ==================================================
   3. Sisältösivujen otsikot
   ================================================== */

/* Sivujen ja yksittäisten artikkelien pääotsikot */
.container-component h1,
.com-content-article__title {
    margin-bottom: 1rem;
    font-size: clamp(1.75rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
}

/* Ajankohtaista-listauksen artikkeliotsikot */
.com-content-category-blog .page-header h2,
.com-content-category-blog .item-title,
.com-content-category-blog h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.4rem, 2vw, 1.7rem) !important;
    font-weight: 700;
    line-height: 1.25;
}

/* Yksittäisten Ajankohtaista-artikkelien pääotsikko */
.com-content-article .page-header h1,
.com-content-article .com-content-article__title {
    color: #174ea6;
}

/* Tapahtumasivun Tulevia tapahtumia -otsikko */
.tapahtumasivu-tulevat .card-header h3,
.tapahtumasivu-tulevat > h3 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
}

/* ==================================================
   4. Ajankohtaista-sivun artikkelien erottelu
   ================================================== */

/* Yksi erotusviiva jokaisen artikkelin jälkeen */
.com-content-category-blog .blog-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(35, 70, 105, 0.25);
}

/* Ajankohtaiset-ohje Arkiston kanssa samalle tasolle */
.ajankohtaiset-ohje {
    position: relative;
    top: -1.5rem;
    margin-bottom: -1.5rem;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Poistetaan myös moduulin mahdollinen sisäinen korttikehys */
.ajankohtaiset-ohje .card {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Otsikkoalue */
.ajankohtaiset-ohje .card-header {
    padding: 0 0 0.45rem;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(36, 88, 166, 0.18) !important;
}

/* Ohjelaatikon otsikko */
.ajankohtaiset-ohje .card-header h3,
.ajankohtaiset-ohje > h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Ohjeteksti */
.ajankohtaiset-ohje .card-body {
    padding: 0.65rem 0 0.75rem;
}

.ajankohtaiset-ohje p:last-child {
    margin-bottom: 0;
}

/* ==================================================
   5. Ajankohtaista-sivun Arkisto
   ================================================== */

/* Paluulinkki Ajankohtaista-listaukseen */
.takaisin-ajankohtaisiin {
    margin: 0 0 0.5rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.takaisin-ajankohtaisiin .card-body {
    padding: 0;
}

.takaisin-ajankohtaisiin p {
    margin: 0;
}

.takaisin-ajankohtaisiin a {
    display: inline-block;
    color: #174ea6;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.takaisin-ajankohtaisiin a:hover,
.takaisin-ajankohtaisiin a:focus {
    color: #174175;
    text-decoration: underline;
}

/* Arkiston pääotsikko */
.ajankohtaista-arkisto .card-header,
.ajankohtaista-arkisto .card-header h3,
.ajankohtaista-arkisto > h3 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Arkiston otsikon ja ensimmäisen vuosiluvun väli */
.ajankohtaista-arkisto .card-body {
    padding-top: 0.25rem;
}

/* Vuosiluvut */
.ajankohtaista-arkisto h4,
.ajankohtaista-arkisto h5 {
    margin-top: 0.85rem;
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
    line-height: 1.2;
}

/* Arkiston luettelo */
.ajankohtaista-arkisto ul {
    margin: 0;
    padding-left: 1.15rem;
    list-style-type: disc;
}

.ajankohtaista-arkisto li {
    margin: 0;
    padding: 0.15rem 0;
    line-height: 1.25;
}

/* Arkiston linkit */
.ajankohtaista-arkisto a {
    display: inline;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
}

/* Luettelopallojen väri */
.ajankohtaista-arkisto li::marker {
    color: #2458a6;
    font-size: 0.75em;
}


/* ==================================================
   6. JCE-editorin valkoinen kirjoitusalue
   ================================================== */

body.mce-content-body,
body#tinymce {
    color: #111111 !important;
    background-color: #ffffff !important;
    background-image: none !important;
    background-attachment: scroll !important;
}

.wf-editor-container iframe,
.mce-edit-area iframe {
    background: #ffffff !important;
}


/* ==================================================
   7. Sivuston HAAPASAARI-otsikko
   ================================================== */

.container-header .navbar-brand a,
.container-header .navbar-brand a:hover,
.container-header .navbar-brand a:focus,
.container-header .site-title,
.container-header .site-title:hover,
.container-header .site-title:focus,
.container-header .site-title a,
.container-header .site-title a:hover,
.container-header .site-title a:focus {
    text-decoration: none;
}


/* ==================================================
   8. Footer-valikko
   ================================================== */

/* Moduuli käyttää koko footerin leveyden */
.container-footer .footer-menu-pieni {
    width: 100% !important;
    max-width: none !important;
}

.footer-menu-pieni .mod-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.footer-menu-pieni .mod-menu > li {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-menu-pieni .mod-menu > li > a {
    display: inline-block !important;
    width: auto !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 0.9rem;
    line-height: 1.4;
    text-decoration: none;
}

.footer-menu-pieni .mod-menu > li > a:hover,
.footer-menu-pieni .mod-menu > li > a:focus {
    color: #ffffff !important;
    text-decoration: underline;
}




@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .site-grid {
        width: 100%;
        padding: 1rem;
    }

    .container-component {
        padding: 1rem;
    }

    .etusivu-ajankohtaista,
    .etusivu-tapahtumat {
        margin-bottom: 1rem;
    }
}

/* Footer pienellä näytöllä */
@media (max-width: 600px) {
    .footer-menu-pieni .mod-menu {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 0.5rem;
        text-align: center;
    }
}


/* ==================================================
   10. Huolto
   ================================================== */

/* Offline- eli huoltosivun yläosa vaaleaksi */
.offline-card .header {
    background: #eef4f7 !important;
    color: #182a3a !important;
}

/* Huoltosivun otsikko tummaksi */
.offline-card .header h1 {
    color: #182a3a !important;
}

/* Huoltosivun tiedoteteksti tummaksi */
.offline-card .header p {
    color: #182a3a !important;
}