:root {
    --primary: #FAD134;
    --gray-light: #D8D9D9;
    --gray-medium: #6E6A63;
    --gray-dark: #45494C;
    --black: #000000;
    --white: #FFFFFF;
    --arabic-font: 'GE SS Two', 'Tajawal', sans-serif;
    --english-font: 'Poppins', sans-serif;
    /* Bootstrap color variables mapping */
    --bs-primary: var(--primary);
    --bs-primary-rgb: 250, 209, 52;
    --bs-secondary: var(--gray-dark);
    --bs-secondary-rgb: 69, 73, 76;
}

/* Global Font Settings */
body {
    font-family: var(--english-font);
}

html[dir="rtl"] body {
    font-family: var(--arabic-font);
}

/* Global Text Alignment - Justify all text content */
p, 
.service-card p,
.project-info p,
.about-section p,
.certification-info p,
.testimonial-content p,
.timeline-content p,
.service-detail p,
.service-type p,
.footer-about-text,
.contact-info p,
.hero-subtitle,
.about-content p,
.leadership-text,
.leadership-caption,
div p {
    text-align: justify;
    text-justify: inter-word;
}

/* Ensure justify works in both RTL and LTR modes */
html[dir="rtl"] p,
html[dir="rtl"] .service-card p,
html[dir="rtl"] .project-info p,
html[dir="rtl"] .about-section p,
html[dir="rtl"] div p {
    text-align: justify;
    text-justify: inter-word;
}

html[dir="ltr"] p,
html[dir="ltr"] .service-card p,
html[dir="ltr"] .project-info p,
html[dir="ltr"] .about-section p,
html[dir="ltr"] div p {
    text-align: justify;
    text-justify: inter-word;
}

/* Exceptions for elements that should keep their specific alignment */
.text-center p,
.text-left p,
.text-right p,
.text-end p,
.text-start p,
.certification-info h3,
.certification-info p,
h1, h2, h3, h4, h5, h6,
.stat-text,
.author-name,
.author-company,
.copyright-text,
.developer-credit {
    text-align: inherit !important;
}

/* Keep centered elements centered */
.text-center,
.certification-info,
.stats-section .stat-item {
    text-align: center;
}

/* Keep footer copyright centered on mobile */
@media (max-width: 767.98px) {
    .footer-copyright .col-md-6 p {
        text-align: center !important;
    }
}

/* Theme color overrides for Bootstrap utilities */
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.bg-secondary { background-color: var(--gray-dark) !important; }
.text-secondary { color: var(--gray-dark) !important; }
.badge.bg-primary { background-color: var(--primary) !important; color: var(--gray-dark) !important; }
.badge.bg-secondary { background-color: var(--gray-dark) !important; color: #fff !important; }
.leadership-caption {
    font-size: 1rem;
    line-height: 1.5;
}
 
 /* Apply Arabic font to specific elements in RTL mode */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-subtitle,
html[dir="rtl"] .btn,
html[dir="rtl"] p {
    font-family: var(--arabic-font);
}

/* Logo Styles */
.logo {
    display: inline-block;
    position: relative;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

/* Logo container styles for hero section */
.hero-section .logo-container {
    position: absolute;
    width: 280px;
    height: 280px;
    z-index: 5;
}

/* Hide hero section logo on mobile devices */
@media screen and (max-width: 768px) {
    .hero-section .logo-container {
        display: none;
    }
}

/* Perfect Image Section Styles */
.perfect-image-section {
    width: 100%;
    overflow: hidden;
    position: relative;
    direction: ltr !important; /* Force LTR direction regardless of page direction */
}

.perfect-image-section .image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    direction: ltr !important;
    height: 120px; /* Match image height so the section has visible height */
}

.perfect-image-section img {
    max-width: none;
    width: auto;
    height: 120px; /* Control height of the banner */
    display: block;
    position: absolute;
    top: 0; /* Anchor to top within container */
    left: 0 !important; /* Always start from left side of the image - force with !important */
    right: auto !important;
}

/* Ensure same behavior in RTL mode */
html[dir="rtl"] .perfect-image-section,
html[dir="rtl"] .perfect-image-section .image-container,
html[dir="rtl"] .perfect-image-section img {
    direction: ltr !important;
}

html[dir="rtl"] .perfect-image-section img {
    left: 0 !important; /* Always show left side of image first, even in RTL mode */
    right: auto !important;
}

/* Responsive height adjustments for perfect image section */
@media screen and (max-width: 1200px) {
    .perfect-image-section img {
        height: 100px;
    }
    .perfect-image-section .image-container {
        height: 100px;
    }
}

@media screen and (max-width: 992px) {
    .perfect-image-section img {
        height: 90px;
    }
    .perfect-image-section .image-container {
        height: 90px;
    }
}

@media screen and (max-width: 768px) {
    .perfect-image-section img {
        height: 80px;
    }
    .perfect-image-section .image-container {
        height: 80px;
    }
}

@media screen and (max-width: 576px) {
    .perfect-image-section img {
        height: 70px;
    }
    .perfect-image-section .image-container {
        height: 70px;
    }
}

@media screen and (max-width: 480px) {
    .perfect-image-section img {
        height: 60px;
    }
    .perfect-image-section .image-container {
        height: 60px;
    }
}

.hero-row {
    position: relative;
    min-height: 400px;
}

/* =================================
   Footer Styles
   ================================= */
.footer-main {
    background-color: var(--gray-dark);
    position: relative;
    overflow: hidden;
    padding: 4rem 0 0;
}

/* Footer Branding */
.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    transition: transform 0.3s ease;
}

.footer-about-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
 
 .footer-logo-inline {
     width: 90px;
     height: auto;
     float: left;
     margin: 0 12px 6px 0;
 }
 
 html[dir="rtl"] .footer-logo-inline {
     float: right;
     margin: 0 0 6px 12px;
 }
 
 .footer-about-text::after {
     content: "";
     display: table;
     clear: both;
 }

/* Footer Headings */
.footer-heading {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

html[dir="rtl"] .footer-heading:after {
    left: auto;
    right: 0;
}

/* Footer Links */
.footer-links {
    padding-left: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1rem;
}

html[dir="rtl"] .footer-links li {
    padding-left: 0;
    padding-right: 1rem;
}

.footer-links li:before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.25rem;
    line-height: 1;
    top: 0;
}

html[dir="rtl"] .footer-links li:before {
    left: auto;
    right: 0;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

html[dir="rtl"] .footer-link:hover {
    transform: translateX(-5px);
}

/* Contact Info */
.footer-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-item {
    display: flex;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.contact-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

html[dir="rtl"] .contact-icon {
    margin-right: 0;
    margin-left: 15px;
}

.contact-item:hover .contact-icon {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(250, 217, 52, 0.3);
}

.contact-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.contact-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(250, 217, 52, 0.3);
}

/* Copyright Section */
.footer-copyright {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 0;
    font-size: 0.875rem;
    margin-top: 2rem;
}

.copyright-text {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.developer-credit {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.875rem;
}

.developer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.developer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.developer-link:hover {
    color: #fff;
}

.developer-link:hover::after {
    width: 100%;
}

/* RTL Support for Developer Link */
html[dir="rtl"] .developer-link::after {
    left: auto;
    right: 0;
}

/* Responsive Styles */
@media (max-width: 767.98px) {
    .footer-copyright .col-md-6 {
        text-align: center !important;
    }
    
    .developer-credit {
        margin-top: 10px;
    }
}

@media (max-width: 991.98px) {
    .footer-main {
        text-align: center;
    }
    
    .footer-heading:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    html[dir="rtl"] .footer-heading:after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .footer-links li {
        padding-left: 0;
    }
    
    .footer-links li:before {
        display: none;
    }
    
    .footer-link:hover {
        transform: none;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 auto 10px;
    }
    
    .contact-text {
        width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .footer-main {
        padding-top: 3rem;
        padding-bottom: 1rem;
    }
    
    .footer-brand {
        margin-bottom: 1.5rem;
    }
    
    .footer-logo-inline {
        float: none;
        display: block;
        margin: 0 auto 12px auto;
        width: 100px;
    }
    
    .footer-heading {
        margin-top: 2rem;
    }
}

html[dir="rtl"] .copyright-year,
html[dir="rtl"] .copyright-reserved {
    margin-right: 0;
    margin-left: 5px;
}

.rights-text {
    color: #ccc;
}

.go-smart-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.go-smart-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* تنسيقات حاوية الشعار */
.logo-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    z-index: 5;
}

/* الشعار على اليسار في النسخة العربية */
html[dir="rtl"] .ar-logo-left {
    justify-content: flex-end;
    padding-right: 0;
    padding-left: 5%;
    text-align: left;
}

/* الشعار على اليمين في النسخة الإنجليزية */
.en-logo-right {
    justify-content: flex-end;
    padding-right: 5%;
}

.hero-logo-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.3));
}

/* RTL support for logo position */
html[dir="rtl"] .hero-logo-container {
    left: auto;
    right: 5%;
    z-index: 1;
    opacity: 0.85;
}

.desktop-logo {
    display: none;
}

.mobile-logo {
    display: inline-block;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform-origin: center center;
    position: relative;
    z-index: 10;
    will-change: transform, opacity;
}

.hidden-logo {
    visibility: hidden;
}

/* إخفاء الشعار الكبير في وضع الموبايل */
@media (max-width: 767px) {
    .hero-logo-container {
        display: none;
    }
}

/* Show desktop logo only on larger screens (PC) */
@media (min-width: 992px) {
    .desktop-logo {
        display: inline-block;
    }
    
    .mobile-logo {
        display: none;
    }
}

/* General Styles */
body {
    font-family: 'Tajawal', 'Poppins', sans-serif;
    color: var(--gray-dark);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-top: 100px; /* إضافة مساحة أعلى الصفحة لمنع تداخل الهيدر */
}

html[dir="rtl"] body {
    font-family: 'Tajawal', sans-serif;
}

html[dir="ltr"] body {
    font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--gray-dark);
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gray-dark);
}

.btn {
    padding: 10px 25px;
    border-radius: 3px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--gray-dark);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--gray-dark);
    border-color: var(--gray-dark);
    color: var(--white);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--gray-dark);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--gray-dark);
}

.section-heading h2 {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-heading h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 60px;
    background-color: var(--primary);
}

html[dir="rtl"] .section-heading h2:after {
    left: auto;
    right: 0;
}

.section-heading.text-center h2:after {
    left: 50%;
    margin-left: -30px;
}

html[dir="rtl"] .section-heading.text-center h2:after {
    right: 50%;
    left: auto;
    margin-right: -30px;
    margin-left: 0;
}

/* Modern Header Styles (similar to MSCEB) */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    z-index: 1000;
    transition: all 0.3s ease;
    background-color: transparent; /* هيدر شفاف في البداية */
    box-shadow: none;
}

header.scrolled {
    padding: 15px 40px;
    background-color: rgba(69, 73, 76, 0.95); /* لون الهيدر بعد التمرير */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container .logo img {
    height: 60px;
    transition: all 0.3s ease;
}

header.scrolled .logo-container .logo img {
    height: 50px;
}

/* Smaller logo in mobile header */
@media (max-width: 767.98px) {
    .logo-container .logo .mobile-logo {
        height: 25px;
    }
    header.scrolled .logo-container .logo .mobile-logo {
        height: 25px;
    }
}

.nav-controls {
    display: flex;
    align-items: center;
}

.language-switcher, .phone-link {
    color: var(--white);
    margin-right: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

html[dir="rtl"] .language-switcher, 
html[dir="rtl"] .phone-link {
    margin-right: 0;
    margin-left: 20px;
}

.language-switcher:hover, .phone-link:hover {
    color: var(--primary);
}

.phone-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Menu Toggle Button */
.menu-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    border-radius: 50%;
    background-color: var(--gray-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-icon {
    display: block;
    position: relative;
    width: 18px;
    height: 14px;
}

.menu-icon span {
    position: absolute;
    height: 2px;
    width: 100%;
    background-color: var(--white);
    left: 0;
    transition: all 0.3s ease;
}

.menu-icon span:nth-child(1) {
    top: 0;
}

.menu-icon span:nth-child(2) {
    top: 6px;
}

.menu-icon span:nth-child(3) {
    top: 12px;
}

body.menu-open .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

body.menu-open .menu-icon span:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Fullscreen Menu */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff; /* solid to fully hide underlying content */
    z-index: 10001; /* higher than any header or floating widget */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Better scrolling on iOS */
}

body.menu-open .fullscreen-menu {
    opacity: 1;
    visibility: visible;
}

/* Hide contact info and social icons inside the fullscreen menu while open */
body.menu-open .fullscreen-menu .menu-footer { display: none !important; }

.menu-content {
    width: 100%;
    max-width: 1200px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.close-menu {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-menu:hover {
    color: var(--primary);
}

.menu-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-items nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.menu-items nav ul li {
    margin-bottom: 20px;
}

.menu-items nav ul li a {
    font-size: 28px;
    color: var(--gray-dark);
    font-weight: 600;
    position: relative;
    padding: 8px 0;
    display: inline-block;
    transition: all 0.3s ease;
}

.menu-items nav ul li a:hover,
.menu-items nav ul li.active a {
    color: var(--primary);
}

.menu-items nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.menu-items nav ul li a:hover:after,
.menu-items nav ul li.active a:after {
    width: 30px;
}

.menu-footer {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.contact-info p {
    margin-bottom: 10px;
    color: var(--gray-dark);
}

.contact-info i {
    color: var(--primary);
    margin-right: 10px;
}

html[dir="rtl"] .contact-info i {
    margin-right: 0;
    margin-left: 10px;
}

.social-links {
    display: flex;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-dark);
    margin-left: 10px;
    transition: all 0.3s ease;
}

html[dir="rtl"] .social-links a {
    margin-left: 0;
    margin-right: 10px;
}

.social-links a:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Hero Section with Animated Background */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 550px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    margin-top: -100px; /* لتعويض padding-top الموجود في body */
    padding: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: -2;
}

.hero-background .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(69, 73, 76, 0.7); /* استخدام الرمادي الداكن من هوية الشركة */
    z-index: 1;
}

.hero-content {
    padding: 0 20px;
    max-width: 800px;
    margin-top: 100px; /* Adjust for fixed header */
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: var(--white);
    max-width: 600px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
        line-height: 1.5;
    }
    
    .hero-section {
        min-height: 500px;
        align-items: flex-start;
        padding-top: 150px;
    }
    
    .hero-content {
        margin-top: 50px;
    }
}

/* Mobile Specific Adjustments */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 20px;
    }
    
    .hero-section {
        min-height: 450px;
        padding-top: 120px;
    }
    
    .hero-content {
        margin-top: 30px;
        padding: 0 15px;
        text-align: center;
    }
    
    /* تحسين توسيط العناصر في النسخة العربية والإنجليزية */
    html[dir="rtl"] .hero-content,
    html[dir="ltr"] .hero-content {
        text-align: center;
    }
    
    /* تحسين أحجام الخطوط للنصوص العربية */
    html[dir="rtl"] .hero-title {
        font-size: 1.7rem;
        line-height: 1.35;
        font-weight: 600;
    }
    
    html[dir="rtl"] .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* Improved container padding for smaller screens */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Better spacing for service cards */
    .service-card {
        padding: 20px;
        text-align: center;
    }
    
    /* ضبط محاذاة النص في بطاقات الخدمات حسب اتجاه اللغة */
    html[dir="rtl"] .service-card {
        text-align: center;
    }
    
    html[dir="ltr"] .service-card {
        text-align: center;
    }
    
    /* Adjust section paddings */
    section {
        padding: 40px 0;
    }
    
    /* Fix project cards */
    .project-card {
        margin-bottom: 20px;
    }
    
    /* إعادة تمكين التأثيرات الحركية على الأجهزة المحمولة */
    /* تم إزالة الكود الذي يعطل تأثيرات AOS */
    
    /* تحسين أزرار القائمة الرئيسية على الجوال */
    #menuToggle {
        padding: 10px;
    }
}

/* Page Header for internal pages */
.page-header {
    background: linear-gradient(rgba(69, 73, 76, 0.8), rgba(69, 73, 76, 0.8)), url('../images/backgrounds/page-header-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 0 60px;
    color: var(--white);
    margin-bottom: 30px;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    background: transparent;
    padding: 0;
    margin: 0;
}

html[dir="rtl"] .breadcrumb {
    padding-right: 0;
}

.breadcrumb-item a {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--white);
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--white);
    opacity: 0.5;
}

/* About Section */
.about-section {
    padding: 80px 0;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
}

.about-image:after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    height: 100%;
    width: 100%;
    background-color: var(--primary);
    z-index: -1;
}

html[dir="rtl"] .about-image:after {
    right: auto;
    left: -20px;
}

/* Certifications Section */
.certifications-section {
    position: relative;
    overflow: hidden;
    background-color: var(--white);
}

.certification-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-light);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.certification-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background-color: rgba(250, 209, 52, 0.1);
    height: 150px;
}

.certification-image img {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
}

.certification-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.certification-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--gray-dark);
    font-weight: 700;
    text-align: center;
}

.certification-info p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--gray-medium);
    text-align: center;
}

/* RTL Support for Certification Cards */
html[dir="rtl"] .certification-info h3,
html[dir="rtl"] .certification-info p {
    text-align: center;
}

/* Testimonials Section */
.testimonials-section {
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
}

.testimonials-section .title-underline {
    height: 3px;
    width: 60px;
    background-color: var(--primary);
    margin: 15px auto 0;
}

.testimonials-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.testimonial-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.testimonial-content {
    position: relative;
}

.testimonial-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    color: var(--gray-dark);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '\201C';
    font-size: 4rem;
    color: rgba(250, 209, 52, 0.2);
    position: absolute;
    left: -15px;
    top: -20px;
    line-height: 1;
    z-index: -1;
}

.testimonial-content p::after {
    content: '\201D';
    left: auto;
    right: -15px;
    bottom: -40px;
    top: auto;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

html[dir="rtl"] .testimonial-author {
    align-items: flex-start;
}

.author-name {
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 5px;
}

.author-company {
    color: var(--gray-medium);
    font-style: italic;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .testimonial-item {
        padding: 20px;
    }
    
    .testimonial-content p {
        font-size: 1rem;
    }
}

/* Statistics Section */
.stats-section {
    background-color: #45494C; /* استخدام اللون الرمادي الداكن (Outer space) */
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 70px 0;
    margin: 50px 0;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 50%;
    opacity: 0.1;
    z-index: 1;
}

.stats-section .container {
    position: relative;
    z-index: 2;
}

.stats-section .section-heading h2,
.stats-section .section-heading p {
    color: #fff;
}

.stat-item {
    padding: 20px 15px;
    transition: all 0.3s ease;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary);
}

.stat-text {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-text {
        font-size: 1rem;
    }
}

/* Timeline Section */
.timeline-section {
    position: relative;
    overflow: hidden;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: var(--primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    display: flex;
    margin-bottom: 60px;
    align-items: center;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-year {
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: var(--primary);
    color: var(--gray-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    z-index: 2;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.timeline-content {
    position: relative;
    width: calc(50% - 50px);
    padding: 20px 30px;
    background-color: var(--white);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.timeline-dot {
    display: none; /* إخفاء النقاط الصفراء الصغيرة */
}

/* تناوب محتوى عناصر الخط الزمني */
.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item:nth-child(odd) .timeline-content h3,
.timeline-item:nth-child(odd) .timeline-content h4 {
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-item:nth-child(even) .timeline-content h3,
.timeline-item:nth-child(even) .timeline-content h4 {
    text-align: left;
}

/* RTL Support for Timeline */
html[dir="rtl"] .timeline::before {
    left: 50%;
    right: auto;
}

html[dir="rtl"] .timeline-year {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

/* تعديل عرض محتوى الخط الزمني بالعربية ليتطابق مع الإنجليزية */
html[dir="rtl"] .timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

html[dir="rtl"] .timeline-item:nth-child(odd) .timeline-content h3,
html[dir="rtl"] .timeline-item:nth-child(odd) .timeline-content h4 {
    text-align: left;
}

html[dir="rtl"] .timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .timeline-item:nth-child(even) .timeline-content h3,
html[dir="rtl"] .timeline-item:nth-child(even) .timeline-content h4 {
    text-align: right;
}

/* Responsive Styles for Timeline */
@media (max-width: 767px) {
    .timeline::before {
        left: 40px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-year {
        left: 40px;
        transform: translateX(-50%);
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .timeline-dot {
        left: 40px;
        transform: translate(-50%, -50%);
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 80px;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: 40px;
        right: auto;
    }
    
    /* RTL Support Mobile */
    html[dir="rtl"] .timeline::before {
        left: auto;
        right: 40px;
    }
    
    html[dir="rtl"] .timeline-year {
        left: auto;
        right: 40px;
        transform: translateX(50%);
    }
    
    html[dir="rtl"] .timeline-content {
        margin-left: 0;
        margin-right: 80px;
    }
    
    html[dir="rtl"] .timeline-dot {
        left: auto;
        right: 40px;
        transform: translate(50%, -50%);
    }
    
    html[dir="rtl"] .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 80px;
    }
    
    html[dir="rtl"] .timeline-item:nth-child(even) .timeline-dot {
        left: auto;
        right: 40px;
    }
}

/* Contact Section Styles */
.location-link {
    color: var(--gray-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid var(--primary);
    display: inline-block;
    position: relative;
    font-weight: 500;
}

.location-link:hover {
    color: var(--primary);
}

/* Services Section */
.service-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-card .icon-box {
    width: 70px;
    height: 70px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-card .icon-box i {
    font-size: 30px;
    color: var(--gray-dark);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.service-card .read-more {
    margin-top: 15px;
    display: inline-block;
    font-weight: 500;
    color: var(--gray-dark);
    transition: color 0.25s ease;
}

.service-card .read-more:hover {
    color: var(--primary);
}

/* Projects Section */
.project-card {
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 5px;
    overflow: hidden;
    background-color: var(--white);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-image .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-image .overlay {
    opacity: 1;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

/* Clients Section */
.client-logo {
    background-color: var(--white);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.client-logo img {
    max-width: 100%;
    max-height: 80px;
}

/* Contact Section */
.contact-info {
    background-color: var(--gray-dark);
    color: var(--white);
}

.contact-info h2, .contact-info p {
    color: var(--white);
}

.contact-details i {
    color: var(--primary);
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary);
    color: var(--gray-dark);
}

.contact-form {
    background-color: var(--white);
}

.form-control {
    padding: 12px 15px;
    border-color: var(--gray-light);
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary);
}

/* Footer Styles */
.footer-main {
    background-color: #222;
    color: #fff;
}

.location-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.location-link:hover {
    color: #f8c22c;
    text-decoration: underline;
}

footer {
    background-color: var(--gray-dark);
    color: var(--white);
}

footer h5 {
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

footer h5:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 40px;
    background-color: var(--primary);
}

html[dir="rtl"] footer h5:after {
    left: auto;
    right: 0;
}

footer .footer-links li {
    margin-bottom: 10px;
}

footer .footer-links a {
    color: var(--gray-light);
    transition: all 0.3s ease;
}

footer .footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

html[dir="rtl"] footer .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

footer .contact-info i {
    color: var(--primary);
}

.copyright {
    background-color: rgba(0,0,0,0.1);
    color: var(--gray-light);
}

.footer-copyright-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    line-height: 1.6;
}

.rights-text {
    font-weight: 500;
    color: var(--white);
}

.go-smart-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.go-smart-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--white);
        padding: 15px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .about-image:after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .section-heading h2 {
        font-size: 28px;
    }
    
    .contact-info, .contact-form {
        padding: 30px !important;
    }
}
