/* =====================================================
   HEADER - InfraPilot Professional Technical Design
   ===================================================== */

.ip-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Subtle top accent line */
.ip-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #2563eb 100%);
    opacity: 0.8;
}

.ip-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    max-width: 1200px;
}

/* Brand / Logo */
.ip-header .navbar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    transition: all 0.2s ease;
    position: relative;
}

.ip-header .navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.ip-header .navbar-brand:hover::after {
    width: 100%;
}

.ip-header .navbar-brand:hover {
    color: #0f172a;
}

.ip-header .navbar-brand .text-primary {
    color: #2563eb !important;
    font-weight: 800;
}

/* Navigation Container */
.ip-header .navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navigation Links */
.ip-header .navbar-nav .nav-link {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.01em;
}

.ip-header .navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #2563eb;
    border-radius: 1px;
    transition: width 0.2s ease;
}

.ip-header .navbar-nav .nav-link:hover {
    color: #0f172a;
}

.ip-header .navbar-nav .nav-link:hover::before {
    width: calc(100% - 36px);
}

.ip-header .navbar-nav .nav-link.active {
    color: #2563eb;
    font-weight: 700;
}

.ip-header .navbar-nav .nav-link.active::before {
    width: calc(100% - 36px);
    background: #2563eb;
}

/* CTA Button */
.ip-header .btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 22px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.ip-header .btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ip-header .btn-cta:hover::before {
    left: 100%;
}

.ip-header .btn-cta:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    color: white;
}

.ip-header .btn-cta i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.ip-header .btn-cta:hover i {
    transform: translateX(2px);
}

/* Status Indicator (optional) */
.ip-header .nav-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    margin-right: 16px;
}

.ip-header .nav-status .status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

.ip-header .nav-status span {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    letter-spacing: 0.02em;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* Mobile Toggle - HIDDEN ON DESKTOP */
.ip-header .navbar-toggler {
    display: none; /* Hidden by default */
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ip-header .navbar-toggler:hover {
    background: #f8fafc;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.ip-header .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.ip-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%232563eb' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 20px;
    height: 20px;
}

/* =====================================================
   SCROLL STATE (when page is scrolled)
   ===================================================== */

.ip-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.ip-header.scrolled::before {
    opacity: 1;
}

/* =====================================================
   MOBILE RESPONSIVE
   ===================================================== */

@media (max-width: 991px) {
    .ip-header .nav-status {
        display: none;
    }
}

@media (max-width: 767px) {
    .ip-header::before {
        height: 2px;
    }

    .ip-header .container {
        height: 60px;
        padding: 0 16px;
    }

    .ip-header .navbar-brand {
        font-size: 1.2rem;
    }

    /* Show toggler only on mobile */
    .ip-header .navbar-toggler {
        display: flex;
    }

    .ip-header .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
        padding: 20px;
        border-radius: 0 0 16px 16px;
    }

    .ip-header .navbar-nav {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .ip-header .navbar-nav .nav-link {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 10px;
        width: 100%;
        text-align: left;
    }

    .ip-header .navbar-nav .nav-link::before {
        display: none;
    }

    .ip-header .navbar-nav .nav-link:hover,
    .ip-header .navbar-nav .nav-link.active {
        background: #f1f5f9;
    }

    .ip-header .btn-cta {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        padding: 16px 20px;
        font-size: 14px;
        border-radius: 10px;
    }
}
