/* =============================================================
   style.css — دائرة الإسكان
   المسافة الجانبية الموحدة: --gap: 20px من كلا الجانبين
   ============================================================= */

/* =====================
  1 متغيرات عامة
   ===================== */
:root {
    --gap: 40px;
}

/* =====================
   الأساسيات
   ===================== */
body {
    margin: 0;
    font-family: 'Tajawal', Tahoma, sans-serif;
    direction: rtl;
}

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

/* =====================
   العناصر ذات المسافة الموحدة
   ===================== */
.breaking-news,
.navbar,
.slider,
.news-section,
.double-sections,
.services-section-wrap {
    margin-left:  var(--gap);
    margin-right: var(--gap);
    box-sizing: border-box;
}

/* =====================
   شريط الترحيب
   ===================== */
.welcome-bar {
    background: #ffc107;
    color: #000;
    text-align: center;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 15px;
    position: relative;
    z-index: 9999;
}

/* =====================
   الشريط الأسود العلوي
   ===================== */
.top-bar {
    display: none;
    background: #111;
    color: #fff;
    padding: 10px 30px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
    font-size: 14px;
}

.top-bar a:hover { color: #f1c40f; }

/* =====================
   الهيدر
   ===================== */
.header-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    position: relative;
    z-index: 100;
}

.main-header {
    width: calc(100% - var(--gap) * 2);
    background: #f8fafd;
    border: 3px solid #dce2f0;
    border-top: 3px solid #c8a63a;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    transition: .3s;
    box-sizing: border-box;
}

.main-header:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .18);
}

/* =====================
   الشعار
   ===================== */
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img {
    width: 85px;
    height: 85px;
    object-fit: contain;
}

.logo-text h2 {
    margin: 0;
    font-size: 26px;
    color: #222;
}

.logo-text p {
    margin: 5px 0 0;
    color: #666;
    font-size: 15px;
    letter-spacing: 1px;
}

.home-btn {
    margin-right: 20px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    white-space: nowrap;
}

.home-btn:hover {
    color: #d99a00;
    transform: translateY(-2px);
}

.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #333;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    transition: 0.3s;
}

.lang-toggle-btn:hover {
    background: #d99a00;
    color: #fff;
    border-color: #d99a00;
    transform: translateY(-2px);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #d99a00;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    border: none;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #333;
    transform: translateY(-3px);
}

/* =====================
   NAVBAR
   ===================== */
nav,
.navbar,
.menu,
.main-menu,
.navbar ul li a,
.main-menu li a {
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    letter-spacing: 0.2px;
        font-weight: bold;

}

.navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    padding: 8px 16px;
     width: 100% !important;
    padding: 4px 0 !important;
    gap: 6px;
    overflow: visible;
    align-items: stretch !important;
}

.navbar ul,
.main-menu {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.navbar ul li,
.main-menu > li {
    position: relative;
    white-space: nowrap;
}

.navbar ul li a,
.main-menu li a {
    text-decoration: none;
    color: #111;
    padding: 8px 9px;
    font-size: 14px;
    display: block;
    border-radius: 5px;
    transition: color 0.25s;
}

.navbar ul li a:hover,
.main-menu li a:hover { color: #c59d00; }

/* القائمة الفرعية */
.main-menu li ul,
.main-menu li .sub-menu,
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    border-top: 3px solid #c8a63a;
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 9999;
    padding: 5px 0;
}

.dropdown:hover .dropdown-menu,
.has-dropdown:hover .dropdown-menu,
.main-menu li:hover > ul,
.main-menu li:hover > .sub-menu { display: flex; }

.main-menu li ul li,
.main-menu li .sub-menu li,
.dropdown-menu li {
    width: 100%;
    white-space: nowrap;
    border-bottom: 1px solid #eee;
}

.main-menu li ul li:last-child,
.main-menu li .sub-menu li:last-child,
.dropdown-menu li:last-child { border-bottom: none; }

.main-menu li ul li a,
.main-menu li .sub-menu li a,
.dropdown-menu li a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}

.main-menu li ul li a:hover,
.main-menu li .sub-menu li a:hover,
.dropdown-menu li a:hover {
    background: #fff8ec;
    color: #c8a63a;
    padding-right: 20px;
}

.has-dropdown { cursor: pointer; }

.main-menu li.active > a {
    color: #0073aa;
    font-weight: bold;
}

/* =====================
   البحث
   ===================== */
.navbar-search-row,
.menu-search {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.menu-search input {
    width: 220px;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 6px 0 0 6px;
    padding: 0 10px;
    outline: none;
    font-family: 'Tajawal', sans-serif;
}

.menu-search button {
    height: 38px;
    width: 45px;
    border: none;
    background: #f0b400;
    color: #fff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.menu-search button:hover { opacity: .9; }

/* =====================
   الإعلانات العاجلة
   ===================== */

.breaking-news {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 52px;

    background: linear-gradient(90deg, #fff7e6, #fff);

    border-top: 2px solid #d4af37;
    border-bottom: 2px solid #d4af37;

    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);

    margin-top: 10px;
    margin-bottom: 10px;

    direction: rtl;
}


/* =========================================================
   عنوان آخر الأخبار
   ========================================================= */

.breaking-title {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}


/* النقطة الحمراء/البيضاء */

.breaking-title::before {
    content: "";

    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    background: #fff;

    border-radius: 50%;

    display: inline-block;

    animation: breaking-blink 1.2s infinite;
}


/* الخط الذهبي الجانبي */

.breaking-title::after {
    content: "";

    position: absolute;

    right: 0;
    top: 0;

    width: 4px;
    height: 100%;

    background: linear-gradient(
        to bottom,
        #f7d774,
        #d4af37,
        #b8860b
    );
}


/* =========================================================
   حركة النقطة
   ========================================================= */

@keyframes breaking-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .2;
    }
}


/* =========================================================
   منطقة الأخبار
   ========================================================= */

.breaking-content {
    position: relative;

    flex: 1 1 auto;

    min-width: 0;

    overflow: hidden;

    display: flex;
    align-items: center;

    background: transparent;
}


/* =========================================================
   المسار المتحرك
   ========================================================= */

.breaking-track {
    display: flex;

    align-items: center;

    width: max-content;

    min-width: max-content;

    direction: rtl;

    white-space: nowrap;
}


/* =========================================================
   النسخة الواحدة
   ========================================================= */

.breaking-copy {
    display: inline-flex;

    align-items: center;

    flex-shrink: 0;

    white-space: nowrap;
}


/* =========================================================
   الخبر
   ========================================================= */

.breaking-item {
    display: inline-flex;

    align-items: center;

    flex-shrink: 0;

    white-space: nowrap;
}


/* =========================================================
   رابط الخبر
   ========================================================= */

.breaking-item a {
    display: inline-flex;

    align-items: center;

    color: #333;

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    line-height: 1.6;

    padding: 0 10px;

    white-space: nowrap;

    transition:
        color .2s ease,
        opacity .2s ease;
}


.breaking-item a:hover {
    color: #c0392b;
}


/* =========================================================
   الوقت
   ========================================================= */

.breaking-content .time-tag {
    color: #c0392b;

    font-size: 11px;

    margin-left: 6px;

    white-space: nowrap;
}


/* =========================================================
   الفاصل ♦
   ========================================================= */

.breaking-sep {
    display: inline-block;

    color: #d4af37;

    font-size: 13px;

    margin: 0 4px;

    user-select: none;
}


/* =========================================================
   الهاتف
   ========================================================= */

@media (max-width: 768px) {

    .breaking-news {
        min-height: 48px;

        border-radius: 8px;
    }

    .breaking-title {
        min-width: 105px;

        padding: 10px 12px;

        font-size: 12px;
    }

    .breaking-title::before {
        width: 7px;
        height: 7px;

        flex-basis: 7px;
    }

    .breaking-item a {
        font-size: 13px;

        padding: 0 8px;
    }

    .breaking-content .time-tag {
        font-size: 10px;
    }

    .breaking-sep {
        font-size: 11px;
    }
}


/* =========================================================
   شاشات الهاتف الصغيرة جداً
   ========================================================= */

@media (max-width: 480px) {

    .breaking-title {
        min-width: 92px;

        padding: 9px 10px;

        font-size: 11px;
    }

    .breaking-item a {
        font-size: 12px;
    }
}

/* =====================
   السلايدر
   ===================== */
.slider {
    position: relative;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}









.slide-item.active .slide-img {
    animation: zoomUp 8s ease forwards;
}

@keyframes zoomUp {
    0%   { transform: scale(1) translateY(0); }
    100% { transform: scale(1.08) translateY(-30px); }
}



.slide-item.active .slide-caption {
    animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
    0%   { opacity: 0; transform: translate(-50%, -40%); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.prev { left: 20px; }
.next { right: 20px; }

.prev:hover,
.next:hover { background: #f1c40f; color: #000; }

/* =====================
   عناوين الأقسام
   ===================== */
.sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0 20px;
    gap: 12px;
}

.sec-head-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.sec-head-left::before {
    content: '';
    display: block;
    width: 5px;
    height: 34px;
    background: linear-gradient(to bottom, #e6c050, #c8a63a);
    border-radius: 3px;
    margin-left: 14px;
    flex-shrink: 0;
}

.sec-head h2 {
    font-size: 20px;
    font-weight: bold;
    color: #0d2b5e;
    margin: 0;
    line-height: 1.3;
}

.sec-head h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #c8a63a;
    border-radius: 2px;
    margin-top: 5px;
}

.sec-head .see-all,
.gov-section-head .see-all {
    font-size: 13px;
    color: #c8a63a;
    text-decoration: none;
    border: 1px solid #c8a63a;
    padding: 5px 16px;
    border-radius: 20px;
    white-space: nowrap;
    transition: 0.2s;
    flex-shrink: 0;
}

.sec-head .see-all:hover,
.gov-section-head .see-all:hover { background: #c8a63a; color: #fff; }

.gov-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.gov-section-head .title-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gov-section-head .title-block::before {
    content: '';
    width: 5px;
    height: 26px;
    background: #c8a63a;
    border-radius: 3px;
    flex-shrink: 0;
}

.gov-section-head h2 {
    font-size: 20px;
    color: #0d2b5e;
    font-weight: bold;
    margin: 0;
}

.news-title-bar {
    background: linear-gradient(90deg, #0d3b66, #145da0);
    padding: 12px 25px;
    margin: 0 0 20px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-title-bar::before,
.news-title-bar::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 3px;
    background: #ffd60a;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 5px;
}

.news-title-bar::before { right: 15px; }
.news-title-bar::after  { left: 15px; }

.news-title-bar h2 {
    color: #fff;
    font-size: 22px;
    margin: 0;
    font-weight: bold;
    letter-spacing: 1px;
}
/*===========================================*/
                /*اخر الاخبار*/
/*===========================================*/

#newsSliderWrap {
    overflow: hidden;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-height: 280px;
}

.news-track {
    position: relative;
    width: 100%;
    display: block;
    will-change: unset;
    min-height: 280px;
}

.news-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(60px);
    pointer-events: none;
    box-sizing: border-box;
}

.news-row.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: absolute;
}

.news-row.incoming {
    animation: rowSlideIn 0.7s ease forwards;
    pointer-events: none;
}

.news-row.leaving {
    animation: rowSlideOut 0.7s ease forwards;
    pointer-events: none;
}

@keyframes rowSlideIn {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes rowSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-60px); }
}

/* بطاقة الخبر */
.news-box {
    background: #fff;
    border: 1px solid #dce2f0;
    border-top: 3px solid #c8a63a;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.25s;
    text-align: center;
    width: 100% !important;
    min-width: unset !important;
    margin: 0 !important;
    flex-shrink: unset;
    box-sizing: border-box;
}

.news-box:hover {
    border-color: #c8a63a;
    box-shadow: 0 6px 20px rgba(200, 166, 58, 0.18);
    transform: translateY(-4px);
}

.news-box a { text-decoration: none; display: block; color: #333; }

.news-box img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.news-box h3 {
    padding: 12px;
    font-size: 14px;
    color: #0d2b5e;
    font-weight: bold;
    line-height: 1.6;
    margin: 0;
    min-height: 60px;
}

.news-box-empty {
    visibility: hidden;
}

/* dots */
.news-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.news-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.news-dot.active {
    background: #c9a84c;
    transform: scale(1.35);
}

/* =====================
   الخدمات الإلكترونية
   ===================== */
.services-section-wrap { margin-top: 40px; }

.services-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.service-card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 10px 18px;
    background: #fff;
    border: 1px solid #dce2f0;
    border-top: 3px solid #c8a63a;
    border-radius: 12px;
    text-decoration: none;
    gap: 12px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(200,166,58,0.15), transparent 70%);
    opacity: 0;
    transition: 0.3s;
}

.service-card:hover::before { opacity: 1; }

.service-card:hover {
    transform: translateY(-4px);
    border-color: #c8a63a;
    box-shadow: 0 6px 20px rgba(200, 166, 58, 0.25), 0 0 30px rgba(200, 166, 58, 0.10);
}

.svc-icon,
.service-card .svc-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d2b5e, #1a4a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8a63a;
    font-size: 22px;
    transition: 0.3s;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.service-card:hover .svc-icon {
    background: linear-gradient(135deg, #c8a63a, #e6c050);
    color: #0d2b5e;
    box-shadow: 0 0 18px rgba(200, 166, 58, 0.5);
}

.service-card h3 {
    font-size: 13px;
    font-weight: bold;
    color: #0d2b5e;
    margin: 0;
    line-height: 1.5;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: 0.3s;
}

.service-card:hover h3 { color: #c8a63a; }

/* =====================
   القسمان السفليان
   ===================== */
.double-sections {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.half-section {
    flex: 1;
    min-width: 300px;
    background: #f8fafd;
    border: 1px solid #dce2f0;
    border-top: 3px solid #c8a63a;
    border-radius: 12px;
    padding: 20px;
}

/* =====================
   المشاريع
   ===================== */
.project-box {
    background: #fff;
    border: 1px solid #dce2f0;
    border-top: 3px solid #c8a63a;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.25s;
    display: flex;
    flex-direction: column;
}

.project-box:hover {
    border-color: #c8a63a;
    box-shadow: 0 6px 20px rgba(200, 166, 58, 0.18);
    transform: translateY(-4px);
}

.project-box a { text-decoration: none; display: flex; flex-direction: column; height: 100%; }

.project-box h3 {
    padding: 12px 14px 6px;
    font-size: 14px;
    color: #0d2b5e;
    font-weight: bold;
    line-height: 1.6;
    flex: 1;
}

.project-image-slider {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #eef1f8;
}

.project-slide {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.project-slide.active { opacity: 1; }

.details-btn {
    display: inline-block;
    margin: 6px 14px 12px;
    padding: 5px 16px;
    background: linear-gradient(135deg, #0d2b5e, #143570);
    color: #fff !important;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    transition: 0.2s;
    align-self: flex-start;
}

.project-box:hover .details-btn {
    background: linear-gradient(135deg, #c8753a, #e6c050);
    color: #0d2b5e !important;
}

/* المشاريع المنجزة — Swiper */
.completedProjects {
    position: relative;
    padding: 10px 45px 35px;
    width: 100%;
    overflow: hidden;
}

.completedProjects .swiper-pagination {
    bottom: 5px !important;
}

.completedProjects .project-box img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.completedProjects .project-box h3 {
    padding: 12px;
    min-height: 75px;
    line-height: 1.6;
    font-size: 20px;
}

.completedProjects .swiper-button-next,
.completedProjects .swiper-button-prev {
    width: 45px;
    height: 45px;
    background: #e5e5e5;
    border-radius: 50%;
    color: #555;
    transition: .3s;
}

.completedProjects .swiper-button-next:hover,
.completedProjects .swiper-button-prev:hover { background: #2196f3; color: #fff; }

.completedProjects .swiper-button-next::after,
.completedProjects .swiper-button-prev::after { font-size: 18px; font-weight: bold; }


.completedProjects .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ccc;
    opacity: 1;
}

.completedProjects .swiper-pagination-bullet-active { background: #c86dd7; }

.swiper { direction: ltr; }

/* =====================
   الدورات التدريبية
   ===================== */
.training-vertical-slider {
    height: 340px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
}

.training-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.training-item {
    background: #fff;
    border: 1px solid #dce2f0;
    border-top: 3px solid #c8a63a;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    transition: 0.25s;
}

.training-item:hover {
    border-color: #c8a63a;
    box-shadow: 0 4px 16px rgba(200, 166, 58, 0.15);
    transform: translateX(-3px);
}

.training-img-box {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.training-img-box img {
    width: 100px;
    height: 72px;
    object-fit: cover;
    flex-shrink: 0;
}

.training-overlay {
    flex: 1;
    padding: 10px 14px;
    background: #fff;
}

.training-overlay h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #0d2b5e;
    font-weight: bold;
}

/* =====================
   المشاريع الحالية — إصلاح نهائي
   ===================== */
.ongoing-projects .projects-slider {
    display: flex;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #c8a63a #f0f0f0;
}

.ongoing-projects .project-box {
    
    min-width: 200px;
    width: 200px;
    flex-shrink: 0;
} 
.ongoing-projects .projects-slider::-webkit-scrollbar { height: 5px; }
.ongoing-projects .projects-slider::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 5px; }
.ongoing-projects .projects-slider::-webkit-scrollbar-thumb { background: #c8a63a; border-radius: 5px; }

/* الرابط يكون عمودي: صورة فوق، نص تحت */
.ongoing-projects .project-box a {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    text-decoration: none;
}

.ongoing-projects .project-image-slider {
    position: relative;
    width: 100% !important;
    height: 160px !important;
    min-width: unset !important;
    overflow: hidden;
    background: #eef1f8;
    border-radius: 10px;

}

.ongoing-projects .project-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    border-radius: 10px;
    transform: scale(1);
    transition: none;

}

.ongoing-projects .project-slide.active {
    opacity: 1;
    animation: slideShow 3.2s ease forwards;
}

@keyframes slideShow {
    0%   { opacity: 0; transform: scale(1);    border-radius: 0; }
    10%  { opacity: 1; transform: scale(1);    border-radius: 0; }
    65%  { opacity: 1; transform: scale(1);    border-radius: 0; }
    85%  { opacity: 0.6; transform: scale(0.35); border-radius: 50%; }
    100% { opacity: 0;   transform: scale(0.2);  border-radius: 50%; }
}

.ongoing-projects .project-box h3 {
    padding: 10px 12px !important;
    font-size: 13px !important;
    color: #0d2b5e !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    text-align: right !important;
    flex: 1;
}

.ongoing-projects .project-box:hover h3 { color: #c8a63a !important; }

/* =====================
   Hero Header
   ===================== */
.hero-header {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.hero-header img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: fill;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 20, 40, 0.55);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
}

.hero-overlay h1 { font-size: 32px; margin: 0; color: #ffd86b; }
.hero-overlay p  { font-size: 16px; margin-top: 10px; opacity: 0.9; }

/* =====================
   الأدوات العائمة
   ===================== */
.floating-tools {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
}

.floating-tools .tool {
    position: absolute;
    left: 0;
    min-width: 50px;
    width: auto;
    height: 50px;
    border: none;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: all .3s ease;
    box-sizing: border-box;
}

.floating-tools .facebook { top: 0;    background: #1877f2; }
.floating-tools .email    { top: 60px; background: #ea4335; }
.floating-tools .whatsapp { top: 120px; background: #25d366; }
.floating-tools .youtube  { top: 180px; background: #ff0000; }
.floating-tools .dark     { top: 240px; background: #222; }

.floating-tools .tool span {
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: .3s;
    margin-right: 0;
}

.floating-tools .tool:hover {
    width: max-content;
    padding: 0 15px;
}

.floating-tools .tool:hover span {
    max-width: 1000px;
    opacity: 1;
    margin-right: 10px;
}

/* =====================
   الفوتر
   ===================== */
.main-footer {
    background: #0b1f3a;
    color: #fff;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 50px;
    flex-wrap: wrap;
    direction: rtl;
    gap: 20px;
}

.footer-box {
    width: 30%;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    box-sizing: border-box;
}

.footer-box h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #c8a63a;
    display: inline-block;
}

.footer-box p,
.footer-box ul li {
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 7px 0;
    margin: 0;
    font-size: 14px;
    color: #ccc;
}

.footer-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-box p::before,
.footer-box ul li::before {
    content: ">> ";
    color: #c8a63a;
    font-weight: bold;
}

.footer-box p:last-of-type,
.footer-box ul li:last-child { border-bottom: none; }

.footer-about-text {
    font-size: 14px;
    color: #ccc;
    line-height: 1.9;
    border-bottom: none !important;
}

.footer-about-text::before { content: none !important; }

.footer-box a { color: #fff; text-decoration: none; transition: 0.3s; }
.footer-box a:hover { color: #d4af37; }
.footer-box i { color: #d4af37; margin-left: 5px; }
.footer-logo img { width: 100px; margin-bottom: 15px; }

.footer-links-grid {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.footer-links-col {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, #c8a63a 20%, #c8a63a 80%, transparent);
    margin: 0 15px;
    align-self: stretch;
    min-height: 100%;
}

.footer-bottom {
    background: #061428;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: #fff;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-copyright { font-size: 13px; }

.footer-lang { display: flex; gap: 8px; }

.footer-lang button {
    background: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.footer-lang button:hover { background: #d4af37; color: #061428; }

/* =====================
   الوضع الليلي
   ===================== */
body.dark-mode {
    background: #121212;
    color: #f1f1f1;
}

body.dark-mode .main-header,
body.dark-mode .news-section,
body.dark-mode .project-box,
body.dark-mode .service-card,
body.dark-mode .breaking-news,
body.dark-mode .half-section { background: #1e1e1e !important; color: #f1f1f1 !important; }

body.dark-mode a { color: #fff; }

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p,
body.dark-mode span { color: #f1f1f1 !important; }

.dark-mode .navbar ul li a { color: #fff; }
.dark-mode .logo-text h2,
.dark-mode .logo-text p   { color: #fff; }
.dark-mode .main-header   { background: #222 !important; }
.dark-mode .dropdown-menu { background: #222; }

.dark-mode .breaking-news { background: #2a1f00; border-color: #c8a63a; }
.dark-mode .breaking-content marquee a { color: #f0c060; }

.dark-mode .news-box,
.dark-mode .project-box,
.dark-mode .training-item,
.dark-mode .service-card,
.dark-mode .half-section,
.dark-mode .news-section { background: #1e2235 !important; border-color: #2d3455 !important; }

.dark-mode .news-box h3,
.dark-mode .project-box h3,
.dark-mode .training-overlay h3,
.dark-mode .service-card h3 { color: #afc5e8 !important; }

.dark-mode .news-box:hover,
.dark-mode .project-box:hover,
.dark-mode .training-item:hover,
.dark-mode .service-card:hover {
    border-color: #c8a63a !important;
    box-shadow: 0 6px 20px rgba(200, 166, 58, 0.12) !important;
}

.dark-mode .training-overlay { background: #1e2235; }
.dark-mode .gov-section-head h2,
.dark-mode .sec-head h2 { color: #afc5e8 !important; }

/* =====================
   صفحات الإدارة
   ===================== */
.news-admin { width: 95%; margin: 30px auto; }

.news-admin .admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.news-admin .admin-header h1 { margin: 0; font-size: 28px; color: #222; }

.btn { display: inline-block; padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all .15s; }
.btn-primary   { background: #11a8ff; color: #fff; }
.btn-outline   { background: transparent; color: #11a8ff; border: 1px solid #11a8ff; }
.btn-secondary { background: #6c757d; color: #fff; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.news-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.06); display: flex; flex-direction: column; }
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-card .card-body { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.news-card h3 { margin: 0 0 8px; font-size: 18px; color: #d81b60; }
.news-card p  { margin: 0 0 12px; color: #444; line-height: 1.6; font-size: 14px; }

.card-actions { display: flex; gap: 8px; padding: 12px 15px; border-top: 1px solid #f3f3f3; background: #fbfbfb; }
.card-actions a { text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.card-actions a.view   { background: transparent; color: #444; }
.card-actions a.edit   { background: #ffd60a; color: #111; }
.card-actions a.delete { background: #e74c3c; color: #fff; }

/* =====================
   عرض المقال
   ===================== */
.post-container {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.post-image { width: 100%; max-height: 500px; object-fit: cover; border-radius: 10px; margin-bottom: 25px; }
.post-title { font-size: 38px; line-height: 1.8; margin-bottom: 20px; color: #222; overflow-wrap: break-word; }
.post-meta { display: flex; gap: 20px; margin-bottom: 25px; color: #777; font-size: 14px; }

.post-content {
    line-height: 2.3;
    font-size: 20px;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.post-content img,
.post-content video,
.post-content iframe { max-width: 100%; display: block; margin: 15px auto; border-radius: 10px; }

.article-content {
    font-size: 18px;
    line-height: 2;
    text-align: right;
    margin: 20px 0;
    overflow: hidden;
}

.article-content img {
    display: block;
    max-width: 450px;
    width: 100%;
    height: auto;
    margin: 15px auto;
    border-radius: 10px;
}

.article-content img:hover { transform: scale(1.02); transition: 0.3s; }
.article-content video { display: block; max-width: 450px; width: 100%; margin: 15px auto; border-radius: 8px; }

/* =====================
   تسجيل الدخول
   ===================== */
.login-container { width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; background: #f2f2f2; }
.login-box { width: 400px; background: #fff; padding: 40px; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); text-align: center; }
.login-box h2     { margin-bottom: 30px; color: #11a8ff; }
.login-box input  { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 10px; font-size: 18px; }
.login-box button { width: 100%; padding: 15px; border: none; border-radius: 10px; background: #11a8ff; color: #fff; font-size: 20px; cursor: pointer; }
.error { color: red; margin-bottom: 20px; }

/* =====================
   السايدبار الإدارة
   ===================== */
.admin-sidebar { width: 250px; background: #1d2327; min-height: 100vh; padding: 20px; position: fixed; right: 0; top: 0; }
.admin-sidebar h2 { color: #fff; }
.admin-sidebar a  { display: block; color: #fff; padding: 12px; text-decoration: none; margin-bottom: 10px; border-radius: 5px; }
.admin-sidebar a:hover { background: #0073aa; }

/* =====================
   متفرقات
   ===================== */
.back-btn { display: inline-block; margin-bottom: 15px; padding: 10px 15px; background: #444; color: #fff; text-decoration: none; border-radius: 6px; transition: 0.3s; }
.back-btn:hover { background: #000; }

.media-wrap { display: flex; justify-content: center; margin: 20px 0; }
.media-preview { width: 100%; max-width: 450px; border-radius: 10px; display: block; }
video.media-preview { background: #000; }

.gallery { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gallery img { width: 200px; height: 140px; object-fit: cover; border-radius: 8px; display: block; }

.action-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; text-decoration: none; border-radius: 8px; font-weight: bold; transition: 0.3s; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.15); }

.image-box { position: relative; }
.image-title { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.55); color: #fff; padding: 12px 25px; border-radius: 12px; font-size: 18px; font-weight: bold; text-align: center; backdrop-filter: blur(4px); max-width: 85%; }

.form-control { width: 100%; padding: 12px 14px; border: 1px solid #e3e7eb; border-radius: 8px; margin-bottom: 12px; font-size: 15px; box-sizing: border-box; }
.form-row { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.media-card { border: 1px solid #eee; padding: 12px; border-radius: 10px; margin-bottom: 12px; background: #fafafa; }
.image-preview { width: 100%; height: auto; border-radius: 8px; display: block; margin-bottom: 10px; }

.ui-sortable-helper { box-shadow: 0 5px 20px rgba(0,0,0,0.15); }
.ui-sortable-placeholder { height: 70px; border: 2px dashed #0073aa; margin-bottom: 10px; border-radius: 8px; background: #f5faff; }

/* =====================
   Responsive
   ===================== */
@media (max-width: 1024px) {
    .main-header { padding: 14px 24px; }
}

@media (max-width: 992px) {
    .news-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    html, body { overflow-x: hidden; max-width: 100%; }
    :root { --gap: 8px; }

    .breaking-news,
    .navbar,
    .slider,
    .news-section,
    .double-sections,
    .services-section-wrap{
        margin-left: 8px !important;
        margin-right: 8px !important;
    }.map-section{
    margin:0 !important;
}

    .header-container { margin-top: 6px; padding: 0 8px; box-sizing: border-box; }

    .main-header {
        width: 100% !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        gap: 8px;
        box-sizing: border-box;
        transform: none !important;
    }

    .main-header:hover { transform: none !important; }

    .logo-area img { width: 50px; height: 50px; }
    .logo-text h2  { font-size: 15px; }
    .logo-text p   { font-size: 11px; display: none; }

    .navbar {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        padding: 4px 0 !important;
        gap: 4px;
        overflow: visible;
    }

    .navbar ul,
    .main-menu {
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 2px;
        width: 100%;
    }

    .navbar ul li a,
    .main-menu li a { font-size: 12px !important; padding: 5px 6px !important; white-space: normal; }

    .main-menu li ul,
    .main-menu li .sub-menu,
    .dropdown-menu { display: none !important; }

    .menu-search { width: 100%; }
    .menu-search input { width: calc(100% - 40px) !important; height: 32px; font-size: 13px; }
    .menu-search button { height: 32px; width: 40px; }

    .breaking-news { flex-direction: column !important; border-radius: 8px; }
    .breaking-title { width: 100%; justify-content: center; padding: 8px 14px; font-size: 13px; }
    .breaking-content { padding: 6px 10px; }
    .breaking-content marquee a { font-size: 13px; }

    .slider { height: auto !important; border-radius: 10px; }
    .slide-item { position: relative; height: auto; }
    .slide-img { width: 100%; height: auto !important; object-fit: contain !important; }
    .slides { height: auto; }

    .slide-caption { font-size: 13px !important; padding: 8px 14px !important; white-space: normal !important; width: 75%; }

    .prev, .next { width: 32px !important; height: 32px !important; font-size: 14px !important; }
    .prev { left: 8px; }
    .next { right: 8px; }

    .sec-head { margin: 16px 0 12px; }
    .sec-head h2 { font-size: 16px; }

    .news-section { padding: 12px; }
    .news-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-box img { height: 100px; }
    .news-box h3  { font-size: 12px; min-height: 50px; padding: 8px; }

    .completedProjects { padding: 10px 30px 45px !important; }
    .completedProjects .project-box img  { height: 140px; }
    .completedProjects .project-box h3   { font-size: 13px !important; min-height: auto; padding: 8px; }
    .completedProjects .swiper-button-next,
    .completedProjects .swiper-button-prev { width: 32px !important; height: 32px !important; }
    .completedProjects .swiper-button-next::after,
    .completedProjects .swiper-button-prev::after { font-size: 14px !important; }

    .double-sections { flex-direction: column !important; gap: 12px; }
    .half-section { min-width: unset !important; width: 100% !important; padding: 12px !important; box-sizing: border-box; }

    .training-vertical-slider { height: 240px; }
    .training-img-box img { width: 75px !important; height: 56px !important; }
    .training-overlay h3 { font-size: 12px; }

    /* المشاريع الحالية - موبايل */
    .ongoing-projects .projects-slider {
        grid-template-columns: 1fr !important;
    }
    .ongoing-projects .project-image-slider { height: 180px !important; }
    .ongoing-projects .project-box h3 { font-size: 12px !important; }

    .services-section-wrap { margin-top: 16px; }
    .services-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; flex-wrap: unset !important; gap: 10px; }
    .service-card { flex: unset !important; width: 100% !important; padding: 14px 8px 10px !important; }
    .service-card h3 { font-size: 12px !important; }
    .svc-icon { width: 44px !important; height: 44px !important; font-size: 17px !important; }

    .floating-tools { display: none !important; }

    .footer-container { padding: 20px 12px !important; flex-direction: column; }
    .footer-box { width: 100% !important; }
    .footer-links-grid { flex-direction: column; }
    .footer-links-divider { display: none; }
    .footer-bottom { flex-direction: column !important; gap: 8px; text-align: center; padding: 10px !important; font-size: 12px; }

    .post-container { margin: 10px !important; padding: 16px !important; }
    .post-title      { font-size: 22px !important; }
    .post-content    { font-size: 16px !important; }
    .post-meta       { flex-direction: column; gap: 4px; }
    .hero-header { height:auto  !important;}
    .hero-overlay h1 { font-size: 18px; }
    .hero-overlay p  { font-size: 13px; }
}

@media (max-width: 600px) {
    .news-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 400px) {
    .navbar ul li a,
    .main-menu li a { font-size: 11px !important; padding: 4px 5px !important; }
    .logo-area img { width: 42px; height: 42px; }
    .logo-text h2  { font-size: 13px; }
    .slider { height: 150px !important; }
    .service-card h3 { font-size: 11px !important; }
    .svc-icon { width: 38px !important; height: 38px !important; font-size: 15px !important; }
    .completedProjects { padding: 8px 24px 40px !important; }
}

/* =====================
   إصلاح آخر الأخبار — لابتوب
   ===================== */
.news-section {
    box-sizing: border-box;
}

#newsSliderWrap {
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 290px;
    box-sizing: border-box;
}

.news-track {
    position: relative;
    width: 100%;
    display: block;
    will-change: unset;
    min-height: 290px;
}

.news-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(60px);
    pointer-events: none;
    box-sizing: border-box;
}

.news-row.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: absolute;
}

.news-row.incoming {
    animation: rowSlideIn 0.7s ease forwards;
    pointer-events: none;
}

.news-row.leaving {
    animation: rowSlideOut 0.7s ease forwards;
    pointer-events: none;
}

@keyframes rowSlideIn {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes rowSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-60px); }
}

.news-box {
    width: 100% !important;
    min-width: unset !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.news-box-empty {
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 992px) {
    .news-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #newsSliderWrap, .news-track { min-height: 320px; }
}

@media (max-width: 600px) {
    .news-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #newsSliderWrap, .news-track { min-height: 360px; }
}

/* =====================
   إصلاح الموبايل النهائي
   ===================== */
@media (max-width: 768px) {

    .header-container {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .slider {
        height: auto !important;
        min-height: unset !important;
        margin-bottom: 10px;
    }

    .slides {
        height: auto !important;
        min-height: unset !important;
    }

    .slide-item {
        position: relative !important;
        height: auto !important;
        opacity: 1 !important;
    }

    .slide-item:not(.active) {
        display: none !important;
    }

    .slide-img {
        width: 100% !important;
        height: 180px !important;
        object-fit: cover !important;
        display: block !important;
    }

    #newsSliderWrap {
        min-height: unset !important;
    }

    .news-track {
        min-height: unset !important;
    }

    .news-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        min-height: unset !important;
    }

    .news-box-empty {
        display: none !important;
    }
}

/* =====================
   إصلاح ارتفاع آخر الأخبار
   ===================== */
#newsSliderWrap,
.news-track {
    min-height: 250px !important;
}

@media (max-width: 992px) {
    #newsSliderWrap,
    .news-track {
        min-height: 360px !important;
    }
}

@media (max-width: 768px) {
    #newsSliderWrap,
    .news-track {
        min-height: 420px !important;
    }

    .news-box-empty {
        display: none !important;
    }
}

@media (max-width: 480px) {
    #newsSliderWrap,
    .news-track {
        min-height: 480px !important;
    }
}

/* =====================
   إصلاح فراغ الموبايل بعد الهيدر
   ===================== */
@media (max-width: 768px) {

    .header-container {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .main-header {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .page-wrapper {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .breaking-news {
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }

    .slider {
        margin-top: 4px !important;
        margin-bottom: 8px !important;
    }

    .slides {
        padding: 0 !important;
        margin: 0 !important;
    }

    .slide-item.active {
        position: relative !important;
        opacity: 1 !important;
        height: auto !important;
    }

    .slide-item:not(.active) {
        display: none !important;
    }

    .slide-img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        display: block !important;
    }
}

/* =====================
   إصلاح الخريطة والمنيو - موبايل
   ===================== */
@media (max-width: 768px) {

    .map-section {
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        right: 0 !important;
        left: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .map-section iframe {
        width: 100vw !important;
        height: 250px !important;
        display: block !important;
        border: 0 !important;
    }

    .navbar,
    .main-header,
    .header-container {
        transform: none !important;
        position: relative !important;
        right: auto !important;
        left: auto !important;
    }
}

/* =====================
   خريطة الموقع
   ===================== */
.map-section {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    line-height: 0;
}

.map-section iframe {
    display: block;
    width: 100%;
    height: 450px;
    border: 0;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .map-section iframe {
        height: 250px;
    }
}

.map-section {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}

/* =====================
   منيو الموبايل - إصلاح نهائي
   ===================== */
@media (max-width: 768px) {

    .main-header {
        padding: 8px !important;
        gap: 6px;
    }

    .logo-area {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }

    .navbar ul,
    .main-menu {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
        width: 100% !important;
        flex-wrap: unset !important;
    }

    .navbar ul li,
    .main-menu > li {
        width: 100%;
    }

    .navbar ul li a,
    .main-menu li a {
        display: block !important;
        text-align: center !important;
        font-size: 12px !important;
        padding: 7px 4px !important;
        background: #f4f6fb;
        border: 1px solid #dce2f0;
        border-radius: 6px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar ul li a:hover,
    .main-menu li a:hover {
        background: #fff8ec;
        border-color: #c8a63a;
        color: #c8a63a !important;
    }

    .menu-search {
        width: 100%;
        margin-top: 4px;
    }

    .menu-search input {
        width: calc(100% - 42px) !important;
        height: 34px;
        font-size: 13px;
    }

    .menu-search button {
        height: 34px;
        width: 42px;
    }

    .main-menu li ul,
    .main-menu li .sub-menu,
    .dropdown-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {

    .navbar {
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 6px !important;
        align-items: stretch !important;
        overflow: visible !important;
    }

    .navbar ul,
    .main-menu {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
        width: 100% !important;
        flex-wrap: unset !important;
        flex-direction: unset !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .navbar ul li,
    .main-menu > li {
        width: 100% !important;
        white-space: normal !important;
        position: static !important;
    }

    .navbar ul li a,
    .main-menu > li > a {
        display: block !important;
        text-align: center !important;
        font-size: 12px !important;
        padding: 8px 4px !important;
        background: #f4f6fb !important;
        border: 1px solid #dce2f0 !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #111 !important;
    }

    .menu-search {
        width: 100% !important;
        margin-top: 4px !important;
        display: flex !important;
    }

    .menu-search input {
        width: calc(100% - 42px) !important;
        height: 34px !important;
        font-size: 13px !important;
    }

    .menu-search button {
        height: 34px !important;
        width: 42px !important;
    }
}

@media (max-width:768px){

    .has-dropdown{
        position: relative !important;
    }

    .sub-menu{
        display: none;
        position: absolute !important;
        top: 100%;
        left: 0;
        right: auto;
        width: max-content;
        min-width: 180px;
        background: #fff;
        border: 1px solid #dce2f0;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,.15);
        z-index: 9999;
    }

    .has-dropdown.open > .sub-menu{
        display: block !important;
    }
}

/* =============================================================
   CSP Compliant Utility Classes (Refactored from inline styles)
   ============================================================= */

/* Form & Field Utilities */
.form-field-compact {
    margin-bottom: 0;
}

.form-hidden {
    display: none;
}

.form-inline {
    display: inline;
}

.form-bordered-box {
    border: 1px solid #ccc;
    padding: 15px;
    margin: 15px;
}

.input-bordered-rounded {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.input-full-width {
    width: 100%;
    padding: 10px;
}

.textarea-full-height {
    width: 100%;
    height: 200px;
}

/* Card & Section Utilities */
.card-header-dot-purple {
    background: #7c3aed;
}

.card-header-dot-green {
    background: #22c55e;
}

.card-header-dot-amber {
    background: #f59e0b;
}

.card-header-dot-pink {
    background: #ec4899;
}

.card-spacing-lg {
    margin-bottom: 22px;
}

.card-spacing-md {
    margin-bottom: 18px;
}

.section-centered-spacing {
    text-align: center;
    margin-bottom: 20px;
}

.alert-success-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-success-spacing {
    background: #d1e7dd;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* Icon & Color Utilities */
.icon-drag-color {
    color: #c9a84c;
}

.icon-file-color {
    color: #1d4ed8;
}

.icon-facebook-color {
    color: #1877f2;
}

.icon-whatsapp-color {
    color: #25d366;
}

.icon-secondary {
    font-size: 22px;
    opacity: 0.7;
    vertical-align: -2px;
    margin-left: 6px;
}

.icon-small {
    font-size: 14px;
}

.icon-large-muted {
    font-size: 50px;
    color: #ddd;
}

.text-muted-secondary {
    color: #94a3b8;
}

.text-muted-light {
    color: #94a3b8;
    font-weight: 400;
}

.text-success {
    color: green;
}

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

.small-text-secondary {
    color: #888;
    margin-top: 5px;
}

.status-badge-dynamic {
    /* Dynamic background applied via inline style for status color */
}

/* Table Column Width Utilities */
.table-col-checkbox {
    width: 40px;
}

.table-col-number {
    width: 60px;
}

.table-col-icon {
    width: 60px;
}

.table-col-date {
    width: 160px;
}

.table-col-image {
    width: 70px;
}

.table-col-actions {
    width: 180px;
}

.table-col-actions-wide {
    width: 200px;
}

.table-col-status {
    width: 120px;
}

/* Button & Layout Utilities */
.btn-submit-full {
    width: 100%;
    justify-content: center;
    padding: 14px;
}

.btn-success-small {
    background: #28a745;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}

.btn-warning-small {
    background: #ffc107;
    color: #000;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}

.btn-danger-small {
    background: #dc3545;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}

/* Display & Layout Utilities */
.flex-items-center-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.flex-gap-small {
    display: flex;
    gap: 8px;
}

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

.grid-auto-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.grid-full-width {
    grid-column: 1 / -1;
}

.relative-position {
    position: relative;
}

.image-placeholder-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.image-preview-hidden {
    display: none;
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
}

.title-no-margin {
    margin: 0;
}

/* Spacing & Margin Utilities */
.mt-large {
    margin-top: 20px;
}

.mt-xlarge {
    margin-top: 25px;
}

.label-block {
    display: block;
    margin-bottom: 10px;
}

.label-bold-dark {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #555;
}

/* Text Alignment Utilities */
.navbar-dynamic-align {
    /* Dynamic text-align applied via inline style */
}

.page-wrapper-dynamic-align {
    /* Dynamic text-align applied via inline style */
}

/* Badge Utilities */
.badge-draft {
    background: #f39c12;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
}

@media (max-width: 1300px) {
    .navbar,
    .navbar ul,
    .main-menu {
        flex-wrap: wrap !important;
    }
}

.main-header,
.navbar,
.main-menu {
    box-sizing: border-box;
    max-width: 100%;
}

/* إزالة أي فراغ بين الصورة الرئيسية والمنيو */
.hero-header,
.hero-header img,
.header-container,
.main-header,
.navbar {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.hero-header {
    line-height: 0 !important;
    display: block !important;
}

/* =====================
   الخدمات الإلكترونية - إصلاح الحجم
   ===================== */
.services-section-wrap {
    margin-bottom: 40px !important;
}

.services-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 16px !important;
}

.service-card {
    flex: 0 0 auto !important;
    width: 160px !important;
    min-width: unset !important;
    max-width: 160px !important;
    padding: 24px 12px 18px !important;
    box-sizing: border-box !important;
}

.service-card h3 {
    font-size: 13px !important;
}

@media (max-width: 768px) {
    .services-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }

    .service-card {
        width: 100% !important;
        max-width: none !important;
    }
}

.service-card {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.service-card-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    width: 100% !important;
    gap: 10px !important;
}

/* =====================
   الاعلانات
   ===================== */
.breaking-content {
    overflow: hidden;
    flex: 1;
    padding: 0 15px;
}



.breaking-track:hover {
    animation-play-state: paused;
}

.breaking-item {
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
}

.breaking-item a {
    color: #000000;
    font-weight: bold;
    text-decoration: none;
}

.breaking-sep {
    color: #c9a84c;
    margin: 0 10px;
}

.breaking-content {
    overflow: hidden;
    flex: 1;
    padding: 0 15px;
    direction: ltr; /* ← مهم جداً */
}

.breaking-track {
    display: inline-flex;
    white-space: nowrap;
    animation: marquee-scroll 40s linear infinite;
}

.breaking-copy {
    display: inline-flex;
    align-items: center;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.navbar ul li a,
.main-menu li a {
    text-decoration: none;
    color: #111;
    padding: 8px 9px;
    font-size: 16px !important;
    display: block;
    border-radius: 5px;
    transition: color 0.25s;
    font-weight: bold !important;
}

/* القائمة */
.dropdown-menu {
    z-index: 9999 !important;
}.scbtn-edit {
    flex:1;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px;
    background: #eff6ff; color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    font-size: 13px; font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer; transition: 0.25s;
}
.scbtn-edit:hover { background: #1d4ed8; color: #fff; }
.scbtn-delete { flex:1; }

/* Modal */
.modal-overlay {
    display:none; position:fixed; inset:0;
    background:rgba(0,0,0,0.55); z-index:9999;
    align-items:center; justify-content:center;
}
.modal-overlay.active { display:flex; }
.modal-box {
    background:#fff; border-radius:18px;
    padding:28px 32px; width:100%; max-width:480px;
    box-shadow:0 20px 60px rgba(0,0,0,0.25);
    direction:rtl; font-family:'Cairo',sans-serif;
    position:relative;
}
.modal-title {
    font-size:18px; font-weight:800; color:#1a3a6b;
    margin-bottom:20px;
    display:flex; align-items:center; gap:8px;
}
.modal-title i { color:#c9a84c; }
.modal-preview {
    width:100%; height:180px; object-fit:cover;
    border-radius:10px; margin-bottom:16px;
    border:1px solid #e2e8f0;
}
.modal-label { font-size:13px; font-weight:600; color:#475569; margin-bottom:5px; display:block; }
.modal-input {
    width:100%; padding:10px 14px;
    border:1px solid #d1d9e6; border-radius:10px;
    font-family:'Cairo',sans-serif; font-size:14px;
    margin-bottom:14px; outline:none; transition:0.25s;
}
.modal-input:focus { border-color:#c9a84c; box-shadow:0 0 0 3px rgba(201,168,76,0.15); }
.modal-file {
    width:100%; padding:9px 12px;
    border:1px dashed #c9a84c; border-radius:10px;
    font-family:'Cairo',sans-serif; font-size:13px;
    background:#fffdf5; cursor:pointer; margin-bottom:18px;
}
.modal-actions { display:flex; gap:10px; }
.modal-save {
    flex:1; padding:11px;
    background:linear-gradient(135deg,#c9a84c,#f0c755);
    color:#0f2544; border:none; border-radius:10px;
    font-size:14px; font-weight:700;
    font-family:'Cairo',sans-serif; cursor:pointer; transition:0.3s;
}
.modal-save:hover { transform:translateY(-2px); box-shadow:0 8px 25px rgba(201,168,76,0.5); }
.modal-cancel {
    flex:1; padding:11px;
    background:#f1f5f9; color:#64748b;
    border:1px solid #e2e8f0; border-radius:10px;
    font-size:14px; font-weight:600;
    font-family:'Cairo',sans-serif; cursor:pointer; transition:0.3s;
}
.modal-cancel:hover { background:#e2e8f0; }
.modal-close {
    position:absolute; top:14px; left:14px;
    width:30px; height:30px; border-radius:50%;
    background:#f1f5f9; border:none; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    color:#64748b; font-size:14px; transition:0.2s;
}
.modal-close:hover { background:#e2e8f0; }





.slide-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    overflow: hidden;
}

.slide-item.active {
    opacity: 1;
    position: absolute; /* يبقى absolute */
}

section.slider {
    position: relative;
    overflow: hidden;
    height: 450px; /* ← حدد ارتفاع ثابت */
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.slide-caption {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-align: right;
    direction: rtl;
    z-index: 2;
    border-radius: 8px;
    backdrop-filter: blur(2px);
    max-width: 300px;
}

.banner-head {
    position: relative;
    width: 100%;
    height: 80px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.banner-wave {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.banner-title {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #ffffff;
    font-weight: 700;
    font-size: 26px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
    .banner-head { height: 100px; }
    .banner-title { font-size: 20px; }
}

.lang-form{
    display:inline-block;
    margin:0;
}
.lang-toggle-btn{
    padding:5px 14px;
    min-width:90px;
    height:32px;
    font-size:14px;
        margin-top:6px;

}

.lang-toggle-btn i{
    font-size:15px;
    
}

/* عند مرور الماوس */
.lang-toggle-btn:hover{
    background:#d4af37;      /* ذهبي */
    border-color:#d4af37;
    color:#fff;
}

.lang-toggle-btn:hover i{
    color:#fff;
}

.lang-toggle-btn:focus{
    outline:none;
    box-shadow:0 0 0 3px rgba(13,110,253,.15);
}
.lang-form {
    display: inline;
}.page-wrapper {
    text-align: right;
}

html[dir="ltr"] .page-wrapper {
    text-align: left;
}/* =========================================================
   NEWS SLIDER
   CSP SAFE
   لا يستخدم inline style
   ========================================================= */

.news-slider-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* =========================================================
   Track
   ========================================================= */

.news-track {
    position: relative;
    width: 100%;
}

/* =========================================================
   الصفوف
   ========================================================= */

.news-row {
    position: absolute;
    inset: 0;
    width: 100%;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(25px);
}

/* الصف الأول */
.news-row.active {
    position: relative;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}

/* =========================================================
   الصف الخارج
   ========================================================= */

.news-row.leaving {
    animation: newsRowLeave 0.55s ease forwards;
}

/* =========================================================
   الصف الداخل
   ========================================================= */

.news-row.incoming {
    position: absolute;

    opacity: 0;
    visibility: visible;
    pointer-events: none;

    animation: newsRowEnter 0.55s ease forwards;
}

/* =========================================================
   حركات السلايدر
   ========================================================= */

@keyframes newsRowLeave {

    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-25px);
    }
}

@keyframes newsRowEnter {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   الخبر
   ========================================================= */

.news-box {
    min-width: 0;
    width: 100%;
}

.news-box-empty {
    visibility: hidden;
    pointer-events: none;
}

/* =========================================================
   النقاط
   ========================================================= */

.news-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;

    margin-top: 18px;
}

.news-dot {
    width: 10px;
    height: 10px;

    padding: 0;
    border: 0;
    border-radius: 50%;

    cursor: pointer;

    opacity: 0.5;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.news-dot:hover {
    opacity: 0.8;
}

.news-dot.active {
    opacity: 1;
    transform: scale(1.25);
}

/* =========================================================
   RTL
   ========================================================= */

html[dir="rtl"] .news-row {
    direction: rtl;
}

html[dir="ltr"] .news-row {
    direction: ltr;
}

/* =========================================================
   الأجهزة اللوحية
   ========================================================= */

@media (max-width: 992px) {

    .news-row {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   الهاتف
   ========================================================= */

@media (max-width: 600px) {

    .news-row {
        grid-template-columns:
            repeat(1, minmax(0, 1fr));
    }

    .news-dots {
        margin-top: 14px;
    }
}

/* =========================================================
   تقليل الحركة
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .news-row.leaving,
    .news-row.incoming {
        animation: none;
    }

    .news-dot {
        transition: none;
    }
}