body {
    font-family: "Inter", sans-serif;
    background: #f8f9fa;
    color: #212529;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}

.mobile-bottom-nav {
    display: none;
}

.has-global-hero-video {position:relative;overflow:hidden}
.global-hero-video {position:absolute;inset:0;z-index:0;width:100%;height:100%;display:block;object-fit:cover;pointer-events:none}
.has-global-hero-video > *:not(.global-hero-video) {position:relative;z-index:2}
.has-global-hero-video > .greeting-hero-overlay,
.has-global-hero-video > .organization-hero-overlay,
.has-global-hero-video > .area-hero-overlay,
.has-global-hero-video > .history-hero-overlay,
.has-global-hero-video > .vision-hero-overlay,
.has-global-hero-video > .transparency-hero-overlay {position:absolute;z-index:1}
.news-hero.has-global-hero-video::after,
.agenda-hero.has-global-hero-video::after,
.announcement-hero.has-global-hero-video::after,
.developments-hero.has-global-hero-video::after,
.gallery-hero.has-global-hero-video::after,
.profile-hero.has-global-hero-video::after,
.service-hero.has-global-hero-video::after,
.contact-hero.has-global-hero-video::after,
.service-detail-hero.has-global-hero-video::after,
.umkm-hero.has-global-hero-video::after,
.potential-hero.has-global-hero-video::after,
.pot-detail-hero.has-global-hero-video::after {content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(5,52,38,.93),rgba(8,75,55,.70),rgba(6,42,34,.55))}
.gallery-hero.has-global-hero-video::after {background:linear-gradient(90deg,rgba(5,52,38,.93),rgba(8,75,55,.70),rgba(6,42,34,.55))}
.umkm-hero.has-global-hero-video::after {content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(2,77,68,.94),rgba(5,137,122,.72))}

body.page-loading {overflow:hidden}
.public-page-loader {position:fixed;inset:0;z-index:99999;display:grid;place-items:center;background:linear-gradient(145deg,#0b694f,#07513d);opacity:1;visibility:visible;transition:opacity .4s ease,visibility .4s ease}
.public-page-loader::before,.public-page-loader::after {content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.035)}
.public-page-loader::before {width:420px;height:420px;top:-170px;right:-130px}
.public-page-loader::after {width:320px;height:320px;bottom:-150px;left:-90px}
.public-page-loader.is-hidden {opacity:0;visibility:hidden;pointer-events:none}
.public-loader-content {position:relative;z-index:1;display:flex;align-items:center;flex-direction:column;color:#fff;text-align:center}
.public-loader-logo-wrap {position:relative;width:112px;height:112px;display:grid;place-items:center;margin-bottom:26px}
.public-loader-ring {position:absolute;inset:0;border:2px solid rgba(255,255,255,.2);border-top-color:#77e4af;border-right-color:#77e4af;border-radius:50%;animation:publicLoaderSpin 1.15s linear infinite}
.public-loader-logo {width:76px;height:76px;padding:9px;border-radius:18px;background:rgba(255,255,255,.14);object-fit:contain;box-shadow:0 12px 35px rgba(0,0,0,.18);animation:publicLoaderPulse 1.5s ease-in-out infinite}
.public-loader-content strong {font-size:.86rem;letter-spacing:.2em;text-transform:uppercase}
.public-loader-content small {margin-top:10px;color:rgba(255,255,255,.65);font-size:.72rem}
.public-loader-dots {display:flex;gap:6px;height:8px;margin-top:12px}
.public-loader-dots span {width:6px;height:6px;border-radius:50%;background:#8cf0bd;animation:publicLoaderDot 1.1s ease-in-out infinite}
.public-loader-dots span:nth-child(2) {animation-delay:.14s}.public-loader-dots span:nth-child(3) {animation-delay:.28s}
@keyframes publicLoaderSpin {to{transform:rotate(360deg)}}
@keyframes publicLoaderPulse {0%,100%{transform:scale(.95)}50%{transform:scale(1.04)}}
@keyframes publicLoaderDot {0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-5px);opacity:1}}
@media (prefers-reduced-motion:reduce) {.public-loader-ring,.public-loader-logo,.public-loader-dots span{animation:none}.public-page-loader{transition-duration:.01ms}}

.headman-photo {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 20px;
    border: 6px solid #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
    -webkit-transition: 0.3s;
    -moz-transition: 0.3s;
    -ms-transition: 0.3s;
    -o-transition: 0.3s;
}

.headman-photo:hover {
    transform: scale(1.03);
}

.home-news-image {
    width: 85px;
    height: 70px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 10px;
}

.home-news-placeholder {
    width: 85px;
    height: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 10px;
    font-size: 24px;
}
.org-avatar {
    display: block;
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    object-fit: cover;
    object-position: center;
    border: 3px solid #198754;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 14px rgba(25, 135, 84, 0.2);
}

.org-avatar-small {
    width: 58px;
    height: 58px;
}

.org-card strong {
    display: block;
    margin-bottom: 5px;
}

.org-card small {
    display: block;
    color: #6b7280;
}

.profile-tabs {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}
.navbar-custom {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    flex-shrink: 0;
    font-weight: 700;
    color: #198754 !important;
}

.navbar-custom .navbar-collapse {
    min-width: 0;
}

.navbar-custom .navbar-nav {
    margin-left: auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: 500;
    margin-left: 4px;
    padding-right: 8px;
    padding-left: 8px;
    white-space: nowrap;
    transition: 0.2s;
}

.navbar-nav .nav-link:hover {
    color: #198754;
}

.navbar-nav .nav-link.active {
    color: #198754 !important;
    font-weight: 700;
}

.public-main-menu .nav-link {display:flex;align-items:center;gap:6px}
.public-main-menu .nav-link>i {width:16px;color:#198754;font-size:13px;text-align:center}
.public-main-menu .dropdown-toggle::after {margin-left:2px;vertical-align:middle}
.public-dropdown-menu {min-width:310px;padding:10px;border:1px solid #e1ebe6;border-radius:14px;box-shadow:0 18px 45px rgba(18,55,42,.14)}
.public-dropdown-menu .dropdown-item {display:flex;align-items:center;gap:12px;padding:10px 11px;border-radius:9px;color:#24372e}
.public-dropdown-menu .dropdown-item:hover,.public-dropdown-menu .dropdown-item:focus {background:#edf8f2;color:#198754}
.public-dropdown-menu .dropdown-item>i {flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border-radius:9px;background:#e6f5ed;color:#198754}
.public-dropdown-menu .dropdown-item strong,.public-dropdown-menu .dropdown-item small {display:block}
.public-dropdown-menu .dropdown-item strong {font-size:13px}
.public-dropdown-menu .dropdown-item small {margin-top:2px;color:#7b8982;font-size:10px}

.institution-mega-menu {
    left: 50%;
    width: min(950px, calc(100vw - 32px));
    padding: 25px 30px;
    border: 1px solid #e1ebe6;
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(18, 55, 42, .17);
    transform: translateX(-50%);
}

.institution-mega-grid {display:grid;grid-template-columns:1.85fr 1fr 1fr;gap:24px}
.institution-mega-section + .institution-mega-section {padding-left:24px;border-left:1px solid #e8eeeb}
.institution-mega-section h6 {margin:0 0 12px;padding-bottom:9px;border-bottom:1px dashed #d9e4df;color:#93a3b5;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.institution-mega-section h6.institution-subheading {margin-top:15px}
.institution-link-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 16px}
.institution-link {display:flex;align-items:center;gap:11px;min-width:0;padding:8px 6px;border-radius:11px;color:#27362f;text-decoration:none;transition:background-color .2s ease,color .2s ease,transform .2s ease}
.institution-link:hover,.institution-link:focus {color:#198754;background:#f1f9f5;transform:translateY(-1px)}
.institution-logo-wrap {flex:0 0 39px;width:39px;height:39px;display:grid;place-items:center;border-radius:10px;background:#f4f7f5;overflow:hidden}
.institution-logo-wrap img {width:100%;height:100%;padding:4px;object-fit:contain}
.institution-logo-fallback {color:#198754;background:#e9f7ef;font-size:16px}
.institution-link:nth-of-type(2n) .institution-logo-fallback {background:#eef2ff;color:#6750c8}
.institution-link span,.institution-link strong,.institution-link small {display:block;min-width:0}
.institution-link strong {font-size:13px;line-height:1.25}
.institution-link small {margin-top:2px;color:#738279;font-size:10px;line-height:1.35}

@media (min-width:1200px) {
    .public-main-menu .dropdown:hover>.dropdown-menu {display:block;margin-top:0}
    .public-main-menu .public-institution-nav:hover>.institution-mega-menu {display:block;margin-top:0}
}

@media (max-width:1199.98px) {
    .institution-mega-menu {left:auto;width:100%;max-height:65vh;padding:16px;overflow-y:auto;transform:none;box-shadow:none}
    .institution-mega-grid {grid-template-columns:1fr}
    .institution-mega-section + .institution-mega-section {padding-left:0;border-left:0}
}

@media (max-width:575.98px) {
    .institution-link-grid {grid-template-columns:1fr}
}

@media (min-width:1400px) {
    .public-main-menu {transform:translateX(32px)}
}

/* Align the desktop menu with the same Bootstrap container as page content. */
@media (min-width: 1400px) {
    .navbar-custom .navbar-brand {
        margin-right: 20px;
    }
}

/* Keep the full desktop navigation on one line inside Bootstrap's container. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-custom .navbar-brand {
        margin-right: 12px;
    }

    .navbar-custom .navbar-nav .nav-link {
        margin-left: 0;
        padding-right: 4px;
        padding-left: 4px;
        font-size: 13px;
    }

    .navbar-custom .brand-title {
        font-size: 22px;
    }
}

.footer-section {
    background: linear-gradient(135deg, #0d5c31, #198754);
    color: white;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-link:hover {
    color: white;
}

.social-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: 0.2s;
}

.social-circle:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.logo-desa {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.footer-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.brand-title {
    font-size: 26px;
    font-weight: 700;
    color: #198754;
}

@media (max-width: 1199.98px) {
    .navbar-custom .container {
        flex-wrap: wrap;
    }

    .navbar-custom .navbar-brand {
        min-width: 0;
        max-width: calc(100% - 64px);
        margin-right: 0;
    }

    .navbar-custom .navbar-brand > div {
        min-width: 0;
    }

    .navbar-custom .navbar-toggler {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .navbar-custom .navbar-collapse {
        flex-basis: 100%;
    }

    .navbar-custom .navbar-nav {
        align-items: stretch;
        padding: 12px 0 6px;
    }

    .navbar-custom .navbar-nav .nav-link {
        margin-left: 0;
        padding: 9px 4px;
    }
}

@media (max-width: 575.98px) {
    .navbar-custom .container {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .logo-desa {
        width: 48px;
        height: 48px;
    }

    .navbar-custom .navbar-brand {
        max-width: calc(100% - 54px);
    }

    .navbar-custom .brand-title {
        overflow: hidden;
        font-size: clamp(17px, 5.1vw, 21px);
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-custom .navbar-brand small {
        display: block;
        overflow: hidden;
        font-size: clamp(10px, 3.2vw, 13px);
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-custom .navbar-toggler {
        width: 44px;
        height: 42px;
        padding: 5px 7px;
    }

    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    main,
    main > section,
    main > div {
        min-width: 0;
    }

    h1,
    h2,
    h3,
    p,
    a,
    span {
        overflow-wrap: break-word;
    }

    .footer-section {
        padding-bottom: 28px !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1085;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 6px 4px calc(5px + env(safe-area-inset-bottom));
        border-top: 1px solid #dce7e2;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -8px 24px rgba(16, 52, 39, .12);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav__item {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 52px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        padding: 3px 1px;
        color: #718078;
        font-size: 9px;
        font-weight: 600;
        line-height: 1;
        text-align: center;
        text-decoration: none;
        transition: color .2s ease, transform .2s ease;
    }

    .mobile-bottom-nav__item i {
        display: grid;
        width: 27px;
        height: 25px;
        place-items: center;
        border-radius: 9px;
        font-size: 15px;
        transition: background-color .2s ease;
    }

    .mobile-bottom-nav__item.active {
        color: var(--primary-color, #198754);
    }

    .mobile-bottom-nav__item.active i {
        background: #e9f7ef;
    }

    .mobile-bottom-nav__item:active {
        transform: translateY(1px);
    }
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.15);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.9);
}
/* Global hero image: source is VillageProfile.hero_banner_image via layout CSS variable. */
.greeting-hero,
.organization-hero,
.area-hero,
.history-hero,
.vision-hero,
.transparency-hero,
.home-hero {
    background-image: var(--village-hero-image) !important;
    background-position: center !important;
    background-size: cover !important;
}

.news-hero-card,
.agenda-hero-card,
.announcement-hero-card,
.developments-hero-card,
.gallery-hero-card,
.profile-hero-card,
.service-hero-card,
.contact-hero-card {
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.65)),
        var(--village-hero-image) !important;
    background-position: center !important;
    background-size: cover !important;
}

.service-detail-hero {
    background-image:
        linear-gradient(135deg, rgba(247, 252, 249, 0.92), rgba(255, 255, 255, 0.82)),
        var(--village-hero-image) !important;
    background-position: center !important;
    background-size: cover !important;
}

/* Unified public-page banner; the homepage keeps its dedicated slider. */
:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero,.greeting-hero,.history-hero,.vision-hero,.organization-hero,.area-hero,.transparency-hero,.potential-hero,.pot-detail-hero,.umkm-hero) {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    padding: 70px 0 105px;
    overflow: hidden;
    color: #fff;
    background-image: linear-gradient(90deg,rgba(5,52,38,.93),rgba(8,75,55,.70),rgba(6,42,34,.55)),var(--village-hero-image) !important;
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero,.potential-hero,.pot-detail-hero,.umkm-hero)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg,rgba(5,52,38,.93),rgba(8,75,55,.70),rgba(6,42,34,.55));
}

:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero,.greeting-hero,.history-hero,.vision-hero,.organization-hero,.area-hero,.transparency-hero,.potential-hero,.pot-detail-hero,.umkm-hero) > .container {
    position: relative;
    z-index: 2;
}

:is(.news-hero-card,.agenda-hero-card,.announcement-hero-card,.developments-hero-card,.gallery-hero-card,.profile-hero-card,.service-hero-card,.contact-hero-card,.service-detail-hero-card) {
    width: 100%;
    max-width: 850px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    color: #fff;
}

:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero) :is(h1,h2,p,small,strong,a) {
    color: inherit !important;
}

:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero) h1 {
    max-width: 950px;
    margin-top: 24px !important;
    color: #fff !important;
    font-size: clamp(2.6rem,4.5vw,4.2rem) !important;
    line-height: 1.05;
    letter-spacing: -.04em;
}

:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero) p {
    max-width: 760px;
    color: rgba(255,255,255,.78) !important;
}

:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero) small {
    color: #71e2a9 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
}

:is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.profile-hero,.service-hero,.contact-hero) .title-line {
    display: none;
}

.service-detail-hero-content h1,.service-detail-hero-content p,.service-detail-breadcrumb,.service-detail-breadcrumb strong,.service-detail-breadcrumb a {
    color: inherit !important;
}

.service-detail-main-icon {
    color: #fff;
    background: rgba(255,255,255,.16);
}

.potential-hero,.umkm-hero { text-align: left; }
.potential-hero .container,.umkm-hero .container { width: 100%; }
.potential-title { font-size: clamp(2.8rem,4.5vw,4.2rem) !important; }

@media (max-width: 767.98px) {
    :is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero,.greeting-hero,.history-hero,.vision-hero,.organization-hero,.area-hero,.transparency-hero,.potential-hero,.pot-detail-hero,.umkm-hero) {
        min-height: 300px;
        padding: 52px 0 82px;
    }
    :is(.news-hero,.agenda-hero,.announcement-hero,.developments-hero,.gallery-hero,.profile-hero,.service-hero,.contact-hero,.service-detail-hero) h1 {
        font-size: clamp(2.2rem,11vw,3.1rem) !important;
    }
}
