:root{
    --public-blue:#0b1f3a;
    --public-blue-2:#123968;
    --public-gold:#c9a227;
    --public-gold-2:#facc15;
    --public-muted:#64748b;
}

html{scroll-behavior:smooth;}
body{background:#f8fafc;color:#1f2937;}
section{scroll-margin-top:92px;}

#navbar.public-navbar{
    --nav-height:64px;
    padding:5px 0;
    background:rgba(255,255,255,.94);
    border:0;
    border-bottom:1px solid rgba(15,23,42,.07);
    box-shadow:0 10px 32px rgba(15,23,42,.08);
    backdrop-filter:saturate(180%) blur(18px);
    transition:padding .25s ease, box-shadow .25s ease, background .25s ease;
    z-index:1030;
}

#navbar.public-navbar.is-scrolled{
    padding:2px 0;
    background:rgba(255,255,255,.98);
    box-shadow:0 14px 38px rgba(15,23,42,.13);
}

#navbar.public-navbar .container{
    min-height:var(--nav-height);
}

.public-brand{
    min-width:0;
    display:flex;
    align-items:center;
    gap:11px;
    padding:0;
}

.public-brand-logo{
    width:62px;
    height:50px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}

.public-brand-logo img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.public-brand-copy{
    display:flex;
    flex-direction:column;
    line-height:1.12;
}

.public-brand-copy strong{
    color:var(--public-blue);
    font-size:14px;
    font-weight:900;
    letter-spacing:.25px;
}

.public-brand-copy small{
    color:#9a7413;
    font-size:9.5px;
    font-weight:800;
    letter-spacing:.25px;
    margin-top:4px;
}

.public-navbar .navbar-nav{
    gap:2px;
}

.public-navbar .nav-custom{
    min-height:42px;
    display:flex;
    align-items:center;
    gap:6px;
    padding:8px 9px !important;
    border-radius:12px;
    color:#334155 !important;
    font-size:12.5px;
    font-weight:750;
    white-space:nowrap;
    transition:.2s ease;
}

.public-navbar .nav-custom i{
    color:#8793a4;
    font-size:14px;
    transition:.2s ease;
}

.public-navbar .nav-custom:hover,
.public-navbar .nav-custom:focus,
.public-navbar .nav-custom.active{
    color:var(--public-blue) !important;
    background:#fff7db;
}

.public-navbar .nav-custom:hover i,
.public-navbar .nav-custom.active i{
    color:#b38615;
}

.public-navbar .nav-custom.active{
    box-shadow:inset 0 0 0 1px rgba(201,162,39,.2);
}

.public-dropdown{
    min-width:270px;
    padding:9px;
    margin-top:10px !important;
    border:1px solid rgba(15,23,42,.07);
    border-radius:18px;
    box-shadow:0 22px 55px rgba(15,23,42,.16);
}

.public-dropdown .dropdown-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px;
    border-radius:13px;
    color:var(--public-blue);
    white-space:normal;
}

.public-dropdown .dropdown-item:hover,
.public-dropdown .dropdown-item.active{
    color:var(--public-blue);
    background:#fff8df;
}

.dropdown-icon{
    width:38px;
    height:38px;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    color:#9a7413;
    background:#fff3c4;
}

.public-dropdown strong,
.public-dropdown small{
    display:block;
}

.public-dropdown strong{
    font-size:13px;
    font-weight:850;
}

.public-dropdown small{
    color:var(--public-muted);
    font-size:10.5px;
    margin-top:2px;
}

.public-login-item{
    margin-left:5px;
}

.public-login-btn{
    min-height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:8px 14px;
    border-radius:13px;
    background:linear-gradient(135deg,var(--public-blue),var(--public-blue-2));
    color:#fff;
    font-size:12.5px;
    font-weight:850;
    box-shadow:0 10px 22px rgba(11,31,58,.2);
    transition:.2s ease;
}

.public-login-btn:hover{
    color:#fff;
    transform:translateY(-2px);
    box-shadow:0 14px 28px rgba(11,31,58,.27);
}

.public-toggler{
    width:44px;
    height:42px;
    padding:10px;
    border:1px solid rgba(15,23,42,.09) !important;
    border-radius:13px;
    background:#f8fafc;
    box-shadow:none !important;
}

.public-toggler span{
    display:block;
    width:100%;
    height:2px;
    margin:4px 0;
    border-radius:999px;
    background:var(--public-blue);
}

.page-hero,
.hero,
.detail-hero,
.news-hero{
    isolation:isolate;
}

.page-hero h1,
.hero h1,
.detail-hero h1,
.news-hero h1{
    letter-spacing:0;
    text-wrap:balance;
}

.page-hero p,
.hero p,
.detail-hero p,
.news-hero p{
    max-width:780px;
}

.hero-badge,
.portal-badge,
.breadcrumb-box,
.news-badge{
    box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}

.stat-card,
.stat-card-new,
.info-card,
.leader-card,
.member-card,
.fraksi-card,
.akd-card,
.calendar-card,
.agenda-list-box,
.main-card,
.side-card,
.summary-card,
.detail-info-card,
.participant-section{
    border:1px solid rgba(15,23,42,.06);
    box-shadow:0 12px 30px rgba(15,23,42,.07);
}

.stat-card:hover,
.info-card:hover,
.leader-card:hover,
.member-card:hover,
.fraksi-card:hover,
.akd-card:hover{
    box-shadow:0 18px 42px rgba(15,23,42,.12);
}

.section-title small{
    letter-spacing:3px;
}

.section-title h2{
    text-wrap:balance;
}

.member-photo,
.leader-photo,
.pegawai-photo,
.profile-img{
    background:#f1f5f9;
}

.wa-container{
    right:24px;
    bottom:24px;
}

.wa-float{
    box-shadow:0 12px 28px rgba(37,211,102,.28);
}

.footer-main{
    border-top:1px solid rgba(15,23,42,.06);
}

.mobile-service-bottom-menu{
    display:none;
}

.mobile-service-panel{
    display:none;
}

.member-card,
.pegawai-card,
.akd-card,
.related-card,
.agenda-card,
.galeri-card,
.berita-card{
    content-visibility:auto;
    contain-intrinsic-size:320px;
}

@media(max-width:1199px){
    #navbar.public-navbar{
        padding:6px 0;
    }

    #navbar.public-navbar .container{
        min-height:62px;
    }

    .public-navbar .navbar-collapse{
        max-height:calc(100vh - 92px);
        overflow-y:auto;
        margin-top:8px;
        padding:12px;
        border:1px solid rgba(15,23,42,.07);
        border-radius:18px;
        background:#fff;
        box-shadow:0 20px 50px rgba(15,23,42,.14);
    }

    .public-navbar .navbar-nav{
        gap:4px;
    }

    .public-navbar .nav-custom{
        padding:10px 12px !important;
        font-size:13px;
    }

    .public-dropdown{
        min-width:0;
        margin:4px 0 8px !important;
        border:0;
        box-shadow:none;
        background:#f8fafc;
    }

    .public-login-item{
        margin:7px 0 0;
    }

    .public-login-btn{
        width:100%;
    }
}

@media(max-width:768px){
    section{scroll-margin-top:84px;}

    #navbar.public-navbar .container{
        min-height:60px;
    }

    .public-brand{
        gap:8px !important;
    }

    .public-brand-logo{
        width:56px;
        height:46px;
    }

    .public-brand-copy strong{
        font-size:12px;
    }

    .public-brand-copy small{
        font-size:8px;
        line-height:1.2;
    }

    .page-hero,
    .hero,
    .detail-hero,
    .news-hero{
        min-height:430px !important;
        padding-top:98px !important;
    }

    .page-hero h1,
    .hero h1,
    .detail-hero h1,
    .news-hero h1{
        font-size:32px !important;
        line-height:1.18 !important;
    }

    .page-hero p,
    .hero p,
    .detail-hero p,
    .news-hero p{
        font-size:14px !important;
        line-height:1.7 !important;
    }

    .container.py-4,
    .container.py-5{
        padding-top:1.4rem !important;
        padding-bottom:1.4rem !important;
    }

    .section-title{
        margin-bottom:1.75rem !important;
    }

    .stat-card,
    .info-card{
        border-radius:20px !important;
    }

    .wa-container{
        right:14px !important;
        bottom:14px !important;
    }

    .wa-float{
        width:52px !important;
        height:52px !important;
        font-size:24px !important;
    }

    .wa-box{
        width:260px !important;
    }

    .footer-main,
    .footer-main .text-end{
        text-align:center !important;
    }

    .footer-bottom{
        flex-direction:column;
        gap:8px;
        text-align:center;
    }
}

@media(max-width:480px){
    .page-hero,
    .hero,
    .detail-hero,
    .news-hero{
        min-height:400px !important;
    }

    .page-hero h1,
    .hero h1,
    .detail-hero h1,
    .news-hero h1{
        font-size:29px !important;
    }

    .hero-badge,
    .portal-badge,
    .breadcrumb-box,
    .news-badge{
        font-size:11px !important;
    }
}

/* Mobile layout: keep dense public data readable on narrow phones. */
@media(max-width:575.98px){
    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:clip;
    }

    body{
        font-size:15px;
        line-height:1.6;
    }

    .container,
    .container-fluid{
        --bs-gutter-x:1.5rem;
    }

    .row.g-4,
    .row.g-5{
        --bs-gutter-x:1rem;
        --bs-gutter-y:1rem;
    }

    section.py-5{
        padding-top:2.6rem !important;
        padding-bottom:2.6rem !important;
    }

    h1,
    .h1{
        font-size:clamp(1.75rem,8.5vw,2.15rem) !important;
        overflow-wrap:anywhere;
    }

    h2,
    .h2,
    .section-title h2{
        font-size:clamp(1.45rem,7vw,1.85rem) !important;
        line-height:1.25;
        overflow-wrap:anywhere;
    }

    h3,
    .h3{
        font-size:1.35rem !important;
    }

    p,
    li,
    a,
    button,
    strong,
    small{
        overflow-wrap:anywhere;
    }

    #navbar.public-navbar .container{
        padding-left:12px;
        padding-right:12px;
    }

    .public-brand{
        max-width:calc(100% - 56px);
    }

    .public-brand-logo{
        width:52px;
        height:43px;
    }

    .public-brand-copy{
        min-width:0;
    }

    .public-brand-copy strong{
        font-size:11.5px;
        white-space:nowrap;
    }

    .public-brand-copy small{
        font-size:7.5px;
        white-space:nowrap;
    }

    .public-navbar .navbar-collapse{
        max-height:calc(100dvh - 82px);
        padding:10px;
        border-radius:16px;
    }

    .public-dropdown .dropdown-item{
        padding:9px;
    }

    .page-hero,
    .hero,
    .detail-hero,
    .news-hero{
        min-height:0 !important;
        padding-top:105px !important;
        padding-bottom:44px !important;
    }

    .hero-row{
        padding-top:105px !important;
        padding-bottom:40px !important;
    }

    .hero-actions,
    .produk-actions,
    .agenda-actions{
        width:100%;
    }

    .hero-actions > *,
    .produk-actions > *,
    .agenda-actions > *{
        flex:1 1 100%;
        justify-content:center;
        text-align:center;
    }

    .modern-card,
    .stat-card,
    .stat-card-new,
    .info-card,
    .leader-card,
    .member-card,
    .pegawai-card,
    .fraksi-card,
    .akd-card,
    .calendar-card,
    .agenda-list-box,
    .main-card,
    .side-card,
    .summary-card,
    .detail-info-card,
    .participant-section,
    .filter-box,
    .pengaduan-info,
    .pengaduan-form{
        border-radius:18px !important;
    }

    .modern-card,
    .filter-box,
    .main-card,
    .side-card,
    .summary-card,
    .detail-info-card,
    .participant-section{
        padding:18px !important;
    }

    .tab-btn{
        flex:1 1 100%;
        width:100%;
        padding:10px 12px;
    }

    .preview-img{
        width:100%;
        border-radius:12px;
    }

    .filter-box .filter-control,
    .filter-box input,
    .filter-box select,
    .filter-box .btn-filter,
    .search-box,
    .search-box input{
        width:100% !important;
        max-width:none !important;
    }

    .filter-btn{
        flex:1 1 calc(50% - 8px);
        min-width:0;
        white-space:normal;
    }

    .calendar-card,
    .agenda-list-box,
    .perjadin-map-panel,
    .perjadin-list-panel{
        padding:15px !important;
    }

    .calendar-week,
    .calendar-days{
        gap:3px !important;
    }

    .day-cell{
        min-width:0;
        font-size:11px !important;
    }

    .pagination{
        gap:4px;
    }

    .pagination .page-link{
        margin:0 !important;
        min-width:36px;
        text-align:center;
    }

    table{
        display:block;
        width:100%;
        max-width:100%;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .notif-success,
    .notif-error{
        top:84px !important;
        left:12px !important;
        right:12px !important;
        width:auto;
        max-width:none !important;
    }

    .wa-box{
        width:min(270px,calc(100vw - 28px)) !important;
    }

    .footer-logo{
        width:76px !important;
    }
}

@media(max-width:390px){
    .public-brand-logo{
        width:48px;
        height:40px;
    }

    .public-brand-copy strong{
        font-size:10.5px;
    }

    .public-brand-copy small{
        font-size:7px;
        letter-spacing:0;
    }

    .public-toggler{
        width:42px;
        height:40px;
    }

    .filter-btn{
        flex-basis:100%;
    }
}

@media(max-width:991.98px){
    html.has-mobile-service-menu body{
        padding-bottom:calc(92px + env(safe-area-inset-bottom));
    }

    .mobile-service-bottom-menu{
        position:fixed;
        left:50%;
        right:auto;
        bottom:10px;
        z-index:1044;
        display:flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        width:min(360px, calc(100vw - 28px));
        min-height:66px;
        padding:7px;
        border:1px solid rgba(8,47,99,.12);
        border-radius:22px;
        background:rgba(255,255,255,.97);
        box-shadow:0 -12px 30px rgba(15,46,85,.13);
        backdrop-filter:blur(14px);
        transform:translateX(-50%);
    }

    .mobile-service-bottom-home,
    .mobile-service-bottom-primary,
    .mobile-service-bottom-toggle{
        flex:1 1 0;
        min-width:0;
        min-height:52px;
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
        gap:4px;
        border-radius:15px;
        border:0;
        color:#7b8799;
        background:transparent;
        text-decoration:none;
        line-height:1.1;
        font-weight:900;
    }

    .mobile-service-bottom-home span,
    .mobile-service-bottom-primary span,
    .mobile-service-bottom-toggle span{
        width:29px;
        height:29px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:10px;
        color:#174ea6;
        background:#eef4ff;
        font-size:14px;
    }

    .mobile-service-bottom-home strong,
    .mobile-service-bottom-primary strong,
    .mobile-service-bottom-toggle strong{
        max-width:100%;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        font-size:10px;
    }

    .mobile-service-bottom-home{
        color:#7b8799;
    }

    .mobile-service-bottom-primary{
        color:#082f63;
        background:#fff7df;
    }

    .mobile-service-bottom-primary span{
        color:#082f63;
        background:#ffd95b;
    }

    .mobile-service-bottom-toggle{
        color:#082f63;
    }

    .mobile-service-panel{
        position:fixed;
        left:12px;
        right:12px;
        bottom:88px;
        z-index:1043;
        display:block;
    }

    .mobile-service-panel:not(.show){
        pointer-events:none;
    }

    .mobile-service-panel-inner{
        max-width:430px;
        margin-left:auto;
        margin-right:auto;
        padding:14px;
        border:1px solid rgba(8,47,99,.12);
        border-radius:22px;
        background:rgba(255,255,255,.98);
        box-shadow:0 -18px 42px rgba(15,46,85,.16);
        backdrop-filter:blur(14px);
    }

    .mobile-service-panel-head{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:12px;
        margin-bottom:12px;
    }

    .mobile-service-panel-head strong{
        color:#082f63;
        font-size:14px;
        font-weight:900;
    }

    .mobile-service-panel-head small{
        color:#77859d;
        font-size:10px;
        font-weight:800;
        text-align:right;
    }

    .mobile-service-panel-grid{
        display:grid;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:8px;
    }

    .mobile-service-panel-item{
        min-height:62px;
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
        gap:5px;
        border-radius:15px;
        color:#7b8799;
        text-decoration:none;
        font-weight:900;
    }

    .mobile-service-panel-item span{
        width:29px;
        height:29px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:10px;
        color:#174ea6;
        background:#eef4ff;
        font-size:14px;
    }

    .mobile-service-panel-item:nth-child(3n) span,
    .mobile-service-panel-item:nth-child(6n) span{
        color:#a97900;
        background:#fff4cf;
    }

    .mobile-service-panel-item strong{
        max-width:100%;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        font-size:9px;
    }

    .mobile-service-panel-item.active{
        color:#082f63;
        background:#fff7df;
    }

    .mobile-service-panel-item.active span{
        color:#082f63;
        background:#ffd95b;
    }

    .footer-main{
        text-align:center;
        background:#fff;
        border-top:1px solid rgba(8,47,99,.10);
        padding-bottom:calc(106px + env(safe-area-inset-bottom));
    }

    .footer-main .row{
        --bs-gutter-y:16px;
        max-width:520px;
        margin-left:auto;
        margin-right:auto;
    }

    .footer-main .container.py-5{
        padding-top:28px !important;
        padding-bottom:22px !important;
    }

    .footer-main h5{
        color:#082f63;
        font-size:16px;
        margin-bottom:10px;
    }

    .footer-logo{
        width:64px !important;
        height:auto;
    }

    .footer-main p{
        color:#77859d;
        font-size:12px;
        line-height:1.65;
    }

    .footer-main .btn-outline-dark{
        width:38px;
        height:38px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        border-color:rgba(8,47,99,.10);
        border-radius:13px;
        color:#082f63;
        background:#fff7df;
    }

    .footer-main .row > .col-lg-4:nth-child(2){
        display:none;
    }

    .footer-main .col-lg-4:nth-child(3){
        max-width:360px;
        margin-left:auto;
        margin-right:auto;
        padding:16px;
        border:1px solid rgba(8,47,99,.10);
        border-radius:18px;
        background:#f8fbff;
    }

    .footer-main .col-lg-4:nth-child(3) p{
        margin-bottom:8px !important;
    }

    .footer-bottom{
        flex-direction:column;
        gap:5px;
        text-align:center;
        padding-top:12px !important;
        padding-bottom:14px !important;
        color:#77859d;
        font-size:11px;
    }

    .footer-bottom .text-end{
        text-align:center !important;
    }
}

@media(min-width:576px) and (max-width:991.98px){
    .mobile-service-bottom-menu{
        width:380px;
    }

    .mobile-service-panel-inner{
        max-width:470px;
    }
}

@media(max-width:575.98px){
    html.has-mobile-service-menu body{
        padding-bottom:calc(92px + env(safe-area-inset-bottom));
    }

    .mobile-service-panel{
        bottom:86px;
    }

    .mobile-service-panel-grid{
        gap:7px;
    }

    .footer-main{
        padding-bottom:calc(106px + env(safe-area-inset-bottom));
    }
}

@media(max-width:390px){
    .mobile-service-bottom-menu{
        width:min(330px, calc(100vw - 22px));
        border-radius:20px;
    }

    .mobile-service-panel{
        left:8px;
        right:8px;
    }

    .mobile-service-panel-inner{
        padding:12px;
        border-radius:20px;
    }

    .mobile-service-panel-item strong{
        font-size:8px;
    }
}
