/* ==========================================================================
   NOMINA CUSTOM OVERRIDES (Consolidated from legacy custom-css-js snippets)
   Versioned via filemtime() in functions.php for browser caching & cache-busting.
   ========================================================================== */

/* --- [8732] MASTER CSS: SINGLE POST & FRONT PAGE --- */
.single-post #single-content h1 {
    border-left: 4px solid var(--smpn1-accent, #1B5DAF) !important;
    padding-left: 12px !important;
    display: block !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
    font-family: var(--smpn1-heading-font, 'DM Sans', sans-serif) !important;
    font-weight: 700 !important;
    word-wrap: break-word !important;
}

.single-post #single-content ul li,
.single-post #single-content ol li {
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
    padding-left: 5px !important;
}

.single-post #single-content ul,
.single-post #single-content ol {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
    padding-left: 20px !important;
}

.single-post #single-content ul li::marker {
    color: #f39c12 !important;
    font-weight: bold;
}

#single-article-text h2.wp-block-heading,
#single-article-text h2 {
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    font-family: var(--smpn1-heading-font, 'DM Sans', sans-serif) !important;
    color: #0f172a !important;
    word-wrap: break-word !important;
    background-color: color-mix(in srgb, var(--smpn1-nav-left, #1B5DAF) 7%, transparent) !important;
    padding: 10px 15px !important;
    border-left: 4px solid var(--smpn1-nav-left, #1B5DAF) !important;
}

.post-item .post-details h2,
.post-item .post-details p,
h2.news-feed-judul,
.the-excerpt {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    color: #212121 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

#berita-pilihan {
    background-color: #0b2adb !important;
    padding: 15px !important;
    border-radius: 0px !important;
}

html,
body {
    max-width: 100% !important;
    overflow-x: clip !important;
    position: relative !important;
}

.header-fixed {
    overflow: visible !important;
}

/* --- [8863] PROFILE GALLERY MOBILE FIX & MICRO INTERACTION --- */
@media only screen and (max-width: 768px) {
    #pgZoomOverlay {
        padding: 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    #pgZoomOverlay > div {
        position: relative !important;
        width: 100% !important;
        max-width: 100vw !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    #pgZoomOverlay .pg-card,
    #pgZoomOverlay .pg-lcard {
        max-width: calc(100vw - 80px) !important;
        margin: 0 auto !important;
    }

    #pgZoomOverlay > div > div:first-child,
    #pgZoomOverlay > div > div:last-child {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: rgba(15, 23, 42, 0.82) !important;
        color: #ffffff !important;
        z-index: 99999 !important;
        font-size: 24px !important;
        line-height: 1 !important;
        box-shadow: 0 0 16px rgba(59, 130, 246, 0.18), 0 6px 18px rgba(0, 0, 0, 0.22) !important;
        backdrop-filter: blur(4px) !important;
    }

    #pgZoomOverlay > div > div:first-child {
        left: 10px !important;
    }

    #pgZoomOverlay > div > div:last-child {
        right: 10px !important;
    }
}

.back-to-top,
.scroll-top,
#scrollTop,
#backToTop {
    z-index: 9999 !important;
}

#pgZoomOverlay .pg-card,
#pgZoomOverlay .pg-lcard {
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease, filter 0.42s ease !important;
}

#pgZoomOverlay .pg-card:hover,
#pgZoomOverlay .pg-lcard:hover {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

#pgZoomOverlay > div > div:first-child,
#pgZoomOverlay > div > div:last-child {
    transition: transform 0.26s ease, background 0.26s ease, box-shadow 0.26s ease, opacity 0.26s ease !important;
    opacity: 0.88;
}

#pgZoomOverlay > div > div:first-child:hover,
#pgZoomOverlay > div > div:last-child:hover {
    transform: translateY(-50%) scale(1.08) !important;
    opacity: 1 !important;
    background: linear-gradient(135deg, rgba(7, 86, 242, 0.92), rgba(12, 68, 124, 0.92)) !important;
    box-shadow: 0 10px 24px rgba(7, 86, 242, 0.28), 0 0 16px rgba(59, 130, 246, 0.2) !important;
}

#pgZoomOverlay > div > div:first-child:active,
#pgZoomOverlay > div > div:last-child:active {
    transform: translateY(-50%) scale(0.92) !important;
}

#pgZoomOverlay {
    perspective: 1200px;
}

#pgZoomOverlay .pg-card,
#pgZoomOverlay .pg-lcard {
    animation: pgSwipeCard 0.52s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
}

@keyframes pgSwipeCard {
    0% {
        opacity: 0;
        transform: translateX(12px) scale(0.985);
        filter: blur(1.5px);
    }
    55% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@media (max-width: 768px) {
    #pgZoomOverlay > div > div:first-child:active,
    #pgZoomOverlay > div > div:last-child:active {
        transform: translateY(-50%) scale(0.88) !important;
        transition: transform 0.12s ease !important;
    }
}

/* --- [8942] STATIC PAGE SPMB STYLE (Scoped to page content only) --- */
.page #page-content ul li,
.page #page-content ol li,
.page #single-content ul li,
.page #single-content ol li {
    margin-bottom: 0 !important;
    line-height: 1.5 !important;
    padding-left: 5px !important;
    list-style-position: outside !important;
}

.page #page-content ul,
.page #page-content ol,
.page #single-content ul,
.page #single-content ol {
    margin-top: 2px !important;
    margin-bottom: 8px !important;
    padding-left: 22px !important;
}

.page #page-content ul li::marker,
.page #single-content ul li::marker {
    color: #f39c12 !important;
    font-weight: bold !important;
}

.page h2.wp-block-heading,
.page h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    font-family: 'DM Sans', sans-serif !important;
    color: #333333 !important;
    background-color: rgba(7, 86, 242, 0.07) !important;
    padding: 10px 15px !important;
    border-left: 4px solid #0756f2 !important;
    margin-top: 15px !important;
    margin-bottom: 4px !important;
    border-radius: 4px !important;
}

.page h3.wp-block-heading,
.page h3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    font-family: 'DM Sans', sans-serif !important;
    color: #0756f2 !important;
    margin-top: 20px !important;
    margin-bottom: 8px !important;
}

/* Running Text kini dikelola oleh MU-Plugin smpn1-running-text.php (assets/running-text.css) */
.fluid-nav {
    margin-bottom: 0 !important;
    display: flow-root;
    position: relative;
    z-index: 100;
    overflow: visible !important;
}

.fluid-nav .menu-utama {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-left: 10px !important;
}

.fluid-nav .menu-utama > li > ul.sub-menu {
    z-index: 9999 !important;
}

.mobile-menu-kiri > li.menu-item-has-children > a:after {
    transition: transform 0.2s ease;
}

.mobile-menu-kiri > li.menu-item-has-children.active > a:after {
    transform: rotate(180deg);
}

/* --- [9056] MOBILE GHOST SEARCH ICON IN HAMBURGER --- */
.header-shrink {
    position: relative !important;
}

.header-shrink::after {
    display: none !important;
}

@media only screen and (max-width: 1100px) {
    .header-shrink::after {
        content: "\1F50D" !important;
        position: absolute !important;
        right: 45px !important;
        bottom: 30px !important;
        font-size: 24px !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        display: block !important;
        z-index: 9999 !important;
        text-shadow: none !important;
        filter: none !important;
        pointer-events: none !important;
    }
}

.hamburger-button {
    z-index: 9998 !important;
}

/* --- MOBILE TOP NAV: SKENARIO A (1 BARIS + INDIKATOR GESER) --- */
@media only screen and (max-width: 1100px) {
    .fluid-nav {
        position: relative !important;
    }

    .fluid-nav::after {
        content: "\203A";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 38px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 8px;
        color: #ffffff;
        font-size: 20px;
        font-weight: 700;
        line-height: 1;
        background: linear-gradient(90deg, rgba(0, 140, 214, 0) 0%, rgba(0, 140, 214, 0.88) 45%, #008cd6 100%);
        pointer-events: none;
        z-index: 5;
        transition: opacity 0.2s ease;
    }

    .fluid-nav.is-scroll-end::after {
        opacity: 0;
    }

    .fluid-nav .menu-utama {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-right: 40px !important;
    }

    .fluid-nav .menu-utama > li {
        flex: 0 0 auto !important;
    }
}

/* --- MOBILE HAMBURGER DRAWER: TEMA BIRU SEKOLAH --- */
.mobile-menu-kiri-wrap {
    z-index: 10000 !important;
    background: #f8fafc !important;
    box-shadow: 0 0 28px rgba(15, 23, 42, 0.32) !important;
}

.mobile-menu-kiri-wrap #logo-menu-kiri {
    background: #ffffff;
    width: calc(100% - 58px) !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
}

.mobile-menu-kiri-wrap .close-button-hamburger {
    float: right;
    width: 36px;
    height: 36px;
    margin: 12px 14px 0 0;
    border-radius: 50%;
    background: #eff6ff;
    color: #1B5DAF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-kiri-wrap .close-button-hamburger:hover,
.mobile-menu-kiri-wrap .close-button-hamburger:active {
    background: #1B5DAF;
    color: #ffffff;
}

.mobile-menu-kiri-wrap form.search-form {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    background: linear-gradient(135deg, #1B5DAF 0%, #0ea5e9 100%) !important;
    border-top: none !important;
    padding: 14px 16px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.mobile-menu-kiri-wrap form.search-form > label {
    flex: 1 1 auto;
    margin: 0;
}

.mobile-menu-kiri-wrap form.search-form .search-field {
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12) !important;
    box-sizing: border-box !important;
}

.mobile-menu-kiri-wrap .search-submit {
    flex: 0 0 42px;
    width: 42px !important;
    height: 40px !important;
    border-radius: 8px !important;
    background-color: #0f3d7a !important;
    border: none !important;
}

.mobile-menu-kiri-wrap .mobile-menu-kiri {
    background: #f8fafc;
    padding: 12px 12px 28px 12px;
    margin: 0;
    list-style: none;
}

.mobile-menu-kiri > li {
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mobile-menu-kiri > li > a {
    padding: 13px 44px 13px 16px !important;
    font-size: 13.5px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    border-bottom: none !important;
    text-decoration: none !important;
    position: relative !important;
}

.mobile-menu-kiri > li.current-menu-item > a {
    background: linear-gradient(90deg, #1B5DAF 0%, #0284c7 100%) !important;
    color: #ffffff !important;
}

.mobile-menu-kiri > li.menu-item-has-children > a:after {
    top: 50%;
    margin-top: -9px;
    width: 18px !important;
    height: 18px !important;
    background-size: 18px !important;
    right: 14px !important;
}

.mobile-menu-kiri .sub-menu {
    background: #f1f5f9 !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.mobile-menu-kiri .sub-menu li {
    border-bottom: 1px solid #e2e8f0 !important;
}

.mobile-menu-kiri .sub-menu li:last-child {
    border-bottom: none !important;
}

.mobile-menu-kiri .sub-menu li a {
    padding: 11px 16px 11px 26px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    text-decoration: none !important;
}

.mobile-menu-kiri .sub-menu li.current-menu-item a {
    color: #1B5DAF !important;
    font-weight: 700 !important;
}

/* --- SIDEBAR WIDGETS: FONT HARMONY & ACCESSIBILITY (KALENDER HIJRIYAH & LOKASI SEKOLAH) --- */
#kalender-modern-widget,
#kalender-modern-widget *,
#kalender-modern-widget *::before,
#kalender-modern-widget *::after,
#lokasi-sekolah-widget,
#lokasi-sekolah-widget * {
    font-family: 'DM Sans', sans-serif !important;
}

#kalender-modern-widget .km-header-masehi,
#kalender-modern-widget .km-month-name,
#lokasi-sekolah-widget .ls-header-info h3,
#lokasi-sekolah-widget .ls-badge,
#lokasi-sekolah-widget .ls-btn {
    font-family: 'Montserrat', sans-serif !important;
}

#lokasi-sekolah-widget .ls-header {
    padding: 18px 16px !important;
    gap: 8px !important;
    align-items: center !important;
}

#lokasi-sekolah-widget .ls-header-info {
    flex: 1 1 auto;
    min-width: 0;
}

#lokasi-sekolah-widget .ls-header-info h3 {
    font-size: 1.02rem !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    color: #ffffff !important;
    margin: 0 0 4px 0 !important;
}

#lokasi-sekolah-widget .ls-header-info p {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    color: #bae6fd !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

#lokasi-sekolah-widget .ls-badge {
    flex: 0 0 auto;
    white-space: nowrap !important;
    font-size: 0.64rem !important;
    padding: 4px 8px !important;
    color: #e0f2fe !important;
    background: rgba(56, 189, 248, 0.18) !important;
    border: 1px solid rgba(125, 211, 252, 0.4) !important;
}

#lokasi-sekolah-widget .ls-footer {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 14px 12px !important;
}

#lokasi-sekolah-widget .ls-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 8px !important;
    font-size: 0.76rem !important;
    white-space: nowrap !important;
}

#kalender-modern-widget .km-days-grid {
    min-height: 196px;
    gap: 2px !important;
}

#kalender-modern-widget .km-weekdays {
    gap: 2px !important;
}

#kalender-modern-widget .km-weekdays > div {
    font-size: 0.68rem !important;
}

#kalender-modern-widget .km-body {
    padding: 14px 10px !important;
}

#kalender-modern-widget .km-day {
    font-size: 0.78rem !important;
    width: 100%;
    max-width: 34px;
    margin: 0 auto;
}

#kalender-modern-widget .km-header {
    padding: 18px 12px !important;
}

#kalender-modern-widget .km-header-masehi {
    font-size: 0.96rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    color: #ffffff !important;
}

#kalender-modern-widget .km-header-hijriah {
    color: #a7f3d0 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    margin-top: 2px;
}

#kalender-modern-widget .km-clock-wib {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(167, 243, 208, 0.35);
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

#kalender-modern-widget .km-clock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    #kalender-modern-widget .km-today {
        animation: none !important;
    }
}

/* --- MOBILE SIDEBAR FRONTPAGE EDGE-TO-EDGE (<= 768px) --- */
@media only screen and (max-width: 768px) {
    body #sidebar-right,
    body #sidebar-left {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    body #sidebar-right .before-widget,
    body #sidebar-left .before-widget {
        margin-bottom: 14px;
    }

    body #sidebar-right .before-widget:not(:has(ul.wpp-list)):not(:has(#kalender-modern-widget)):not(:has(#lokasi-sekolah-widget)):not(:has(.sholat-wrap)),
    body #sidebar-left .before-widget:not(:has(ul.wpp-list)):not(:has(#kalender-modern-widget)):not(:has(#lokasi-sekolah-widget)):not(:has(.sholat-wrap)) {
        padding: 0 14px;
    }

    body #lokasi-sekolah-widget .ls-card,
    body #kalender-modern-widget .km-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    body .sholat-wrap {
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

