/*===========================================
    NAVIGATION LINKS DESIGN
    PESO Biñan - Main Navigation Styling
    NO TEXT WRAP - Single Line Only
============================================*/

/* Main Navigation Container */
.navbar-custom {
    background: linear-gradient(135deg, #56668d 0%, #232936 100%);
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(0, 255, 200, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: none;
    margin-bottom: 0;
}

.navbar-custom.scrolled {
    padding: 0.4rem 0;
    background: linear-gradient(135deg, #004cff 0%, #1a1f2c 100%);
    box-shadow: 0 4px 25px rgba(0, 255, 200, 0.15);
}

/* Logo and Brand Styling */
.navbar-brand-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    white-space: nowrap;
}

.logo-image {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo-container:hover .logo-image {
    transform: scale(1.05) rotate(-2deg);
}

.logo-text {
    line-height: 1.1;
    white-space: nowrap;
}

.logo-main-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #00b4d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo-sub-text {
    font-size: 0.7rem;
    color: #adb5bd;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo-sub-text-2 {
    font-size: 0.65rem;
    color: #6c757d;
    font-style: italic;
    white-space: nowrap;
}

/* Navigation Items Container */
.navbar-nav {
    gap: 0.1rem;
    align-items: center;
    margin-left: auto;
}

/* Navigation Items */
.nav-item {
    position: relative;
    margin: 0;
    flex-shrink: 0;
}

/* ======================================= */
/* NAVIGATION LINKS - ACTIVE STATE FIX     */
/* ORANGE COLOR FOR ACTIVE LINKS           */
/* ======================================= */

/* Navigation Links - Base Style */
.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #e9ecef !important;
    padding: 0.5rem 0.8rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap !important;
    text-decoration: none;
    line-height: 1;
}

/* Icon inside nav links */
.nav-link i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
    color: #00b4d8;
    flex-shrink: 0;
}

/* ======================================= */
/* ACTIVE LINK - ORANGE COLOR              */
/* This is what you need - changes to orange */
/* ======================================= */

.nav-link.active {
    background: linear-gradient(135deg, #ff8c42, #ff6b35) !important; /* Orange gradient */
    color: white !important;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.4) !important; /* Orange shadow */
    font-weight: 600;
}

/* Active link icon color */
.nav-link.active i {
    color: white !important;
    transform: scale(1.1);
}

/* Home link specific active state */
.nav-link[href="index.php"].active {
    background: linear-gradient(135deg, #ff8c42, #ff6b35) !important;
}

/* Dashboard link - keep green even when active? 
   If you want dashboard to stay green even when active, uncomment this:
.nav-link[href="dashboard.php"].active {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
}
*/

/* ======================================= */
/* HOVER EFFECTS                           */
/* ======================================= */

/* Hover state for non-active links */
.nav-link:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

/* Hover state for active links - slightly darker orange */
.nav-link.active:hover {
    background: linear-gradient(135deg, #ff7b2c, #ff5a3c) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.5) !important;
}

/* Icon hover for active links */
.nav-link.active:hover i {
    transform: scale(1.15);
}

/* Special hover colors for different sections (only when NOT active) */
.nav-link:not(.active)[href="#programs"]:hover i { color: #f39c12; }
.nav-link:not(.active)[href="#awards"]:hover i { color: #f1c40f; }
.nav-link:not(.active)[href="#prereg"]:hover i { color: #2ecc71; }
.nav-link:not(.active)[href="jobs.php"]:hover i { color: #e74c3c; }
.nav-link:not(.active)[href="#about"]:hover i { color: #3498db; }
.nav-link:not(.active)[href="#login"]:hover i { color: #9b59b6; }

/* If these sections become active, icons should be white */
.nav-link.active[href="#programs"] i,
.nav-link.active[href="#awards"] i,
.nav-link.active[href="#prereg"] i,
.nav-link.active[href="jobs.php"] i,
.nav-link.active[href="#about"] i,
.nav-link.active[href="#login"] i {
    color: white !important;
}

/* ======================================= */
/* USER STATUS BADGE                        */
/* ======================================= */

.user-status {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(0, 119, 182, 0.15));
    padding: 0.35rem 0.9rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 180, 216, 0.3);
    color: #e9ecef;
    font-size: 0.82rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap !important;
    flex-shrink: 0;
}

.user-status i {
    font-size: 1rem;
    color: #00b4d8;
    flex-shrink: 0;
}

.user-status:hover {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.25), rgba(0, 119, 182, 0.25));
    border-color: #00b4d8;
    transform: translateY(-2px);
}

/* ======================================= */
/* DASHBOARD LINK - Special Style          */
/* ======================================= */

.nav-link[href="dashboard.php"] {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
    white-space: nowrap !important;
}

/* Dashboard link hover */
.nav-link[href="dashboard.php"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(46, 204, 113, 0.4);
}

/* Dashboard link active state - if you want it orange too, remove this block */
.nav-link[href="dashboard.php"].active {
    background: linear-gradient(135deg, #ff8c42, #ff6b35) !important; /* Orange when active */
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.4) !important;
}

/* ======================================= */
/* NAVBAR TOGGLER (Mobile)                 */
/* ======================================= */

.navbar-toggler {
    color: white !important;
    font-size: 1.3rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    flex-shrink: 0;
}

/* ======================================= */
/* SYSTEM STATUS BAR                        */
/* ======================================= */

.system-status {
    background: linear-gradient(135deg, #0f1219, #1a1f2c);
    padding: 0.4rem 0;
    border-top: 1px solid rgba(255, 107, 53, 0.2); /* Changed to orange tint */
    border-bottom: 1px solid rgba(255, 107, 53, 0.2); /* Changed to orange tint */
    font-size: 0.85rem;
    color: #e9ecef;
    margin-top: 0 !important;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 247, 255, 0.1);
}

/* Status Bar Items */
.status-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1.5rem;
    white-space: nowrap;
}

.status-item i {
    margin-right: 0.3rem;
    color: #ff8c42; /* Changed to orange */
    font-size: 0.8rem;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.status-online {
    background: #2ecc71;
    box-shadow: 0 0 10px #2ecc71;
}

/* ======================================= */
/* RESPONSIVE DESIGN                        */
/* ======================================= */

/* Desktop Styles */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-grow: 0;
        margin-left: auto;
    }
    
    .navbar-nav {
        flex-direction: row;
        flex-wrap: nowrap !important;
    }
    
    .nav-link {
        padding: 0.5rem 0.7rem !important;
        font-size: 0.85rem;
    }
    
    @media (min-width: 1200px) {
        .nav-link {
            padding: 0.6rem 0.9rem !important;
            font-size: 0.9rem;
        }
    }
    
    @media (min-width: 1400px) {
        .nav-link {
            padding: 0.7rem 1rem !important;
            font-size: 0.95rem;
        }
    }
}

/* Mobile Dropdown */
@media (max-width: 991px) {
    .navbar-collapse {
        background: linear-gradient(135deg, #1a1f2c 0%, #232936 100%);
        padding: 0.8rem;
        border-radius: 12px;
        margin-top: 0.8rem;
        border: 1px solid rgba(255, 107, 53, 0.2); /* Orange border */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        width: 100%;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        padding: 0.7rem 1rem !important;
        margin: 2px 0;
        border-radius: 6px;
        width: 100%;
        justify-content: flex-start;
        white-space: nowrap !important;
    }
    
    /* Active links in mobile */
    .nav-link.active {
        background: linear-gradient(135deg, #ff8c42, #ff6b35) !important;
    }
    
    .user-status {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .logo-main-text {
        font-size: 1.2rem;
    }
    
    .logo-image {
        height: 42px;
    }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    .logo-main-text {
        font-size: 1rem;
    }
    
    .logo-sub-text, .logo-sub-text-2 {
        font-size: 0.6rem;
    }
    
    .logo-image {
        height: 38px;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem !important;
    }
}

/* For screens between 992px and 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .nav-link {
        padding: 0.45rem 0.6rem !important;
        font-size: 0.8rem;
    }
    
    .logo-main-text {
        font-size: 1.2rem;
    }
    
    .logo-sub-text {
        font-size: 0.65rem;
    }
    
    .logo-sub-text-2 {
        font-size: 0.6rem;
    }
    
    .user-status {
        padding: 0.3rem 0.7rem;
        font-size: 0.78rem;
    }
}

/* ======================================= */
/* UTILITIES & ANIMATIONS                   */
/* ======================================= */

/* Animation for New Items */
@keyframes navItemPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); } /* Orange pulse */
    70% { box-shadow: 0 0 0 5px rgba(255, 107, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

.nav-link.new {
    animation: navItemPulse 2s infinite;
    background: linear-gradient(135deg, #ff8c42, #ff6b35) !important; /* Orange */
    color: white !important;
}

.nav-link.new i {
    color: white !important;
}

/* Active Users Counter Badge */
#active-users {
    background: linear-gradient(135deg, #ff8c42, #ff6b35) !important; /* Orange */
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-left: 3px;
    color: white;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

/* Scroll Progress Indicator - Orange */
.navbar-custom::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: var(--scroll-width, 0%);
    height: 2px;
    background: linear-gradient(90deg, #ff8c42, #ff6b35, #ff8c42) !important; /* Orange gradient */
    transition: width 0.1s ease;
}

/* Text truncation for extreme cases */
.user-status span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    display: inline-block;
    vertical-align: middle;
}

/* ======================================= */
/* DARK MODE SUPPORT                        */
/* ======================================= */

@media (prefers-color-scheme: dark) {
    .navbar-custom {
        background: linear-gradient(135deg, #0a0c12 0%, #14181f 100%);
    }
    
    .system-status {
        background: linear-gradient(135deg, #080b10, #12161d);
    }
}

/* ======================================= */
/* PRINT STYLES                             */
/* ======================================= */

@media print {
    .navbar-custom,
    .system-status {
        display: none;
    }
}

/* ======================================= */
/* BOOTSTRAP OVERRIDES                      */
/* ======================================= */

/* Ensure Bootstrap doesn't override our nowrap */
.navbar-nav .nav-link,
.system-status,
.status-item {
    white-space: nowrap !important;
}

/* Fix for flex wrapping */
.navbar > .container,
.navbar-collapse {
    flex-wrap: nowrap !important;
}

/* Remove any body padding */
body {
    margin: 0;
    padding: 0;
    padding-top: 0 !important;
}

/* Additional fix for WordPress */
.admin-bar .navbar-custom {
    top: 0;
}