/* ==================== */
/* RTL Support Styles */
/* ==================== */
/* ==================== */
/* Cairo Font Local Import */
/* ==================== */

@font-face {
  font-family: 'Cairo';
  src: url('/fonts/Cairo-Regular.woff2') format('woff2'),
       url('/fonts/Cairo-Regular.woff') format('woff');
  font-weight: 400; /* Regular */
  font-style: normal;
  font-display: swap; /* مهم لتجنب FOUT */
}

@font-face {
  font-family: 'Cairo';
  src: url('/fonts/Cairo-Bold.woff2') format('woff2'),
       url('/fonts/Cairo-Bold.woff') format('woff');
  font-weight: 700; /* Bold */
  font-style: normal;
  font-display: swap;
}
html[lang="ar"] .timeline-title,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] p,
html[lang="ar"] span {
    letter-spacing: 0 !important;
    word-spacing: normal;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 125px;
    right: 30px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* RTL Direction Support */
[dir="rtl"] body ,.projects-filters button,.load-more-container button {
    font-family: 'Cairo', 'Inter', sans-serif;
}

[dir="rtl"] .nav-menu {
       flex-direction: ROW;
}

[dir="rtl"] .hero-cta {
    flex-direction: row-reverse;
        justify-content: flex-end;
}

[dir="rtl"] .about-grid {
    direction: rtl;
}

[dir="rtl"] .about-stats {
    flex-direction: row-reverse;
}
[dir="rtl"].timeline {
    direction: rtl;
}
[dir="rtl"].timeline-item {
    transform-origin: right top; /* بدل left top */
}
[dir="rtl"] .timeline-item {
    direction: rtl;
        transform: translateY(50px); /* فقط Y، مش X */
    opacity: 0;

}

[dir="rtl"] .timeline-marker {
    right: auto;
    left: 0;
}

[dir="rtl"] .timeline-content {
    padding-right: 15px;
    padding-left: 40px;
}

[dir="rtl"] .timeline-item::before {
    right: auto;
    left: 6px;
}

[dir="rtl"] .project-tags {
    flex-direction: row-reverse;
        justify-content: flex-end;
}

[dir="rtl"] .skill-items {
    direction: rtl;
}

[dir="rtl"] .contact-methods {
    direction: rtl;
}

[dir="rtl"] .social-links {
    flex-direction: ROW;}

[dir="rtl"] .floating-actions {
    left: 30px;
    right: auto;
}

[dir="rtl"] .language-switcher {
    top: 125px;

    left: 30px;
    right: auto;
}

/* Mobile RTL Adjustments */
@media (max-width: 768px) {
    .language-switcher {
        top: 135px;
        right: 15px;
    }
    
    [dir="rtl"] .language-switcher {
        top: 135px;
        left: 15px;
        right: auto;
    }
    
    [dir="rtl"] .floating-actions {
        left: 15px;
        right: auto;
    }
}

/* Arabic Typography Adjustments */
[dir="rtl"] .hero-title {
    font-size: 4.5rem;
        line-height: 94px;

}

[dir="rtl"] .section-title {
    font-size: 2.8rem;
}

[dir="rtl"] .about-text {
    line-height: 1.9;
}
[dir="rtl"] .contact-method {
align-items: flex-start;
    
}

@media (max-width: 768px) {
    [dir="rtl"] .hero-title {
        font-size: 4.5rem;
    }
    
    [dir="rtl"] .section-title {
        font-size: 2rem;
    }
    
[dir="rtl"] .nav-menu {
       flex-direction: column;
}
}