/*
RTL (Right-to-Left) Styles for Qistas Legal Platform Theme
*/

/* ========================================
   RTL BASE STYLES
   ======================================== */
body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}


/* ========================================
   HEADER RTL
   ======================================== */
.header {
    direction: rtl;
}

.header .container {
    direction: rtl;
}

.header-content {
    flex-direction: row;
    direction: rtl;
    justify-content: space-between;
}

.logo {
    margin-left: 0;
    margin-right: 0;
    order: 1;
}

.nav {
    flex-direction: row-reverse;
    margin-right: auto;
    margin-left: 0;
    order: 2;
}

.nav-menu {
    flex-direction: row-reverse;
}

.nav-link::after {
    right: 0;
    left: auto;
}

.mobile-menu-toggle {
    order: 3;
    margin-right: 0;
    margin-left: 0;
}

@media (min-width: 768px) {
    .nav-menu li.menu-item-has-children>a {
        padding: 5px 25px;
    }

    .nav-menu li a {
        font-size: 18px;
    }
	
}



/* Dropdown Menu RTL */


.nav-menu .sub-menu {
    left: auto;
    right: 0;
}

.nav-menu .sub-menu li a {
    text-align: right;
}

.nav-menu .sub-menu li a:hover {
    padding-right: 20px;
    /* Maintain padding */
}

/* ========================================
   HERO SECTION RTL
   ======================================== */
.hero-title {
    text-align: center;
}

.hero-description {
    text-align: center;
}

.hero-icons {
    justify-content: center;
}

.hero-buttons {
    justify-content: center;
}

.hero .hero-title {
	    line-height: 1.4;
}

/* ========================================
   LEGAL RESEARCH SECTION RTL
   ======================================== */
.section-header {
    /*flex-direction: row-reverse;*/
}

.research-content {
    direction: rtl;
}

.research-text {
    text-align: right;
}

.hero-description {
    font-size: 32px;
    margin-top: 25px;
}

/* ========================================
   STATISTICS RTL
   ======================================== */
.stats-grid {
    direction: rtl;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: clamp(22px, 8vw, 23px);
    line-height: 1.3;
}

/* ========================================
   FEATURES RTL
   ======================================== */
.features-grid {
    direction: rtl;
}

.feature-card {
    text-align: center;
}

/* ========================================
   AREF SECTION RTL
   ======================================== */
.aref-header {
    flex-direction: row-reverse;
}

.aref-content {
    direction: rtl;
}

.aref-description {
    text-align: right;
}

.aref-title img {
    transform: scaleX(-1);
}



.aref-feature h4::after {
    right: 0;
    left: auto;
}

/* ========================================
   SOLUTIONS RTL
   ======================================== */
.solutions-content {
    direction: rtl;
}

.solutions-left-column {
    text-align: right;
}

.solution-feature {
    /* flex-direction: row-reverse; */
}

.solution-feature h4::after {
    right: 0;
    left: auto;
}

/* ========================================
   PARTNERING RTL
   ======================================== */
.partnering-content {
    direction: rtl;
}

.partnering-text {
    text-align: right;
}


.partnering-feature-content h4::after {
    right: 0;
    left: auto;
}

/* ========================================
   CONTACT RTL
   ======================================== */
.contact-wrapper {
    direction: rtl;
}

.contact-info {
    text-align: right;
}

.contact-form {
    text-align: right;
}

.form-group label {
    text-align: right;
}

.form-group input {
    text-align: right;
}

/* ========================================
   FOOTER RTL
   ======================================== */
.footer-content {
    direction: rtl;
}

.footer-description p {
    text-align: right;
}

.footer-description {
    text-align: center;
}

.footer-contact-info {
    direction: rtl;
    padding-left: 0;
    padding-right: 0%;
    justify-items: start;
}

.footer-contact-info .contact-row {
    align-items: flex-start;
    flex-direction: row-reverse;
}

.footer .contact-item {
    flex-direction: row-reverse;
}


.footer .contact-icon::after {
    left: auto;
    right: -10px;
}

.footer-desc-inner {
    justify-content: space-between;
}

.footer .contact-details {
    padding-left: 0;
    padding-right: 10px;
}

.footer .address-item {
    flex-direction: row-reverse;
}

.footer .address-icon {
    margin-left: 0;
    margin-right: 15px;
}

.address-details {
    padding-right: 0;
    padding-left: 10px;
}

.address-block {
    margin-right: 0;
    margin-left: 20px;
    padding-right: 0;
    padding-left: 20px;
}

.address-block p {
    text-align: right;
}

.footer .address-block::after {
    left: auto;
    right: -10px;
}

.footer .address-block h4 {
    text-align: right
}

.footer-desc-text {
    text-align: right;
}

/* ========================================
   MOBILE MENU RTL
   ======================================== */
@media (max-width: 768px) {
	
	
	.header-content {
		flex-direction: row-reverse;
	}
    .mobile-menu-toggle {
        display: block !important;
        order: 1;
    }
	
	.hero-description {
    font-size: 25px;
    line-height: 1.3;
}

    .logo {
        order: 2;
    }

    .nav {
        right: auto;
        left: -100%;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
        text-align: right;
    }

    .nav.active {
        left: 0;
        right: auto;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-end;
		flex-direction: column-reverse;
    }

    .nav-menu li {
        width: 100%;
        text-align: right;
    }

    .nav-menu li a {
        display: block;
        text-align: right;
        width: 100%;
    }


    .footer .contact-item {
        flex-direction: row;
    }

    .footer .contact-details::after {
        right: -10px;
        left: auto;
    }

    .footer .contact-icon {
        margin-left: 5px;
        margin-right: 15px;
    }

    .footer .contact-details p,
    .footer .contact-details p a {
        direction: ltr;
    }

    .contact-form {
        padding-bottom: 50px;
    }

    .section-title,
    .section-subtitle,
    .features-title,
    .aref-title,
    .aref-subtitle,
    .partnering-title,
    .contact-info h2,
    .contact-info h3 {
        text-align: right;
        line-height: 1.2;
        margin-bottom: 5px;
        font-size: 22px;
        text-wrap: balance;
    }

    .partnering-description {
        margin-bottom: 10px;
        margin-top: 14px;
        text-align: right;
    }

    .partnering-feature,
    .solution-feature,
    .aref-feature {
        flex-direction: row;
    }

    .features-title br {
        display: none;
    }

    .btn-video {
        justify-content: center;
    }

    .legal-research .section-icon,
    .aref-section .section-icon,
    .partnering-section .section-icon,
    .solutions-section .section-icon {
        width: 30px;
    }

}

/* ========================================
   LANGUAGE SWITCHER RTL
   ======================================== */
.language-switcher {
    flex-direction: row-reverse;
}

/* ========================================
   SKIP LINK RTL
   ======================================== */
.skip-link {
    right: 6px;
    left: auto;
}

/* ========================================
   FOCUS STATES RTL
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline-offset: -2px;
}

/* ========================================
   BUTTON RTL
   ======================================== */
.btn {
    text-align: center;
}

.btn-video {
    flex-direction: row-reverse;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
}

.btn-video svg {
    order: 2;
}

/* ========================================
   FORM RTL
   ======================================== */
.form-group input:focus {
    text-align: right;
}

/* ========================================
   ICON RTL
   ======================================== */
.icon-item {
    text-align: center;
}

.icon-tooltip {
    direction: rtl;
    text-align: center;
}

/* ========================================
   TITLE UNDERLINE RTL
   ======================================== */
.title-underline {
    margin-right: 0;
    margin-left: auto;
}

/* ========================================
   RESPONSIVE RTL ADJUSTMENTS
   ======================================== */
@media (max-width: 1024px) {

    .research-content,
    .aref-content,
    .partnering-content,
    .solutions-content {
        direction: rtl;
    }
}

@media (max-width: 768px) {
    .hero-icons {
        justify-content: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .footer-contact-info {
        padding-right: 0;
        padding-left: 0;
    }
}

/* ========================================
   ARABIC TYPOGRAPHY ENHANCEMENTS
   ======================================== */
body[dir="rtl"] {
    font-family: 'Cairo', 'Poppins', sans-serif;
}

body[dir="rtl"] .hero-title,
body[dir="rtl"] .section-title,
body[dir="rtl"] .section-subtitle,
body[dir="rtl"] .features-title,
body[dir="rtl"] .aref-title,
body[dir="rtl"] .aref-subtitle,
body[dir="rtl"] .solutions-title,
body[dir="rtl"] .partnering-title,
body[dir="rtl"] .contact-info h2,
body[dir="rtl"] .contact-info h3 {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

/* ========================================
   RTL ANIMATION ADJUSTMENTS
   ======================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   RTL: FAQ PAGE STYLES
   ======================================== */
[dir="rtl"] .faq-question {
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .faq-question-text {
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .faq-answer-content {
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .faq-title {
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .faq-answer-content ul,
[dir="rtl"] .faq-answer-content ol {
    margin-right: 1.5rem;
    margin-left: 0;
}

[dir="rtl"] .faq-question::before {
    left: auto;
    right: 0;
    top: 0;
    height: 100%;
    transform: translateX(16px);
    border-radius: 0 12px 12px 0;
}

/* ========================================
   RTL: CONTACT PAGE STYLES
   ======================================== */
[dir="rtl"] .contact-banner-title,
[dir="rtl"] .contact-title {
    font-family: 'Cairo', sans-serif;
    text-align: right;
}

[dir="rtl"] .contact-block-body h4,
[dir="rtl"] .contact-block-body p {
    text-align: right;
}

.contact-block-body {
    direction: ltr;
}

/* Form fields - Arabic font and alignment; keep email/tel LTR */
[dir="rtl"] .contact-form .input,
[dir="rtl"] .contact-form .textarea {
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .contact-form input[type="email"],
[dir="rtl"] .contact-form input[type="tel"] {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] .dial-select select {
    direction: ltr;
    text-align: left;
}

/* Phone numbers and emails in contact blocks should be LTR on mobile */
@media (max-width: 768px) {

    [dir="rtl"] .contact-block-body p:not(.address-group p),
    [dir="rtl"] .contact-block-body a:not(.address-group a) {
        direction: ltr;
        text-align: left;
    }

    /* Keep addresses RTL on mobile */
    [dir="rtl"] .contact-block .address-group h4,
    [dir="rtl"] .contact-block .address-group p {
        direction: rtl;
        text-align: right;
    }

    /* Ensure phone links are LTR */
    [dir="rtl"] .contact-block-body>p>a,
    [dir="rtl"] .contact-block-body p a[href^="tel:"] {
        direction: ltr;
        text-align: left;
        display: inline-block;
    }
}