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

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    color: #333;
}

.main-header {
    background-color: #fff;
    border-bottom: 2px solid #ddd;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.main-header .header-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.main-header .logo {
    margin-left: 30px;
}

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

.main-header .main-nav {
    flex-grow: 1;
}

.main-header .main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-header .main-nav li {
    margin-left: 20px;
}

.main-header .main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    padding: 10px 0;
    display: block;
    transition: color 0.3s;
}

.main-header .main-nav a:hover {
    color: #007bff;
}

.header-tools {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.lang-switcher {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    transition: color 0.3s;
}

.lang-switcher:hover {
    color: #0056b3;
}

.lang-separator {
    margin: 0 5px;
    color: #666;
}

/* Slider Section */
.hero-slider-section {
    position: relative;
    height: 450px;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.5s, opacity 0.5s linear;
}

.hero-slider-section.slick-initialized {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s linear;
}

.slider-container {
    display: flex;
    height: 100%;
}

.slide-item {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 56, 128, 0.4);
}

.slide-caption {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    text-align: center;
    z-index: 2;
}

.slide-caption h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.slide-caption p {
    font-size: 1.2rem;
    margin: 0;
}

.slick-dots {
    bottom: 20px;
    left: 20px;
    right: auto;
}

.slick-dots li button:before {
    font-size: 10px;
    color: #fff;
    opacity: 0.5;
}

.slick-dots li.slick-active button:before {
    color: #007bff;
    opacity: 1;
}

/* General Sections */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 50px 0;
}

.page-title, h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #172a5f;
    position: relative;
    display: inline-block;
}

.page-title::after, h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #007bff;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.about-us-summary {
    background-color: #f8f9fa;
    text-align: right;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.services-grid, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.service-item, .product-item {
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.service-item:hover, .product-item:hover {
    transform: translateY(-10px);
}

.service-item img, .product-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

footer {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 20px 0;
}

.contact-section {
    padding: 50px 0;
    text-align: right;
}

.contact-section h1 {
    text-align: center;
    margin-bottom: 40px;
}

.contact-section h3 {
    color: #172a5f;
    margin-top: 30px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: right;
}

.form-group textarea {
    resize: vertical;
}

.contact-form button {
    padding: 12px 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #0056b3;
}

.news-and-contact-section {
    background-color: #f8f9fa;
    padding: 50px 0;
}
.news-and-contact-section .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}
.contact-info-column, .news-slider-column {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}
.contact-info-column {
    border-left: 1px solid #ddd;
    border-right: none;
    text-align: right;
}
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    direction: rtl;
}
.contact-item i {
    font-size: 24px;
    color: #172a5f;
    margin-left: 15px;
    margin-right: 0;
}
.social-icons {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}
.social-icons a {
    margin-left: 15px;
    margin-right: 0;
    font-size: 24px;
    color: #555;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: #007bff;
}
.section-title {
    font-size: 1.5rem;
    color: #172a5f;
    margin-bottom: 30px;
    text-align: right;
}
.news-item-slider {
    position: relative;
    padding-right: 20px;
    padding-left: 0;
}
.news-item-slider h4 {
    font-size: 1rem;
    color: #333;
}
/* Boxed Layout */
body.boxed-layout {
    background-color: #f0f2f5 !important;
}
body.boxed-layout header,
body.boxed-layout main {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
body.boxed-layout footer {
    max-width: 1200px;
    margin: 0 auto;
}
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.partner-item {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s;
    text-align: center;
}
.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.partner-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}
/* ... الكود الموجود مسبقًا... */

.contact-info-block .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.contact-info-block .contact-item i {
    font-size: 20px;
    color: #007bff;
    margin-left: 10px;
}
/* ...existing CSS... */

.products-layout {
    display: flex;
    gap: 30px;
}
.category-sidebar {
    flex-basis: 250px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    height: fit-content;
}
.category-sidebar h3 {
    text-align: left;
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.category-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-sidebar li a {
    display: block;
    padding: 10px 0;
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}
.category-sidebar li a:hover {
    color: #007bff;
}
.products-grid-container {
    flex-grow: 1;
}
/* ...existing CSS... */

.products-layout {
    display: flex;
    gap: 30px;
    direction: rtl;
}
.category-sidebar {
    flex-basis: 250px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    height: fit-content;
}
.category-sidebar h3 {
    text-align: right;
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.category-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-sidebar li a {
    display: block;
    padding: 10px 0;
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}
.category-sidebar li a:hover {
    color: #007bff;
}
.products-grid-container {
    flex-grow: 1;
}
/* ... (existing styles) ... */

/* Boxed Layout Specific Adjustments */
body.boxed-layout .hero-video-section {
    max-width: 1200px; /* يجب أن يتوافق مع max-width لـ main */
    margin: 0 auto;
    overflow: hidden; /* لضمان عدم خروج أي جزء من الفيديو عن الإطار */
    border-radius: 0; /* يمكنك إضافة border-radius إذا أردت حواف دائرية */
}

body.boxed-layout .hero-video-section .hero-video-background {
    /* تأكد أن الفيديو يملأ المساحة المتاحة دون الخروج من الإطار */
    width: 100%;
    height: 100%;
    object-fit: cover; /* لضمان تغطية المساحة بالكامل مع الحفاظ على الأبعاد */
    position: absolute; /* احتفظ به لملء الخلفية */
    top: 0;
    right: 0; /* تغيير left إلى right للاتجاه RTL */
    transform: none; /* إلغاء التحويل إذا كان يسبب مشكلة */
}

/* Make sure main has a background and box-shadow for boxed layout */
body.boxed-layout main {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative; /* مهم لضمان أن الفيديو داخل الأب */
    z-index: 1; /* لتجنب أي تداخل مع عناصر أخرى */
}
/* ...other styles... */

/* Video Section */
.hero-video-section {
    position: relative;
    height: 450px; /* يجب أن يكون هذا الارتفاع موجوداً */
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    top: 50%;
    right: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(50%, -50%); /* مهم جداً لتوسيط الفيديو بالاتجاه الصحيح */
    z-index: 1;
}

.hero-placeholder {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #172a5f;
    color: white;
    z-index: 2;
}

.hero-placeholder h1 {
    font-size: 3rem;
    position: relative;
}

/* Boxed Layout specific for hero video */
body.boxed-layout .hero-video-section {
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* ...existing CSS... */

.news-list-column {
    text-align: right;
}

.news-card {
    direction: rtl;
}

.news-card img {
    margin-left: 15px;
    margin-right: 0;
}
/* ... (existing CSS) ... */
/* ...existing CSS... */

/* Adjustments for news and contact section layout */
.news-and-contact-section .container {
    flex-direction: row-reverse;
    gap: 30px;
}

.contact-info-column, .news-list-column {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-info-column {
    border-left: 1px solid #eee;
    border-right: none;
    text-align: right;
}

.news-list-column {
    text-align: right;
}

/* Specific styling for Latest News section (RTL) */
.section-title {
    text-align: right;
}
.section-title::after {
    right: 0;
    left: auto;
    transform: none;
}

.latest-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    padding: 10px;
}

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

.news-card img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
    margin-left: 15px;
    margin-right: 0;
    flex-shrink: 0;
}

.news-card .news-content {
    flex-grow: 1;
    text-align: right;
}

.news-card h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #172a5f;
}

.news-card p {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

.news-card a {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

.news-card a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    .news-and-contact-section .container {
        flex-direction: column;
        gap: 0;
    }
    .contact-info-column, .news-list-column {
        min-width: unset;
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #eee;
        margin-bottom: 20px;
    }
    .contact-info-column:last-child {
        border-bottom: none;
    }
    .news-card {
        flex-direction: column;
        text-align: center;
    }
    .news-card img {
        margin-left: 0;
        margin-bottom: 10px;
        width: 120px;
        height: 120px;
    }
    .section-title {
        text-align: center;
    }
    .section-title::after {
        right: 50%;
        transform: translateX(50%);
    }
}

/* Adjustments for news and contact section layout */
.news-and-contact-section .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    direction: rtl; /* أضف هذا السطر لضمان الترتيب الصحيح للأعمدة */
    gap: 30px;
}

.contact-info-column {
    border-left: 1px solid #ddd; /* الحدود يجب أن تكون على اليسار */
    border-right: none;
    text-align: right;
}

.news-list-column {
    text-align: right; /* Align text within news column */
}

/* Specific styling for Latest News section (RTL) */
.section-title {
    text-align: right; /* Ensure title is right-aligned in RTL */
}
.section-title::after {
    right: 0; /* Align underline to the right */
    left: auto;
    transform: none;
}

.news-card {
    direction: rtl; /* Ensure text direction is RTL inside card */
}

.news-card img {
    margin-left: 15px; /* Space between image and text */
    margin-right: 0; /* Remove right margin */
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    .news-and-contact-section .container {
        flex-direction: column; /* Stacks columns normally on small screens */
    }
    .contact-info-column {
        border-left: none; /* Remove left border */
        border-bottom: 1px solid #eee; /* Separator for stacked columns */
    }
    .news-card {
        flex-direction: column; /* Stack image and text on small screens */
        text-align: center;
    }
    .news-card img {
        margin-left: 0; /* No margin on either side when stacked */
    }
    .section-title {
        text-align: center;
    }
    .section-title::after {
        right: 50%;
        transform: translateX(50%);
    }
}
/* ...existing CSS... */

.product-details-layout {
    direction: rtl;
}

.product-info-block {
    text-align: right;
}
/* ...existing CSS... */

.category-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-sidebar li {
    position: relative;
    padding: 10px 0;
    cursor: pointer;
}
.category-sidebar li a {
    display: block;
    padding-right: 20px; /* Space for the icon */
}
.category-sidebar .toggle-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: #555;
    transition: transform 0.3s;
}
.category-sidebar li.expanded > .toggle-icon {
    transform: translateY(-50%) rotate(90deg);
}
.subcategories-list {
    padding-right: 20px; /* Indent subcategories */
    border-top: 1px solid #ddd;
    margin-top: 10px;
}
/* ...existing CSS... */



.top-header-bar {
    background-color: #172a5f;
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 0;
    direction: rtl;
}
.top-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.contact-info span {
    margin-left: 20px;
}
.contact-info i {
    margin-left: 5px;
}
.social-links a {
    color: #fff;
    margin-right: 15px;
}

/* Boxed Layout Specific Adjustments */
body.boxed-layout .top-header-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    
    
}
/* Boxed Layout */
body.boxed-layout .top-header-bar {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #172a5f;
}

body.boxed-layout .main-header,
body.boxed-layout main {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* ...existing CSS... */

.services-grid .service-item a,
.products-grid .product-item a {
    display: block;
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.services-grid .service-item a:hover h3,
.products-grid .product-item a:hover h3 {
    color: #007bff;
}

.services-grid .service-item h3,
.products-grid .product-item h3 {
    margin-top: 10px;
    font-size: 1.2em;
    font-weight: bold;
}