/* Header Top Layout */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

/* Mobile: Stack vertically */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
}

/* Language Switcher Styles */
.language-switcher {
    position: relative;
    z-index: 1000;
}

.language-switcher .switcher-button {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.language-switcher .switcher-button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.language-switcher .current-flag {
    font-size: 16px;
    line-height: 1;
}

.language-switcher .current-lang {
    font-size: 13px;
    font-weight: 600;
}

.language-switcher .chevron {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.language-switcher.open .chevron {
    transform: rotate(180deg);
}

.language-switcher .dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    min-width: 120px;
}

/* Mobile dropdown alignment */
@media (max-width: 768px) {
    .language-switcher .dropdown {
        right: auto;
        left: 0;
    }
}

.language-switcher.open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-switcher .lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.language-switcher .lang-option:hover {
    background-color: #f3f4f6;
}

.language-switcher .lang-option.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.language-switcher .lang-option .flag {
    font-size: 16px;
    line-height: 1;
}

.language-switcher .lang-option .name {
    font-size: 13px;
}

/* Mobile language link */
.mobile-language-link {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-switcher {
        display: none;
    }
    
    .mobile-language-link {
        display: block;
    }
}

/* Animation for smooth language change */
.language-transition {
    transition: opacity 0.2s ease;
}

.language-transition.changing {
    opacity: 0.7;
}

/* Loading state */
.language-switcher.loading .switcher-button {
    opacity: 0.6;
    cursor: not-allowed;
}

.language-switcher.loading .chevron {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}