/* Saro Advertisement - Custom CSS for RTL and Enhancements */

/* Primary Color Override */
:root {
    --bs-primary: #58884e !important;
    --bs-primary-rgb: 88, 136, 78 !important;
    --brand-primary: #58884e;
    --brand-primary-dark: #4a7042;
}

.btn-primary,
.btn-gradient-primary {
    background-color: #58884e !important;
    background: linear-gradient(to right, #58884e 0%, #6fa862 100%) !important;
    border-color: #58884e !important;
}

.btn-primary:hover,
.btn-gradient-primary:hover {
    background-color: #4a7042 !important;
    background: linear-gradient(to right, #4a7042 0%, #5d9154 100%) !important;
    border-color: #4a7042 !important;
}

.bg-primary {
    background-color: #58884e !important;
}

.bg-soft-primary {
    background-color: rgba(88, 136, 78, 0.15) !important;
}

.bg-soft-success {
    background-color: rgba(25, 135, 84, 0.15) !important;
}

.bg-soft-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
}


.text-primary {
    color: #58884e !important;
}

.border-primary {
    border-color: #58884e !important;
}

/* Cairo Font Family */
* {
    font-family: 'Cairo', sans-serif !important;
}

body {
    font-family: 'Cairo', sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: 'Cairo', sans-serif !important;
}

p,
span,
a,
li,
label,
input,
textarea,
button,
.btn {
    font-family: 'Cairo', sans-serif !important;
}

/* RTL Basic Support - No navbar interference */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Top Bar - Keep consistent in RTL and LTR */
.top-bar {
    direction: ltr !important;
    text-align: left !important;
}

.top-bar .container,
.top-bar .row,
.top-bar .col-6 {
    direction: ltr !important;
}

.top-bar .text-end {
    text-align: right !important;
}

/* Main Navbar - Keep consistent layout */
[dir="rtl"] .navbar .navbar-nav.mx-auto {
    flex-direction: row !important;
}

[dir="rtl"] .navbar .navbar-brand {
    margin-right: 0 !important;
    margin-left: auto !important;
}



/* Subpage Navbar - Always visible with background */
.subpage-navbar {
    background-color: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.subpage-navbar .nav-link {
    color: #333 !important;
}

.subpage-navbar .nav-link:hover,
.subpage-navbar .nav-link.active {
    color: #58884e !important;
}



[dir="rtl"] .ms-auto,
[dir="rtl"] .ms-1,
[dir="rtl"] .ms-2,
[dir="rtl"] .ms-3,
[dir="rtl"] .ms-4 {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .me-auto,
[dir="rtl"] .me-1,
[dir="rtl"] .me-2,
[dir="rtl"] .me-3,
[dir="rtl"] .me-4 {
    margin-right: 0 !important;
    margin-left: auto !important;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Video Background Enhancements */
.video-background {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -1;
    object-fit: cover;
}

/* Strategic Locations Text */
[dir="rtl"] .display-1 {
    text-align: right;
}

/* Solutions Cards */
.card.position-relative {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.position-relative:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Client Logos Hover Effect */
.client-logo {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Work Box Hover Animation */
.work-box {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 20px;
    border-radius: 12px;
}

.work-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(88, 136, 78, 0.2) !important;
}

.work-box .work-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-box:hover .work-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(88, 136, 78, 0.3);
}

.work-box:hover .work-icon i {
    transform: scale(1.15);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-box h5 {
    transition: color 0.3s ease;
}

.work-box:hover h5 {
    color: #58884e !important;
}

/* Contact Form Enhancements */
#contactForm .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Language Switcher */
#lang-switcher {
    cursor: pointer;
    transition: all 0.3s ease;
}

#lang-switcher:hover {
    opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .display-1 {
        font-size: 3rem !important;
    }

    .video-background {
        min-height: 70vh;
    }
}


/* ========================================
   Contact Page Icons Fix
   ======================================== */

/* Contact icon styling */
.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.contact-icon i {
    font-size: 24px;
    line-height: 1;
}

/* Ensure Material Design Icons display properly */
.mdi {
    display: inline-block;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Fix contact info RTL layout */
[dir="rtl"] .contact-icon {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .flex-grow-1.ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}


/* Logo Sizing */
.logo-dark,
.logo-light {
    height: 65px !important;
    width: auto !important;
}

/* Footer Logo */
.footer-logo img {
    height: 65px !important;
    max-height: 65px !important;
    width: auto !important;
}

/* ========================================
   Enhanced RTL Support
   ======================================== */

/* RTL: Flex containers */
[dir="rtl"] .d-flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .d-flex.flex-column {
    flex-direction: column !important;
}

/* RTL: Card badge positioning */
[dir="rtl"] .position-absolute.top-0.end-0 {
    right: auto !important;
    left: 0.5rem !important;
}

[dir="rtl"] .position-absolute.top-0.start-0 {
    left: auto !important;
    right: 0.5rem !important;
}

/* RTL: Row layouts */
[dir="rtl"] .row {
    flex-direction: row-reverse;
}

[dir="rtl"] .row.justify-content-center {
    flex-direction: row;
}

/* RTL: Text alignment for paragraphs and descriptions */
[dir="rtl"] p,
[dir="rtl"] .text-muted,
[dir="rtl"] .card-text {
    text-align: center;
}

[dir="rtl"] .text-center {
    text-align: center !important;
}

/* RTL: Card body */
[dir="rtl"] .card-body {
    text-align: right;
}

/* RTL: Accordion */
[dir="rtl"] .accordion-button {
    text-align: right;
    padding-right: 1.25rem;
    padding-left: 2.5rem;
}

[dir="rtl"] .accordion-button::after {
    margin-left: 0;
    margin-right: auto;
    position: absolute;
    left: 1.25rem;
    right: auto;
}

[dir="rtl"] .accordion-body {
    text-align: right;
}

/* RTL: Work boxes in features section */
[dir="rtl"] .work-box {
    text-align: right;
}

[dir="rtl"] .work-box.text-center {
    text-align: center !important;
}

/* RTL: Feature icons */
[dir="rtl"] .avatar {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .text-center .avatar {
    margin: 0 auto !important;
}

/* RTL: Testimonial cards */
[dir="rtl"] .card.shadow-sm p {
    text-align: right;
}

[dir="rtl"] .card.shadow-sm.text-center p {
    text-align: center !important;
}

/* RTL: Footer links */
[dir="rtl"] .footer-nav {
    text-align: right;
}

[dir="rtl"] .footer-nav li {
    text-align: right;
}

/* RTL: Contact form labels */
[dir="rtl"] .form-label {
    text-align: right;
    display: block;
}

[dir="rtl"] .form-control {
    text-align: right;
}

/* RTL: Icon margins */
[dir="rtl"] .mdi.ms-1,
[dir="rtl"] .mdi.ms-2 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

[dir="rtl"] .mdi.me-1,
[dir="rtl"] .mdi.me-2 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

/* RTL: Contact info section */
[dir="rtl"] .contact-icon {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .flex-grow-1.ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

/* RTL: Strategic locations text */
[dir="rtl"] #strategic .display-1,
[dir="rtl"] section .display-1 {
    text-align: right !important;
}

/* RTL: Subtitle section */
[dir="rtl"] .subtitle {
    text-align: center;
}

/* RTL: Solution cards grid */
[dir="rtl"] #solutions .row {
    flex-direction: row-reverse;
}

/* RTL: Features grid */
[dir="rtl"] #features .row {
    flex-direction: row-reverse;
}

/* RTL: Badge positioning fix */
[dir="rtl"] .badge.position-absolute {
    right: auto !important;
    left: 0.5rem !important;
}

/* RTL: Back to top button */
[dir="rtl"] .back-to-top-btn {
    left: 30px;
    right: auto;
}

/* RTL: Hero content */
[dir="rtl"] .hero-content {
    text-align: center;
}

/* RTL: Map container */
[dir="rtl"] .map-container {
    direction: ltr;
}