/* =====================================================
   Bluestron Mega Menu — styles.css
   CSS custom properties are injected via wp_add_inline_style
   ===================================================== */

/* ── Defaults (overridden by WP inline style) ── */
:root {
    --bm-primary:     #0B2545;
    --bm-accent:      #4FC3F7;
    --bm-accent-dark: #29B6F6;
    --bm-card-bg:     #0B2545;
    --bm-card-hover:  #163660;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* =====================================================
   TOP BAR
   ===================================================== */
.bm-top-bar {
    background: #081d38;
    color: #94B8D4;
    font-size: 13px;
    padding: 7px 28px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
}

.bm-top-bar__left { margin-right: auto; }
.bm-top-bar__icon { font-size: 12px; }

.bm-top-bar a {
    color: #94B8D4;
    text-decoration: none;
}
.bm-top-bar a:hover { color: #fff; }

/* =====================================================
   NAVBAR
   ===================================================== */
.bm-wrapper { position: relative; }

.bm-nav {
    background: var(--bm-primary);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 0;
}

/* Logo */
.bm-logo {
    text-decoration: none;
    margin-right: 28px;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    flex-shrink: 0;
}

.bm-logo__img {
    height: 36px;
    width: auto;
}

.bm-logo__text {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.bm-logo__dot { color: var(--bm-accent); }

.bm-logo__tagline {
    color: #7090B0;
    font-size: 10px;
    letter-spacing: 0.02em;
}

/* Nav items list */
.bm-nav__items {
    display: flex;
    align-items: center;
    list-style: none;
    flex: 1;
    gap: 0;
}

.bm-nav__item {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 64px;
    padding: 0 16px;
    color: #A8C0D8;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
    position: relative;
}

.bm-nav__item:hover,
.bm-nav__item.is-active {
    color: #fff;
    border-bottom: 3px solid var(--bm-accent);
}

/* Chevron */
.bm-chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s;
}

.bm-nav__item.is-active .bm-chevron {
    transform: rotate(225deg) translateY(-2px);
}

/* CTA Sign In button */
.bm-cta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bm-accent);
    color: var(--bm-primary);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}

.bm-cta:hover { background: var(--bm-accent-dark); }
.bm-cta__icon { font-size: 10px; }

/* Mobile toggle — hidden on desktop */
.bm-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    margin-left: 16px;
    padding: 4px 8px;
}

/* =====================================================
   MEGA PANELS CONTAINER
   ===================================================== */
.bm-panels {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 200;
}

/* =====================================================
   MEGA PANEL (shared)
   ===================================================== */
.bm-panel {
    display: none;
    background: #fff;
    border-top: 3px solid var(--bm-accent);
    box-shadow: 0 12px 32px rgba(11, 37, 69, 0.12);
    padding: 28px 32px 32px;
    gap: 0;
    animation: bmSlideIn 0.18s ease;
}

.bm-panel.is-open { display: flex; }

@keyframes bmSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Column base ── */
.bm-col { display: flex; flex-direction: column; }

.bm-col__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 12px;
}

/* ── Column 1: Skills ── */
.bm-col--skills {
    min-width: 190px;
    border-right: 1px solid #E2E8F0;
    padding-right: 24px;
    margin-right: 24px;
}

.bm-skill-list { list-style: none; }

.bm-skill-item {
    font-size: 14px;
    color: #475569;
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 2px solid transparent;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.bm-skill-item:hover {
    background: #EFF6FF;
    color: var(--bm-primary);
}

.bm-skill-item.is-active {
    background: #EFF6FF;
    color: var(--bm-primary);
    font-weight: 600;
    border-left: 2px solid var(--bm-accent);
    padding-left: 8px;
}

/* ── Column 2: Focus ── */
.bm-col--focus {
    min-width: 240px;
    border-right: 1px solid #E2E8F0;
    padding-right: 24px;
    margin-right: 24px;
}

.bm-focus-list { list-style: none; }

.bm-focus-item {
    font-size: 14px;
    color: #475569;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.bm-focus-item:hover,
.bm-focus-item.is-active {
    background: #EFF6FF;
    color: var(--bm-primary);
    font-weight: 500;
}

/* ── Column 3: Courses ── */
.bm-col--courses { flex: 1; }

.bm-courses-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.bm-course-card {
    background: var(--bm-card-bg);
    border-radius: 8px;
    padding: 14px 14px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.bm-course-card:hover { background: var(--bm-card-hover); }

.bm-course-card__title {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
}

.bm-course-card__meta {
    font-size: 12px;
    color: var(--bm-accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

.bm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    display: inline-block;
    flex-shrink: 0;
}

/* Browse all button */
.bm-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bm-card-bg);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.bm-browse-btn:hover { background: var(--bm-card-hover); color: #fff; }

/* Placeholder panel */
.bm-panel__placeholder {
    padding: 24px;
    color: #64748B;
    font-size: 14px;
}

/* =====================================================
   MOBILE DRAWER
   ===================================================== */
.bm-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 290px;
    height: 100%;
    background: var(--bm-primary);
    color: #fff;
    transition: left 0.28s ease;
    padding: 0;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.bm-drawer.is-open { left: 0; }

.bm-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bm-drawer__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.bm-drawer__list {
    list-style: none;
    flex: 1;
    padding: 8px 0;
}

.bm-drawer__item {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    color: #CBD5E1;
}

.bm-drawer__item:hover { color: #fff; background: rgba(255,255,255,0.05); }

.bm-drawer__sub {
    display: none;
    margin-top: 10px;
    padding-left: 8px;
}

.bm-drawer__item.is-open .bm-drawer__sub { display: block; }

.bm-drawer__sub strong {
    display: block;
    color: var(--bm-accent);
    font-size: 12px;
    margin: 10px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bm-drawer__sub a {
    display: block;
    color: #94A3B8;
    text-decoration: none;
    font-size: 13px;
    padding: 3px 0;
}

.bm-cta--drawer {
    margin: 16px 20px 24px;
    justify-content: center;
    border-radius: 6px;
}

.bm-drawer__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
}

.bm-drawer__overlay.is-open { display: block; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
    .bm-nav__items { display: none; }
    .bm-cta         { display: none; }
    .bm-mobile-toggle { display: block; margin-left: auto; }
}

@media (max-width: 700px) {
    .bm-courses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
