/* ==========================================================
   NextGen IT Academy - Perfectly Balanced & Responsive Navbar Stylesheet
   ========================================================== */

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
}

/* --- Sticky Glassmorphic Header --- */
.navbar {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 999;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Logo & Branding --- */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    font-size: 21px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.4px;
    text-decoration: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-right: 10px;
}

.navbar-brand:hover {
    transform: scale(1.01);
}

.brand-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.brand-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #7c3aed;
    border-radius: 50%;
    margin-left: 3px;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.6);
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 1; }
}

/* --- Nav Links (Capsule Theme with Even Distribution) --- */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.navbar-nav .nav-link {
    position: relative;
    padding: 6px 12px !important;
    color: #475569 !important;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-nav .nav-link:hover {
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed !important;
}

.navbar-nav .nav-link.active {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
    font-weight: 700;
}

/* --- Command Palette Search Bar --- */
.search-wrapper {
    position: relative;
    width: 170px;
    margin: 0 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.search-box {
    width: 100%;
    height: 37px;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding-left: 34px;
    padding-right: 42px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.search-box::placeholder {
    color: #94a3b8;
}

.search-box:focus {
    background: #ffffff;
    border-color: #7c3aed;
    outline: none;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12), 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 2;
}

.search-box:focus ~ .search-icon {
    color: #7c3aed;
}

.search-shortcut {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9.5px;
    font-family: monospace;
    font-weight: 600;
    color: #94a3b8;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 1px 5px;
    border-radius: 4px;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.search-box:focus ~ .search-shortcut {
    opacity: 0;
}

/* --- Right Buttons & CTAs --- */
.nav-right-btns {
    gap: 8px !important;
    flex-shrink: 0;
}

.signin-btn {
    font-size: 13.5px;
    font-weight: 600;
    color: #475569 !important;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    transition: all 0.2s ease;
    padding: 6px 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.signin-btn:hover {
    color: #2563eb !important;
}

.get-started-btn {
    padding: 8px 18px;
    border-radius: 30px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    border: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    text-decoration: none;
    display: inline-block;
}

.get-started-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.38);
    color: #ffffff !important;
}

.get-started-btn:active {
    transform: translateY(0) scale(1);
}

/* --- Custom Hamburger Toggler for Mobile --- */
.navbar-toggler {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 17px;
    padding: 0;
    border: none;
    background: transparent;
    outline: none !important;
    box-shadow: none !important;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #475569;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.navbar-toggler:not(.collapsed) .line-1 {
    transform: translateY(7.5px) rotate(45deg);
}

.navbar-toggler:not(.collapsed) .line-2 {
    opacity: 0;
    transform: scaleX(0);
}

.navbar-toggler:not(.collapsed) .line-3 {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Desktop Layout Flex Optimization --- */
@media (min-width: 992px) {
    .navbar .container-fluid {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-grow: 1;
        justify-content: space-between;
        align-items: center;
    }

    .navbar-nav {
        margin-left: 20px;
        margin-right: auto;
    }

    .search-wrapper {
        margin-right: 12px;
    }
}

/* --- Responsive Rules (Tablets and Mobile) --- */
@media (max-width: 991px) {
    .navbar {
        padding: 8px 0;
    }

    .navbar-brand {
        font-size: 19px;
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 16px;
        padding: 18px;
        margin-top: 12px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    }

    .navbar-nav {
        align-items: stretch;
        gap: 4px;
        margin-bottom: 12px;
        margin-left: 0;
    }

    .navbar-nav .nav-link {
        padding: 8px 14px !important;
        border-radius: 10px;
    }

    .search-wrapper {
        width: 100%;
        margin: 10px 0;
    }

    .search-shortcut {
        display: none;
    }

    .signin-btn {
        display: block;
        text-align: center;
        padding: 10px;
        background: rgba(241, 245, 249, 0.6);
        border-radius: 10px;
        margin-bottom: 8px;
    }
}
