/* Shared Header Styles - Used by both main site and private area */

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.header .logo img {
    height: 28px;
}

/* High specificity to ensure consistent rendering across all pages */
header.header .logo .logo-text,
.header .logo .logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #1A2537;
    line-height: 1;
}

header.header .logo .logo-text .logo-highlight,
.header .logo .logo-text .logo-highlight,
.header .logo-highlight {
    color: #FF5C01;
}

/* Nav Links */
.header .nav-links {
    display: flex;
    list-style: none;
    gap: 16px;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.header .nav-links a {
    text-decoration: none;
    color: #1a202c;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    transition: color 0.3s ease;
}

.header .nav-links a:hover {
    color: #FF5C01;
}

/* Nav Dropdown */
.header .nav-dropdown {
    position: relative;
}

.header .nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    line-height: 1;
    color: #1a202c;
    transition: color 0.3s ease;
    padding: 0;
}

.header .nav-dropdown-toggle:hover {
    color: #FF5C01;
}

.header .nav-arrow {
    transition: transform 0.3s ease;
}

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

.header .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.header .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header .nav-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
}

.header .nav-dropdown-menu a:first-child {
    border-radius: 12px 12px 0 0;
}

.header .nav-dropdown-menu a:last-child {
    border-radius: 0 0 12px 12px;
}

.header .nav-dropdown-menu a:hover {
    background: rgba(255, 92, 1, 0.1);
}

/* Language Selector */
.header .language-selector {
    position: relative;
}

.header .lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #1a202c;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
}

.header .lang-toggle:hover {
    background: rgba(255, 92, 1, 0.1);
    color: #FF5C01;
}

.header .flag-icon {
    font-size: 16px;
}

.header .lang-text {
    font-size: 14px;
}

.header .lang-arrow {
    transition: transform 0.3s ease;
}

.header .lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.header .lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header .lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #1a202c;
}

.header .lang-option:hover {
    background: rgba(255, 92, 1, 0.1);
    color: #FF5C01;
}

.header .lang-option:first-child {
    border-radius: 8px 8px 0 0;
}

.header .lang-option:last-child {
    border-radius: 0 0 8px 8px;
}

/* CTA Button (Contact / Logout) */
.header .cta-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FF5C01;
    color: white !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header .cta-nav:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.header .cta-nav.secondary {
    background: #1A2537;
}

/* Back Link */
.header .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
}

.header .back-link:hover {
    color: #FF5C01;
}

/* User Info */
.header .user-name {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    line-height: 1;
}

.header .admin-badge {
    background: #FF5C01;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 9999px;
    line-height: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header.header .logo .logo-text,
    .header .logo .logo-text {
        font-size: 18px;
        white-space: nowrap;
    }

    .header .logo img {
        height: 20px;
    }

    .header .nav-links {
        gap: 15px;
    }

    .header .nav-links li:not(.language-selector) {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 0;
    }

    header.header .logo .logo-text,
    .header .logo .logo-text {
        font-size: 16px;
        white-space: nowrap;
    }

    .header .logo img {
        height: 18px;
    }

    .header .lang-dropdown {
        right: auto;
        left: 0;
    }
}
