/* =========================================================
   AlMaarifah / Health Sciences - Custom Journal CSS
   Version 2
   ========================================================= */

/* =========================================================
   1. COMPACT HEADER
   ========================================================= */

/* Reduce vertical space in the main header */
.main-header {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    min-height: 0 !important;
}

/* Header inner container */
.main-header .container {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Reduce logo size slightly */
.main-header .navbar-logo img,
.main-header .navbar-logo {
    max-height: 120px !important;
    height: auto !important;
}

/* Keep navigation compact */
.main-header .navbar {
    margin-bottom: 0 !important;
}

/* =========================================================
   2. HEALTH SCIENCES SIDEBAR / BLOCKS
   ========================================================= */

/* Give the sidebar blocks more usable width */
.site-footer-sidebar {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

/* Each sidebar block */
.site-footer-sidebar .pkp_block {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* The language block */
.site-footer-sidebar .pkp_block_language {
    width: 25% !important;
    max-width: 25% !important;
    flex: 0 0 25% !important;
}

/* =========================================================
   3. ARABIC / CUSTOM TEXT BLOCK
   ========================================================= */

/* Never clip Arabic text */
.site-footer-sidebar .pkp_block,
.site-footer-sidebar .pkp_block_content,
.site-footer-sidebar p,
.site-footer-sidebar div,
.site-footer-sidebar li {
    overflow: visible !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* Better Arabic line spacing */
.site-footer-sidebar p,
.site-footer-sidebar li {
    line-height: 1.9 !important;
}

/* Arabic text */
html[lang="ar"] .site-footer-sidebar,
html[lang="ar"] .site-footer-sidebar p,
html[lang="ar"] .site-footer-sidebar a {
    font-family: Tahoma, Arial, sans-serif !important;
}

/* =========================================================
   4. LANGUAGE BLOCK
   ========================================================= */

.site-footer-sidebar .pkp_block_language {
    text-align: right !important;
}

.site-footer-sidebar .pkp_block_language a {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.8 !important;
}

/* =========================================================
   5. IMAGE INSIDE SIDEBAR
   ========================================================= */

.site-footer-sidebar img {
    max-width: 100% !important;
    height: auto !important;
}

/* Do not let an image squeeze the text */
.site-footer-sidebar .pkp_block_content {
    min-width: 0 !important;
}

/* =========================================================
   6. MAIN CONTENT
   ========================================================= */

.pkp_structure_main {
    min-width: 0 !important;
}

/* =========================================================
   7. MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .main-header {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    .main-header .navbar-logo img {
        max-height: 90px !important;
    }

    .site-footer-sidebar .pkp_block,
    .site-footer-sidebar .pkp_block_language {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}
