/*
 * IMPORTANT: For editing rules and coding guidelines, see AI_documents/Rules/Rules_for_the_AI.txt
 * For project overview and details, see AI_documents/Project_Overview_Doc.txt
 * 
 * Production Directory: http://ainspire.ai/css/headerstyle.css
 * Development Directory: http://localhost:8000/css/headerstyle.css
 * 
 * Loaded by includes/asset_loader.php 
 * Style for Footer .../sections/header.php
 */ 
/* Header Styles */
/* BACKUP - Original Fixed Header (for rollback):
.fixed-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3) !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
}
*/

/* NEW - Relative Header (takes up space in document flow + z-index works) */
.fixed-header {
    position: relative;
    width: 100%;
    z-index: 15;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    padding: 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    /*background: linear-gradient(135deg, #fff 0%, #8b5cf6 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;*/
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #3b82f6;
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 100%;
}

.contact-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.contact-btn::after {
    content: '→';
    transition: transform 0.3s ease;
}

.contact-btn:hover::after {
    transform: translateX(3px);
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.fixed-header.nav-active .mobile-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.fixed-header.nav-active .mobile-toggle span:nth-child(2) {
    opacity: 0;
}

.fixed-header.nav-active .mobile-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
        justify-content: space-between;
    }
    
    .logo {
        font-size: 22px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
        align-items: center;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
        border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    }

    .fixed-header.nav-active .nav-menu {
        max-height: 500px; /* Adjust as needed, a large value works */
        overflow-y: auto; /* This is the fix for scrolling */
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
        text-align:left;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        font-size: 18px;
        padding: 15px 20px;
        display: block;
        width: 100%;
        text-align:left;
    }
    
    .contact-btn {
        margin: 20px;
        justify-content: center;
    }

    .mobile-toggle {
        display: flex;
    }
    
    /* Mobile Dropdown Specific Styles */
    .mobile-dropdown .dropdown-menu {
        position: static;
        min-width: 100%;
        background: rgba(59, 130, 246, 0.1);
        border: none;
        border-radius: 0;
        margin: 10px 0;
        box-shadow: none;
        display: none;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.4s ease-in-out;
    }

    .mobile-dropdown.dropdown-active .dropdown-menu {
        display: block;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .mobile-dropdown .dropdown-link {
        padding: 15px 20px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-dropdown .dropdown-item-title {
        font-size: 16px;
        margin-bottom: 2px;
        text-align: left;
    }
    
    .mobile-dropdown .dropdown-item-desc {
        display: none;
    }
}

/* Scroll Effect */
.fixed-header.scrolled {
    background: rgba(0, 0, 0, 0.98) !important;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3) !important;
}

.fixed-header.scrolled .header-container {
    padding: 15px 40px;
}

@media (max-width: 768px) {
    .fixed-header.scrolled .header-container {
        padding: 12px 20px;
    }
}

/* Desktop Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-dropdown.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 10px 0;
    margin-top: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 18;
}

.nav-dropdown.dropdown-open > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu li:last-child .dropdown-link {
    border-bottom: none;
}

.dropdown-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6 !important;
    transform: none;
}

.dropdown-link::after {
    display: none;
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.dropdown-item-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}