/* RTL/LTR Language Support Styles */

@font-face {
    font-family: 'Alexandria';
    src: url('../assets/fonts/Alexandria-VariableFont_wght.woff2');
}
@font-face {
    font-family: 'Tajawal';
    src: url('../assets/fonts/Tajawal-Regular.woff2');
}

body.rtl p, body.rtl h2, body.rtl h3, body.rtl span, body.rtl a, body.rtl button {
    font-family: "Tajawal", sans-serif !important;
}
body.rtl h1{
    font-family: "Alexandria", sans-serif !important;
    line-height: 1.2;
}
/* RTL Text Direction */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.ltr {
    direction: ltr;
    text-align: left;
}

/* RTL Navigation */
body.rtl #menu {
    /* flex-direction: row-reverse; */
}
body.rtl p,
body.rtl h2 {
    font-size: 1.2rem !important;
}

body.rtl .drawer-nav {
    text-align: right;
}
body.rtl .drawer-logo svg {
    margin-right: -5.5rem;
}
body.rtl .drawer-nav-link {
    border-left: none;
    border-right: 3px solid transparent;
}

body.rtl #navbar #actions .language-toggle button {
    font-size: 1rem;
    /* padding: 0.05rem 0.5rem; */
    font-weight: 500;
}

body.rtl .drawer-nav-link:hover,
body.rtl .drawer-nav-link.active {
    border-right-color: var(--dark-green);
    transform: translateX(-8px);
}

/* RTL Language Toggle */
body.rtl .language-toggle {
    flex-direction: row-reverse;
}

body.rtl .lang-buttons {
    flex-direction: row-reverse;
}

body.rtl #navbar #actions > button.contact-btn a {
    font-weight: 600;
}
/* RTL Hero Section */
body.rtl #hero #hero-text {
    /* align-items: flex-end; */
    text-align: right;
    padding: 0 6vw 0 0; /* Remove left padding, add right padding */
    margin-left: auto; /* Push content to the right */
    max-width: 100%; /* Limit width so it doesn't span full screen */
}

body.rtl #hero #hero-buttons {
    justify-content: flex-end;
}

/* Ensure hero content is positioned correctly on the right */
body.rtl #hero {
    justify-content: flex-end;
}

/* RTL About Section */
body.rtl #about {
    flex-direction: row-reverse;
}

body.rtl #about #ar-top {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
}

body.rtl #about #aright #ar-button {
    margin-left: auto;
}
/* RTL Products Section */
body.rtl #product #pwrapper #ptop {
    flex-direction: row-reverse;
}

body.rtl #product #pwrapper #ptop #ptopl {
    flex-direction: row-reverse;
}

body.rtl #product #pwrapper #pbtm .pcard h3,
body.rtl #product #pwrapper #pbtm .pcard p {
    right: 1.5vw;
}
body.rtl #product #pwrapper #pbtm .pcard p {
    bottom: 1.5rem;
}
body.rtl #product #pwrapper #pbtm .pcard h3{
    bottom:4.5rem;
    font-weight: 600;
}

/* RTL Stats Section */
body.rtl #stats #statstop #statstopl {
    flex-direction: row-reverse;
}
body.rtl #stats #statsbtm .statcard {
    justify-content: flex-start;
}

body.rtl #stats #statsbtm .statcard h1 span {
    padding-bottom: 10px;
}

body.rtl #career #careerleft {
    align-items: flex-start;
}

body.rtl #career #careertop {
    flex-direction: row-reverse;
}

body.rtl #testimonials #testwrapper {
    gap:2rem;
}
body.rtl #testimonials #testtop{
    /* gap:1rem; */
    margin-bottom: 0.5rem;;
}
/* RTL Testimonials */
body.rtl #testimonials #testtop #testtopl {
    flex-direction: row-reverse;
}

body.rtl #testimonials #testtop > p{
    margin-top: 0.5rem !important;
}

body.rtl #testimonials #testwrapper #testbtm .testcard #cardtext p {
    font-size: 1rem !important;
}
/* RTL Blogs */
body.rtl #blogs #blogstop #blogstopl {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* RTL Footer */
body.rtl .footer-content {
    flex-direction: row-reverse;
    text-align: right;
}
body.rtl .footer-contact {
    margin-top: 1.6rem;
}

body.rtl .nav-links,
body.rtl .services-links {
    align-items: flex-end;
}

/* RTL Animations and Transitions */
body.rtl * {
    transition: all 0.3s ease;
}

/* Mobile RTL Adjustments */
@media (max-width: 768px) {
    /* body.rtl #hero #hero-text {
        text-align: center;
        align-items: center;
    } */
    
    body.rtl #stats #statsbtm .statcard h1 span {
        padding-bottom: 0px;
        padding-top: 4px;
    }
    body.rtl #about {
        flex-direction: column;
    }
    
    body.rtl #career {
        flex-direction: column;
    }
}

/* Arabic Font Support */
body.rtl,
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl p,
body.rtl button,
body.rtl a {
    font-weight: 500;
    font-feature-settings: "liga" 1, "clig" 1, "kern" 1, "calt" 1;
}

/* Ensure proper text rendering for Arabic */
body.rtl {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    unicode-bidi: bidi-override;
}

/* RTL Button and input improvements */
body.rtl button,
body.rtl input {
    text-align: right;
}

body.rtl #hero-buttons {
    gap: 1rem;
}

body.rtl #hero-buttons button {
    text-align: center;
}

/* RTL Testimonials improvements */
body.rtl #testimonials #testwrapper #testbtm .testcard {
    gap:1rem;
    text-align: right;
}

body.rtl #testimonials #testwrapper #testbtm .testcard #cardtext {
    text-align: right;
}
body.rtl #testimonials #testwrapper #testbtm .testcard #cardtext h2 {
    display: flex;
    align-items: center;
    gap:0.5rem;
}
/* RTL Cards content alignment */
body.rtl .pcard,
body.rtl .statcard,
body.rtl .blogcard {
    text-align: right;
}

body.rtl .blogcard h2,
body.rtl .pcard h3,
body.rtl .statcard h2 {
    text-align: right;
}

/* RTL Career section improvements */
body.rtl #career #careerleft .careerstat {
    /* flex-direction: row-reverse; */
    text-align: right;
}

body.rtl #career #careerleft .careerstat-text {
    text-align: right;
    margin-right: 1rem;
    margin-left: 0;
}

body.rtl #career #careerleft button {
    margin-left: auto;
}
/* RTL-specific spacing adjustments */
body.rtl .drawer-nav-link {
    padding: 18px 0 18px 25px;
}

/* RTL Dot positioning */
body.rtl #dot {
    order: 2;
    margin-left: 1vw;
    margin-right: 0;
}

/* RTL Section improvements */
body.rtl #about #ar-top,
body.rtl #careertop,
body.rtl #statstopl,
body.rtl #testtopl,
body.rtl #blogstopl,
body.rtl #ptopl {
    flex-direction: row-reverse;
}

body.rtl #about #ar-top #dot,
body.rtl #careertop #dot,
body.rtl #statstopl #dot,
body.rtl #testtopl #dot,
body.rtl #blogstopl #dot,
body.rtl #ptopl #dot {
    margin-left: 1vw;
    margin-right: 0;
}

/* RTL Text alignment */
body.rtl #about #ar-text,
body.rtl #career #careerleft,
body.rtl #stats,
body.rtl #testimonials,
body.rtl #blogs {
    text-align: right;
}

/* RTL Button alignment */
body.rtl #ar-button,
body.rtl #career button {
    align-self: flex-end;
}

/* RTL Cards and content */
body.rtl .pcard,
body.rtl .statcard,
body.rtl .testcard,
body.rtl .blogcard {
    text-align: right;
}

/* RTL Product section specific */
body.rtl #product #pwrapper #ptop #ptopr {
    order: -1;
}

/* RTL Testimonials Carousel Fix */
body.rtl #testimonials #testwrapper #testbtm #cardtop {
    animation: scrollLeftRTL 50s linear infinite;
}

body.rtl #testimonials #testwrapper #testbtm #cardbtm {
    animation: scrollRightRTL 50s linear infinite;
}

body.rtl #testimonials #testwrapper #testbtm #cardtop:hover,
body.rtl #testimonials #testwrapper #testbtm #cardbtm:hover {
    animation-play-state: paused;
}
/* RTL-specific carousel animations */
@keyframes scrollRightRTL {
    from {
        transform: translate(0);
    }
    to {
        transform: translate(calc(50% + 1rem));
    }
}

@keyframes scrollLeftRTL {
    from {
        transform: translate(calc(50% + 1rem));
    }
    to {
        transform: translate(0);
    }
}

/* RTL Responsive improvements */
@media (max-width: 768px) {
    body.rtl #about #ar-text,
    body.rtl #stats,
    body.rtl #testimonials,
    body.rtl #blogs {
        text-align: center;
    }
    
    body.rtl #ar-button,
    body.rtl #career button {
        align-self: center;
    }

    body.rtl #blogs #blogstop h1{
        text-align: right;
    }
    body.rtl .contact-item {
        text-align: right;;

    }
}