/* ==========================================================================
   HEADER (NAVBAR) STYLES — FIGMA "Landing Page Satu 2" (node 10621:1812)
   PT UTAMA BERKAH MUKTI — floating pill navbar
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    padding: 24px 80px 0;
    pointer-events: none;
    transition: padding 0.3s ease;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    background: #FFFFFF;
    border-radius: 100px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    transition: box-shadow 0.3s ease;
}

.site-header.header-scrolled {
    padding-top: 12px;
}

.site-header.header-scrolled .header-inner {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   LOGO
   -------------------------------------------------------------------------- */
.header-logo {
    padding: 0 14px;
    flex-shrink: 0;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo-img {
    width: 52px;
    height: 60px;
    display: block;
}

/* --------------------------------------------------------------------------
   NAVIGATION LINKS
   -------------------------------------------------------------------------- */
.header-nav {
    flex: 1 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.nav-item-link {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    text-align: center;
    color: #333333;
    text-decoration: none;
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-item-link:hover,
.nav-item-link:focus-visible {
    color: #AA2713;
}

.nav-item-link.active {
    font-weight: 600;
    color: #333333;
    border-bottom-color: #AA2713;
}

/* --------------------------------------------------------------------------
   DROPDOWN MENU: LAYANAN (DESKTOP)
   -------------------------------------------------------------------------- */
.header-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-chevron-icon {
    width: 15px;
    height: 15px;
    color: #FFFFFF;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    flex-shrink: 0;
}

.header-nav-dropdown:hover .nav-chevron-icon,
.header-nav-dropdown.open .nav-chevron-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 310px;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Bridge to prevent menu closing when moving cursor */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    width: 100%;
    height: 14px;
}

/* Hover or Open trigger */
.header-nav-dropdown:hover .nav-dropdown-menu,
.header-nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dropdown-item-link:hover {
    background: #F7F8FA;
    transform: translateX(3px);
}

.dropdown-item-link.active {
    background: #F7F8FA;
    border-left: 3px solid #AA2713;
}

.dropdown-item-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.dropdown-item-title {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 20px;
    color: #292929;
    display: block;
    transition: color 0.2s ease;
}

.dropdown-item-link:hover .dropdown-item-title {
    color: #AA2713;
}

.dropdown-item-sub {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #777777;
    display: block;
    margin-top: 2px;
}


.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-chevron-icon {
    width: 18px;
    height: 18px;
    color: #333333;
}

/* --------------------------------------------------------------------------
   WHATSAPP BUTTON
   -------------------------------------------------------------------------- */
.header-whatsapp {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-wa-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #102F60;
    border-radius: 24px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-wa-header svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}

.btn-wa-header span {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.128px;
    color: #FFFFFF;
    white-space: nowrap;
}

.btn-wa-header:hover {
    background: #1D3A72;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 47, 96, 0.3);
}

/* --------------------------------------------------------------------------
   HAMBURGER TOGGLE (MOBILE)
   -------------------------------------------------------------------------- */
.header-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.header-toggle span {
    width: 24px;
    height: 2.5px;
    background: #102F60;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header-toggle.open span:nth-child(2) {
    opacity: 0;
}

.header-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5.5px);
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .site-header {
        padding-left: 24px;
        padding-right: 24px;
    }

    .header-nav {
        gap: 4px;
    }
}

@media (max-width: 1024px) {
    .site-header {
        padding: 16px 16px 0;
    }

    .header-inner {
        border-radius: 24px;
        padding: 8px 12px;
        position: relative;
    }

    .header-logo {
        padding: 0 4px;
    }

    .header-logo-img {
        width: 42px;
        height: 48px;
    }

    .header-toggle {
        display: flex;
    }

    .header-whatsapp {
        display: none;
    }

    .header-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px 20px 20px;
        background: #FFFFFF;
        border-radius: 20px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }

    .header-nav.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-item-link {
        width: 100%;
        text-align: left;
        padding: 14px 0;
        font-size: 17px;
        line-height: 24px;
        border-bottom: 1px solid #E2E8F0;
        box-sizing: border-box;
    }

    .nav-item-link.active {
        border-bottom: 2px solid #AA2713;
    }

    .header-nav-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        border: none;
        padding: 6px 0 10px 12px;
        background: transparent;
        display: none;
        width: 100%;
        min-width: unset;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .header-nav-dropdown.open .nav-dropdown-menu {
        display: flex;
    }

    .dropdown-item-link {
        padding: 10px 8px;
        border-radius: 6px;
    }

    .header-whatsapp-mobile {
        display: flex;
        width: 100%;
        margin-top: 20px;
    }

    .header-whatsapp-mobile .btn-wa-header {
        width: 100%;
        height: 48px;
    }
}
