/* HADCO Header - Main Styles
 * Global header navigation with language switcher
 * Compatible with all page templates
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Header Container */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

/* Logo */
.header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.header .logo img {
    height: 40px;
    width: auto;
    max-width: 150px;
}

.header .logo:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .header .logo img {
        height: 32px;
    }
}

/* Navigation Menu */
.header .nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.header .nav-menu li {
    list-style: none;
}

.header .nav-menu li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.header .nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #0EA5E9;
    transition: width 0.3s ease;
}

.header .nav-menu li a:hover {
    color: #ffffff;
}

.header .nav-menu li a:hover::after {
    width: 100%;
}

/* Language Switcher */
.header .language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0.5rem;
}

.header .language-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    font-size: 1.25rem;
    cursor: pointer;
    pointer-events: all;
    z-index: 100;
}

.header .language-switcher a::after {
    display: none !important;
}

.header .language-switcher a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.header .language-switcher a.active {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.header .language-switcher .separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    margin: 0 0.25rem;
}

/* CTA Button */
.header .cta-button {
    background: #0EA5E9 !important;
    color: #fff !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
}

.header .cta-button::after {
    display: none !important;
}

.header .cta-button:hover {
    background: #0284c7 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Mobile Menu Button */
.header .mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
}

.header .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(14, 165, 233, 0.4);
}

.header .mobile-menu-btn:active {
    transform: scale(0.95);
}

.header .mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.header .mobile-menu-btn.active {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.5);
}

.header .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    background: #0EA5E9;
}

.header .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background: #0EA5E9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header .nav-menu {
        gap: 1.5rem;
    }

    .header-container {
        padding: 1.25rem 2rem;
    }

    .contact-info-bar {
        gap: 1.5rem;
    }

    .top-contact-item span {
        font-size: 0.813rem;
    }
}

@media (max-width: 768px) {
    .header .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    /* Simpler accordion-style mobile menu */
    .header .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 15, 30, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-bottom: 1px solid rgba(14, 165, 233, 0);
        z-index: 999;
    }

    .header .nav-menu.active {
        max-height: 600px;
        padding: 1rem 0;
        border-bottom-color: rgba(14, 165, 233, 0.3);
    }

    .header .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        opacity: 1;
        transform: none;
    }

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

    .header .nav-menu li a {
        display: block;
        font-size: 1rem;
        padding: 1rem 1.5rem;
        width: 100%;
    }

    .header .nav-menu li a:hover {
        background: rgba(14, 165, 233, 0.1);
    }

    .header-container {
        padding: 1rem 1.5rem;
        position: relative;
    }

    .header .language-switcher {
        margin: 0.5rem 0;
        justify-content: center;
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .header .language-switcher a {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .header .cta-button {
        padding: 0.875rem 2rem !important;
        font-size: 0.95rem !important;
        margin: 0.5rem auto;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.875rem 1rem;
    }

    .header .nav-menu {
        padding: 70px 1.5rem 1.5rem;
    }
}
