/* ==========================================================================
   EDSPARK HEADER — CONSOLIDATED, CONFLICT-FREE STYLESHEET
   Rebuilt from a file that had ~8 overlapping "final" attempts stacked with
   !important overrides. This version defines every selector exactly ONCE,
   uses real breakpoints (1200 / 991 / 767 / 575), and avoids !important
   entirely by keeping specificity flat and consistent.

   Visual language preserved: gradient top accent bar, glassy blurred header,
   pill-shaped desktop nav, dark-sidebar mega dropdown, gradient CTA button,
   off-canvas mobile drawer.
   ========================================================================== */

:root {
    --ed-blue: #0b4ea2;
    --ed-blue-2: #0a71b4;
    --ed-green: #11a37f;
    --ed-deep: #0f172a;
    --ed-text: #1f2937;
    --ed-muted: #64748b;
    --ed-border: rgba(15, 23, 42, 0.09);
    --ed-surface: #ffffff;
    --ed-soft: #f4fbff;
    --header-h-desktop: 86px;
    --header-h-tablet: 74px;
    --header-h-mobile: 66px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-top: var(--header-h-desktop);
}

/* ---------------------------------------------------------------------- */
/* Header shell                                                           */
/* ---------------------------------------------------------------------- */
.cosmic-hub {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--ed-border);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px) saturate(1.3);
}

.cosmic-hub::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ed-blue), var(--ed-green), #7c3aed, #f59e0b);
}

.galaxy-zone {
    max-width: 1320px;
    min-height: var(--header-h-desktop);
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ---------------------------------------------------------------------- */
/* Logo                                                                   */
/* ---------------------------------------------------------------------- */
.star-logo a {
    display: inline-flex;
    align-items: center;
}

.star-logo img {
    max-height: 54px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.10));
}

/* ---------------------------------------------------------------------- */
/* Desktop nav (orbit-path)                                                */
/* ---------------------------------------------------------------------- */
.orbit-path {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    list-style: none;
    margin: 0;
    padding: 6px;
    flex: 1 1 auto;
    max-width: 895px;
    margin-inline: auto;
    border: 1px solid var(--ed-border);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.celestial-node {
    position: relative;
}

.stellar-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 9px 12px;
    color: var(--ed-text);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.stellar-link:hover,
.celestial-node:hover>.stellar-link,
.celestial-node.active>.stellar-link {
    color: var(--ed-blue);
    background: var(--ed-soft);
}

.comet-tail {
    font-size: 10px;
    color: var(--ed-blue-2);
    transition: transform 0.2s ease;
}

.celestial-node:hover>.stellar-link .comet-tail,
.celestial-node.active>.stellar-link .comet-tail {
    transform: rotate(180deg);
}

/* ---------------------------------------------------------------------- */
/* CTA button                                                              */
/* ---------------------------------------------------------------------- */
.nova-zone {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.nova-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ed-blue), var(--ed-blue-2) 55%, var(--ed-green));
    color: #fff;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 14px 28px rgba(11, 78, 162, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nova-button:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(11, 78, 162, 0.3);
}

/* ---------------------------------------------------------------------- */
/* Mega dropdown (Workshopshud) — desktop only                            */
/* ---------------------------------------------------------------------- */
.ap-mega {
    position: static;
}

.ap-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translate(-50%, 10px);
    width: min(1120px, calc(100vw - 40px));
    height: min(520px, calc(100vh - 130px));
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    border-radius: 18px;
    overflow: hidden;
    background: var(--ed-surface);
    border: 1px solid var(--ed-border);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 1200;
}

.ap-mega:hover .ap-dropdown,
.ap-mega:focus-within .ap-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.ap-sidebar {
    padding: 20px 14px;
    overflow-y: auto;
    background: linear-gradient(180deg, #0f1f38 0%, #102844 55%, #0b4f6b 100%);
}

.ap-sidebar::before {
    content: "Workshop Categories";
    display: block;
    margin: 2px 10px 14px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ap-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    margin-bottom: 7px;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.78);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ap-cat span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.ap-cat i:first-child {
    width: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.ap-cat:hover,
.ap-cat.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(3px);
}

.ap-cat:hover i:first-child,
.ap-cat.active i:first-child {
    color: #79b7ff;
}

.ap-panels {
    padding: 22px 24px;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(17, 163, 127, 0.08), transparent 32%), #fff;
}

.ap-panel {
    display: none;
}

.ap-panel.active {
    display: block;
}

.ap-panel.active::before {
    content: attr(data-title) "\A" attr(data-subtitle);
    display: block;
    white-space: pre-line;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ed-border);
    color: var(--ed-deep);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
    max-width: 70%;
}

.ap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ap-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 92px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ed-border);
    background: #fff;
    color: var(--ed-text);
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ap-card:hover {
    color: var(--ed-blue-2);
    border-color: rgba(10, 113, 180, 0.26);
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.13);
}

.ap-thumb {
    position: relative;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f6ff, #e9fff8);
    overflow: hidden;
}

.ap-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ap-thumb i {
    position: relative;
    font-size: 24px;
    color: var(--ed-blue-2);
}

.grad-microsoft {
    background: linear-gradient(135deg, #0078d4, #50e6ff);
}

.grad-cs {
    background: linear-gradient(135deg, var(--ed-blue), var(--ed-blue-2));
}

.grad-agentic {
    background: linear-gradient(135deg, #121826, #2446d8 48%, #00a77f);
}

.grad-electrical {
    background: linear-gradient(135deg, #ff8a00, #e52e71);
}

.grad-mechanical {
    background: linear-gradient(135deg, #434343, #7f8c8d);
}

.grad-management {
    background: linear-gradient(135deg, var(--ed-green), #38ef7d);
}

.grad-medical {
    background: linear-gradient(135deg, #e53935, #e35d5b);
}

.grad-google {
    background: linear-gradient(135deg, #4285f4, #34a853 50%, #fbbc05);
}

.grad-placement {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
}

.ap-info {
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.ap-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    color: inherit;
}

.ap-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
    font-weight: 700;
    color: var(--ed-muted);
}

.ap-duration,
.ap-live {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.ap-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0f8a70;
    background: #eafaf5;
}

/* ---------------------------------------------------------------------- */
/* Mobile hamburger toggle                                                */
/* ---------------------------------------------------------------------- */
.lunar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ed-border);
    border-radius: 12px;
    background: #fff;
    color: var(--ed-deep);
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

/* ---------------------------------------------------------------------- */
/* Mobile off-canvas nav (cosmic-trail)                                   */
/* ---------------------------------------------------------------------- */
.cosmic-trail {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(360px, 88vw);
    background: #fff;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1500;
    overflow-y: auto;
    padding: 18px 14px 24px;
}

.cosmic-trail.show {
    transform: translateX(0);
}

.mobile-menu-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 8px 14px;
    border-bottom: 1px solid var(--ed-border);
    margin-bottom: 10px;
}

.mobile-menu-head span {
    font-weight: 900;
    font-size: 18px;
    color: var(--ed-deep);
}

.mobile-menu-head small {
    font-size: 12px;
    color: var(--ed-muted);
    font-weight: 700;
}

.cosmic-trail .celestial-node+.celestial-node {
    margin-top: 8px;
}

.cosmic-trail .stellar-link,
.cosmic-trail .nebula-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--ed-border);
    background: #fff;
    color: var(--ed-text);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.cosmic-trail .stellar-link>i:first-child,
.cosmic-trail .nebula-link>i:first-child {
    width: 20px;
    text-align: center;
    color: var(--ed-blue-2);
    margin-right: 4px;
}

.cosmic-trail .nebula-drop {
    display: none;
    list-style: none;
    margin: 8px 0 0;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--ed-border);
    background: var(--ed-soft);
}

.cosmic-trail .celestial-node.active>.nebula-drop {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cosmic-trail .nebula-drop .nebula-drop {
    padding: 6px;
    background: #fff;
}

.cosmic-trail .nebula-drop .nebula-drop .nebula-link {
    min-height: 42px;
    padding: 10px 12px 10px 32px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
}

.mobile-talk-link {
    color: #fff !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--ed-blue), var(--ed-green)) !important;
}

/* thumbnails/images don't belong in the mobile list */
.cosmic-trail img,
.cosmic-trail .ap-thumb {
    display: none;
}

/* ---------------------------------------------------------------------- */
/* Modals                                                                  */
/* ---------------------------------------------------------------------- */
.astral-modal,
.pulsar-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.astral-modal {
    background: rgba(0, 0, 0, 0.6);
}

.pulsar-modal {
    background: rgba(0, 0, 0, 0.7);
}

.astral-modal.show,
.pulsar-modal.show {
    display: flex;
    opacity: 1;
}

.astral-content {
    background: #fff;
    border-radius: 16px;
    padding: clamp(18px, 4vw, 28px);
    width: min(500px, 92vw);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    text-align: left;
    border: 1px solid var(--ed-border);
    transform: scale(0.92);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.astral-modal.show .astral-content {
    transform: scale(1);
}

.astral-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--ed-muted);
}

.astral-close:hover {
    color: var(--ed-blue-2);
}

.astral-content h2 {
    font-size: 22px;
    color: var(--ed-blue-2);
    margin: 0 0 18px;
    font-weight: 800;
}

.stellar-section {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.stellar-section h3 {
    font-size: 15px;
    margin: 0 0 6px;
    color: var(--ed-deep);
    font-weight: 700;
}

.stellar-section p {
    margin: 2px 0;
    font-size: 13.5px;
    color: #555;
}

.stellar-section a {
    color: var(--ed-blue-2);
    text-decoration: none;
    font-weight: 600;
}

.stellar-section a:hover {
    text-decoration: underline;
}

.pulsar-modal .popup-container {
    position: relative;
    width: 92%;
    max-width: 600px;
    max-height: 80vh;
}

.pulsar-modal img.popup-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pulsar-modal.show img.popup-image {
    transform: scale(1);
}

.pulsar-close {
    position: absolute;
    top: 10px;
    right: 18px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    z-index: 2001;
}

.pulsar-close:hover {
    color: var(--ed-blue-2);
}

/* ---------------------------------------------------------------------- */
/* Back to top                                                            */
/* ---------------------------------------------------------------------- */
.back-to-top {
    display: none;
    position: fixed;
    right: clamp(16px, 3vw, 24px);
    bottom: clamp(16px, 3vw, 24px);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ed-blue-2);
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.25);
    z-index: 900;
    font-size: 18px;
    opacity: 0.9;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.back-to-top:hover {
    background: #095d93;
    opacity: 1;
}

/* ---------------------------------------------------------------------- */
/* Elementor toggle (unrelated content component, kept for compatibility) */
/* ---------------------------------------------------------------------- */
.elementor-tab-content {
    display: none;
    padding: 15px;
    background-color: #f9f9f9;
}

.elementor-tab-content.active {
    display: block;
}

.elementor-tab-title.active .elementor-toggle-icon-closed {
    display: none;
}

.elementor-tab-title.active .elementor-toggle-icon-opened {
    display: inline-block;
}

.elementor-tab-title .elementor-toggle-icon-opened {
    display: none;
}

.elementor-tab-title .elementor-toggle-icon-closed {
    display: inline-block;
}

/* ==========================================================================
   BREAKPOINT: ≤ 1200px — Small desktop / large tablet
   ========================================================================== */
@media (max-width: 1200px) {
    .galaxy-zone {
        padding-inline: 18px;
        gap: 14px;
    }

    .stellar-link {
        padding-inline: 11px;
        font-size: 13.5px;
    }

    .ap-dropdown {
        width: min(920px, calc(100vw - 32px));
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

/* ==========================================================================
   BREAKPOINT: ≤ 991px — Tablet & mobile: switch to off-canvas nav
   ========================================================================== */
@media (max-width: 991px) {
    body {
        padding-top: var(--header-h-tablet);
    }

    .galaxy-zone {
        min-height: var(--header-h-tablet);
        padding: 10px 18px;
    }

    .star-logo img {
        max-height: 42px;
    }

    .orbit-path,
    .ap-dropdown,
    .nova-zone {
        display: none;
    }

    .lunar-toggle {
        display: inline-flex;
    }

    .cosmic-trail {
        top: 0;
    }

    /* dim backdrop behind the mobile drawer */
    body.nav-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1400;
    }
}

/* ==========================================================================
   BREAKPOINT: ≤ 767px — Large phones
   ========================================================================== */
@media (max-width: 767px) {
    .galaxy-zone {
        padding-inline: 14px;
    }

    .nova-button {
        padding: 0 18px;
        font-size: 13px;
        min-height: 40px;
    }

    .astral-content {
        padding: 18px 16px;
    }
}

/* ==========================================================================
   BREAKPOINT: ≤ 575px — Phones
   ========================================================================== */
@media (max-width: 575px) {
    body {
        padding-top: var(--header-h-mobile);
    }

    .galaxy-zone {
        min-height: var(--header-h-mobile);
        padding: 8px 14px;
    }

    .star-logo img {
        max-height: 36px;
    }

    .lunar-toggle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .cosmic-trail {
        width: 100vw;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
}

/* ---------------------------------------------------------------------- */
/* Reduced motion                                                         */
/* ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}