/* RTL (Right-to-Left) Support Styles */

body.rtl {
    direction: rtl;
    text-align: right;
}

/* Keep container and row LTR for Bootstrap grid to work */
body.rtl .container,
body.rtl .row {
    /* Keep LTR for grid system */
}

/* Header RTL */
body.rtl .heaher__top__left {
    justify-content: flex-end;
}

body.rtl .header__top__right {
    justify-content: flex-start;
}

body.rtl .heaher__top__left li + li {
    margin-left: 0;
    margin-right: 47px;
}

body.rtl .login-register {
    margin-right: 0;
    margin-left: 47px;
}

/* Navigation RTL */
body.rtl .main__menu {
    flex-direction: row-reverse;
}

body.rtl .main__menu li {
    padding: 0 15px;
}

body.rtl .footer__header__custom .col-md-12 {
    flex-direction: row-reverse;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.rtl .craftoriaLogo {
    margin-left: 20px;
    margin-right: 0;
    order: 2;
}

body.rtl .main__menu__nav {
    order: 1;
}

/* Slider RTL */
body.rtl .slider__inner {
    text-align: right;
}

body.rtl .slider__btn {
    text-align: right;
}

/* Sections RTL */
body.rtl .section__title {
    text-align: right;
}

body.rtl .section__title.text-center {
    text-align: center;
}

body.rtl .text-left {
    text-align: right;
}

body.rtl .text-right {
    text-align: left;
}

/* Blog RTL */
body.rtl .blog__meta li + li {
    margin-left: 0;
    margin-right: 20px;
}

body.rtl .blog__btn {
    text-align: right;
}

/* Testimonial RTL */
body.rtl .testimonial {
    flex-direction: row-reverse;
}

body.rtl .testimonial__thumb {
    margin-right: 0;
    margin-left: 20px;
}

body.rtl .testimonial__details {
    text-align: right;
}

body.rtl .htc__testimonial__wrap .slick-dots {
    text-align: right;
}

/* Form RTL */
body.rtl .single__cl__form {
    flex-direction: row-reverse;
}

body.rtl .clint__comment__form input,
body.rtl .clint__comment__form textarea {
    text-align: right;
}

body.rtl .clint__submit__btn {
    text-align: right;
}

/* Footer RTL */
body.rtl .htc__contact__wrap {
    flex-direction: row-reverse;
}

body.rtl .ht__address__inner {
    text-align: right;
}

/* Service Cards RTL */
body.rtl .service__details {
    text-align: right;
}

body.rtl .service__action {
    text-align: right;
}

/* Breadcrumb RTL */
body.rtl .bradcaump-inner {
    flex-direction: row-reverse;
}

body.rtl .brd-separetor {
    margin: 0 10px 0 0;
}

/* Owl Carousel RTL */
body.rtl .owl-carousel {
    direction: ltr; /* Keep carousel direction as LTR for proper functionality */
}

body.rtl .owl-nav .owl-prev {
    left: auto;
    right: 30px;
}

body.rtl .owl-nav .owl-next {
    right: auto;
    left: 30px;
}

/* General RTL adjustments */
body.rtl .col-md-offset-1,
body.rtl .col-lg-offset-1 {
    margin-left: 0;
    margin-right: 8.33333333%;
}

body.rtl .smt-40 {
    margin-top: 40px;
}

body.rtl .xmt-40 {
    margin-top: 40px;
}

/* Float adjustments for RTL */
body.rtl .pull-left {
    float: right !important;
}

body.rtl .pull-right {
    float: left !important;
}

body.rtl .text-left {
    text-align: right !important;
}

body.rtl .text-right {
    text-align: left !important;
}

/* Padding and margin adjustments */
body.rtl .pl-15 {
    padding-left: 0;
    padding-right: 15px;
}

body.rtl .pr-15 {
    padding-right: 0;
    padding-left: 15px;
}

body.rtl .ml-15 {
    margin-left: 0;
    margin-right: 15px;
}

body.rtl .mr-15 {
    margin-right: 0;
    margin-left: 15px;
}

/* Additional RTL Layout Fixes */

/* Footer RTL - Complete Fix */
body.rtl .footer__top {
    direction: rtl;
}

body.rtl .footer__top .container {
    direction: rtl;
}

body.rtl .footer__top .row {
    direction: rtl;
}

body.rtl .footer__widget {
    text-align: right;
}

body.rtl .ft__title {
    text-align: right;
}

body.rtl .ft__details {
    text-align: right;
}

body.rtl .ft__details p {
    text-align: right;
}

body.rtl .ft__menu {
    text-align: right;
    padding-right: 0;
    padding-left: 0;
    list-style: none;
}

body.rtl .ft__menu li {
    text-align: right;
}

body.rtl .ft__menu li a {
    text-align: right;
    display: block;
}

body.rtl .footer__link {
    direction: rtl;
}

/* Service Section RTL */
body.rtl .service__section__wrap {
    direction: rtl;
}

body.rtl .service__hover {
    text-align: center;
}

/* Offer Section RTL */
body.rtl .offer {
    text-align: right;
}

body.rtl .offer__details {
    text-align: right;
}

/* Breadcrumb RTL */
body.rtl .bradcaump-title {
    text-align: center;
}

body.rtl .bradcaump__inner {
    text-align: center;
}

/* Team Section RTL */
body.rtl .team__details {
    text-align: right;
}

/* Contact Address RTL */
body.rtl .htc__contact__address {
    direction: rtl;
}

body.rtl .ht__address__inner {
    direction: rtl;
    text-align: right;
}

body.rtl .ht__address__icon {
    margin-left: 15px;
    margin-right: 0;
}

body.rtl .ht__address__details {
    text-align: right;
}

/* Grid Layout RTL */
body.rtl .col-md-3,
body.rtl .col-md-4,
body.rtl .col-md-6,
body.rtl .col-lg-3,
body.rtl .col-lg-4,
body.rtl .col-lg-6 {
    direction: rtl;
}

/* Section Title RTL */
body.rtl .section__title {
    direction: rtl;
}

body.rtl .title__line {
    text-align: right;
}

body.rtl .section__title.text-center .title__line {
    text-align: center;
}

/* Request Quote Form RTL */
body.rtl .reguest__quote {
    direction: rtl;
}

body.rtl .reguest__quote .section__title {
    text-align: right;
}

/* Slick Carousel Dots RTL */
body.rtl .slick-dots {
    direction: ltr;
    text-align: right;
}

/* Clearfix RTL */
body.rtl .clearfix::after {
    clear: both;
}

/* Container RTL - keep LTR for proper Bootstrap grid */
body.rtl .container {
    /* Keep LTR for grid system */
}

/* Row RTL - Don't reverse flex direction to maintain Bootstrap grid */
body.rtl .row {
    direction: rtl;
}

/* Fix for Bootstrap columns in RTL - don't change direction to maintain grid */
body.rtl [class*="col-"] {
    /* Keep LTR for grid system to work properly */
}

/* Service Cards RTL */
body.rtl .service {
    text-align: right;
}

body.rtl .service__thumb {
    direction: ltr;
}

/* Blog Cards RTL */
body.rtl .blog {
    text-align: right;
}

body.rtl .blog__thumb {
    direction: ltr;
}

/* Testimonial Activation RTL */
body.rtl .testimonial__activation {
    direction: ltr;
}

/* Fix for flex containers - be careful not to break layout */
body.rtl .d-flex.justify-content-between {
    flex-direction: row-reverse;
}

body.rtl .footer__header__custom .row.d-flex {
    flex-direction: row-reverse;
}

/* Fix for text alignment utilities */
body.rtl .text-center {
    text-align: center !important;
}

/* Fix for offset classes */
body.rtl .col-lg-offset-1 {
    margin-right: 8.33333333%;
    margin-left: 0;
}

/* Fix for spacing utilities */
body.rtl .smt-40 {
    margin-top: 40px;
}

body.rtl .xmt-40 {
    margin-top: 40px;
}

/* Fix for padding */
body.rtl .ptb--130,
body.rtl .ptb--150,
body.rtl .ptb--100 {
    direction: rtl;
}

/* Fix for background overlays */
body.rtl [data--black__overlay],
body.rtl [data--gray__overlay] {
    direction: rtl;
}

/* Fix for blog area layout */
body.rtl .htc__blog__area {
    direction: rtl;
}

body.rtl .htc__blog__area .row {
    direction: rtl;
}

body.rtl .htc__blog__area .col-md-4,
body.rtl .htc__blog__area .col-lg-4,
body.rtl .htc__blog__area .col-sm-6 {
    direction: rtl;
}

/* Fix for testimonial area */
body.rtl .htc__testimonial__area {
    direction: rtl;
}

body.rtl .htc__testimonial__area .row {
    direction: rtl;
}

/* Fix for request quote form layout */
body.rtl .reguest__quote .clint__comment__form {
    direction: rtl;
}

/* Fix for blog details page */
body.rtl .htc__bl__dtl__inner {
    direction: rtl;
    text-align: right;
}

body.rtl .blog__meta {
    direction: rtl;
}

body.rtl .pre__next__btn {
    flex-direction: row-reverse;
}

body.rtl .pre__next__btn li:first-child {
    margin-left: 10px;
    margin-right: 0;
}

body.rtl .pre__next__btn li:last-child {
    margin-right: 10px;
    margin-left: 0;
}

/* Fix for sidebar */
body.rtl .htc__page__sidebar {
    direction: rtl;
}

body.rtl .htc__recent__post {
    direction: rtl;
}

body.rtl .htc__single__post {
    flex-direction: row-reverse;
}

body.rtl .post__thumb {
    margin-left: 15px;
    margin-right: 0;
}

body.rtl .post__details {
    text-align: right;
}

/* Fix for latest blog section on home page */
body.rtl .htc__blog__wrap {
    direction: rtl;
}

/* Fix for slider area */
body.rtl .slider__container {
    direction: ltr; /* Keep slider LTR for proper functionality */
}

/* Fix for about area */
body.rtl .htc__about__area {
    direction: rtl;
}

body.rtl .about {
    text-align: right;
}

/* Fix for project/service cards */
body.rtl .htc__latest__project__area {
    direction: rtl;
}

body.rtl .project {
    text-align: right;
}

body.rtl .project__hover__info {
    text-align: right;
}

/* Fix for newsletter area */
body.rtl .htc__newsletter__area {
    direction: rtl;
}

/* Fix for flex containers that break layout */
body.rtl .wrapper {
    direction: rtl;
}

/* Ensure proper text alignment for all paragraphs in RTL */
body.rtl p {
    text-align: right;
}

body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6 {
    text-align: right;
}

/* Fix for blockquote */
body.rtl blockquote {
    text-align: right;
    border-right: 4px solid;
    border-left: none;
    padding-right: 20px;
    padding-left: 0;
    margin-right: 0;
    margin-left: 20px;
}

/* Fix for links */
body.rtl a {
    text-align: right;
}

/* Fix for lists */
body.rtl ul, body.rtl ol {
    text-align: right;
    padding-right: 20px;
    padding-left: 0;
}

/* Fix for icons alignment */
body.rtl .fa, body.rtl .zmdi {
    direction: ltr;
    display: inline-block;
}

/* Fix for buttons */
body.rtl .htc__btn {
    text-align: center;
}

body.rtl .blog__btn a {
    flex-direction: row-reverse;
}

body.rtl .blog__btn a i {
    margin-right: 10px;
    margin-left: 0;
    transform: rotate(180deg);
}

/* ============================================
   ARABIC-SPECIFIC FIXES (DO NOT AFFECT ENGLISH)
   ============================================ */

/* 1. Service Page Hover Fix - Yellow Icon + Service Name */
body.rtl .service__hover {
    text-align: center;
    direction: rtl;
}

body.rtl .service__hover .service__action {
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

body.rtl .service__hover .service__action a {
    text-align: center;
    margin: 0 auto;
}

body.rtl .service__thumb:hover .service__hover {
    left: 0;
    right: 0;
    transform: translateX(0);
}

/* 2. Footer Columns Fix - Complete RTL Alignment */
body.rtl .htc__footer__wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    direction: rtl;
    width: 100%;
    margin: 0;
    padding: 0;
}

body.rtl .htc__footer__wrap .col-md-3,
body.rtl .htc__footer__wrap .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
    direction: rtl;
    text-align: right;
    padding-left: 15px;
    padding-right: 15px;
    float: none !important;
    position: relative;
    width: 25%;
    box-sizing: border-box;
}

body.rtl .htc__footer__wrap .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

body.rtl .htc__footer__wrap .col-xs-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

body.rtl .footer {
    width: 100%;
    direction: rtl;
    text-align: right;
    float: none !important;
}

body.rtl .footer.quick__link {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    display: block;
}

body.rtl .footer__link {
    display: flex;
    flex-direction: row;
    gap: 20px;
    direction: rtl;
    justify-content: flex-start;
}

body.rtl .footer__link ul.ft__menu + ul.ft__menu {
    margin-left: 0 !important;
    margin-right: 30px !important;
}

body.rtl .footer__link .ft__menu {
    flex: 1;
    min-width: 0;
    text-align: right;
    padding-right: 0;
    padding-left: 0;
    margin: 0;
}

body.rtl .footer__link .ft__menu li {
    text-align: right;
    padding-top: 13px;
}

body.rtl .footer__link .ft__menu li:first-child {
    padding-top: 0;
}

body.rtl .footer__instagram {
    display: flex;
    flex-flow: row wrap;
    margin-left: -2px;
    margin-right: -2px;
    direction: rtl;
    gap: 4px;
}

body.rtl .footer__instagram li {
    margin-bottom: 4px;
    padding: 0 2px;
    width: 33.33%;
    box-sizing: border-box;
    flex: 0 0 33.33%;
    max-width: 33.33%;
}

body.rtl .footer__instagram li a {
    display: block;
    width: 100%;
    max-width: 70px;
}

body.rtl .footer__instagram li a img {
    width: 100% !important;
    height: auto !important;
    display: block;
    max-width: 70px !important;
    max-height: 70px !important;
    object-fit: cover;
}

/* 3. Footer Copyright Center Alignment (Arabic Only) */
body.rtl .copyright {
    direction: rtl;
    text-align: center;
}

body.rtl .copyright .container {
    direction: rtl;
}

body.rtl .copyright .row {
    direction: rtl;
}

body.rtl .copyright__inner {
    text-align: center !important;
    width: 100%;
}

body.rtl .copyright__inner p {
    text-align: center !important;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    direction: ltr; /* Keep copyright text LTR for proper display */
}

/* Additional Footer RTL Fixes */
body.rtl .htc__footer__area {
    direction: rtl;
}

body.rtl .htc__footer__area .container {
    direction: rtl;
}

body.rtl .htc__footer__area .row {
    direction: rtl;
    margin-left: -15px;
    margin-right: -15px;
}

body.rtl .footer__top {
    direction: rtl;
}

body.rtl .footer__top .container {
    direction: rtl;
}

body.rtl .footer__top .row {
    direction: rtl;
}

/* Fix for Bootstrap clearfix in footer */
body.rtl .htc__footer__wrap.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

body.rtl .htc__footer__wrap.clearfix::before {
    content: "";
    display: table;
}

/* 4. Home Page Services Section Hover Fix */
body.rtl .project__hover__info {
    text-align: center;
    direction: rtl;
}

body.rtl .project__hover__info .project__action {
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

body.rtl .project__hover__info .project__action h2 {
    text-align: center;
}

body.rtl .project__hover__info .project__action a {
    text-align: center;
    margin: 0 auto;
}

body.rtl .project__thumb:hover .project__hover__info {
    left: 0;
    right: 0;
    transform: translateX(0);
}

/* 5. About Us Section RTL Fixes */
body.rtl .htc__about__area .about__inner {
    text-align: right;
    direction: rtl;
}

body.rtl .htc__about__area .about__inner p {
    text-align: right;
}

body.rtl .htc__about__area .about__inner h2 {
    text-align: right;
}

body.rtl .htc__about__area .about__inner .about__btn {
    text-align: right;
}

body.rtl .htc__about__area .about__hober__info {
    text-align: right;
    direction: rtl;
}

body.rtl .htc__about__area .about__hober__info p {
    text-align: right;
}

body.rtl .htc__about__area .about__hober__info h2 {
    text-align: right;
}

/* 6. Service Detail Pages RTL */
body.rtl .htc__single__service {
    direction: rtl;
    text-align: right;
}

body.rtl .htc__service__dtl {
    direction: rtl;
    text-align: right;
}

body.rtl .htc__ser__dtl {
    direction: rtl;
    text-align: right;
}

body.rtl .htc__ser__dtl h2 {
    text-align: right;
}

body.rtl .htc__ser__dtl p {
    text-align: right;
}

body.rtl .htc__ser__dtl ul {
    text-align: right;
    padding-right: 1.25rem;
    padding-left: 0;
}

body.rtl .htc__ser__dtl ul li {
    text-align: right;
}

body.rtl .htc__category {
    direction: rtl;
    text-align: right;
}

body.rtl .htc__category .cat__list {
    text-align: right;
    padding-right: 0;
    padding-left: 0;
}

body.rtl .htc__category .cat__list li {
    text-align: right;
}

body.rtl .htc__category .cat__list li a {
    text-align: right;
}

/* 7. Blog Detail Page RTL Enhancements */
body.rtl .htc__blog__details__page {
    direction: rtl;
}

body.rtl .htc__blog__details__page .htc__bl__dtl__inner {
    direction: rtl;
    text-align: right;
}

body.rtl .htc__blog__details__page .bl__dtl {
    direction: rtl;
    text-align: right;
}

body.rtl .htc__blog__details__page .bl__dtl p {
    text-align: right;
}

/* 8. Service Page Service Cards Hover Alignment */
body.rtl .service__section__wrap .service {
    direction: rtl;
}

body.rtl .service__section__wrap .service__thumb {
    position: relative;
}

body.rtl .service__section__wrap .service__hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

