:root {
    --portal-bg: #f3f6fb;
    --portal-card: #ffffff;
    --portal-card-soft: #f8fbff;
    --portal-border: rgba(13, 44, 108, 0.1);
    --portal-text: #13233f;
    --portal-muted: #5f6f89;
    --portal-primary: #0d2c6c;
    --portal-primary-soft: rgba(13, 44, 108, 0.08);
    --portal-secondary: #1f4f9d;
    --portal-accent: #d98b1f;
    --portal-shadow: 0 22px 54px rgba(13, 44, 108, 0.1);
}

body.portal-shell {
    background: var(--portal-bg);
    color: var(--portal-text);
    font-family: 'Sora', sans-serif;
}

h1, h2, h3, h4, h5 {
    font-family: 'Source Serif 4', serif;
    color: var(--portal-text);
}

a {
    color: var(--portal-secondary);
}

.modern-navbar {
    background: var(--portal-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none !important;
}

.brand-lockup img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.35rem;
}

.brand-lockup span {
    display: block;
}

.brand-title {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.74rem;
}

.site-navbar .site-menu > li > a.nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    font-weight: 500;
}

.site-navbar .site-menu > li.active > a.nav-link,
.site-navbar .site-menu > li > a.nav-link:hover,
.site-navbar .site-menu .dropdown li a:hover {
    color: #fff;
}

.site-navbar .site-menu .dropdown {
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    box-shadow: var(--portal-shadow);
    overflow: hidden;
}

.site-navbar .site-menu .dropdown li a {
    padding: 0.8rem 1rem;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.15rem !important;
    border-radius: 999px;
    color: #fff !important;
    background: var(--portal-secondary);
    box-shadow: 0 18px 30px rgba(13, 44, 108, 0.2);
}

.hero-section,
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--portal-primary);
}

.hero-home {
    padding: 7.8rem 0 4.1rem;
}

.hero-home::before,
.page-hero::before,
.hero-section.inner-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../../frontend/img/bupatipalutabendera.jpg') center/cover no-repeat;
    opacity: 0.18;
    z-index: 0;
}

.page-hero,
.hero-section.inner-page {
    padding: 7.6rem 0 3.2rem;
}

.hero-section .container,
.page-hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge,
.footer-badge,
.eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.82rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.hero-copy .hero-badge,
.page-hero .hero-badge,
.hero-text .hero-badge {
    margin-bottom: 0.4rem;
}

.hero-copy h1,
.page-hero h1,
.hero-text h1 {
    color: #fff;
    font-size: clamp(2.1rem, 4.4vw, 3.25rem);
    line-height: 1.12;
    margin: 0.95rem 0 1rem;
}

.hero-copy p,
.page-hero p,
.hero-text p {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.96rem;
    line-height: 1.8;
}

.hero-description {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.96rem;
    line-height: 1.8;
}

.hero-description p {
    color: inherit;
    margin-bottom: 0.75rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.65rem;
}

.btn-portal-primary,
.btn-portal-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.82rem 1.3rem;
    border-radius: 16px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-portal-primary {
    color: #fff;
    background: var(--portal-secondary);
    box-shadow: 0 18px 30px rgba(13, 44, 108, 0.18);
}

.btn-portal-light {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-portal-primary:hover,
.btn-portal-light:hover,
.nav-cta:hover {
    transform: translateY(-1px);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.9rem;
}

.hero-stat {
    padding: 1.1rem 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat .number {
    display: block;
    color: #fff;
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.hero-stat .label {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.8rem;
}

.hero-panel {
    padding: 0.85rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 50px rgba(9, 24, 61, 0.2);
}

.hero-banner {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.hero-banner img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.category-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.78rem;
}

.section-shell,
.section {
    padding: 4.4rem 0;
}

.section-heading,
.section-title {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    margin-bottom: 0.55rem;
    line-height: 1.25;
}

.section-subtitle {
    max-width: 680px;
    color: var(--portal-muted);
    line-height: 1.75;
    font-size: 0.92rem;
}

.section-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.glass-card,
.service-card,
.announcement-card,
.news-card,
.download-card,
.detail-card,
.filter-card,
.profile-card,
.post-entry,
.pricing {
    height: 100%;
    border-radius: 22px;
    background: var(--portal-card);
    border: 1px solid var(--portal-border);
    box-shadow: var(--portal-shadow);
}

.service-card,
.announcement-card,
.download-card,
.profile-card,
.pricing {
    padding: 1.35rem;
}

.service-icon,
.announcement-icon,
.download-icon,
.section-card-icon,
.news-icon-badge,
.wrap-icon.icon-1 {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-primary);
    background: var(--portal-primary-soft);
    font-size: 1.5rem;
}

.service-icon,
.announcement-icon,
.download-icon,
.wrap-icon.icon-1 {
    margin-bottom: 0.95rem;
}

.section-card-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-card-head p {
    margin-bottom: 0;
}

.section-card-icon {
    flex-shrink: 0;
}

.service-card h3,
.announcement-card h3,
.download-card h3,
.profile-card h3,
.post-entry h3,
.pricing h3,
.news-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.7rem;
    line-height: 1.5;
}

.service-card p,
.announcement-card p,
.download-card p,
.profile-card p,
.news-card p,
.post-entry p {
    color: var(--portal-muted);
    font-size: 0.9rem;
    line-height: 1.72;
}

.service-meta,
.card-meta,
.post-meta {
    display: inline-flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: var(--portal-muted);
    font-size: 0.78rem;
    margin-bottom: 0.8rem;
}

.service-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pill-tag,
.soft-tag,
.soft-outline-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.pill-tag,
.soft-tag {
    background: var(--portal-primary-soft);
    color: var(--portal-primary);
}

.soft-outline-tag {
    background: rgba(255, 255, 255, 0.6);
    color: var(--portal-secondary);
    border: 1px solid rgba(31, 79, 157, 0.16);
}

.action-link,
.readmore,
.footer-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none !important;
}

.filter-card {
    padding: 1.2rem;
    margin-bottom: 2rem;
}

.portal-filter .form-control,
.portal-filter .custom-select {
    min-height: 50px;
    border-radius: 14px;
    border-color: rgba(13, 44, 108, 0.12);
}

.portal-filter .btn {
    min-height: 50px;
    border-radius: 14px;
    font-weight: 700;
    border: 0;
    background: var(--portal-secondary);
}

.source-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(13, 44, 108, 0.06);
    border: 1px solid rgba(13, 44, 108, 0.09);
    color: var(--portal-text);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.4rem;
}

.source-note span {
    font-size: 1.2rem;
    color: var(--portal-primary);
    margin-top: 0.1rem;
}

.news-card,
.post-entry {
    overflow: hidden;
}

.news-card img,
.post-entry img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-card-body,
.post-text {
    padding: 1.3rem;
}

.news-icon-badge {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
}

.download-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1rem 0 1.15rem;
}

.download-meta .meta-box,
.detail-stat {
    padding: 0.88rem 0.95rem;
    border-radius: 16px;
    background: rgba(13, 44, 108, 0.05);
    border: 1px solid rgba(13, 44, 108, 0.06);
}

.download-meta strong,
.detail-stat strong {
    display: block;
    font-size: 0.78rem;
    color: var(--portal-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 1.4rem;
}

.detail-card {
    padding: 1.35rem;
}

.detail-card h4 {
    margin-bottom: 0.85rem;
    font-size: 1.02rem;
}

.rich-content,
.detail-card p,
.detail-card li {
    color: var(--portal-text);
    line-height: 1.8;
    font-size: 0.92rem;
}

.rich-content > :first-child {
    margin-top: 0;
}

.rich-content > :last-child {
    margin-bottom: 0;
}

.rich-content ul,
.rich-content ol {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.rich-content a {
    font-weight: 700;
}

.rich-content img,
.detail-card img,
.profile-card img {
    max-width: 100%;
    height: auto;
}

.rich-content-light,
.rich-content-light p,
.rich-content-light li,
.rich-content-light a {
    color: rgba(255, 255, 255, 0.84);
}

.profile-page {
    max-width: 880px;
    margin: 0 auto;
}

.document-frame {
    width: 100%;
    min-height: 620px;
    border: 0;
    border-radius: 18px;
    background: #f8fbff;
}

.sidebar-stack {
    display: grid;
    gap: 1.2rem;
}

.portal-footer {
    padding: 3.8rem 0 1.5rem;
    background: var(--portal-primary);
    color: rgba(255, 255, 255, 0.82);
}

.portal-footer h3,
.portal-footer h4 {
    color: #fff;
    margin-bottom: 0.9rem;
}

.portal-footer p,
.footer-copy {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
    font-size: 0.9rem;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.7rem;
    color: rgba(255, 255, 255, 0.74);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.portal-footer-bottom {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.portal-footer-bottom a {
    color: #fff;
}

.pagination {
    gap: 0.55rem;
}

.page-item .page-link {
    border: 1px solid rgba(13, 44, 108, 0.08);
    border-radius: 14px;
    color: var(--portal-text);
    box-shadow: 0 10px 20px rgba(13, 44, 108, 0.06);
}

.page-item.active .page-link {
    background: var(--portal-secondary);
    border-color: var(--portal-secondary);
}

.empty-panel {
    padding: 1.9rem;
    text-align: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px dashed rgba(13, 44, 108, 0.16);
    color: var(--portal-muted);
}

.testimonial-carousel .owl-stage-outer {
    padding: 0;
}

.back-to-top {
    background: var(--portal-secondary);
}

@media (max-width: 991.98px) {
    .hero-home,
    .page-hero,
    .hero-section.inner-page {
        padding-top: 6.8rem;
    }

    .hero-grid,
    .download-meta,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .section-shell,
    .section {
        padding: 3.8rem 0;
    }
}

@media (max-width: 575.98px) {
    .hero-banner img {
        height: 260px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-portal-primary,
    .btn-portal-light {
        width: 100%;
    }

    .section-card-head {
        flex-direction: column;
    }

    .document-frame {
        min-height: 420px;
    }
}
