/*
 * Override tema Designesia untuk header mobile — muat PALING AKHIR setelah style.min.css.
 * Mencegah kedip: position fixed, background #fff, margin/padding header-mobile dari jQuery.
 */

/*
 * Desktop: jangan clip dropdown blog (position:absolute di luar box header).
 * Jangan pakai contain:paint/strict pada header atau topbar — membuat topbar hilang
 * dan menu dropdown tidak tampil.
 */
@media (min-width: 992px) {
    header.header-light.has-topbar {
        overflow: visible !important;
    }

    header.header-light.has-topbar > .container,
    header.header-light.has-topbar #mainmenu,
    header.header-light.has-topbar #mainmenu > li.menu-item-blog {
        overflow: visible !important;
    }

    header.header-light.has-topbar #topbar,
    header.header-light.has-topbar .site-topbar {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
}

/* Sembunyikan toolbar mobile di desktop (scoped child bisa override parent) */
@media (min-width: 992px) {
    .header-mobile-toolbar {
        display: none !important;
    }

    .header-toolbar-desktop {
        display: flex !important;
    }
}

@media (max-width: 991.98px) {
    .header-toolbar-desktop {
        display: none !important;
    }

    .header-mobile-toolbar {
        display: flex !important;
    }

    header.header-light.has-topbar,
    header.header-mobile.header-light.has-topbar,
    header.header-mobile.header-light.transparent.has-topbar {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        transition: none !important;
        box-shadow: none !important;
    }

    header.header-light.has-topbar:not(.menu-open),
    header.header-mobile.header-light.has-topbar:not(.menu-open) {
        height: 3.5rem !important;
        min-height: 3.5rem !important;
        max-height: 3.5rem !important;
        overflow: hidden !important;
    }

    header.header-mobile.header-light.has-topbar .header-row,
    header.header-mobile.header-light.has-topbar .header-col,
    header.header-light.has-topbar .header-nav-row,
    header.header-light.has-topbar .header-col-logo,
    header.header-light.has-topbar .header-col-actions {
        margin-top: 0 !important;
    }

    header.header-mobile.header-light.has-topbar > .container,
    header.header-light.has-topbar > .container {
        height: 100%;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    header.header-mobile .container {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    header.header-light.has-topbar .menu_side_area,
    header.header-mobile .menu_side_area {
        width: auto !important;
        margin-left: auto !important;
    }

  header.header-light.has-topbar .header-get-app-btn,
  header.header-mobile .header-get-app-btn {
        font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        font-synthesis: none;
        width: 118px !important;
        min-width: 118px !important;
        max-width: 118px !important;
        padding: 7px 10px !important;
    }

    /* Jangan ubah box model #content saat masuk/keluar blog di mobile */
    #content.site-blog-area {
        padding-top: 0 !important;
        background: transparent !important;
    }

    #content.site-blog-area .blog-page,
    #content.site-blog-area .blog-page--pending,
    #content.site-blog-area .blog-page--article {
        background: var(--neo-bg, #f5f7fa);
    }
}
