/**
 * HealthGrowth.in - Header Categories Mega Menu Styles
 */

.nav-item-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 16px 0;
}

.nav-dropdown-trigger {
    color: #173b58;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-dropdown-trigger:hover,
.nav-item-dropdown:hover .nav-dropdown-trigger {
    color: var(--green);
}

.dropdown-chevron {
    font-size: 11px;
    transition: transform 0.2s ease;
    display: inline-block;
}

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

.categories-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-40%) translateY(10px);
    width: 680px;
    background: #ffffff;
    border: 1px solid #d5ede2;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(16, 54, 84, 0.12), 0 0 0 1px rgba(17,150,91,0.06);
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

.nav-item-dropdown:hover .categories-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-40%) translateY(0);
}

.mega-menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf6f2;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.mega-menu-top strong {
    display: block;
    color: #103654;
    font-size: 14px;
}

.mega-menu-top span {
    font-size: 11px;
    color: #698296;
}

.view-all-cats-link {
    font-size: 12px;
    color: #11965b;
    font-weight: 700;
    text-decoration: none;
}

.view-all-cats-link:hover {
    text-decoration: underline;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.mega-cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fbfefd;
    border: 1px solid #eaf5f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.mega-cat-item:hover {
    background: #eef9f4;
    border-color: #8cd6b5;
    transform: translateY(-1px);
}

.mega-cat-icon {
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
}

.mega-cat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mega-cat-name {
    font-size: 12px;
    font-weight: 600;
    color: #123d5d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-cat-item:hover .mega-cat-name {
    color: #087b49;
}

.mega-cat-count {
    font-size: 10px;
    color: #728c9e;
}

/* ================= DARK MODE OVERRIDES ================= */
[data-theme="dark"] .nav-dropdown-trigger {
    color: #cbd5e1;
}

[data-theme="dark"] .nav-dropdown-trigger:hover,
[data-theme="dark"] .nav-item-dropdown:hover .nav-dropdown-trigger {
    color: #34d399;
}

[data-theme="dark"] .categories-mega-menu {
    background: #132238 !important;
    border-color: #23354d !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .mega-menu-top {
    border-bottom-color: #1e2f47 !important;
}

[data-theme="dark"] .mega-menu-top strong {
    color: #f8fafc !important;
}

[data-theme="dark"] .mega-menu-top span {
    color: #94a3b8 !important;
}

[data-theme="dark"] .view-all-cats-link {
    color: #34d399 !important;
}

[data-theme="dark"] .mega-cat-item {
    background: #0e1a2b !important;
    border-color: #1e2f47 !important;
}

[data-theme="dark"] .mega-cat-item:hover {
    background: #192c47 !important;
    border-color: #10b981 !important;
}

[data-theme="dark"] .mega-cat-name {
    color: #f8fafc !important;
}

[data-theme="dark"] .mega-cat-item:hover .mega-cat-name {
    color: #34d399 !important;
}

[data-theme="dark"] .mega-cat-count {
    color: #94a3b8 !important;
}