/* ==========================================================================
   RTL (Arabic) Styles
   Version: 3.1.0
   Applied only when body has .rtl or .lang-ar class
   ========================================================================== */

/* ==========================================================================
   1. BASE RTL SETTINGS
   ========================================================================== */
body.rtl,
body.lang-ar {
	direction: rtl;
	text-align: right;
}

/* ==========================================================================
   2. TYPOGRAPHY RTL
   ========================================================================== */
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
	letter-spacing: 0;
}

/* Arabic uses Cairo font */
body.rtl,
body.lang-ar {
	font-family: var(--rog-font-arabic);
}

/* ==========================================================================
   3. HEADER RTL
   ========================================================================== */
body.rtl .ast-primary-header-bar .site-primary-header-wrap,
body.rtl .ast-primary-header-bar .ast-builder-grid-row {
	flex-direction: row-reverse;
}

body.rtl .main-header-menu,
body.rtl .ast-nav-menu {
	flex-direction: row-reverse;
}

body.rtl .main-header-menu > li > a {
	text-align: right;
}

/* Active menu indicator RTL */
body.rtl .main-header-menu > li.current-menu-item > a::after,
body.rtl .main-header-menu > li.current_page_item > a::after {
	left: var(--rog-space-4);
	right: var(--rog-space-4);
}

/* ==========================================================================
   4. LANGUAGE SWITCHER RTL
   ========================================================================== */
body.rtl #rog-lang-switcher,
body.rtl .rog-lang-switcher {
	right: auto;
	left: var(--rog-space-5);
	flex-direction: row-reverse;
}

@media (max-width: 921px) {
	body.rtl #rog-lang-switcher,
	body.rtl .rog-lang-switcher {
		left: var(--rog-space-5);
		right: auto;
		bottom: var(--rog-space-5);
		top: auto;
	}
}

/* ==========================================================================
   5. CTA BUTTON RTL
   ========================================================================== */
body.rtl .menu-item.rog-cta-button > a,
body.rtl .main-header-menu > li.rog-cta-button > a {
	margin-left: 0;
	margin-right: var(--rog-space-3);
}

/* ==========================================================================
   6. DROPDOWN MENUS RTL
   ========================================================================== */
body.rtl .main-header-menu .sub-menu {
	left: auto;
	right: 0;
	text-align: right;
}

body.rtl .main-header-menu .sub-menu li a {
	text-align: right;
}

/* ==========================================================================
   7. MOBILE MENU RTL
   ========================================================================== */
body.rtl .ast-mobile-popup-drawer .ast-mobile-popup-content {
	text-align: right;
}

body.rtl .ast-mobile-popup-drawer .menu-item > a {
	text-align: right;
	flex-direction: row-reverse;
}

body.rtl .ast-mobile-popup-drawer .menu-item .ast-menu-toggle {
	left: 0;
	right: auto;
}

body.rtl .ast-header-break-point .ast-mobile-menu-buttons {
	flex-direction: row-reverse;
}

/* ==========================================================================
   8. CONTENT RTL
   ========================================================================== */
body.rtl .entry-content,
body.rtl .ast-container {
	text-align: right;
}

/* Preserve center alignment */
body.rtl .has-text-align-center,
body.rtl .text-center {
	text-align: center !important;
}

/* Flip left/right alignment */
body.rtl .has-text-align-left {
	text-align: right !important;
}

body.rtl .has-text-align-right {
	text-align: left !important;
}

/* ==========================================================================
   9. GRID & COLUMNS RTL
   ========================================================================== */
body.rtl .wp-block-columns {
	flex-direction: row-reverse;
}

body.rtl .wp-block-column {
	text-align: right;
}

/* Grid classes */
body.rtl .rog-grid-2,
body.rtl .rog-grid-3,
body.rtl .rog-grid-4 {
	direction: rtl;
}

body.rtl .rog-cards-row {
	flex-direction: row-reverse;
}

/* ==========================================================================
   10. LISTS RTL
   ========================================================================== */
body.rtl ul,
body.rtl ol {
	padding-left: 0;
	padding-right: var(--rog-space-6);
}

body.rtl li {
	text-align: right;
}

/* ==========================================================================
   11. BUTTONS RTL
   ========================================================================== */
body.rtl .wp-block-button__link,
body.rtl .rog-btn {
	flex-direction: row-reverse;
}

body.rtl .wp-block-buttons {
	justify-content: flex-start;
}

body.rtl .wp-block-buttons.is-content-justification-center {
	justify-content: center;
}

/* Arrow/chevron icons flip */
body.rtl .wp-block-button__link svg,
body.rtl .rog-btn svg,
body.rtl [class*="arrow-right"],
body.rtl [class*="chevron-right"] {
	transform: scaleX(-1);
}

/* ==========================================================================
   12. CARDS RTL
   ========================================================================== */
body.rtl .rog-card,
body.rtl .rog-value-card,
body.rtl .rog-consultancy-card,
body.rtl .rog-vm-card,
body.rtl .wp-block-columns.rog-cards-row > .wp-block-column {
	text-align: right;
}

/* ==========================================================================
   13. SERVICE SECTIONS RTL
   ========================================================================== */
body.rtl .rog-service-feature {
	direction: rtl;
}

body.rtl .rog-service-feature > * {
	direction: rtl;
	text-align: right;
}

body.rtl .rog-service-feature.reversed {
	direction: ltr;
}

body.rtl .rog-service-feature.reversed > * {
	direction: rtl;
	text-align: right;
}

body.rtl .rog-about-intro {
	direction: rtl;
}

/* ==========================================================================
   14. STEPS RTL
   ========================================================================== */
body.rtl .rog-steps {
	flex-direction: row-reverse;
}

body.rtl .rog-markets-grid {
	flex-direction: row-reverse;
}

/* ==========================================================================
   15. CONTACT RTL
   ========================================================================== */
body.rtl .rog-contact-wrapper {
	direction: rtl;
}

body.rtl .rog-contact-detail {
	flex-direction: row-reverse;
	text-align: right;
}

body.rtl .rog-contact-item {
	flex-direction: row-reverse;
	text-align: right;
}

body.rtl .rog-contact-sidebar {
	text-align: right;
}

body.rtl .rog-contact-form-area {
	text-align: right;
}

/* ==========================================================================
   16. FORMS RTL
   ========================================================================== */
body.rtl .wpforms-container {
	text-align: right;
}

body.rtl .wpforms-field-label {
	text-align: right;
}

body.rtl .wpforms-field input,
body.rtl .wpforms-field textarea,
body.rtl .wpforms-field select {
	text-align: right;
	direction: rtl;
}

body.rtl .wpforms-submit-container {
	text-align: right;
}

body.rtl .wpforms-field-row {
	flex-direction: row-reverse;
}

/* ==========================================================================
   17. FAQ RTL
   ========================================================================== */
body.rtl .rog-faq-item summary {
	flex-direction: row-reverse;
	text-align: right;
}

body.rtl .rog-faq-answer {
	text-align: right;
}

body.rtl .rog-faq-item summary::after {
	margin-left: 0;
	margin-right: auto;
}

body.rtl .rog-faq-categories {
	flex-direction: row-reverse;
}

/* Gutenberg details block RTL */
body.rtl .wp-block-details summary {
	text-align: right;
}

body.rtl .wp-block-details > :not(summary) {
	text-align: right;
}

/* ==========================================================================
   18. FOOTER RTL
   ========================================================================== */
body.rtl .site-footer,
body.rtl .ast-small-footer {
	text-align: right;
}

body.rtl .rog-footer-col {
	text-align: right;
}

body.rtl .rog-footer-col ul {
	padding-right: 0;
}

/* ==========================================================================
   19. UTILITY CLASSES RTL
   ========================================================================== */
body.rtl .ml-auto { margin-left: 0; margin-right: auto; }
body.rtl .mr-auto { margin-right: 0; margin-left: auto; }
body.rtl .pl-1, body.rtl .pl-2, body.rtl .pl-3 { padding-left: 0; }
body.rtl .pr-1, body.rtl .pr-2, body.rtl .pr-3 { padding-right: 0; }
body.rtl .text-left { text-align: right !important; }
body.rtl .text-right { text-align: left !important; }

/* ==========================================================================
   20. SECTION HEADER RTL
   ========================================================================== */
body.rtl .rog-section-header {
	text-align: center;
}

/* ==========================================================================
   21. HERO RTL
   ========================================================================== */
body.rtl .home .entry-content > .wp-block-group:first-child .wp-block-column:first-child {
	padding-right: 0;
	padding-left: var(--rog-space-8);
}

@media (max-width: 782px) {
	body.rtl .home .entry-content > .wp-block-group:first-child .wp-block-column:first-child {
		padding-left: 0;
	}
}

/* ==========================================================================
   22. ASTRA-SPECIFIC RTL
   ========================================================================== */
body.rtl .ast-site-identity {
	order: 2;
}

body.rtl .ast-builder-menu-1 {
	order: 1;
}

body.rtl .ast-flex {
	flex-direction: row-reverse;
}

body.rtl .site-title,
body.rtl .site-description {
	text-align: right;
}

/* ==========================================================================
   23. SECTION ALTERNATING LAYOUT RTL
   ========================================================================== */
body.rtl .rog-section:nth-of-type(even) .wp-block-columns {
	flex-direction: row;
}

@media (max-width: 782px) {
	body.rtl .rog-section:nth-of-type(even) .wp-block-columns {
		flex-direction: column;
	}
}

/* ==========================================================================
   24. EXPLORE CARDS RTL
   ========================================================================== */
body.rtl .rog-explore-card {
	text-align: right;
}

body.rtl .rog-explore-grid {
	direction: rtl;
}

/* ==========================================================================
   25. MAP CONTAINER RTL
   ========================================================================== */
body.rtl .rog-map-container {
	text-align: center;
}
