/* =============================================
   Arabic RTL Overrides — فريق الحلول الإلكترونية
   Built on top of HighTechIT Bootstrap 5 template
   ============================================= */

/* Cairo Arabic Font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

/* Global Arabic Font */
*,
*::before,
*::after {
    font-family: 'Cairo', sans-serif !important;
}

/* Icon font exceptions — override the global Cairo rule for icon elements */
.fab, .fab::before, .fab::after {
    font-family: 'Font Awesome 6 Brands' !important;
    font-weight: 400 !important;
}
.fas, .fas::before, .fas::after {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}
.far, .far::before, .far::after {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 400 !important;
}
.fa, .fa::before, .fa::after {
    font-family: 'FontAwesome' !important;
}
[class^="bi-"], [class*=" bi-"],
[class^="bi-"]::before, [class*=" bi-"]::before {
    font-family: 'bootstrap-icons' !important;
}

body {
    direction: rtl;
    text-align: right;
}

/* ===== Topbar RTL ===== */
.topbar .top-link a {
    margin-right: 0;
    margin-left: 10px;
}

/* Marquee RTL — run text right to left */
#note small {
    animation: mymoveRTL 8s linear infinite;
}

@keyframes mymoveRTL {
    from { transform: translateX(100%); }
    to   { transform: translateX(-100%); }
}

/* ===== Navbar RTL ===== */
.navbar-nav {
    padding-right: 0;
}

.navbar .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 8px;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}

.navbar .nav-item .dropdown-menu {
    text-align: right;
}

/* Logo spacing */
.navbar-brand {
    margin-right: 0;
    margin-left: auto;
}

/* ===== Carousel RTL ===== */
/* Swap prev/next positions */
.carousel-control-prev {
    left: auto;
    right: 0;
    border-radius: 50px 0 0 50px;
}

.carousel-control-next {
    right: auto;
    left: 0;
    border-radius: 0 50px 50px 0;
}

/* ===== Project Corners RTL ===== */
.project-img::before {
    left: auto;
    right: 0;
}

.project-img::after {
    right: auto;
    left: 0;
}

.project-content {
    left: auto;
    right: 0;
}

/* ===== Blog Slide Animation RTL ===== */
.blog-btn-icon .blog-icon-2 {
    left: auto;
    right: -140px;
}

.blog-btn-icon:hover .blog-icon-2 {
    right: 5px;
    left: auto;
}

.blog-btn-icon:hover .blog-icon-1 {
    top: 0;
    right: auto;
    left: -140px;
    transition: 1s;
}

/* ===== Team Carousel Nav RTL ===== */
.team-carousel .owl-nav {
    right: auto;
    left: 50px;
}

.team-carousel .owl-nav .owl-prev,
.team-carousel .owl-nav .owl-next {
    margin-left: 0;
    margin-right: 15px;
}

@media (max-width: 992px) {
    .team-carousel .owl-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        margin-right: -15px;
    }
}

/* ===== Contact RTL ===== */
.contact-detail::before {
    left: auto;
    right: 0;
}

/* ===== Page Header Breadcrumb RTL ===== */
.page-header .breadcrumb-item + .breadcrumb-item::before {
    padding-left: 0;
    padding-right: 0.5rem;
    float: right;
}

/* ===== Back to Top ===== */
.back-to-top {
    right: 30px;
    left: auto;
}

/* ===== Owl Carousel RTL fixes ===== */
.owl-carousel {
    direction: rtl;
}

/* ===== Typography for Arabic ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.6 !important;
    font-weight: 700;
}

p, li, span, a, td, th, label, input, textarea {
    line-height: 1.9 !important;
}

/* ===== Bootstrap RTL logical helpers ===== */
/* Flip ms/me margin utilities for RTL */
.ms-auto { margin-right: auto !important; margin-left: unset !important; }
.me-auto { margin-left: auto !important; margin-right: unset !important; }
.ms-1 { margin-right: 0.25rem !important; margin-left: unset !important; }
.ms-2 { margin-right: 0.5rem !important; margin-left: unset !important; }
.ms-3 { margin-right: 1rem !important; margin-left: unset !important; }
.ms-4 { margin-right: 1.5rem !important; margin-left: unset !important; }
.me-1 { margin-left: 0.25rem !important; margin-right: unset !important; }
.me-2 { margin-left: 0.5rem !important; margin-right: unset !important; }
.me-3 { margin-left: 1rem !important; margin-right: unset !important; }
.me-4 { margin-left: 1.5rem !important; margin-right: unset !important; }

/* Flip ps/pe padding utilities for RTL */
.ps-1 { padding-right: 0.25rem !important; padding-left: unset !important; }
.ps-2 { padding-right: 0.5rem !important; padding-left: unset !important; }
.ps-3 { padding-right: 1rem !important; padding-left: unset !important; }
.ps-4 { padding-right: 1.5rem !important; padding-left: unset !important; }
.pe-1 { padding-left: 0.25rem !important; padding-right: unset !important; }
.pe-2 { padding-left: 0.5rem !important; padding-right: unset !important; }
.pe-3 { padding-left: 1rem !important; padding-right: unset !important; }
.pe-4 { padding-left: 1.5rem !important; padding-right: unset !important; }

/* text-start/end flip */
.text-start { text-align: right !important; }
.text-end   { text-align: left  !important; }

/* float flip */
.float-start { float: right !important; }
.float-end   { float: left  !important; }

/* Border radius flip */
.rounded-start { border-radius: 0 0.375rem 0.375rem 0 !important; }
.rounded-end   { border-radius: 0.375rem 0 0 0.375rem !important; }

/* ===== Form RTL ===== */
.form-control,
.form-select {
    text-align: right;
}

/* ===== Spinner text ===== */
#spinner p,
#spinner span {
    direction: rtl;
}

/* ===== Footer links ===== */
.footer .short-link a:hover,
.footer .help-link a:hover,
.footer .contact-link a:hover {
    letter-spacing: 0;
    padding-right: 5px;
}

/* ===== Social icons row ===== */
.d-flex.social-icons a + a {
    margin-right: 5px;
    margin-left: 0;
}

/* ===== WhatsApp floating button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
    width: 58px;
    height: 58px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.5);
    transition: transform .3s, box-shadow .3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,.7);
}

.whatsapp-float i {
    color: #fff !important;
    font-size: 28px;
}

/* ===== Counter suffix/prefix ===== */
.counter-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-direction: row-reverse;
}

/* ===== Misc RTL fixes ===== */
.list-unstyled,
.list-inline {
    padding-right: 0;
    padding-left: 0;
}

.breadcrumb {
    flex-direction: row;
}

/* ===== Hero carousel RTL text ===== */
.carousel-caption {
    direction: rtl;
    text-align: center;
}

/* ensure owl nav icons flip for RTL */
.team-carousel .owl-nav .owl-prev i.bi-arrow-left::before {
    content: "\F138"; /* arrow-right Bootstrap icon */
}

.team-carousel .owl-nav .owl-next i.bi-arrow-right::before {
    content: "\F12F"; /* arrow-left Bootstrap icon */
}

/* ===== Disable hover effect on services cards ===== */
.services-item,
.services-item:hover,
.services-item:focus,
.services-item:active,
.services .services-item,
.services .services-item:hover,
.services .services-item:focus,
.services .services-item:active {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: inherit !important;
    transform: none !important;
    transition: none !important;
    box-shadow: 0 0 60px rgba(0, 0, 0, .2) !important;
    border-color: transparent !important;
}
.services-item:hover i,
.services-item:hover .fab,
.services-item:hover .fas,
.services-item:hover .far,
.services-item:hover .fa,
.services-item:hover svg {
    color: var(--bs-primary) !important;
    transform: none !important;
}
.services-item:hover h5,
.services-item:hover h4,
.services-item:hover h3 {
    color: #212529 !important;
}
.services-item:hover p {
    color: #6c757d !important;
}
