/* =====================================================
   SEMTEC — RTL Arabic CSS
   Applies to all pages with dir="rtl" lang="ar"
   Load after all other CSS stylesheets
   ===================================================== */

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

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

/* Containers */
.container,
.row,
.clearfix {
    direction: rtl;
}

/* Float inversions */
.float-left  { float: right !important; }
.float-right { float: left  !important; }

/* Text alignment inversions */
.text-left   { text-align: right !important; }
.text-right  { text-align: left  !important; }
.text-md-start { text-align: right !important; }
.text-md-end   { text-align: left  !important; }

/* Header & Footer */
#header,
#footer,
#header-wrap,
.header-row,
.menu-container,
.footer-widgets-wrap {
    direction: rtl;
}

/* Navigation menu - items flow right to left */
.primary-menu .menu-container {
    padding-right: 0;
}

/* Logo side */
#logo {
    margin-right: 0;
    margin-left: auto;
}

/* Feature boxes */
.fbox-content {
    text-align: right;
}

/* Lists */
ul, ol {
    padding-right: 1.5em;
    padding-left: 0;
}

/* Form labels & inputs */
label,
.form-control,
input,
textarea,
select {
    text-align: right;
    direction: rtl;
}

/* Margins / padding utility inversions */
.ms-auto { margin-left: 0 !important; margin-right: auto !important; }
.me-auto { margin-right: 0 !important; margin-left: auto !important; }

/* Heading blocks */
.heading-block,
.heading-block h2,
.heading-block span {
    direction: rtl;
    text-align: right;
}

.heading-block.center,
.heading-block.center h2,
.heading-block.center span {
    text-align: center;
}

/* Portfolio descriptions */
.portfolio-desc,
.portfolio-desc h3,
.portfolio-desc span {
    text-align: right;
}

/* Engagement / color blocks */
.col-padding > div {
    direction: rtl;
    text-align: right;
}

/* Copyrights row */
#copyrights .row {
    direction: rtl;
}

/* Social icons bar */
.d-flex.justify-content-md-end {
    justify-content: flex-start !important;
}
.d-flex.justify-content-md-start {
    justify-content: flex-end !important;
}

/* Error 404 block */
.error404 {
    direction: ltr; /* keep large 404 number LTR */
}

/* Address blocks — keep latin addresses LTR-readable but contained in RTL context */
address,
.bdi,
[dir="ltr"] {
    unicode-bidi: isolate;
    direction: ltr;
    text-align: left;
    display: inline-block;
}

/* Slider captions */
.slider-caption {
    text-align: right;
    direction: rtl;
}

.slider-caption.slider-caption-center {
    text-align: center;
}

/* Widget links list */
.widget_links ul {
    padding-right: 0;
}

/* Breadcrumb */
.breadcrumb {
    direction: rtl;
}

/* Button alignment in RTL */
.button {
    direction: rtl;
}

/* Page title */
#page-title {
    direction: rtl;
}

/* Input group — icons on right in RTL */
.input-group > .input-group-text {
    border-radius: 0 4px 4px 0;
}
.input-group > .form-control {
    border-radius: 4px 0 0 4px;
}

/* Section-level */
section,
.section {
    direction: rtl;
}
