/* ===================================
   Header V2 - Clean & Modern
   =================================== */

.header-v2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.header-v2.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Navigation Container */
.nav-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 40px;
}

/* Logo - Original Style */
.nav-v2__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-v2__logo .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF !important;
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: contain;
}

/* Support for PNG logo image */
.nav-v2__logo img.logo-icon {
    background: transparent;
    padding: 4px;
}

.nav-v2__logo:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.nav-v2__logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A !important;
    letter-spacing: -0.5px;
}

/* Navigation Links */
.nav-v2__links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-v2__link {
    position: relative;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748B !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-v2__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-v2__link:hover {
    color: #1E293B !important;
}

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

.nav-v2__link.active {
    color: #4F46E5 !important;
    font-weight: 600;
}

.nav-v2__link.active::after {
    width: 100%;
}

/* Actions */
.nav-v2__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Language Switch */
.lang-switch {
    position: relative;
}

.lang-switch__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lang-switch__btn:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
}

.lang-flag {
    width: 18px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

.lang-switch__btn svg {
    color: #94A3B8;
    transition: transform 0.2s ease;
}

.lang-switch:hover .lang-switch__btn svg {
    transform: rotate(180deg);
}

/* Language Dropdown */
.lang-switch__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: #FFFFFF;
    border: 1px solid #F1F5F9;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.lang-switch:hover .lang-switch__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switch__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155 !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.lang-switch__option:hover {
    background: #F8FAFC;
    color: #334155 !important;
}

.lang-switch__option.active {
    background: rgba(79, 70, 229, 0.08);
    color: #4F46E5 !important;
}

.lang-switch__option img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

/* Sign In Button */
.nav-v2__signin {
    padding: 10px 18px;
    font-size: 0.938rem;
    font-weight: 500;
    color: #334155 !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-v2__signin:hover {
    color: #0F172A !important;
    background: #F8FAFC;
}

/* CTA Button */
.nav-v2__cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white !important;
    font-size: 0.938rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.2s ease;
}

.nav-v2__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    color: white !important;
}

/* Profile dropdown */
.nav-v2__profile {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-v2__avatar {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #E2E8F0;
    background: #FFFFFF;
    overflow: hidden;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-v2__avatar:hover {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.nav-v2__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-v2__avatar .status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10B981;
    border: 2px solid #FFFFFF;
}

.nav-v2__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    border: 1px solid #F1F5F9;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1200;
}

.nav-v2__dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-v2__dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 10px;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 6px;
}

.nav-v2__dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-v2__dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-v2__dropdown-info {
    flex: 1;
    min-width: 0;
}

.nav-v2__dropdown-info .name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0F172A !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-v2__dropdown-info .role {
    font-size: 0.8rem;
    color: #64748B !important;
    margin-top: 2px;
}

.nav-v2__dropdown-item {
    display: flex;
    align-items: center;
    padding: 9px 10px;
    font-size: 0.88rem;
    color: #334155 !important;
    text-decoration: none;
    border-radius: 8px;
    gap: 8px;
    transition: all 0.15s ease;
}

.nav-v2__dropdown-item:hover {
    background: #F8FAFC;
    color: #0F172A !important;
}

.nav-v2__dropdown-item--danger {
    color: #EF4444 !important;
}

.nav-v2__dropdown-item--danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444 !important;
}

/* Mobile Toggle */
.nav-v2__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-v2__toggle:hover {
    background: #F1F5F9;
}

.nav-v2__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-v2__toggle span:nth-child(2) {
    width: 70%;
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 1024px) {
    .nav-v2__links {
        display: none;
    }
    
    .nav-v2__toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .nav-v2__signin {
        display: none;
    }
    
    .nav-v2 {
        height: 64px;
    }
    
    .nav-v2__profile {
        order: 1;
    }
    
    .lang-switch {
        order: 2;
    }
}

@media (max-width: 480px) {
    .nav-v2__logo .logo-text {
        font-size: 1.25rem;
    }
    
    .nav-v2__cta {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
    
    .lang-switch__btn span {
        display: none;
    }
    
    .lang-switch__btn {
        padding: 8px 10px;
    }
    
    .nav-v2__dropdown {
        right: -10px;
        min-width: 220px;
    }
}
