/* ==========================================================================
   Main Stylesheet: sivuston layoout-muotoilut pääasiassa
   ========================================================================== */

   /* Reset and base styles */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}
/* sivun taustaväri ja asetuksia */
body {
    background-color: #e9e9e9;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 20px;
}

header {
    padding: 0;
    border-bottom: 1px solid #D60000;
    width: 100%;
    margin: 0;
}

main {
    padding: 0 0 40px 0;
    width: 100%;
    margin: 0;
}
.page .fullwidth-content {
    padding-top: 40px;
    padding-bottom: 40px;
}
.home .fullwidth-content {
    padding-top: 0;
    padding-bottom: 40px;
}

footer {
    background-color: #141b28;
    color: #e9ecf5;
    padding: 0;
    margin: 0;
    width: 100%;
    flex: 0 0 auto;
}

/* Alatunnisten kolme kolumnia */
.site-footer .footer-main {
    background-color: transparent;
    padding: 2em 0;
}

.site-footer .footer-columns {
    display: flex;
    gap: 30px;
    align-items: center;
}

.site-footer .footer-column {
    flex: 1 1 0;
    padding: 0 10px;
}

.site-footer .footer-column .widget {
    margin-bottom: 20px;
}

/* Subfooter */
.site-footer .subfooter {
    background-color: #1b1421;
    border-top: 1px solid #D60000;
}

.site-footer .subfooter .subfooter-inner {
    padding: 12px 0;
}
.footer-columns p, .site-footer .subfooter .subfooter-text {
    color: #e9e9e9;
    font-size: 2rem;
}
.site-footer .subfooter .subfooter-text {
    margin: 0;
    text-align: center;
    font-style: italic;
}

/* Alatunnisteen linkit */
.site-footer a {
    font-size: 1.8rem;
    color: #e9ecf5;
}
/*Alatunnisteen logo*/
.footer-col-1 img {
    width: 400px;
}
.footer-column.footer-col-2 {
    text-align: center;
}
.footer-column.footer-col-3 {
    text-align: right;
}
/*Alatunnisteen menuvalikko*/
ul#menu-alatunniste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    padding: 0 5% 0 0;
    margin: 0;
}

/* Responsive: stack footer columns */
@media (max-width: 768px) {
    .site-footer .footer-columns {
        flex-direction: column;
        gap: 20px;
    }
}

/* ==========================================================================
   Navigaatio eli menuvalikon muotoilut
   ========================================================================== */

header {
    background-color: #0d0316;
    width: 100%;
    margin: 0;
    padding: 15px 0;
}

.site-header {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin: 0;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    width: 30%;
    max-width: 250px;
    margin: 0;
    padding: 0 20px;
}

.site-branding {
    flex: 1;
}

.site-branding h1 {
    margin: 0;
}

.site-branding a {
    color: #113238;
    text-decoration: none;
}

.site-branding a:hover {
    color: #F8972C;
}

.site-description {
    margin: 0;
    color: #113238;
    font-size: 0.9em;
}

/* Päänavigaatio ylätunnisteessa */
.site-navigation {
    display: flex;
    justify-content: left;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 2%;
}

.site-navigation ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.site-navigation li {
    margin: 0;
    padding: 0;
}

.site-navigation a {
    display: block;
    padding: 1rem;
    color: #D60000;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.site-navigation a:hover {
    color: #F8972C;
    text-decoration: none;
}

.site-navigation li.current-menu-item > a {
    color: #D60000;
    border-bottom-color: #F8972C;
}

/* Dropdown submenu styles */
.site-navigation .menu-item-has-children > a::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.site-navigation .menu-item-has-children > a.dropdown-toggle.active::after {
    transform: rotate(180deg);
}

.site-navigation .sub-menu {
    position: absolute;
    z-index: 9999;
    min-width: 120px;
    display: none;
    list-style: none;
    margin: 0;
    padding: 1rem 0.5rem;
    background-color: #F8972C;
    flex-direction: column;
    border-radius: 10px;
}

.site-navigation .sub-menu.active {
    display: flex;
}

.site-navigation .sub-menu a {
    padding: 0.3rem 1.7rem;
    border-bottom: none;
    color: #141b28;
    font-size: 1.6rem;
}

.site-navigation .sub-menu a:hover {
    color: #F8972C;
    border-left-color: #F8972C;
    background-color: #141b28;
}

/* Desktop hover - show submenu on parent hover */
@media (min-width: 769px) {
    .site-navigation .menu-item-has-children:hover > .sub-menu {
        display: flex;
    }

    .site-navigation .menu-item-has-children:hover > a::after {
        transform: rotate(180deg);
    }
}

/* "Hampirilaisvalikon muotoilu" */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 20px;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #D60000;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger span:last-child {
    margin-bottom: 0;
}

.menu-toggle.active .hamburger span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Mobiilivalikon asetukset */
@media (max-width: 768px) {
    .header-wrapper {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 0;
    }
    /*Poistetaan taustaväri, joka periytyy Elementorin asetuksista painikkeisiin */
    button.menu-toggle {
    background: none!important;
    box-shadow: none !important;
}
    .site-branding {
        flex: 1;
    }

    .site-branding h1 {
        font-size: 1.5em;
    }

    .site-description {
        font-size: 0.8em;
    }

    .site-navigation {
        position: fixed;
        top: 0;
        right: -52%;
        width: 50%;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        transition: right 0.3s ease;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 20px;
        overflow-y: auto;
        max-width: none;
        margin: 0;
    }

    .site-navigation.active {
        right: 0;
    }

    .site-navigation ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .site-navigation li {
        width: 100%;
    }

    .site-navigation a {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        border-right: 4px solid transparent;
    }

    .site-navigation a:hover {
        background-color: #f0f0f0;
        border-bottom-color: #eee;
        border-right-color: #F8972C;
    }

    .site-navigation li.current-menu-item > a {
        background-color: #f9f9f9;
        border-right-color: #F8972C;
    }

    /* Mobile dropdown styles */
    .site-navigation .menu-item-has-children > a::after {
        content: '▼';
        font-size: 0.7em;
        margin-left: 8px;
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .site-navigation .menu-item-has-children > a.dropdown-toggle.active::after {
        transform: rotate(180deg);
    }

    .site-navigation .sub-menu {
        display: none;
        list-style: none;
        margin: 0;
        padding: 0;
        background-color: #f0f0f0;
        flex-direction: column;
        width: 100%;
    }

    .site-navigation .sub-menu.active {
        display: flex;
    }

    .site-navigation .sub-menu a {
        padding: 12px 20px 12px 40px;
        border-bottom: 1px solid #eee;
        border-right: none;
        color: #666;
        font-size: 0.95em;
    }

    .site-navigation .sub-menu a:hover {
        background-color: #e9e9e9;
        border-right-color: transparent;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav a {
        display: block;
        padding: 12px;
        border-left: 3px solid transparent;
    }

    nav a:hover {
        border-left-color: #F8972C;
    }
}

/* ==========================================================================
   Sisältöalueen muotoilut
   ========================================================================== */

.post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e9ecf5;
}

.post-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.post-title {
    font-size: 2em;
    margin-bottom: 10px;
}

.post-content {
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1em;
}


/* ==========================================================================
   Responsiivisuus
   ========================================================================== */

@media (max-width: 1024px) {
    .site-navigation ul {
        gap: 10px;
    }

    .site-navigation a {
        padding: 12px 15px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    .container {
        padding: 0 15px;
    }
}

/* 
==========================================================================
Yksittäisen artikkelin muotoilut
========================================================================== 
*/

/* Täysi leveys, ei täytteitä tai marginaaleja */
    #main.site-main, .site-main { padding: 0 !important; margin: 0 !important; }
    .container { max-width: 100% !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }

/* Post layout: content 75%, sidebar 25% */
    .post-layout {
        display: flex;
        gap: 0;
        width: 100%;
    }

    .post-content-wrapper {
        flex: 0 0 75%;
        padding: 40px 20px;
    }

    .post-sidebar-wrapper {
        flex: 0 0 25%;
        padding: 40px 20px;
        background-color: #f9f9f9;
    }

/* Post navigation section */
    .post-navigation-section {
        padding: 40px 20px;
        border-top: 1px solid #eee;
        background-color: #f0f0f0;
    }

/* Mobile: hide sidebar and stack layout */
    @media (max-width: 768px) {
        .post-layout {
            flex-direction: column;
        }

        .post-content-wrapper {
            flex: 1;
            padding: 20px 15px;
        }

        .post-sidebar-wrapper {
            display: none;
        }

        .post-navigation-section {
            padding: 20px 15px;
        }
    }

    /* PAINIKKEET OLETUSMUOTOILUT */
    .elementor-button {
    display: flex!important;
    min-width: 180px;
    border-radius: 2.5rem!important;
    height: 5rem;
    justify-content: center;
    align-items: center;
}

/* 
==========================================================================
Yksittäisen artikkelin muotoilut
========================================================================== 
*/

/* Yksittäisen sivun oletuskuva subheaderin taustalla ja lohkon muotoilut */
.page .subheader {
    display: flex;
    height: 400px;
    align-items: center;
    background-color: #000;
    background-size: cover;
    background-position-y: 50%;
	background-position-x: 25%;
}
.page h1.entry-title {
    display: block;
    width: fit-content;
    padding: 1rem 1.6rem 1rem 3%;
    border-radius: 0 2rem 2rem 0;
    color: #F8972C;
    background-color: #00000040;
}

/* Artikkelien sivun ja yksittäisen artikelin muotoilut */

/* ==========================================================================
   Responsiivinen Row ja Column systeemi yksittäiselle artikkelille, jossa
   käytetään vimpainta oikeassa laidassa sivua.
   ========================================================================== */

.art-row {
    display: flex;
    gap: 2rem;
}

.col-sidebar {
    flex: 1;
    padding-top: 2%;
    padding-left: 1%;
    background-color: #D3D3E3;
    border-left: 3px ridge #F8972C;
}

/*Sivupalkin listojen muotoilut*/
.col-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.col-sidebar li {
    margin: 10px;
}


/* Pääsisältö hieman leveämpi */
.col-main {
    display: flex;
    flex: 4;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 2rem;
    margin-top: 3%;
    margin-left: 2%;
    margin-right: 1%;
}
/*Artikkelikortti artikkelien ja taksonomian sivuilla */
.blog .article-card {
    display: flex;
    width: 28%;
    min-width: 280px;
    border: 1px solid #D60000;
    padding: 0;
    border-radius: 20px;
    background-color: #D3D3E3;
    flex-direction: column;
    justify-content: space-between;
}
.blog .article-card a.read-more {
    display: block;
    width: auto;
    float: right;
    background-color: #D60000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 0 0 20px 20px;
    text-decoration: none;
    font-weight: 500;;
}
.blog .article-card .post-content {
padding: 0 3%;
}

/* Responsiivisuus */
@media (max-width: 1417px) {
    .blog .article-card {
    width: 43%;
}
}
@media (max-width: 948px) {
    .blog .article-card {
    width: 100%;
}

.col-main {
    flex: 3;
}
.col-sidebar {
    flex: 2;
}
}
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
}

/*Artikkelien listauksen muotoilut artikkelien sivulla index.php*/
.blog .article-card header.entry-header {
    background-color: unset;
    padding: 0 3%;
    width: 94%;
}

/*YHTEYDENOTTOLOMAKKEEN MUOTOILUT*/

.yhteydenottolomake {
	display: block;
	width: 100%;
}

/*lomakekentät input*/
.yhteydenottolomake input {
    font-family: "Elms Sans", sans-serif;
    font-size: 2rem;
    height: 3rem;
    width: 90%;
    padding: 20px 10px;
}
.yhteydenottolomake textarea {
    font-family: "Elms Sans", sans-serif;
    font-size: 2rem;
    min-width: 90%;
}
.yhteydenottotapa {
    display: flex;
    flex-direction: row;
}
.wpcf7-list-item {
    display: block;
    width: 100%;
}
input[type="checkbox"] {
    width: 3rem;
    height: 3rem;
}
.wpcf7-submit {
	color: #fff;
    background-color: #009800 !important;
    min-height: 4.3rem;
    font-family: "Elms Sans", sans-serif !important;
    font-size: 2.3rem !important;
    font-weight: 600;
    line-height: 1.5;
    padding: 0 !important;
    box-shadow: 0px 2px 5px 1px rgb(2 45 6 / 0%) !important;
}