/* =====================================================
   GEdIJ – OJS layout correction
   Replaces the previous grid/direct-child rules.
   Desktop: article left, sidebar right.
   Mobile: sidebar below article.
   ===================================================== */

.pkp_site_name .is_img img {
    display: inline-block;
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
}

/* Desktop and laptop */
@media screen and (min-width: 992px) {
    .pkp_structure_content {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 28px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Main content */
    .pkp_structure_content .pkp_structure_main {
        float: none !important;
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Right sidebar */
    .pkp_structure_content .pkp_structure_sidebar {
        float: none !important;
        flex: 0 0 265px !important;
        display: block !important;
        position: relative !important;
        clear: none !important;
        width: 265px !important;
        min-width: 265px !important;
        max-width: 265px !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Sidebar widgets */
.pkp_structure_sidebar .pkp_block {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 22px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.pkp_structure_sidebar .pkp_block .title,
.pkp_structure_sidebar .pkp_block h2,
.pkp_structure_sidebar .pkp_block h3 {
    display: block;
    width: 100%;
    margin: 0 0 12px 0;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: normal;
    box-sizing: border-box;
}

.pkp_structure_sidebar img {
    display: block;
    width: auto;
    max-width: 100% !important;
    height: auto !important;
    max-height: 150px;
    object-fit: contain;
    margin: 10px auto;
}

.pkp_structure_sidebar p,
.pkp_structure_sidebar li {
    line-height: 1.5;
    overflow-wrap: break-word;
    word-break: normal;
}

.pkp_structure_sidebar a {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.pkp_structure_sidebar ul,
.pkp_structure_sidebar ol {
    padding-left: 20px;
}

/* Tablet and mobile */
@media screen and (max-width: 991px) {
    .pkp_structure_content {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 24px !important;
        width: 100% !important;
    }

    .pkp_structure_content .pkp_structure_main {
        order: 1 !important;
        float: none !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pkp_structure_content .pkp_structure_sidebar {
        order: 2 !important;
        float: none !important;
        flex: 0 0 auto !important;
        display: block !important;
        clear: both !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pkp_structure_sidebar .pkp_block {
        margin-bottom: 20px !important;
    }

    .pkp_structure_sidebar img {
        max-height: 130px;
    }
}
