@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&display=swap');

.dinkes-navbar-wrapper {
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.dinkes-navbar {
    height: 103px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40.8px);
    -webkit-backdrop-filter: blur(40.8px);
    border-bottom: 0.91px solid rgba(255, 255, 255, 0.16);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.dinkes-navbar.navbar-white {
    background: #FFFFFF;
    border-bottom: 1px solid #EAEAEA;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}


.dinkes-navbar-container {
    width: 100%;
    max-width: 1524px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo-pemkab {
    height: 45px;
    width: auto;
    display: block;
}

.logo-dinkes {
    height: 45px;
    width: auto;
    display: block;
}

.navbar-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.menu-item {
    font-size: 18px;
    font-weight: 700;
    color: #332C2B;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 1px;
    transition: color 0.3s ease;
}

.menu-item:hover, 
.menu-item.active {
    color: #009966;
}

.chevron-icon {
    width: 10px;
    height: 6px;
    display: inline-block;
    transition: transform 0.3s ease;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.5px !important;
    margin-left: 6px;
    vertical-align: middle;
}

.dropdown {
    position: relative;
}

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

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    list-style: none;
    padding: 8px 0;
    margin: 8px 0 0 0;
    min-width: 240px;
    z-index: 10000;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #332C2B;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(0, 153, 102, 0.08);
    color: #009966;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #332C2B;
    font-size: 28px;
    cursor: pointer;
    padding: 4px;
}

.emergency-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #EF4444;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    padding: 16px 24px;
    border-radius: 3px;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.emergency-floating-btn:hover {
    background: #DC2626;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.5);
}

.navbar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.navbar-overlay.active {
    display: block;
    opacity: 1;
}
.menu-header-mobile {
    display: none;
}

@media (max-width: 1024px) {
    .dinkes-navbar {
        height: 80px;
    }
    .dinkes-navbar-container {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        padding: 0 16px;
    }
    .navbar-brand {
        order: 1;
        gap: 10px;
        min-width: 0;
        max-width: none;
    }
    .logo-pemkab {
        height: 36px;
        width: auto;
        flex-shrink: 0;
    }
    .logo-dinkes {
        height: 36px;
        width: auto;
        max-width: 140px;
        object-fit: contain;
        flex-shrink: 1;
    }
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 0;
        flex-shrink: 0;
        background: none;
        border: none;
        color: #332C2B;
        cursor: pointer;
        padding: 4px;
    }
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden offscreen by default */
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        gap: 0;
        border-top: none;
        transition: right 0.3s ease;
        z-index: 10000;
        overflow-y: auto;
    }
    .navbar-menu.active {
        right: 0;
    }
    .menu-header-mobile {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 24px 24px 20px 24px;
        border-bottom: 1px solid #EAEAEA;
        margin-bottom: 8px;
    }
    .menu-title-mobile {
        font-weight: 800;
        font-size: 18px;
        color: #006045;
    }
    .menu-close-mobile {
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #475569;
        cursor: pointer;
        padding: 4px;
        transition: color 0.2s;
    }
    .menu-close-mobile:hover {
        color: #DC2626;
    }
    .menu-item {
        width: 100%;
        justify-content: space-between;
        padding: 14px 24px;
        border-bottom: 1px solid #F1F5F9;
        border-radius: 0;
    }
    .dropdown {
        width: 100%;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        background: #F8FAFC;
        display: none;
    }
    .dropdown.open .dropdown-menu,
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    .dropdown-item {
        padding: 12px 24px 12px 40px;
        border-bottom: 1px solid #F1F5F9;
    }
    .emergency-floating-btn {
        bottom: 20px;
        right: 20px;
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* ── Mobile Menu Drawer Styles ───────────────────────────────── */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: #FFFFFF;
    z-index: 100001;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.mobile-menu-drawer.open {
    left: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
}

.mobile-drawer-close {
    background: #F1F5F9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #332C2B;
    transition: background 0.2s ease;
}

.mobile-drawer-close:hover {
    background: #E2E8F0;
}

.mobile-drawer-menu {
    list-style: none;
    padding: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu-link {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #332C2B;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background: rgba(0, 153, 102, 0.08);
    color: #009966;
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: #332C2B;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-dropdown-toggle:hover {
    background: rgba(0, 153, 102, 0.08);
    color: #009966;
}

.mobile-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown.open .mobile-chevron {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    padding: 0 0 0 16px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-dropdown.open .mobile-submenu {
    max-height: 500px; /* ample height for submenu items */
    padding-top: 6px;
    padding-bottom: 6px;
}

.mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4B5563;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mobile-submenu a:hover {
    background: rgba(0, 153, 102, 0.06);
    color: #009966;
}

@media (max-width: 480px) {
    .dinkes-navbar-container {
        padding: 0 12px;
    }
    .navbar-brand {
        gap: 6px;
    }
    .logo-pemkab {
        height: 28px;
    }
    .logo-dinkes {
        height: 28px;
        max-width: 110px;
    }
}
