/* Language Toggle and RTL Support */

/* Button Style */
.lang-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
    font-family: 'Cairo', sans-serif;
    /* Always use Cairo for the button text if it's Arabic */
}

.lang-btn:hover {
    background-color: var(--bg-surface);
}

/* Visibility Logic */
[lang="ar"] .lang-en {
    display: none !important;
}

[lang="en"] .lang-ar {
    display: none !important;
}

/* RTL Layout Changes */
[dir="rtl"] {
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
}

[dir="rtl"] body {
    font-family: var(--font-body);
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    font-family: var(--font-heading);
}

/* RTL Specific Overrides */
[dir="rtl"] .tier-label {
    border-left: none;
    border-right: 3px solid var(--accent);
    padding-left: 0;
    padding-right: 1rem;
}

[dir="rtl"] .skill-header {
    flex-direction: row;
    /* Ensure icon is next to text */
}

[dir="rtl"] .hero-actions {
    flex-direction: row;
}

[dir="rtl"] .btn i {
    transform: scaleX(-1);
    /* Flip arrows if needed, but usually icon direction matters */
}

/* Specifically flip arrow-right in RTL to point left */
[dir="rtl"] .fa-arrow-right {
    transform: rotate(180deg);
}

/* Status badge positioning in RTL */
[dir="rtl"] .status-badge {
    right: auto;
    left: 25px;
}