/* ==========================================================
   Header / Navbar
   ========================================================== */

/* ============================================
   HEADER - Prefix km- agar tidak bentrok Bootstrap
   ============================================ */

.km-header {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 999;
    width: 100%;
    background: transparent;
}

.km-header-inner {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
}
/* ---- Logo (original structure) ---- */

.km-header .logo-box, .km-sticky .logo-box {
    flex-shrink: 0;
}

.km-header .logo-box .logo a, .km-sticky .logo-box .logo a {
    display: inline-flex;
    align-items: center;
}

.km-header .logo-box .logo img {
    height: 50px;
    width: auto;
}
/* ---- Desktop Nav ---- */

.km-nav-desktop {
    display: flex;
    align-items: center;
}

.km-nav-desktop > ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.km-nav-desktop > ul > li {
    position: relative;
}

.km-nav-desktop > ul > li > a {
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 0.3s;
    position: relative;
}

.km-nav-desktop > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.km-nav-desktop > ul > li:hover > a, .km-nav-desktop > ul > li.active > a {
    color: #ffffff;
}

.km-nav-desktop > ul > li:hover > a::after, .km-nav-desktop > ul > li.active > a::after {
    transform: translateX(-50%) scaleX(1);
}
/* Dropdown arrow */

.km-nav-desktop > ul > li.has-dropdown > a {
    padding-right: 30px;
}

.km-nav-desktop > ul > li.has-dropdown > a .km-arrow {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255,255,255,0.5);
    transition: transform 0.3s, border-color 0.3s;
}

.km-nav-desktop > ul > li.has-dropdown:hover > a .km-arrow {
    border-top-color: #fff;
    transform: translateY(-50%) rotate(180deg);
}
/* ---- Dropdown ---- */

.km-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 250px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    list-style: none;
    z-index: 100;
}

.km-nav-desktop > ul > li:hover > .km-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.km-dropdown li a {
    display: block;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    transition: all 0.2s;
}

.km-dropdown li a:hover {
    background: #f0f7fb;
    color: #136c98;
    padding-left: 28px;
}
/* ---- Right section ---- */

.km-header-right {
    display: flex;
    align-items: center;
    margin-left: 16px;
}

.km-divider {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,0.2);
    margin: 0 14px;
}

.km-langs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.km-langs a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    border-radius: 5px;
    transition: background 0.2s;
    text-decoration: none;
}

.km-langs a:hover {
    background: rgba(255,255,255,0.12);
}

.km-langs a img {
    width: 22px;
    height: auto;
    border-radius: 2px;
}

.km-social {
    display: flex;
    align-items: center;
    gap: 0;
}

.km-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: rgba(255,255,255,0.65);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.25s;
}

.km-social a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
/* ---- Hamburger (mobile) ---- */

.km-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: rgba(19, 108, 152, 0.85);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.km-hamburger:hover {
    background: #136c98;
}

.km-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.km-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.km-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.km-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
/* ---- Mobile Nav ---- */

.km-nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    padding: 12px 0;
    z-index: 999;
}

.km-nav-mobile.open {
    display: block;
    animation: kmSlideDown 0.25s ease;
}

@keyframes kmSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.km-nav-mobile ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.km-nav-mobile > ul > li > a {
    display: block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.km-nav-mobile > ul > li.active > a {
    color: #136c98;
    font-weight: 600;
}

.km-nav-mobile > ul > li > a:hover {
    background: #f5f8fa;
    color: #136c98;
}

.km-nav-mobile .km-mob-sub {
    padding: 0 0 8px 0;
    background: #f8f9fb;
}

.km-nav-mobile .km-mob-sub a {
    display: block;
    padding: 9px 24px 9px 40px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.km-nav-mobile .km-mob-sub a:hover {
    color: #136c98;
}

.km-nav-mobile .km-mob-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 24px 8px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

.km-nav-mobile .km-mob-bottom a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #555;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.km-nav-mobile .km-mob-bottom a:hover {
    background: #f0f0f0;
    color: #136c98;
}

.km-nav-mobile .km-mob-bottom .mob-flag {
    border-radius: 6px;
}

.km-nav-mobile .km-mob-bottom .mob-flag img {
    width: 22px;
    height: auto;
    border-radius: 2px;
}
/* ============================================
   STICKY HEADER
   ============================================ */

.km-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
    transform: translateY(-100%);
    transition: transform 0.35s ease;
}

.km-sticky.show {
    transform: translateY(0);
}

.km-sticky .km-header-inner {
    height: 65px;
}

.km-sticky .logo-box .logo img {
    height: 40px;
}

.km-sticky .km-nav-desktop > ul > li > a {
    color: #444;
    font-size: 15px;
    padding: 10px 18px;
}

.km-sticky .km-nav-desktop > ul > li > a::after {
    background: #136c98;
}

.km-sticky .km-nav-desktop > ul > li:hover > a, .km-sticky .km-nav-desktop > ul > li.active > a {
    color: #136c98;
}

.km-sticky .km-nav-desktop > ul > li.has-dropdown > a .km-arrow {
    border-top-color: rgba(0,0,0,0.35);
}

.km-sticky .km-nav-desktop > ul > li.has-dropdown:hover > a .km-arrow {
    border-top-color: #136c98;
}

.km-sticky .km-divider {
    background: rgba(0,0,0,0.12);
}

.km-sticky .km-social a {
    color: rgba(0,0,0,0.45);
}

.km-sticky .km-social a:hover {
    color: #136c98;
    background: rgba(19,108,152,0.08);
}

.km-sticky .km-hamburger {
    background: #136c98;
}
/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1080px) {
    .km-nav-desktop, .km-header-right {
        display: none !important;
    }
    .km-hamburger {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .km-header-inner {
        padding: 0 16px;
        height: 70px;
    }
    .km-header .logo-box .logo img {
        height: 36px;
    }
    .km-nav-mobile {
        left: 10px;
        right: 10px;
    }
}
