/**
 * RTL Styles for Arabic Version - Mapping Technologies
 * Styles spécifiques pour la version arabe (droite à gauche)
 */

/* ===========================================
   FONTS & TYPOGRAPHY RTL
   =========================================== */
.rtl-layout {
    font-family: 'Noto Sans Arabic', 'Inter', Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

.rtl-layout * {
    direction: rtl;
}

.rtl-layout h1, 
.rtl-layout h2, 
.rtl-layout h3, 
.rtl-layout h4, 
.rtl-layout h5, 
.rtl-layout h6 {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    font-weight: 600;
}

.rtl-layout p, 
.rtl-layout li, 
.rtl-layout span {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    line-height: 1.8;
}

/* ===========================================
   LANGUAGE SELECTOR
   =========================================== */
.language-selector {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1001;
}

.language-dropdown {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.language-btn:hover {
    background: rgba(15, 23, 42, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.language-btn i:last-child {
    transition: transform 0.3s ease;
}

.language-dropdown.active .language-btn i:last-child {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.language-dropdown.active .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(50, 130, 184, 0.3);
    color: #60a5fa;
}

.language-option.active {
    background: rgba(50, 130, 184, 0.5);
    color: #60a5fa;
}

.language-option .flag {
    font-size: 18px;
}

/* ===========================================
   NAVIGATION RTL
   =========================================== */
.rtl-layout .nav-container {
    flex-direction: row-reverse;
}

.rtl-layout .nav-menu {
    flex-direction: row-reverse;
}

.rtl-layout .nav-toggle {
    order: -1;
}

.rtl-layout .nav-logo {
    margin-left: 0;
    margin-right: auto;
}

/* ===========================================
   HERO SECTION RTL
   =========================================== */
.rtl-layout .hero-content {
    text-align: right;
}

.rtl-layout .hero-expertise {
    justify-content: flex-end;
}

.rtl-layout .expertise-item {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl-layout .hero-actions {
    justify-content: flex-end;
}

/* ===========================================
   CAROUSEL RTL
   =========================================== */
.rtl-layout .carousel-navigation .prev-btn {
    right: 20px;
    left: auto;
}

.rtl-layout .carousel-navigation .next-btn {
    left: 20px;
    right: auto;
}

.rtl-layout .carousel-btn {
    transform: scaleX(-1);
}

/* ===========================================
   SERVICES RTL
   =========================================== */
.rtl-layout .service-card {
    text-align: right;
}

.rtl-layout .service-features {
    justify-content: flex-end;
}

.rtl-layout .feature-tag {
    margin-left: 0.5rem;
    margin-right: 0;
}

.rtl-layout .feature-tag:last-child {
    margin-left: 0;
}

/* ===========================================
   SOLUTIONS RTL
   =========================================== */
.rtl-layout .solution-item {
    text-align: right;
}

.rtl-layout .solution-item.reverse {
    grid-template-columns: 1fr 1fr;
}

.rtl-layout .solution-item.reverse .solution-content {
    order: 2;
}

.rtl-layout .solution-item.reverse .solution-visual {
    order: 1;
}

.rtl-layout .capability-list li {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl-layout .capability-list li i {
    margin-left: var(--space-3);
    margin-right: 0;
}

.rtl-layout .solution-features {
    justify-content: flex-end;
}

/* ===========================================
   PROJECTS RTL
   =========================================== */
.rtl-layout .project-card {
    text-align: right;
}

.rtl-layout .project-tech {
    justify-content: flex-end;
}

.rtl-layout .project-tech span {
    margin-left: 0.5rem;
    margin-right: 0;
}

.rtl-layout .project-tech span:last-child {
    margin-left: 0;
}

/* ===========================================
   PARTNERS RTL
   =========================================== */
.rtl-layout .partners-grid {
    direction: rtl;
}

.rtl-layout .partner-item {
    text-align: center;
}

/* ===========================================
   ABOUT RTL
   =========================================== */
.rtl-layout .about-content {
    direction: rtl;
}

.rtl-layout .about-text {
    text-align: right;
}

.rtl-layout .expertise-areas .expertise-item {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl-layout .expertise-areas .expertise-item i {
    margin-left: var(--space-3);
    margin-right: 0;
}

/* ===========================================
   CONTACT RTL
   =========================================== */
.rtl-layout .contact-content {
    direction: rtl;
}

.rtl-layout .contact-info {
    text-align: right;
}

.rtl-layout .contact-method {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl-layout .contact-method i {
    margin-left: var(--space-4);
    margin-right: 0;
}

.rtl-layout .form-group {
    direction: rtl;
}

.rtl-layout .form-group input,
.rtl-layout .form-group textarea,
.rtl-layout .form-group select {
    text-align: right;
    direction: rtl;
}

.rtl-layout .form-group label {
    right: 1rem;
    left: auto;
}

.rtl-layout .btn {
    flex-direction: row-reverse;
}

.rtl-layout .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* ===========================================
   FOOTER RTL
   =========================================== */
.rtl-layout .footer {
    direction: rtl;
    text-align: right;
}

.rtl-layout .footer-content {
    direction: rtl;
}

.rtl-layout .footer-section {
    text-align: right;
}

.rtl-layout .footer-logo {
    flex-direction: row-reverse;
}

.rtl-layout .footer-logo img {
    margin-left: var(--space-2);
    margin-right: 0;
}

.rtl-layout .footer-bottom {
    flex-direction: row-reverse;
}

.rtl-layout .footer-links {
    order: -1;
}

.rtl-layout .footer-links a {
    margin-left: var(--space-6);
    margin-right: 0;
}

.rtl-layout .footer-links a:last-child {
    margin-left: 0;
}

/* ===========================================
   RESPONSIVE RTL
   =========================================== */
@media (max-width: 768px) {
    .language-selector {
        top: 80px;
        right: 15px;
    }
    
    .language-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .language-menu {
        min-width: 150px;
    }
    
    .rtl-layout .nav-menu {
        text-align: right;
    }
    
    .rtl-layout .hero-expertise {
        justify-content: center;
    }
    
    .rtl-layout .hero-actions {
        justify-content: center;
        flex-direction: column;
    }
    
    .rtl-layout .service-features {
        justify-content: center;
    }
    
    .rtl-layout .solution-features {
        justify-content: center;
    }
    
    .rtl-layout .project-tech {
        justify-content: center;
    }
    
    .rtl-layout .about-content {
        grid-template-columns: 1fr;
    }
    
    .rtl-layout .contact-content {
        grid-template-columns: 1fr;
    }
    
    .rtl-layout .footer-content {
        grid-template-columns: 1fr;
    }
    
    .rtl-layout .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .rtl-layout .footer-links {
        order: 0;
        margin-top: var(--space-4);
    }
}

/* ===========================================
   TYPOGRAPHY IMPROVEMENTS RTL
   =========================================== */
.rtl-layout .section-title {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    font-weight: 700;
}

.rtl-layout .section-subtitle {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    font-weight: 400;
}

.rtl-layout .hero-title {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.rtl-layout .hero-description {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    line-height: 1.8;
}

/* ===========================================
   SPECIAL ELEMENTS RTL
   =========================================== */
.rtl-layout .slide-overlay {
    text-align: center;
}

.rtl-layout .slide-overlay h3 {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

.rtl-layout .slide-overlay p {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

/* ===========================================
   ICONS RTL ADJUSTMENTS
   =========================================== */
.rtl-layout .fas.fa-chevron-left::before {
    content: "\f054"; /* chevron-right */
}

.rtl-layout .fas.fa-chevron-right::before {
    content: "\f053"; /* chevron-left */
}

/* Adjust arrows in carousel for RTL */
.rtl-layout .carousel-btn.prev-btn i::before {
    content: "\f054"; /* chevron-right */
}

.rtl-layout .carousel-btn.next-btn i::before {
    content: "\f053"; /* chevron-left */
}

/* ===========================================
   CUSTOM ANIMATIONS RTL
   =========================================== */
@keyframes slideInRTL {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRTL {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(30px);
        opacity: 0;
    }
}

.rtl-layout [data-aos="fade-right"] {
    animation: slideInRTL 0.8s ease-out;
}

.rtl-layout [data-aos="fade-left"] {
    animation: slideInRTL 0.8s ease-out reverse;
}

/* ===========================================
   PRINT STYLES RTL
   =========================================== */
@media print {
    .rtl-layout {
        direction: rtl;
    }
    
    .language-selector {
        display: none;
    }
}