/* ================== style.css ================== */

/* ================== الستايلات الأساسية ================== */
/* إضافة box-sizing للجميع */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    direction: rtl;
    margin: 0;
    padding: 0;
    background: #f4f6fa;
    overflow-x: hidden;
}

/* ================== الهيدر والبنر ================== */
header {
    background: linear-gradient(90deg, #e3eafc 0%, #f4f6fa 100%);
    box-shadow: 0 2px 12px #e3eafc;
    padding-bottom: 0;
}




/**************************************************************/
.main-banner {
    width: 100%;
    height: 119px;
    min-height: 119px;
    max-height: 119px;
    background: linear-gradient(90deg, #1976d2 0%, #e3eafc 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    overflow: hidden;
    min-width: 0;
    max-width: 100vw;
}

.main-banner img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    flex-shrink: 0;
}

.main-banner > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.main-banner h1 {
    color: #fff;
    font-family: 'Cairo', Tahoma, sans-serif;
    font-size: 3.25rem;
    margin: 0 0 2px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #1976d2;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-banner h1 i {
    color: #ffeb3b;
}

.main-banner > div > div {
    color: #e3eafc;
    font-size: 0.95rem;
    font-family: 'Cairo', Tahoma, sans-serif;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-banner span {
    color: #ffeb3b;
    font-weight: bold;
}




/**************************************************************/
/* ================== شريط القوائم ================== */

.nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #005599;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav ul li {
    margin: 0;
}

.nav ul li a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.nav ul li a:hover {
    background: #0077cc;
}

/* ====== Responsive Navbar ====== */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #fff;
    position: absolute;
    right: 18px;
    top: 10px;
    z-index: 2001;
    cursor: pointer;
}

@media (max-width: 900px) {
    .nav ul {
        display: none;
        flex-direction: column;
        background: #1976d2;
        position: absolute;
        top: 100%;
        right: 0;
        width: 100vw;
        box-shadow: 0 8px 32px #b3c6e6;
        padding: 0;
        margin: 0;
        z-index: 2000;
    }
    .nav ul.active {
        display: flex;
    }
    .nav ul li {
        width: 100%;
        text-align: right;
        border-bottom: 1px solid #e3eafc;
    }
    .nav ul li a {
        padding: 16px 24px;
        font-size: 1.15rem;
        color: #fff;
        background: none;
    }
    .nav ul li a:hover {
        background: #005599;
    }
    .nav-toggle {
        display: block;
    }
}

@media (max-width: 600px) {
    .nav ul li a {
        font-size: 1rem;
        padding: 14px 12px;
    }
    .nav-toggle {
        font-size: 2rem;
        right: 10px;
    }
}

/* ================== شريط الأخبار ================== */
.news-ticker {
    overflow: hidden;
    background-color: #cfcdce;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 10px;
    position: relative;
}

.news-ticker .scrolling {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    animation: scroll-right 80s linear infinite;
}

.news-ticker:hover .scrolling {
    animation-play-state: paused;
}

.news-ticker img.news-logo {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin: 0 15px;
    filter: opacity(0.7);
}

.news-ticker a {
    margin: 0 30px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
}

@keyframes scroll-right {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ================== تخطيط الصفحة الرئيسية ================== */
.page-content {
    margin-top: 180px;
    padding: 20px;
}

.page-layout {
    display: flex;
    margin: 0 auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.main-content-area {
    flex: 2;
    background: #ffffff;
}

.main-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

/* ================== قائمة الأخبار ================== */
/* شبكة الأخبار بعمودين */
/* إعادة ستايل post-box والعناصر كما في الموقع العام */
.news-section {
    padding: 5px;
}

.news-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 8px;
}

.news-list-rows {
    display: flex;
    flex-direction: column;
    /*gap: 5px;*/
}

.news-item {
    display: flex;
    gap: 10px;
    border-radius: 3px;
    align-items: flex-start;
    margin-bottom: 10px;
    height: 200px;
    width: 100%;
}

.news-image {
    flex-shrink: 0;
    width: 450px;
    height: 100%;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

/* العرض الثابت اختياري إذا تحب تنظّم الشكل */
.news-image {
    flex-shrink: 0;
    width: 400px;
    height: 200px;
}

/* محتوى النص */
.news-content {
    flex-grow: 1;
}

.news-heading {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.news-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.news-excerpt {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-readmore {
    font-size: 0.9rem;
    color: #1976d2;
    text-decoration: none;
    font-weight: bold;
}
.news-readmore:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
    }
}


/* ================== الشريط الجانبي ================== */
.sidebar-right-sidebar {
    flex: 1 0 110px !important;
    background: #ffffff;
    padding: 1px;
    border-radius: 0;
    border-left: 0.01rex solid #0000002d;
    height: 1300px;
    width: 130px !important;
    min-width: 110px !important;
    max-width: 130px !important;
}
.sidebar-left-sidebar {
    flex: 1 0 110px !important;
    background: #ffffff;
    padding: 1px;
    border-radius: 0;
    border-right: 0.01rex solid #0000002d;
    height: 1300px;
    width: 130px !important;
    min-width: 110px !important;
    max-width: 130px !important;
}





/* ==== الفوتر الأساسي ==== */
footer {
    background: linear-gradient(90deg, #e3eafc 0%, #f4f6fa 100%);
    color: #003366;
    padding: 5px 5px 5px;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    font-size: 1.1rem;
    margin-top: 0px;
    box-shadow: 0 -2px 12px #e3eafc;
}

/* ==== توزيع الأعمدة ==== */
.footer-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
    direction: rtl;
}

/* ==== الأعمدة الثلاثة ==== */
.footer-flex-container > div {
    flex: 1 1 30%;
    min-width: 260px;
}

/* ==== عمود المواقع المهمة ==== */
.important-links-vertical h3,
.footer-contact-info h3,
.footer-map h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #003366;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 6px;
    text-align: center;
}

.important-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.important-links-list li {
    margin: 8px 0;
}

.important-links-list a {
    text-decoration: none;
    color: #003366;
    transition: color 0.3s;
}

.important-links-list a:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* ==== عمود التواصل ==== */
.footer-contact-info .info {
    margin: 10px 0;
    color: #222;
    line-height: 1.6;
    font-weight: 500;
}

.footer-contact-info .fa {
    margin-left: 7px;
    color: #1976d2;
}

.footer-contact-info .social-links {
    margin-top: 12px;
    text-align: center;
}

.footer-contact-info .social-links a {
    display: inline-block;
    margin: 0 6px;
    color: #1976d2;
    font-size: 1.4em;
    transition: color 0.2s;
}

.footer-contact-info .social-links a:hover {
    color: #003366;
}

/* ==== عمود الخريطة ==== */
.footer-map iframe {
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1);
}

/* ==== حقوق النشر ==== */
footer span,
.footer-copyright {
    display: block;
    margin-top: 24px;
    text-align: center;
    font-size: 0.95rem;
    color: #666;
    letter-spacing: 0.5px;
}

/* ==== استجابة الشاشات الصغيرة ==== */
@media (max-width: 900px) {
    .footer-flex-container {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-flex-container > div {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .footer-map iframe {
        height: 140px;
    }
}

/* ================== الستايلات القديمة المحتفظ بها ================== */
.container {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
}

.main-content {
    flex: 2;
    padding: 10px;
}

.d1 {
    padding: 1px;
    width: 100px;
    height: auto;
}

.d2 {
    padding: 1px;
    width: 100px;
    height: auto;
}

.video-box img,
.photo-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 5px;
}

.ad-box {
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.banner {
    width: 100%;
    overflow: hidden;
    background-color: #ddd;
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
    border-bottom: 2px solid #ccc;
}

.h1 {
    color: #fff;
    font-family: 'Cairo';
    font-size: 3.25rem;
    margin: 0 0 2px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #1976d2;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.side-widget {
    width: 7cm;
    background: #f4f6fa;
    box-shadow: 0 0 8px #e3eafc;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.right-widget {
    border-left: 2px solid #e3eafc;
}

.widget-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget-item h3 {
    color: #1976d2;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.widget-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ================== صفحة التواصل ================== */
.contact-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 18px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.contact-container {
    max-width: 800px;
    margin: auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.contact-container h1 {
    text-align: center;
    color: #333;
}

.contact-container .info {
    margin-bottom: 20px;
}

.contact-container .info p {
    font-size: 18px;
    margin: 5px 0;
}

.contact-container .social-links {
    margin-top: 10px;
}

.contact-container .social-links a {
    display: inline-block;
    margin: 0 10px;
    font-size: 24px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-container .social-links a:hover {
    color: #007bff;
}

.contact-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 8px;
    margin-top: 20px;
}

/* ================== صفحة الإعلانات ================== */
.ads-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 100vw;
    overflow-x: hidden;
}

.ad-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px #e3eafc;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ad-card:hover {
    box-shadow: 0 8px 32px #b3c6e6;
    transform: translateY(-3px) scale(1.02);
}

.ad-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.ad-card .ad-content {
    padding: 20px;
}

.ad-card h3 {
    color: #1976d2;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.ad-card p {
    color: #666;
    line-height: 1.6;
}

/* ================== صفحة الخدمات ================== */
.services-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 100vw;
    overflow-x: hidden;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px #e3eafc;
    padding: 30px;
    text-align: right;
    transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
    box-shadow: 0 8px 32px #b3c6e6;
    transform: translateY(-3px) scale(1.02);
}

.service-card h3 {
    color: #1976d2;
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.service-card ul {
    margin: 18px 0 0 0;
    padding-right: 22px;
    color: #666;
    line-height: 1.8;
}

.service-card li {
    margin-bottom: 8px;
}

/* ================== صفحة المشاريع ================== */
.projects-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 100vw;
    overflow-x: hidden;
}

.project-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px #e3eafc;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
    box-shadow: 0 8px 32px #b3c6e6;
    transform: translateY(-3px) scale(1.02);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card .project-content {
    padding: 20px;
}

.project-card h3 {
    color: #1976d2;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-card .project-type {
    display: inline-block;
    background: #1976d2;
    color: #fff;
    padding: 4px 18px;
    border-radius: 7px;
    font-size: 1.08rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 0 28px 0;
}

.projects-filter-btn {
    background: #e3eafc;
    color: #1976d2;
    border: none;
    border-radius: 7px;
    padding: 10px 28px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    outline: none;
}

.projects-filter-btn.active,
.projects-filter-btn:hover {
    background: #1976d2;
    color: #fff;
}

.details-btn {
    margin-top: 0;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 22px;
    font-size: 1.08rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-block;
    order: 1;
}
.details-btn:hover {
    background: #0d47a1;
}

/* ================== صفحة المكتبة الصورية ================== */
.gallery-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    max-width: 100vw;
    overflow-x: hidden;
}

.gallery-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px #e3eafc;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.gallery-item:hover {
    box-shadow: 0 8px 32px #b3c6e6;
    transform: translateY(-3px) scale(1.02);
}

.gallery-item img {
    width: 400px;
    height: 200px;
    object-fit: cover;
}

.gallery-item .photo-info {
    padding: 15px;
    text-align: center;
}

.gallery-item h3 {
    color: #1976d2;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.gallery-item p {
    color: #666;
    font-size: 0.9rem;
}

/* ================== صفحة الفيديوهات ================== */
.videos-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 100vw;
    overflow-x: hidden;
}

.video-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px #e3eafc;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.video-card:hover {
    box-shadow: 0 8px 32px #b3c6e6;
    transform: translateY(-3px) scale(1.02);
}

.video-embed {
    width: 100%;
    aspect-ratio: 16/9;
    max-width: 100%;
    max-height: 100%;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-embed iframe,
.video-embed video {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: block;
}

/* ================== تحكم الفيديو ================== */
.custom-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-embed:hover .custom-controls {
    opacity: 1;
}

.custom-controls button,
.custom-controls input[type=range] {
    pointer-events: auto;
}

.custom-btn {
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    outline: none;
    backdrop-filter: blur(5px);
}

.custom-btn:hover {
    background: rgba(0,85,153,0.8);
    transform: scale(1.1);
}

.custom-btn svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.custom-volume {
    width: 80px;
    accent-color: #005599;
    margin: 0 8px;
    vertical-align: middle;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    height: 6px;
}

.custom-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.custom-play:hover {
    background: rgba(0,85,153,0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.custom-play svg {
    width: 40px;
    height: 40px;
    fill: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.video-card .video-content {
    padding: 20px;
}

.video-card h3 {
    color: #1976d2;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.video-card p {
    color: #666;
    line-height: 1.6;
}

.no-video {
    color: red;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.error-message {
    color: #a00;
    font-size: 20px;
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px #e3eafc;
    margin: 40px auto;
    max-width: 600px;
}

/* ================== صفحة التفاصيل ================== */
.details-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.details-card {
    max-width: 800px;
    margin: 0 auto 40px auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 18px #e3eafc;
    overflow: hidden;
}

.details-card img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.details-card .details-content {
    padding: 30px;
    text-align: right;
}

.details-card h2 {
    color: #1976d2;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.details-card .meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.details-card .content {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* ================== صفحة الهيكل التنظيمي ================== */
.org-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.org-note {
    color: #1976d2;
    font-size: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.org-chart {
    direction: ltr;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px #e3eafc;
    padding: 20px;
    margin-bottom: 50px;
    overflow-x: auto;
}

/* ================== صفحة الخبر ================== */
.post-title {
    text-align: center;
    color: #1976d2;
    font-size: 2.2rem;
    margin: 38px 0 28px 0;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #e3eafc;
}

.post-card {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 18px #e3eafc;
    overflow: hidden;
}

.post-card img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.post-card .post-content {
    padding: 30px;
    text-align: right;
}

.post-card h2 {
    color: #1976d2;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.post-card .meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.post-card .content {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* ================== الرسائل الفارغة ================== */
.no-content {
    text-align: center;
    width: 100%;
    color: #888;
    font-size: 18px;
    grid-column: 1/-1;
}
/*
/* ================== الاستجابة للشاشات الصغيرة ================== 
@media (max-width: 900px) {
    .page-layout {
        flex-direction: column;
    }
    .sidebar {
        order: -1;
    }
    
    .contact-title,
    .ads-title,
    .services-title,
    .projects-title,
    .gallery-title,
    .videos-title,
    .details-title,
    .org-title,
    .post-title {
        font-size: 1.3rem;
    }
    
    .contact-container {
        max-width: 99vw;
        padding: 12px 4vw;
    }
    
    .contact-container .info p {
        font-size: 1rem;
    }
    
    /* تحسينات الفيديو للشاشات الصغيرة 
    .custom-play {
        width: 60px;
        height: 60px;
    }
    
    .custom-play svg {
        width: 30px;
        height: 30px;
    }
    
    .custom-controls {
        padding: 0 8px;
        gap: 5px;
    }
    
    .custom-btn {
        width: 32px;
        height: 32px;
    }
    
    .custom-volume {
        width: 60px;
    }
}
*/
@media (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column;
        max-width: 100vw;
        padding: 0 2vw;
    }
    .side-widget {
        width: 100%;
        order: -1;
    }
}

/* ================== تصميم قائمة الفيديوهات الجديد ================== */
.videos-container {
    max-width: 100vw;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.video-item {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 600px;
    min-width: 0;
}

@media (max-width: 700px) {
    .video-item {
        flex-direction: column;
        max-width: 98vw;
        width: 100%;
        min-width: 0;
        height: auto !important;
    }
    .video-thumbnail, .video-player-inline {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 180px !important;
        min-height: 120px !important;
        max-height: 220px !important;
    }
    .video-info {
        padding: 12px 8px;
        text-align: right;
        direction: rtl;
        align-items: flex-end;
    }
}

.video-thumbnail {
    position: relative;
    width: 280px;
    height: 158px;
    flex-shrink: 0;
    background: #000;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
}

.video-item:hover .play-button {
    background: rgba(25, 118, 210, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info .video-meta {
    color: #666;
    font-size: 0.9rem;
    margin-top: 8px;
}

.video-info .video-meta i {
    margin-left: 8px;
    color: #1976d2;
}

.video-info .video-resolution {
    color: #888;
    font-size: 0.8rem;
    margin-right: 8px;
}

/* ================== تصميم الفيديو المكبر ================== */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
}

.video-modal video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ================== التصميم المتجاوب لقائمة الفيديوهات ================== */
@media (max-width: 768px) {
    .video-item {
        flex-direction: column;
    }
    
    .video-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .video-info {
        padding: 12px 16px;
    }
    
    .video-info h3 {
        font-size: 1.1rem;
    }
}
.video-modal-content {
    position: relative;
    background: #000;
    padding: 0; /* ازالة البادينغ */
    border-radius: 8px;
    max-width: 90vw;
    width: 90vw;
    max-height: calc(90vw * 9 / 16); /* ارتفاع حسب نسبة 16:9 */
    height: calc(90vw * 9 / 16);
    box-sizing: border-box;
    overflow: hidden;
}

.video-modal iframe,
.video-modal video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.center-news {
    margin: 0 auto;
    padding: 0;
    max-width: calc(100vw - 220px);
    min-width: 320px;
    width: 100%;
    box-sizing: border-box;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    justify-items: stretch;
    padding: 0;
    margin: 0;
}
@media (max-width: 900px) {
    .center-news {
        max-width: 100vw;
        padding: 0;
    }
    .news-list {
        grid-template-columns: 1fr;
    }
}

.post-box {
    background: #fff;
    border: 3px solid #1976d2;
    border-radius: 0;
    box-shadow: 0 2px 8px #e3eafc;
    margin: 0;
    padding: 0 0 10px 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.post-box img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px solid #1976d2;
}
.post-bottom-row {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    border-top: none;
    padding: 0 18px;
    margin-top: 8px;
    gap: 8px;
}
.post-title {
    color: #1976d2;
    font-size: 1.08rem;
    font-weight: bold;
    margin-right: 0;
    flex: 1 1 0;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    order: 2;
}
.details-btn {
    color: #111;
    background: none;
    border: none;
    border-left: 3px solid #111;
    font-weight: bold;
    font-size: 1rem;
    margin-left: 8px;
    padding: 6px 14px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
    min-width: 90px;
    text-align: left;
    order: 1;
}
.details-btn:hover {
    color: #1976d2;
    border-left-color: #1976d2;
}
.post-title {
    order: 1;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.image-modal-content {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 4px 32px #000a;
    background: #fff;
    object-fit: contain;
    transition: transform 0.25s cubic-bezier(.4,2,.6,1);
}
.image-modal-close {
    position: absolute;
    top: 24px;
    left: 24px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.image-modal-close:hover {
    background: rgba(0,0,0,0.6);
}

/* ================== حقل البحث ================== */

.search-container {
    position:relative;
    display: inline-block;
  /*  justify-content: space-between;*/
}

.search-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
}

.search-input {
    width: 100%;
    max-width: 120px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 0 6px 6px 0;
    font-size: 16px;
    direction: rtl;
    margin-right: -1px;
    background: #fff;
    color: #000;
}

.search-button {
    padding: 7px 12px;
    background: #218838;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s;
}

.search-button svg {
    transition: transform 0.6s;
}

.search-button:hover svg {
    transform: scale(1.1);
}

.search-container:hover .search-input,
.search-input:focus {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


  .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 1px;
    flex-wrap: wrap;
    gap: 1px;

    background: #005599;
    box-shadow: 0 2px 8px #b3c6e6;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1000;
    width: 100%;
}


.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-right: 10px; /* ✅ تبعد القوائم عن حافة اليمين */
}

.nav-list li a {
    text-decoration: none;
    color: #000;
    font-size:30x;
}

.search-container {
    margin-left: 0;
}

.sidebar-post-box {
  width: 100%;
  max-width: 100%;
  max-height: 1cm;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  margin: 1px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  
}
.sidebar-post-img {
  width: 100%;
  max-height: 4cm;
  object-fit: cover;
  display: block;
  border-radius: 0px;
}
.sidebar-post-content {
  padding: 5px 5px 5px 5px;
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sidebar-post-excerpt {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
  max-height: 3.2cm;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  margin-bottom: 10px;
}
.sidebar-post-more {
  background: #fff;
  color: #1976d2;
  border: none;
  border-radius: 2px;
  padding: 6px 18px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.2s, color 0.2s;
}
.sidebar-post-more:hover {
    text-decoration: underline;
}

.nav-list-search {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  justify-content: space-between;
}
.nav-list-search ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}
.nav-list-search .search-container  {
  margin-right: 18px;
  margin-left: 0;
  min-width: 180px;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .nav-list-search {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list-search .search-container {
    margin: 10px 0 0 0;
    width: 100%;
    min-width: 0;
  }
}

/* === Dropdown (شاشات كبيرة) === */
.nav-list-search ul li.dropdown {
    position: relative;
}
.nav-list-search ul li.dropdown > a:after {
    content: "\25BC"; /* سهم للأسفل */
    font-size: 0.7em;
    margin-right: 6px;
    margin-left: 3px;
    vertical-align: middle;
}
.nav-list-search ul li .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 6px;
    z-index: 1000;
    padding: 8px 0 0 0;
    margin-top: 0;
    text-align: right;
}
.nav-list-search ul li .dropdown-menu li {
    border-bottom: 1px solid #eee;
}
.nav-list-search ul li .dropdown-menu li:last-child {
    border-bottom: none;
}
.nav-list-search ul li .dropdown-menu a {
    color: #222;
    padding: 12px 18px;
    display: block;
    text-decoration: none;
    transition: background 0.2s;
}
.nav-list-search ul li .dropdown-menu a:hover {
    background: #f2f2f2;
}
.nav-list-search ul li.dropdown:hover > .dropdown-menu {
    display: block;
}

/* === Dropdown (موبايل) === */
.mobile-nav li.dropdown-mobile {
    position: relative;
}
.mobile-nav li.dropdown-mobile > a:after {
    content: "\25BC";
    font-size: 0.7em;
    margin-right: 6px;
    margin-left: 3px;
    vertical-align: middle;
}
.mobile-nav li .dropdown-menu-mobile {
    display: none;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 0 10px 10px 10px;
    padding: 0;
    text-align: right;
    position: static;
}
.mobile-nav li .dropdown-menu-mobile li {
    border-bottom: 1px solid #eee;
}
.mobile-nav li .dropdown-menu-mobile li:last-child {
    border-bottom: none;
}
.mobile-nav li .dropdown-menu-mobile a {
    color: #222;
    padding: 12px 18px;
    display: block;
    text-decoration: none;
    transition: background 0.2s;
}
.mobile-nav li .dropdown-menu-mobile a:hover {
    background: #f2f2f2;
}
.mobile-nav li.dropdown-mobile.open > .dropdown-menu-mobile {
    display: block;
}

/* دعم RTL */
.nav-list-search ul li .dropdown-menu,
.mobile-nav li .dropdown-menu-mobile {
    direction: rtl;
   
}

/* ================== تحسينات التجاوب مع الشاشات الصغيرة ================== */

/* إصلاح أساسي للشاشات الصغيرة */
@media (max-width: 768px) {
    /* إخفاء الأعمدة الجانبية */
    .sidebar-right-sidebar,
    .sidebar-left-sidebar {
        display: none !important;
    }
    
    /* جعل المحتوى الرئيسي يأخذ العرض الكامل */
    .main-content-area {
        flex: 1 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
    }
    
    /* تغيير تخطيط الصفحة إلى عمودي */
    .page-layout {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* تحسين قائمة الأخبار */
    .news-item {
        flex-direction: column !important;
        height: auto !important;
        margin-bottom: 15px !important;
        padding: 10px !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        background: #fff !important;
    }
    
    .news-image {
        width: 100% !important;
        height: 200px !important;
        margin-bottom: 10px !important;
    }
    
    .news-content {
        padding: 0 !important;
    }
    
    .news-heading {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    .news-excerpt {
        font-size: 0.9rem !important;
        margin-bottom: 10px !important;
    }
    
    .news-readmore {
        font-size: 0.85rem !important;
        padding: 8px 16px !important;
        background: #1976d2 !important;
        color: #fff !important;
        border-radius: 4px !important;
        display: inline-block !important;
        text-align: center !important;
        text-decoration: none !important;
    }
    
    /* تحسين البنر */
    .main-banner {
        height: 80px !important;
        min-height: 80px !important;
        max-height: 80px !important;
        padding: 0 15px !important;
    }
    
    .main-banner img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .main-banner h1 {
        font-size: 1.6rem !important;
    }
    
    /* تحسين القائمة */
    .nav-list-search {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 10px !important;
    }
    
    .nav-list-search ul {
        flex-direction: column !important;
        width: 100% !important;
        background: #fff !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        margin: 5px 0 !important;
    }
    
    .nav-list-search ul li {
        width: 100% !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .nav-list-search ul li:last-child {
        border-bottom: none !important;
    }
    
    .nav-list-search ul li a {
        padding: 15px 20px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        color: #333 !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        text-decoration: none !important;
    }
    
    .nav-list-search ul li a:hover,
    .nav-list-search ul li a:active {
        background-color: #f8f9fa !important;
        color: #1976d2 !important;
    }
    
    .nav-list-search ul li a i {
        width: 20px !important;
        text-align: center !important;
        color: #666 !important;
    }
    
    /* تحسين شريط البحث */
    .search-container {
        width: 100% !important;
        margin: 10px 0 !important;
    }
    
    .search-form {
        display: flex !important;
        width: 100% !important;
    }
    
    .search-input {
        flex: 1 !important;
        width: 100% !important;
        max-width: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        border-radius: 6px 0 0 6px !important;
        border: 1px solid #ccc !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
    }
    
    .search-button {
        border-radius: 0 6px 6px 0 !important;
        padding: 12px 15px !important;
        min-width: 50px !important;
        background: #218838 !important;
        border: 1px solid #218838 !important;
        border-right: none !important;
    }
    
    /* تحسين العناوين */
    .main-title {
        font-size: 1.5rem !important;
        margin: 8px 0 8px 0 !important;
    }
    
    /* تحسين الفوتر */
    footer {
        padding: 15px 0 !important;
        font-size: 1rem !important;
        margin-top: 30px !important;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .main-banner {
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        padding: 0 10px !important;
    }
    
    .main-banner img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .main-banner h1 {
        font-size: 1.4rem !important;
    }
    
    .page-content {
        margin-top: 140px !important;
        padding: 10px !important;
    }
    
    .news-item {
        padding: 8px !important;
        margin-bottom: 12px !important;
    }
    
    .news-image {
        height: 150px !important;
    }
    
    .news-heading {
        font-size: 0.95rem !important;
    }
    
    .news-excerpt {
        font-size: 0.85rem !important;
    }
    
    .nav-list-search ul li a {
        padding: 12px 15px !important;
        font-size: 15px !important;
    }
    
    .search-input,
    .search-button {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
    
    .main-title {
        font-size: 1.3rem !important;
    }
    
    footer {
        padding: 12px 0 !important;
        font-size: 0.9rem !important;
        margin-top: 20px !important;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .main-banner {
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
        padding: 0 8px !important;
    }
    
    .main-banner img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .main-banner h1 {
        font-size: 1.2rem !important;
    }
    
    .page-content {
        margin-top: 120px !important;
        padding: 5px !important;
    }
    
    .news-item {
        padding: 6px !important;
        margin-bottom: 10px !important;
    }
    
    .news-image {
        height: 120px !important;
    }
    
    .news-heading {
        font-size: 0.9rem !important;
    }
    
    .news-excerpt {
        font-size: 0.8rem !important;
    }
    
    .nav-list-search ul li a {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
    
    .main-title {
        font-size: 1.1rem !important;
    }
}

/* إصلاح القائمة المنسدلة */
@media (max-width: 900px) {
    .nav ul {
        display: none !important;
        flex-direction: column !important;
        background: #1976d2 !important;
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        width: 100vw !important;
        box-shadow: 0 8px 32px #b3c6e6 !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 2000 !important;
    }
    
    .nav ul.active {
        display: flex !important;
    }
    
    .nav ul li {
        width: 100% !important;
        text-align: right !important;
        border-bottom: 1px solid #e3eafc !important;
    }
    
    .nav ul li a {
        padding: 16px 24px !important;
        font-size: 1.15rem !important;
        color: #fff !important;
        background: none !important;
    }
    
    .nav ul li a:hover {
        background: #005599 !important;
    }
    
    .nav-toggle {
        display: block !important;
    }
}

