/**
 * Vigthoria Ecosystem - Header Component
 * Main header styling for all Vigthoria.io pages
 * Created as part of the codebase rebuild - May 21, 2025
 */

/* ----------------------------------------
   Header Container
---------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg, rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Light mode specific styling */
[data-theme="light"] .header {
    background-color: var(--header-bg-light, rgba(248, 250, 252, 0.9));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ----------------------------------------
   Main Navigation
---------------------------------------- */
.main-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 60px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
}

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary, #f8fafc);
    font-weight: 700;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    margin-right: 20px;
}

.logo:hover {
    opacity: 0.9;
}

.header-logo {
    height: 40px;
    width: auto;
    display: block !important;
    visibility: visible !important;
}

.header-logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: white;
    display: block !important;
    visibility: visible !important;
}

/* Light mode logo text color */
[data-theme="light"] .logo {
    color: var(--text-primary-light, #0f172a);
}

/* ----------------------------------------
   Navigation Links
---------------------------------------- */
.nav-links {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
    list-style: none;
    position: relative !important;
}

.nav-link {
    color: var(--text-secondary, #cbd5e1);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary-color, #6c63ff);
}

/* Active link indicator */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color, #6c63ff);
    border-radius: 1px;
}

[data-theme="light"] .nav-link {
    color: var(--text-secondary-light, #64748b);
}

[data-theme="light"] .nav-link:hover, 
[data-theme="light"] .nav-link.active {
    color: var(--primary-color, #6c63ff);
}

/* ----------------------------------------
   Navigation Buttons
---------------------------------------- */
.nav-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 1rem;
    margin-left: auto !important;
    flex-shrink: 0;
    position: relative !important;
    flex-direction: row !important;
}

/* Force buttons to display inline */
.nav-buttons > * {
    display: inline-flex !important;
    position: relative !important;
}

/* Primary button styling */
.btn-primary {
    background: linear-gradient(135deg, #6c63ff 0%, #3b82f6 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

/* ----------------------------------------
   Language Switcher
---------------------------------------- */
.language-switcher-container {
    position: relative;
    margin: 0 5px;
}

#language-switcher {
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 6px 25px 6px 10px;
    font-size: 14px;
    color: white;
    cursor: pointer;
}

.language-switcher-container::after {
    content: '▼';
    font-size: 10px;
    color: white;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

[data-theme="light"] #language-switcher {
    color: var(--text-secondary-light, #64748b);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    border-color: var(--border-color-light, rgba(0, 0, 0, 0.1));
}

/* ----------------------------------------
   Theme Switch
---------------------------------------- */
.theme-switch {
    position: relative;
    width: 48px;
    height: 24px;
    padding: 0;
    border-radius: 24px;
    background-color: var(--switch-bg, rgba(255, 255, 255, 0.1));
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.theme-switch-track {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

.theme-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.theme-switch-icon {
    font-size: 12px;
    color: #0f172a;
    transition: opacity 0.3s ease;
}

.theme-switch-icon.sun {
    opacity: 0;
}

.theme-switch-icon.moon {
    opacity: 1;
}

[data-theme="light"] .theme-switch-thumb {
    transform: translateX(24px);
}

[data-theme="light"] .theme-switch-icon.sun {
    opacity: 1;
}

[data-theme="light"] .theme-switch-icon.moon {
    opacity: 0;
}

[data-theme="light"] .theme-switch {
    background-color: var(--switch-bg-light, rgba(0, 0, 0, 0.1));
}

/* ----------------------------------------
   Mobile Menu
---------------------------------------- */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
}

.menu-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: white;
    transition: all 0.3s ease;
}

/* Mobile menu toggle active state */
.mobile-menu-toggle.active .menu-icon span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .menu-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .menu-icon span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ----------------------------------------
   Responsive Styles
---------------------------------------- */
@media (max-width: 1200px) {
    .main-nav {
        padding: 0 15px;
    }

    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none !important;
        position: fixed !important;
        top: var(--header-height, 70px) !important;
        left: 0 !important;
        width: 100% !important;
        flex-direction: column !important;
        background-color: rgba(10, 10, 10, 0.95) !important;
        padding: 20px 0 !important;
        z-index: 999 !important;
        gap: 0 !important;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    .nav-links a {
        width: 100% !important;
        padding: 15px !important;
        text-align: center !important;
    }
    
    .main-nav {
        justify-content: space-between !important;
    }
    
    .btn-primary {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .language-switcher-container {
        margin-left: 10px;
    }
}

@media (max-width: 767px) {
    .header-logo-text {
        font-size: 1.2rem;
    }
    
    .logo {
        margin-right: 10px;
    }
    
    .btn-primary {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    #language-switcher {
        padding: 4px 20px 4px 8px;
        font-size: 12px;
    }
}
