/********** RTL CSS **********/

/* ==========================================
   RTL Overrides for Arabic Language Support
   Black, Gold & White Theme
   ========================================== */

/* Base RTL Settings */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* ==========================================
   Text Alignment Utilities
   ========================================== */

[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

/* ==========================================
   Margin & Padding Utilities - Flip left/right
   ========================================== */

/* Margin End (me-*) -> Margin Start in RTL */
[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .me-4 { margin-right: 0 !important; margin-left: 1.5rem !important; }
[dir="rtl"] .me-5 { margin-right: 0 !important; margin-left: 3rem !important; }
[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }
[dir="rtl"] .me-0 { margin-left: 0 !important; }

/* Margin Start (ms-*) -> Margin End in RTL */
[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .ms-4 { margin-left: 0 !important; margin-right: 1.5rem !important; }
[dir="rtl"] .ms-5 { margin-left: 0 !important; margin-right: 3rem !important; }
[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }

/* Padding End (pe-*) -> Padding Start in RTL */
[dir="rtl"] .pe-1 { padding-right: 0 !important; padding-left: 0.25rem !important; }
[dir="rtl"] .pe-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
[dir="rtl"] .pe-3 { padding-right: 0 !important; padding-left: 1rem !important; }
[dir="rtl"] .pe-4 { padding-right: 0 !important; padding-left: 1.5rem !important; }
[dir="rtl"] .pe-5 { padding-right: 0 !important; padding-left: 3rem !important; }

/* Padding Start (ps-*) -> Padding End in RTL */
[dir="rtl"] .ps-1 { padding-left: 0 !important; padding-right: 0.25rem !important; }
[dir="rtl"] .ps-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
[dir="rtl"] .ps-3 { padding-left: 0 !important; padding-right: 1rem !important; }
[dir="rtl"] .ps-4 { padding-left: 0 !important; padding-right: 1.5rem !important; }
[dir="rtl"] .ps-5 { padding-left: 0 !important; padding-right: 3rem !important; }

/* ==========================================
   Topbar RTL - Social Icons Fix
   ========================================== */

[dir="rtl"] .bg-dark .d-inline-flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .bg-dark .btn-sm-square {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .bg-dark .btn-sm-square:last-child {
    margin-right: 0 !important;
}

[dir="rtl"] .bg-dark .btn-sm-square i {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==========================================
   Navbar RTL
   ========================================== */

[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

[dir="rtl"] .navbar-light .navbar-nav .nav-link {
    margin-right: 0;
    margin-left: 30px;
}

[dir="rtl"] .navbar .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
    text-align: right;
}

[dir="rtl"] .navbar-toggler {
    margin-right: auto;
    margin-left: 0;
}

/* Mobile Language Switcher RTL */
[dir="rtl"] #language-switcher-mobile {
    text-align: right !important;
}

[dir="rtl"] #language-switcher-mobile i {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] #current-lang-mobile {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* ==========================================
   Buttons RTL
   ========================================== */

[dir="rtl"] .btn i,
[dir="rtl"] .btn .fa,
[dir="rtl"] .btn .fas,
[dir="rtl"] .btn .far {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Navbar Quote Button - RTL */
[dir="rtl"] .navbar .btn i.fa-arrow-right {
    margin-left: 0 !important;
    margin-right: 1rem !important;
    transform: scaleX(-1);
}

[dir="rtl"] .navbar .btn-primary {
    direction: rtl;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[dir="rtl"] .navbar .btn-primary span {
    display: inline-block;
}

[dir="rtl"] .navbar .btn-primary i {
    order: -1;
}

/* ==========================================
   Header Carousel RTL
   ========================================== */

[dir="rtl"] .header-carousel .owl-nav {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .header-carousel .owl-dots {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* ==========================================
   Section Title RTL
   ========================================== */

[dir="rtl"] .section-title h1::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .section-title h1::after {
    right: auto;
    left: 0;
}

[dir="rtl"] .section-title.text-start h1::before {
    display: block;
}

[dir="rtl"] .section-title.text-start h1::after {
    display: none;
}

/* ==========================================
   About Section RTL
   ========================================== */

@media (min-width: 992px) {
    [dir="rtl"] .about-text {
        padding-right: 0.75rem;
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    [dir="rtl"] .about-text {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    [dir="rtl"] .about-text {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}

/* ==========================================
   Feature Section RTL
   ========================================== */

@media (min-width: 992px) {
    [dir="rtl"] .feature-text {
        padding-left: 0.75rem;
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    [dir="rtl"] .feature-text {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    [dir="rtl"] .feature-text {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}

/* ==========================================
   Quote Section RTL
   ========================================== */

@media (min-width: 992px) {
    [dir="rtl"] .quote-text {
        padding-right: 0.75rem;
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    [dir="rtl"] .quote-text {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    [dir="rtl"] .quote-text {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}

/* Quote Form RTL */
[dir="rtl"] .quote-form .btn-primary {
    direction: rtl;
}

[dir="rtl"] .quote-form .btn-primary i {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
    transform: scaleX(-1);
}

[dir="rtl"] .quote-form .btn-primary:hover i {
    transform: scaleX(-1) translateX(-5px);
}

[dir="rtl"] .quote-form select option {
    text-align: right;
}

/* ==========================================
   Contact Section RTL
   ========================================== */

@media (min-width: 992px) {
    [dir="rtl"] .contact-text {
        padding-left: 0.75rem;
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    [dir="rtl"] .contact-text {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    [dir="rtl"] .contact-text {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}

/* ==========================================
   Team Social Icons RTL
   ========================================== */

[dir="rtl"] .team-item .team-social {
    left: auto;
    right: -38px;
}

[dir="rtl"] .team-item:hover .team-social {
    right: 0;
    left: auto;
}

/* ==========================================
   Portfolio RTL
   ========================================== */

[dir="rtl"] .portfolio-item .portfolio-overlay {
    left: auto;
    right: 50%;
}

[dir="rtl"] .portfolio-item:hover .portfolio-overlay {
    right: 0;
    left: auto;
}

/* ==========================================
   Footer RTL
   ========================================== */

/* Footer icons - flip margins */
[dir="rtl"] .footer .fa-map-marker-alt,
[dir="rtl"] .footer .fa-phone-alt,
[dir="rtl"] .footer .fa-envelope {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

/* Footer links with arrows */
[dir="rtl"] .footer .btn.btn-link {
    text-align: right;
}

[dir="rtl"] .footer .btn.btn-link::before {
    display: none;
}

/* Footer Language Switcher RTL */
[dir="rtl"] .footer .footer-lang-switcher {
    text-align: right !important;
}

[dir="rtl"] .footer .footer-lang-switcher::before {
    content: none !important;
    margin: 0 !important;
}

[dir="rtl"] .footer .footer-lang-switcher i {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] #current-lang-footer {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* Footer social buttons */
[dir="rtl"] .footer .btn.btn-social,
[dir="rtl"] .footer .btn-outline-light.btn-social {
    margin-right: 0;
    margin-left: 5px;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[dir="rtl"] .footer .btn.btn-social i,
[dir="rtl"] .footer .btn-outline-light.btn-social i {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 16px !important;
}

[dir="rtl"] .footer .btn-outline-light {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

[dir="rtl"] .footer .btn-outline-light i {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Footer contact info icons - ensure visibility */
[dir="rtl"] .footer .fa-map-marker-alt::before,
[dir="rtl"] .footer .fa-phone-alt::before,
[dir="rtl"] .footer .fa-envelope::before {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

/* Footer language switcher icon */
[dir="rtl"] .footer .footer-lang-switcher i.fa-globe {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

/* Social media icons - RTL specific fixes */
[dir="rtl"] .footer .btn-outline-light.btn-social i.fab,
[dir="rtl"] .footer .btn-outline-light.btn-social i.fa-twitter,
[dir="rtl"] .footer .btn-outline-light.btn-social i.fa-facebook-f,
[dir="rtl"] .footer .btn-outline-light.btn-social i.fa-youtube,
[dir="rtl"] .footer .btn-outline-light.btn-social i.fa-linkedin-in {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-family: "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
    font-size: 16px !important;
}

/* Social media button containers - RTL */
[dir="rtl"] .footer .btn-outline-light.btn-social {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    margin-right: 0 !important;
    margin-left: 5px !important;
}

/* Font Awesome Brands - RTL specific */
[dir="rtl"] .fab {
    font-family: "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Clean Social Media Icon Fixes - RTL */
[dir="rtl"] .footer .btn-outline-light.btn-social {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    margin-left: 5px;
    border: 1px solid #D4AF37;
    background: transparent;
    transition: all 0.3s;
}

[dir="rtl"] .footer .btn-outline-light.btn-social:hover {
    background: #D4AF37;
    color: #000000;
}

[dir="rtl"] .footer .btn-outline-light.btn-social i.fab {
    display: inline-block;
    font-family: "Font Awesome 5 Brands";
    font-weight: 400;
    font-size: 16px;
    color: #D4AF37;
    line-height: 1;
    text-align: center;
}

/* Explicit icon content for social media - RTL */
[dir="rtl"] .footer .fa-twitter::before { content: "\f099"; }
[dir="rtl"] .footer .fa-facebook-f::before { content: "\f39e"; }
[dir="rtl"] .footer .fa-youtube::before { content: "\f167"; }
[dir="rtl"] .footer .fa-linkedin-in::before { content: "\f0e1"; }

/* Topbar Social Media Icons - RTL FORCE DISPLAY */
[dir="rtl"] .container-fluid.bg-dark .btn-sm-square.bg-primary,
[dir="rtl"] .bg-dark .btn-sm-square.bg-primary {
    width: 35px !important;
    height: 35px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    transition: all 0.3s !important;
    background-color: #D4AF37 !important;
    border: none !important;
    padding: 0 !important;
    margin-right: 0 !important;
    margin-left: 4px !important;
}

[dir="rtl"] .container-fluid.bg-dark .btn-sm-square.bg-primary i.fab,
[dir="rtl"] .bg-dark .btn-sm-square.bg-primary i.fab {
    display: inline-block !important;
    font-family: "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #000000 !important;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none !important;
}

[dir="rtl"] .container-fluid.bg-dark .btn-sm-square.bg-primary:hover,
[dir="rtl"] .bg-dark .btn-sm-square.bg-primary:hover {
    background: #000000 !important;
    color: #D4AF37 !important;
}

[dir="rtl"] .container-fluid.bg-dark .btn-sm-square.bg-primary:hover i.fab,
[dir="rtl"] .bg-dark .btn-sm-square.bg-primary:hover i.fab {
    color: #D4AF37 !important;
}

/* FORCE icon content for topbar social media - RTL */
[dir="rtl"] .container-fluid.bg-dark .fa-facebook-f::before,
[dir="rtl"] .bg-dark .fa-facebook-f::before { content: "\f39e" !important; }
[dir="rtl"] .container-fluid.bg-dark .fa-twitter::before,
[dir="rtl"] .bg-dark .fa-twitter::before { content: "\f099" !important; }
[dir="rtl"] .container-fluid.bg-dark .fa-linkedin-in::before,
[dir="rtl"] .bg-dark .fa-linkedin-in::before { content: "\f0e1" !important; }
[dir="rtl"] .container-fluid.bg-dark .fa-instagram::before,
[dir="rtl"] .bg-dark .fa-instagram::before { content: "\f16d" !important; }

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

/* ==========================================
   BLOG RTL STYLES - ENHANCED
   ========================================== */

/* Blog Item RTL */
[dir="rtl"] .blog-item .d-flex.mb-3 small i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .blog-item a.text-uppercase {
    flex-direction: row-reverse;
}

[dir="rtl"] .blog-item a.text-uppercase i {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .blog-item a.text-uppercase:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .blog-item a.text-uppercase:hover i {
    transform: translateX(-3px);
}

/* Blog Sidebar RTL */
[dir="rtl"] .bg-light h4::after {
    left: auto;
    right: 0;
}

/* Search Form RTL */
[dir="rtl"] .position-relative button {
    right: auto;
    left: 0;
}

/* Recent Posts RTL */
[dir="rtl"] .d-flex.mb-3:hover {
    transform: translateX(-8px) scale(1.02);
}

[dir="rtl"] .d-flex.mb-3 {
    flex-direction: row-reverse;
}

[dir="rtl"] .d-flex.mb-3 img {
    margin-left: 0;
    margin-right: 0;
}

[dir="rtl"] .d-flex.mb-3 .flex-grow-1 {
    padding-left: 0;
    padding-right: 1rem;
}

[dir="rtl"] .d-flex.mb-3 .ps-3 {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

/* Professional Categories RTL */
[dir="rtl"] .category-link {
    text-align: right;
    flex-direction: row-reverse;
}

[dir="rtl"] .category-link::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .category-link:hover {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
    background: linear-gradient(270deg, rgba(212, 175, 55, 0.05), transparent);
}

[dir="rtl"] .category-link i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .category-link .badge {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Old Categories RTL */
[dir="rtl"] .btn-link:hover {
    padding-left: 0;
    padding-right: 0;
    text-decoration: none;
}

[dir="rtl"] .btn-link::before {
    display: none;
}

[dir="rtl"] .btn-link:hover::before {
    display: none;
}

/* Pagination RTL */
[dir="rtl"] .pagination .page-link {
    text-align: center;
}

/* Blog Details RTL */
[dir="rtl"] .blog-item h4::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .blog-item ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

/* Author Section RTL */
[dir="rtl"] .d-flex.align-items-center.mb-3 {
    flex-direction: row-reverse;
}

[dir="rtl"] .d-flex.align-items-center.mb-3 img {
    margin-left: 1rem;
    margin-right: 0;
}

/* Comments RTL */
[dir="rtl"] .d-flex.mb-4 {
    flex-direction: row-reverse;
}

[dir="rtl"] .d-flex.mb-4 img {
    margin-left: 1rem;
    margin-right: 0;
}

/* Comment Form RTL */
[dir="rtl"] form .form-control {
    text-align: right;
}

[dir="rtl"] form .btn-primary {
    text-align: center;
}

/* ==========================================
   RESPONSIVE BLOG RTL STYLES
   ========================================== */

/* Extra Small devices RTL (phones, 576px and down) */
@media (max-width: 575.98px) {
    [dir="rtl"] .blog-item .d-flex.mb-3 {
        text-align: center;
    }
    
    [dir="rtl"] .d-flex.mb-3 img {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    [dir="rtl"] .d-flex.align-items-center.mb-3 {
        text-align: center;
    }
    
    [dir="rtl"] .d-flex.align-items-center.mb-3 img {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    [dir="rtl"] .d-flex.mb-4 {
        text-align: center;
    }
    
    [dir="rtl"] .d-flex.mb-4 img {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    [dir="rtl"] .bg-light h4::after {
        left: auto;
        right: 50%;
        transform: translateX(50%);
    }
    
    [dir="rtl"] .blog-item h4::after {
        left: auto;
        right: 0;
    }
    
    [dir="rtl"] .blog-item ul {
        padding-right: 1rem;
        padding-left: 0;
    }
}

/* Small devices RTL (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    [dir="rtl"] .d-flex.align-items-center.mb-3 {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    [dir="rtl"] .d-flex.align-items-center.mb-3 img {
        margin-right: 1rem;
        margin-left: 0;
    }
    
    [dir="rtl"] .d-flex.mb-4 {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    [dir="rtl"] .d-flex.mb-4 img {
        margin-right: 1rem;
        margin-left: 0;
    }
    
    [dir="rtl"] .d-flex.mb-3 {
        flex-direction: row-reverse;
    }
    
    [dir="rtl"] .d-flex.mb-3 img {
        margin-right: 1rem;
        margin-left: 0;
    }
}

/* Medium devices RTL (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    [dir="rtl"] .d-flex.align-items-center.mb-3 {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    [dir="rtl"] .d-flex.align-items-center.mb-3 img {
        margin-right: 1rem;
        margin-left: 0;
    }
    
    [dir="rtl"] .d-flex.mb-4 {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    [dir="rtl"] .d-flex.mb-4 img {
        margin-right: 1rem;
        margin-left: 0;
    }
    
    [dir="rtl"] .d-flex.mb-3 {
        flex-direction: row-reverse;
    }
    
    [dir="rtl"] .d-flex.mb-3 img {
        margin-right: 1rem;
        margin-left: 0;
    }
}

/* Large devices RTL (desktops, 992px and up) */
@media (min-width: 992px) {
    [dir="rtl"] .d-flex.align-items-center.mb-3 {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    [dir="rtl"] .d-flex.align-items-center.mb-3 img {
        margin-right: 1rem;
        margin-left: 0;
    }
    
    [dir="rtl"] .d-flex.mb-4 {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    [dir="rtl"] .d-flex.mb-4 img {
        margin-right: 1rem;
        margin-left: 0;
    }
    
    [dir="rtl"] .d-flex.mb-3 {
        flex-direction: row-reverse;
    }
    
    [dir="rtl"] .d-flex.mb-3 img {
        margin-right: 1rem;
        margin-left: 0;
    }
}

/* Landscape orientation RTL adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    [dir="rtl"] .page-header h1 {
        font-size: 1.5rem !important;
    }
    
    [dir="rtl"] .blog-item .bg-primary img {
        height: 150px;
    }
}

/* Print styles RTL */
@media print {
    [dir="rtl"] .blog-item {
        text-align: right;
    }
    
    [dir="rtl"] .blog-item h1,
    [dir="rtl"] .blog-item h4 {
        text-align: right;
    }
    
    [dir="rtl"] .blog-item ul {
        padding-right: 1.5rem;
        padding-left: 0;
    }
}

/* Accessibility RTL improvements */
@media (prefers-reduced-motion: reduce) {
    [dir="rtl"] .blog-item a.text-uppercase:hover {
        transform: translateX(0) !important;
    }
    
    [dir="rtl"] .blog-item a.text-uppercase:hover i {
        transform: translateX(0) !important;
    }
    
    [dir="rtl"] .d-flex.mb-3:hover {
        transform: translateX(0) !important;
    }
}

[dir="rtl"] .footer .fab {
    display: inline-block !important;
}

[dir="rtl"] .footer .fab.fa-twitter,
[dir="rtl"] .footer .fab.fa-facebook-f,
[dir="rtl"] .footer .fab.fa-youtube,
[dir="rtl"] .footer .fab.fa-linkedin-in {
    display: inline-block !important;
    opacity: 1 !important;
}

/* Newsletter section RTL */
[dir="rtl"] .footer .position-relative input {
    padding-right: 1.5rem;
    padding-left: 8rem;
    text-align: right;
}

[dir="rtl"] .footer .position-relative .btn {
    right: auto;
    left: 0;
    margin-right: 0.5rem;
    margin-left: 0;
}

/* Copyright section */
[dir="rtl"] .footer .copyright .text-md-start {
    text-align: right !important;
}

[dir="rtl"] .footer .copyright .text-md-end {
    text-align: left !important;
}

/* Back to Top Button RTL */
[dir="rtl"] .back-to-top {
    right: auto !important;
    left: 45px !important;
}

/* Footer Override RTL - Force Clean Template Style */
[dir="rtl"] .footer .btn.btn-link {
    text-align: right !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin-bottom: 5px !important;
    display: block !important;
    font-size: 15px !important;
    font-weight: normal !important;
    text-transform: none !important;
    transition: color 0.3s !important;
    border: none !important;
    background: none !important;
}

[dir="rtl"] .footer .btn.btn-link::before {
    display: none !important;
    content: none !important;
}

[dir="rtl"] .footer .btn.btn-link::after {
    display: none !important;
    content: none !important;
}

[dir="rtl"] .footer .btn.btn-link:hover {
    color: #D4AF37 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

[dir="rtl"] .footer .btn.btn-link:hover::before {
    display: none !important;
}

[dir="rtl"] .footer .btn.btn-link:hover::after {
    display: none !important;
}

/* Footer Language Switcher RTL Override */
[dir="rtl"] .footer .footer-lang-switcher {
    text-align: right !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin-bottom: 5px !important;
    display: block !important;
    border: none !important;
    background: none !important;
    font-size: 15px !important;
    font-weight: normal !important;
}

[dir="rtl"] .footer .footer-lang-switcher::before {
    display: none !important;
    content: none !important;
}

[dir="rtl"] .footer .footer-lang-switcher::after {
    display: none !important;
    content: none !important;
}

[dir="rtl"] .footer .footer-lang-switcher:hover {
    color: #D4AF37 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

[dir="rtl"] .footer .footer-lang-switcher:hover::before {
    display: none !important;
}

[dir="rtl"] .footer .footer-lang-switcher:hover::after {
    display: none !important;
}

/* Override any general btn-link styles in footer RTL */
[dir="rtl"] .footer .btn-link {
    color: #FFFFFF !important;
    text-decoration: none !important;
    padding: 0 !important;
    position: relative !important;
    display: block !important;
    transition: color 0.3s !important;
}

[dir="rtl"] .footer .btn-link:hover {
    color: #D4AF37 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-decoration: none !important;
}

[dir="rtl"] .footer .btn-link::before {
    display: none !important;
    content: none !important;
}

[dir="rtl"] .footer .btn-link::after {
    display: none !important;
    content: none !important;
}

[dir="rtl"] .footer .btn-link:hover::before {
    display: none !important;
}

[dir="rtl"] .footer .btn-link:hover::after {
    display: none !important;
}

/* ==========================================
   Back to Top Button RTL
   ========================================== */

[dir="rtl"] .back-to-top {
    right: auto;
    left: 45px;
}

/* ==========================================
   Forms RTL
   ========================================== */

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

[dir="rtl"] .input-group-text {
    border-radius: 0 0.25rem 0.25rem 0 !important;
}

[dir="rtl"] .input-group .form-control:first-child {
    border-radius: 0.25rem 0 0 0.25rem !important;
}

/* ==========================================
   Icons that need flipping in RTL
   ========================================== */

[dir="rtl"] .fa-chevron-right,
[dir="rtl"] .fa-angle-right,
[dir="rtl"] .fa-arrow-right {
    transform: scaleX(-1);
    display: inline-block;
}

[dir="rtl"] .fa-chevron-left,
[dir="rtl"] .fa-angle-left,
[dir="rtl"] .fa-arrow-left {
    transform: scaleX(-1);
    display: inline-block;
}

/* Bootstrap Icons - ensure visibility */
[dir="rtl"] .bi {
    display: inline-block !important;
}

[dir="rtl"] .bi-arrow-left,
[dir="rtl"] .bi-arrow-right {
    display: inline-block !important;
    opacity: 1 !important;
}

/* Font Awesome Icons - ensure visibility in RTL */
[dir="rtl"] .fa,
[dir="rtl"] .fas,
[dir="rtl"] .far,
[dir="rtl"] .fab,
[dir="rtl"] i.fa,
[dir="rtl"] i.fas,
[dir="rtl"] i.far,
[dir="rtl"] i.fab,
[dir="rtl"] .fa-globe,
[dir="rtl"] .fa-map-marker-alt,
[dir="rtl"] .fa-phone-alt,
[dir="rtl"] .fa-envelope,
[dir="rtl"] .fa-twitter,
[dir="rtl"] .fa-facebook-f,
[dir="rtl"] .fa-youtube,
[dir="rtl"] .fa-linkedin-in {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

/* ==========================================
   List Items RTL
   ========================================== */

[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

[dir="rtl"] .list-unstyled {
    padding-right: 0;
}

/* ==========================================
   Breadcrumb RTL
   ========================================== */

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 0.5rem;
}

/* ==========================================
   Float Utilities RTL
   ========================================== */

[dir="rtl"] .float-start {
    float: right !important;
}

[dir="rtl"] .float-end {
    float: left !important;
}

/* ==========================================
   Border Utilities RTL
   ========================================== */

[dir="rtl"] .border-start {
    border-left: 0 !important;
    border-right: 1px solid #dee2e6 !important;
}

[dir="rtl"] .border-end {
    border-right: 0 !important;
    border-left: 1px solid #dee2e6 !important;
}

/* ==========================================
   Responsive RTL Adjustments
   ========================================== */

@media (max-width: 991.98px) {
    [dir="rtl"] .navbar-light .navbar-nav .nav-link {
        margin-left: 0;
        margin-right: 0;
    }
    
    [dir="rtl"] .navbar-nav {
        border-top: 1px solid #D4AF37;
    }
}

/* ==========================================
   Carousel RTL Specific
   ========================================== */

[dir="rtl"] .owl-carousel .owl-nav button.owl-prev,
[dir="rtl"] .owl-carousel .owl-nav button.owl-next {
    direction: ltr;
}

/* ==========================================
   Testimonial Carousel RTL
   ========================================== */

/* Flip gradient overlays */
[dir="rtl"] .testimonial-carousel::before {
    left: auto;
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

[dir="rtl"] .testimonial-carousel::after {
    right: auto;
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Navigation arrows positioning */
[dir="rtl"] .testimonial-carousel .owl-nav {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Ensure arrows are visible and properly positioned */
[dir="rtl"] .testimonial-carousel .owl-nav .owl-prev,
[dir="rtl"] .testimonial-carousel .owl-nav .owl-next {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Flip navigation arrows - fix display */
[dir="rtl"] .testimonial-carousel .owl-nav .owl-prev i,
[dir="rtl"] .testimonial-carousel .owl-nav .owl-next i {
    transform: scaleX(-1);
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Swap arrow functionality in RTL */
[dir="rtl"] .testimonial-carousel .owl-nav .owl-prev::before {
    content: '';
}

[dir="rtl"] .testimonial-carousel .owl-nav .owl-next::before {
    content: '';
}

/* Testimonial Owl Carousel RTL Structure */
[dir="rtl"] .testimonial-carousel .owl-stage-outer,
[dir="rtl"] .testimonial-carousel .owl-stage {
    direction: rtl;
}

[dir="rtl"] .testimonial-carousel .owl-item {
    float: right !important;
    direction: rtl;
}

/* Testimonial text alignment */
[dir="rtl"] .testimonial-item {
    direction: rtl;
    text-align: center !important;
}

[dir="rtl"] .testimonial-item img {
    margin: 0 auto !important;
}

[dir="rtl"] .testimonial-text {
    direction: rtl;
    text-align: center !important;
}

[dir="rtl"] .testimonial-text p {
    text-align: center !important;
    direction: rtl;
}

[dir="rtl"] .testimonial-text h5,
[dir="rtl"] .testimonial-text span {
    text-align: center !important;
}

/* ==========================================
   Additional Fixes
   ========================================== */

[dir="rtl"] .position-relative {
    direction: rtl;
}

[dir="rtl"] .d-flex {
    direction: rtl;
}

/* Checkboxes and Radio Buttons */
[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

[dir="rtl"] .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

/* Modal RTL */
[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

/* Badge RTL */
[dir="rtl"] .badge {
    text-align: center;
}

/* Pagination RTL */
[dir="rtl"] .page-link {
    margin-right: -1px;
    margin-left: 0;
}

[dir="rtl"] .page-item:first-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir="rtl"] .page-item:last-child .page-link {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* ==========================================
   SERVICE DETAILS RTL SUPPORT
   ========================================== */

/* Service Details RTL Text Alignment */
[dir="rtl"] .service-details-main {
    text-align: right;
}

[dir="rtl"] .service-card h5,
[dir="rtl"] .service-info-card h5,
[dir="rtl"] .service-details-main h1,
[dir="rtl"] .service-details-main h3 {
    text-align: right;
}

/* Service Details RTL Margins */
[dir="rtl"] .service-card .d-flex .ms-3 {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

[dir="rtl"] .service-details-main .btn-square {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

[dir="rtl"] .service-details-main .me-3 {
    margin-left: 0.75rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .service-details-main .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .service-details-main .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .service-details-main .ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* Service Details RTL Mobile */
@media (max-width: 576px) {
    [dir="rtl"] .service-card .d-flex .ms-3 {
        margin-right: 0.5rem !important;
    }
    
    [dir="rtl"] .service-details-main .btn-square {
        margin-left: 0.5rem !important;
    }
}

/* ==========================================
   SERVICE DETAILS RTL SPECIFIC FIXES
   ========================================== */

/* RTL Other Services */
[dir="rtl"] .other-service-item .ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

[dir="rtl"] .other-service-item .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .other-service-item .ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* RTL Service Info Cards */
[dir="rtl"] .service-info-card .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .service-info-card .ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

[dir="rtl"] .service-info-card .d-flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .service-info-card .d-flex .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .service-info-card .d-flex .ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

/* RTL Contact Card */
[dir="rtl"] .bg-primary .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

/* RTL Features and Process */
[dir="rtl"] .service-details-main .btn-square {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

/* RTL Mobile Other Services */
@media (max-width: 576px) {
    [dir="rtl"] .other-service-item .ms-3 {
        margin-right: 0.75rem !important;
    }
}

/* RTL Main Content Area */
[dir="rtl"] .service-details-main .d-flex.gap-3 {
    flex-direction: row-reverse;
}

[dir="rtl"] .service-details-main .btn i {
    transform: scaleX(-1);
}

/* RTL Process Steps */
[dir="rtl"] .service-details-main .row.g-4 .col-md-6:nth-child(even) {
    text-align: right;
}

[dir="rtl"] .service-details-main .row.g-4 .col-md-6:nth-child(odd) {
    text-align: left;
}

/* RTL Features List */
[dir="rtl"] .service-details-main .d-flex.align-items-center {
    flex-direction: row-reverse;
}

/* RTL CTA Section */
[dir="rtl"] .service-details-main .d-flex.gap-3 .btn {
    text-align: center;
}

/* RTL Contact Card Icons */
[dir="rtl"] .bg-primary .d-flex {
    flex-direction: row-reverse;
}

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

[dir="rtl"] .contact-item:hover {
    transform: translateX(-3px);
}

[dir="rtl"] .contact-item .ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

[dir="rtl"] .contact-item .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

/* Force RTL Alignment for Service Info and Contact */
[dir="rtl"] .service-info-card .d-flex.align-items-center {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .service-info-card .d-flex.align-items-center i {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .contact-item {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .contact-item i {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

/* Ensure text alignment */
[dir="rtl"] .service-info-card h5,
[dir="rtl"] .service-info-card h6,
[dir="rtl"] .service-info-card p,
[dir="rtl"] .service-info-card .text-muted {
    text-align: right !important;
}

[dir="rtl"] .contact-item div {
    text-align: right !important;
}

[dir="rtl"] .bg-primary h5,
[dir="rtl"] .bg-primary p {
    text-align: right !important;
}

/* Force RTL alignment for all text content */
[dir="rtl"] .service-info-item div,
[dir="rtl"] .contact-item div,
[dir="rtl"] .service-info-item h6,
[dir="rtl"] .service-info-item p,
[dir="rtl"] .contact-item small,
[dir="rtl"] .contact-item strong {
    text-align: right !important;
    direction: rtl !important;
}

/* Service Info Item RTL */
[dir="rtl"] .service-info-item {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .service-info-item:hover {
    transform: translateX(-3px) !important;
}

[dir="rtl"] .service-info-item i {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

/* Fix mixed Arabic/English text alignment */
[dir="rtl"] .service-info-item .text-muted,
[dir="rtl"] .contact-item strong {
    text-align: right !important;
    direction: rtl !important;
}

/* Ensure consistent alignment for all text elements */
[dir="rtl"] .service-info-card *,
[dir="rtl"] .bg-primary * {
    text-align: right !important;
}

/* Override Bootstrap text utilities for RTL */
[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

/* RTL Mobile Responsive */
@media (max-width: 768px) {
    [dir="rtl"] .service-details-main .d-flex.gap-3 {
        flex-direction: column;
    }
    
    [dir="rtl"] .service-details-main .btn i {
        transform: none;
    }
}

