/* 
   DCM CORE INSTITUTE - STRATEGIC NAV REFACTOR
   6 PILLARS MEGA-MENU STYLES
*/

:root {
    --nav-bg: rgba(2, 6, 23, 0.95);
    --nav-border: rgba(255, 255, 255, 0.08);
    --pillar-blue: #3b82f6;
    --pillar-purple: #8b5cf6;
    --pillar-emerald: #10b981;
    --pillar-amber: #f59e0b;
    --pillar-rose: #f43f5e;
    --pillar-cyan: #06b6d4;
    --text-muted: #94a3b8;
}

.navbar-pro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nav-border);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensure spacing between brand, pillars, and actions */
    padding: 0 40px;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 24px; /* Reduced margin to give pillars more room */
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0; /* Protect the logo */
}

.logo-orb {
    width: 22px;
    height: 22px;
    background: var(--pillar-blue);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: white;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-weight: 300;
    opacity: 0.7;
}

/* MEGA-MENU STRUCTURE */
.nav-pillars {
    display: flex;
    gap: 20px; /* Reduced base gap for pillars to prevent overlap */
    height: 100%;
    align-items: center;
    flex-grow: 1; /* Allow pillars to fill remaining space */
    justify-content: center; /* Center them within the flexible space */
    min-width: 0; /* Allow containment */
}

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

.pillar-link {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.pillar-link:hover,
.pillar-item:hover .pillar-link {
    opacity: 1;
    color: var(--pillar-blue);
}

/* THE DROPDOWN */
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 450px;
    background: #0f172a;
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pillar-item:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-header {
    grid-column: span 2;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.03);
}

.link-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--pillar-blue);
}

.link-text {
    display: flex;
    flex-direction: column;
}

.link-title {
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.link-desc {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
}

/* ACTIONS */
.nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px; /* Slightly tighter gap for intermediate screens */
    flex-shrink: 0; /* Prevent the actions from collapsing */
}

.auth-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-btn:hover {
    color: white;
}

.connect-btn {
    background: var(--pillar-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.connect-btn:hover {
    transform: translateY(-2px);
    background: #2563eb;
}

@media (max-width: 1024px) {
    .nav-pillars {
        display: none;
    }
}

/* TELEMETRY TICKER STYLES (Phase 26) */
.telemetry-ticker {
    background: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    height: 36px;
    width: 100%;
    z-index: 9999;
    position: sticky;
    top: 72px; /* Exactly below nav */
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: background 0.5s ease;
}

.ticker-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    white-space: nowrap;
}

.ticker-label {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticker-value {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.ticker-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.status-pulse {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: status-glow 2s infinite;
}

.status-text {
    font-size: 10px;
    font-weight: 800;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes status-glow {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Update Pulse */
.ticker-pulse {
    background: rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .ticker-content {
        gap: 20px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px; /* for scrollbar space if any */
    }
    .ticker-content::-webkit-scrollbar {
        display: none;
    }
    .ticker-label {
        font-size: 10px;
    }
    .ticker-value {
        font-size: 10px;
    }
}

/* GLOBAL SEARCH & AUTOCOMPLETE */
.nav-search {
    position: relative;
    margin: 0 30px;
    flex: 1;
    max-width: 400px;
}

.nav-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.nav-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px 10px 40px;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.nav-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--pillar-blue);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: #0f172a;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 11000;
    overflow: hidden;
    animation: searchSlideDown 0.2s ease-out;
}

@keyframes searchSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1250px) {
    .nav-search {
        display: none;
    }
    .nav-pillars {
        gap: 12px;
    }
    .nav-brand {
        margin-right: 12px;
    }
    .back-to-hub-btn span {
        display: none;
    }
    .back-to-hub-btn i {
        margin-right: 0 !important;
    }
    .back-to-hub-btn {
        padding: 4px 8px !important;
    }
}

@media (max-width: 1100px) {
    .nav-pillars {
        gap: 8px;
    }
    .pillar-link {
        font-size: 12px;
    }
}