/* ========================================
   RTL Styles for Arabic Version
   مكتب المحاماة الحربي
   ======================================== */

/* === Base RTL === */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    font-family: 'Noto Sans Arabic', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: right;
}

/* Arabic Typography */
html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3, 
html[dir="rtl"] h4, 
html[dir="rtl"] h5, 
html[dir="rtl"] h6 {
    font-family: 'Noto Sans Arabic', 'Playfair Display', Georgia, serif;
}

/* === Navigation === */
html[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

html[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

html[dir="rtl"] .logo-text {
    text-align: right;
}

html[dir="rtl"] .lang-switcher {
    margin-left: 0;
    margin-right: var(--spacing-md);
}

html[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

/* === Header Scrolled === */
html[dir="rtl"] .header {
    left: 0;
    right: 0;
}

/* === Hero Section === */
html[dir="rtl"] .hero-content {
    text-align: center;
}

html[dir="rtl"] .hero-eyebrow::before {
    order: 1;
}

html[dir="rtl"] .hero-eyebrow::after {
    order: -1;
}

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

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

/* === Buttons === */
html[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn i {
    margin-left: 0;
    margin-right: 0;
}

/* === Stats Section === */
html[dir="rtl"] .stats-grid {
    direction: rtl;
}

/* === About Preview === */
html[dir="rtl"] .about-preview {
    direction: rtl;
}

html[dir="rtl"] .about-grid {
    direction: rtl;
}

html[dir="rtl"] .about-content {
    text-align: right;
}

html[dir="rtl"] .about-content .btn i {
    transform: rotate(180deg);
}

html[dir="rtl"] .about-preview-content {
    text-align: right;
}

html[dir="rtl"] .about-preview-content .section-eyebrow {
    text-align: right;
}

html[dir="rtl"] .about-preview-content h2 {
    text-align: right;
}

html[dir="rtl"] .about-preview-content .btn {
    align-self: flex-end;
}

/* === Section Headers === */
html[dir="rtl"] .section-header {
    text-align: center;
}

html[dir="rtl"] .section-subtitle {
    display: block;
}

/* === Services Grid === */
html[dir="rtl"] .services-grid {
    direction: rtl;
}

html[dir="rtl"] .service-card {
    text-align: center;
}

html[dir="rtl"] .service-link {
    flex-direction: row-reverse;
}

html[dir="rtl"] .service-link i {
    transform: rotate(180deg);
}

html[dir="rtl"] .service-link:hover i {
    transform: rotate(180deg) translateX(4px);
}

/* === Why Us Section === */
html[dir="rtl"] .why-grid {
    direction: rtl;
}

html[dir="rtl"] .why-item {
    text-align: center;
}

html[dir="rtl"] .why-us-grid {
    direction: rtl;
}

html[dir="rtl"] .features-list {
    direction: rtl;
}

html[dir="rtl"] .feature-item {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .feature-number {
    text-align: left;
}

/* === Team Section === */
html[dir="rtl"] .team-grid {
    direction: rtl;
}

html[dir="rtl"] .team-card {
    text-align: center;
}

html[dir="rtl"] .team-info {
    text-align: center;
}

html[dir="rtl"] .team-cta {
    text-align: center;
}

html[dir="rtl"] .team-cta .btn i {
    transform: rotate(180deg);
}

/* === Lawyers Grid === */
html[dir="rtl"] .lawyers-grid {
    direction: rtl;
}

html[dir="rtl"] .lawyer-info {
    text-align: center;
}

html[dir="rtl"] .lawyer-expertise {
    justify-content: center;
}

/* === CTA Section === */
html[dir="rtl"] .cta {
    text-align: center;
}

html[dir="rtl"] .cta-content {
    text-align: center;
}

html[dir="rtl"] .cta-buttons {
    flex-direction: row-reverse;
    justify-content: center;
}

/* === Footer === */
html[dir="rtl"] .footer {
    text-align: right;
}

html[dir="rtl"] .footer-grid {
    direction: rtl;
}

html[dir="rtl"] .footer-about .footer-logo {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

html[dir="rtl"] .footer-about .logo-text {
    text-align: right;
}

html[dir="rtl"] .footer-links,
html[dir="rtl"] .footer-services {
    text-align: right;
}

html[dir="rtl"] .footer-contact ul li {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .footer-contact ul li i {
    margin-left: var(--spacing-sm);
    margin-right: 0;
}

html[dir="rtl"] .footer-bottom {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-social {
    flex-direction: row-reverse;
}

/* === Contact Page === */
html[dir="rtl"] .contact-grid {
    direction: rtl;
}

html[dir="rtl"] .contact-info {
    text-align: right;
}

html[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .contact-item-icon {
    margin-left: var(--spacing-md);
    margin-right: 0;
}

html[dir="rtl"] .contact-item-content {
    text-align: right;
}

html[dir="rtl"] .horaire-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-social {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

html[dir="rtl"] .contact-form-wrapper {
    text-align: right;
}

html[dir="rtl"] .form-group label {
    text-align: right;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea,
html[dir="rtl"] .form-group select {
    text-align: right;
}

/* === Map Section === */
html[dir="rtl"] .map-address {
    flex-direction: row-reverse;
}

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

/* === Breadcrumb === */
html[dir="rtl"] .breadcrumb {
    flex-direction: row-reverse;
}

/* === Services Detail === */
html[dir="rtl"] .service-detail-card {
    direction: rtl;
    border-left: none;
    border-right: 3px solid var(--gray-300);
}

html[dir="rtl"] .service-detail-card:hover {
    border-left-color: transparent;
    border-right-color: var(--black);
}

html[dir="rtl"] .service-detail-content {
    text-align: right;
}

html[dir="rtl"] .service-detail-content ul li {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .service-detail-content ul li i {
    margin-left: var(--spacing-sm);
    margin-right: 0;
}

/* === Values Grid === */
html[dir="rtl"] .values-grid {
    direction: rtl;
}

html[dir="rtl"] .value-card {
    text-align: center;
}

/* === Legal Content === */
html[dir="rtl"] .legal-content {
    text-align: right;
}

html[dir="rtl"] .legal-content ul {
    margin-left: 0;
    margin-right: var(--spacing-md);
}

html[dir="rtl"] .legal-content ul li {
    padding-left: 0;
    padding-right: var(--spacing-md);
}

html[dir="rtl"] .legal-content ul li::before {
    left: auto;
    right: 0;
}

/* === WhatsApp Float === */
html[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 30px;
}

/* === Mobile Styles === */
@media (max-width: 768px) {
    html[dir="rtl"] .nav {
        flex-direction: row-reverse;
    }
    
    html[dir="rtl"] .nav-toggle {
        order: -1;
    }
    
    html[dir="rtl"] .lang-switcher {
        position: absolute;
        top: 50%;
        left: 60px;
        right: auto;
        transform: translateY(-50%);
        margin-right: 0;
    }
    
    html[dir="rtl"] .nav-menu {
        right: auto;
        left: -100%;
        flex-direction: column;
    }
    
    html[dir="rtl"] .nav-menu.active {
        left: 0;
        right: auto;
    }
    
    html[dir="rtl"] .hero-buttons,
    html[dir="rtl"] .cta-buttons {
        flex-direction: column;
    }
    
    html[dir="rtl"] .hero-contact {
        flex-direction: column;
    }
    
    html[dir="rtl"] .footer-grid {
        text-align: center;
    }
    
    html[dir="rtl"] .footer-about .footer-logo {
        justify-content: center;
    }
    
    html[dir="rtl"] .footer-contact ul li {
        justify-content: center;
    }
    
    html[dir="rtl"] .footer-bottom {
        flex-direction: column;
    }
    
    html[dir="rtl"] .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    html[dir="rtl"] .contact-item-icon {
        margin: 0 auto var(--spacing-sm);
    }
    
    html[dir="rtl"] .service-detail-card {
        text-align: center;
        border-right: none;
        border-top: 3px solid var(--gray-300);
    }
    
    html[dir="rtl"] .service-detail-card:hover {
        border-top-color: var(--black);
    }
    
    html[dir="rtl"] .service-detail-content ul {
        text-align: right;
    }
    
    html[dir="rtl"] .whatsapp-float {
        left: 15px;
        right: auto;
    }
}

@media (max-width: 480px) {
    html[dir="rtl"] .stats-grid {
        direction: rtl;
    }
    
    html[dir="rtl"] .horaire-row {
        flex-direction: column;
        text-align: center;
    }
}

/* Fix phone numbers direction */
a[href^="tel:"],
.hero-contact-value,
.footer-info a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}
