/* ==========================================================================
   KIWI VIETNAM - SYNCHRONIZED HEADER
   ========================================================================== */
.kiwi-navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 74px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.kiwi-navbar.scrolled {
    height: 68px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    border-bottom-color: #e2e8f0;
}

/* Compatibility with Logged-in Admin Bar */
body.has-admin-bar {
    padding-top: 38px !important;
}

body.has-admin-bar .kiwi-navbar {
    top: 38px !important;
}

body.has-admin-bar .kiwi-drawer {
    top: 38px !important;
    height: calc(100vh - 38px) !important;
    height: calc(100dvh - 38px) !important;
}

.kiwi-nav-container {
    max-width: 1260px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Brand Logo */
.kiwi-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.kiwi-brand-logo {
    max-height: 44px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease;
}

.kiwi-brand:hover .kiwi-brand-logo {
    transform: scale(1.03);
}

/* Desktop Navigation */
.kiwi-desktop-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.kiwi-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    height: 100%;
}

.kiwi-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.kiwi-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #334155 !important;
    text-decoration: none !important;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.1px;
}

.kiwi-nav-link:hover {
    color: #86ae2c !important;
    background: rgba(134, 174, 44, 0.08);
}

.kiwi-nav-link.active {
    color: #86ae2c !important;
    background: rgba(134, 174, 44, 0.1);
    font-weight: 700;
}

.kiwi-arrow-icon {
    font-size: 11px;
    transition: transform 0.25s ease;
    opacity: 0.75;
}

.kiwi-has-dropdown:hover .kiwi-arrow-icon {
    transform: rotate(180deg);
    color: #86ae2c;
}

/* Ecosystem Dropdown Menu */
.kiwi-dropdown-menu {
    position: absolute;
    top: calc(100% - 6px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 320px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}

.kiwi-has-dropdown:hover .kiwi-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.kiwi-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kiwi-dropdown-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.kiwi-dropdown-card:hover {
    background: #f8fafc;
    transform: translateX(3px);
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.audio-icon {
    background: #f0fdf4;
    color: #16a34a;
}
.kiwi-dropdown-card:hover .audio-icon {
    background: #86ae2c;
    color: #ffffff;
}

.box-icon {
    background: #eff6ff;
    color: #2563eb;
}
.kiwi-dropdown-card:hover .box-icon {
    background: #2563eb;
    color: #ffffff;
}

.cell-icon {
    background: #fffbeb;
    color: #d97706;
}
.kiwi-dropdown-card:hover .cell-icon {
    background: #d97706;
    color: #ffffff;
}

.card-info {
    flex: 1;
}

.card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.card-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    text-transform: uppercase;
}

.card-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.4;
}

/* Header Actions (Right) */
.kiwi-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* Hotline Pill */
.kiwi-hotline-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.kiwi-hotline-pill:hover {
    background: #ffffff;
    border-color: #86ae2c;
    box-shadow: 0 4px 14px rgba(134, 174, 44, 0.15);
    transform: translateY(-1px);
}

.hotline-badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #86ae2c, #6c8d23);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
}

.hotline-badge-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.hotline-title {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.hotline-num {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.2px;
}

/* Mobile Hamburger Button */
.kiwi-hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    gap: 5px;
    transition: all 0.2s ease;
}

.hamburger-bar {
    width: 22px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.kiwi-hamburger-btn:hover {
    background: rgba(134, 174, 44, 0.1);
    border-color: #86ae2c;
}

.kiwi-hamburger-btn:hover .hamburger-bar {
    background: #86ae2c;
}

/* ==========================================================================
   OFF-CANVAS MOBILE DRAWER
   ========================================================================== */
.kiwi-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.kiwi-drawer.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    z-index: 2;
}

.kiwi-drawer.active .drawer-panel {
    transform: translateX(0);
}

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

.drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

.drawer-nav {
    flex: 1;
    padding: 16px 14px;
}

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

.drawer-menu > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #334155 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.drawer-menu > li > a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #64748b;
}

.drawer-menu > li > a:hover,
.drawer-menu > li > a.active {
    background: rgba(134, 174, 44, 0.1);
    color: #86ae2c !important;
}

.drawer-menu > li > a:hover i,
.drawer-menu > li > a.active i {
    color: #86ae2c;
}

.drawer-sub-toggle .sub-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.25s ease;
}

.drawer-has-sub.open .sub-arrow {
    transform: rotate(180deg);
}

.drawer-sub-menu {
    list-style: none;
    margin: 4px 0 8px 32px;
    padding: 0;
    display: none;
    flex-direction: column;
    gap: 6px;
    border-left: 2px solid #e2e8f0;
    padding-left: 10px;
}

.drawer-has-sub.open .drawer-sub-menu {
    display: flex;
}

.drawer-sub-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #475569 !important;
}

.drawer-sub-menu li a:hover {
    background: #f8fafc;
    color: #86ae2c !important;
}

.drawer-sub-menu li a strong {
    display: block;
    font-size: 13.5px;
    color: #1e293b;
}

.drawer-sub-menu li a span {
    display: block;
    font-size: 11.5px;
    color: #64748b;
}

.drawer-footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.drawer-hotline-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
}

.drawer-hotline-card .card-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #86ae2c, #6c8d23);
    color: #ffffff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.drawer-hotline-card .card-label {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.drawer-hotline-card .card-num {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none !important;
}

.drawer-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.info-row i {
    color: #86ae2c;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .kiwi-navbar {
        height: 64px;
    }
    .kiwi-desktop-nav,
    .desktop-only {
        display: none !important;
    }
    .kiwi-hamburger-btn {
        display: flex !important;
    }
    .kiwi-brand-logo {
        max-height: 38px;
    }
}
