﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}


body {
    background: #fff;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

a {
    text-decoration: none; /* لإزالة الخط تحت الرابط */
    color: inherit;
}

.container {
    width: 85%;
    margin: 0 auto
}

hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 5px 0
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* ================= 1. Social ICON ========================== */
.social-icons {
    display: flex;
    gap: 10px;
}

    .social-icons a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background-color: #ddd;
        font-weight: 700; /* = bold (الافتراضي) */
        color: #333;
        text-decoration: none;
        font-size: 16px;
    }

        .social-icons a.facebook {
            background-color: #3b5998;
            color: #fff;
        }
        /* أزرق الفيسبوك */
        .social-icons a.twitter {
            background-color: #55acee;
            color: #fff;
        }
        /* أزرق تويتر */
        .social-icons a.instagram {
            background-color: #e1306c;
            color: #fff;
        }
        /* وردي انستجرام */

        .social-icons a:hover {
            opacity: 0.8;
        }


/* ================= 1. Header ========================== */
.header .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* يسمح بانتظام العناصر على عدة أسطر عند ضيق المساحة */
    padding: 8px 0;
    gap: 10px; /* مسافة مرنة بين العناصر */
}

.header .social-icons img {
    width: 24px;
    margin-left: 8px;
    cursor: pointer
}

.header .info {
    font-size: .9rem
}

    .header .info span, .header .info a {
        margin-left: 12px;
        color: #333;
        text-decoration: none
    }

.header .ads {
    flex: 1; /* يحتل المساحة المتبقية */
    margin: 0; /* إزالة الهوامش الثابتة */
    height: auto; /* يتكيف مع محتواه */
    max-height: 100px; /* لكن لا يزيد عن 100px */
    display: flex;
    align-items: center;
    justify-content: center;
}

    .header .ads img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.header .logo img {
    height: 60px;
    margin: 0; /* إزالة الهوامش الثابتة */
}

.header .row:nth-of-type(2) {
    gap: 20px
}

/* ترتيب أيقونات التواصل والمعلومات */
.header .social-icons,
.header .info {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ================= 2. Navbar ========================= */



nav {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

    nav ul {
        list-style: none;
        display: flex;
        gap: 15px;
        margin: 0;
        padding: 0;
    }

        nav ul li a {
            text-decoration: none;
            color: #333;
            font-weight: 700; /* = bold (الافتراضي) */
            transition: color 0.3s ease;
            font-size: 12px;
        }

            nav ul li a:hover {
                color: #b13446;
            }

    nav .search {
        margin-left: 20px;
        flex: 0 0 auto;
    }

        nav .search input {
            width: 200px;
            padding: 6px;
            font-size: 1rem;
        }


/* ========== Section 1 ========== */
.section1 {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin: 24px 0;

}

    .section1 .col-right {
        display: flex;
        flex-direction: column;
        flex: 0 0 25%;
    }

    .section1 .col-center {
        display: flex;
        flex-direction: column;
        flex: 0 0 50%;
    }

    .section1 .col-left {
        display: flex;
        flex-direction: column;
        flex: 0 0 25%;
    }

    .section1 .news-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .section1 .col-right .news-item:not(:last-child) {
        border-bottom: 1px solid #ccc;
        padding-bottom: 16px;
    }

    .section1 .col-left .news-item:not(:last-child) {
        border-bottom: 1px solid #ccc;
        padding-bottom: 16px;
    }

    .section1 .news-image {
        flex: 40% 40% 40%;
        overflow: hidden;
        height: 200px; /* إضافة هذا */
    }

        .section1 .news-image img {
            width: 100%;
            height: 100%; /* تعديل */
            object-fit: cover;
        }

    .section1 .news-image-middel {
        flex:  0 100% 0;
        overflow: hidden;
        height:400px; /* إضافة هذا */
    }

        .section1 .news-image-middel img {
            width: 100%;
            height: 100%; /* تعديل */
            object-fit: cover;
        }

    .section1 .news-content {
        padding-top: 8px;
        line-height: 1.8;
    }

    .section1 .news-title {
        text-align: right;
        margin-bottom: 6px;
    }

        .section1 .news-title a {
        
            font-weight: 700;
            font-size: 14px; /*big title size */
           color:#000; /*black*/
        }

            .section1 .news-title a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .section1 .news-title-middel {
        text-align: right;
        margin-bottom: 6px;
    }

    .section1 .news-title-middel a {
    
        font-weight: 700;
        font-size: 16px; /*big title size */
        color: #000; /*black*/
    }

    .section1 .news-title-middel a:hover {
        color: #b13446; /*red*/
        transition: color 0.7s ease;
    }



    .section1 .news-text {
       
        margin-bottom: 6px;
        text-align: right;
    
        font-size: 14px;
        line-height: 2;
        color: #555;
    }

    .section1 .news-meta {
        font-size: .8rem;
        color: #666;
    }

/* ========== Section 2 ========== */
.section2 {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin: 24px 0;
}

    .section2 .col-first {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .section2 .col-second {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .section2 .news-item {
        display: flex;
        flex-direction: column;
    }

    .section2 .news-image {
        overflow: hidden;
        height: 300px; /* إضافة هذا */
    }

        .section2 .news-image img {
            width: 100%;
            height: 100%; /* تعديل */
            object-fit: cover;
        }

    .section2 .news-content {
        padding-top: 8px;
    }

    .section2 .news-title {
        text-align: right;
        margin-bottom: 6px;
    }

        .section2 .news-title a {
        
            font-weight: 700;
            font-size: 16px; /*big title size */
            color:#000; /*black*/
        }

        .section2 .news-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

    .section2 .news-text {
        text-align: right;
    
        font-size: 14px;
        line-height: 2;
        color: #555;
    }

    .section2 .news-meta {
        font-size: .8rem;
        color: #666;
        margin-top: 10px;
    }

/* ========== Section 3 ========== */
.section3 {
    margin: 24px 0;
}
    .section3 .section3-ad {
        flex:1;
        overflow: hidden;
        height: 100px; /* إضافة هذا */
    }



    .section3 .section3-ad img {
        width: 100%;
        height: 100%; /* تعديل */
        object-fit: cover;
    }

/* ========== Section 4 ========== */
.section4 {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin: 24px 0;
    margin-bottom:60px;
}

    .section4 .col-main {
        display: flex;
        flex-direction: column;
        flex: 0 0 75%;
    }

    .section4 .col-side {
        display: flex;
        flex-direction: column;
        flex: 0 0 25%;
    }

    .section4 .article-main {
        display: flex; /* يفعل Flexbox */
        flex-direction: row; /* محور أفقي: الصورة والنص بجانب بعض */
        align-items: flex-start; /* محاذاة العناصر رأسياً في الأعلى */
        gap: 16px;
    }

    .section4 .article-image {
        flex: 0 0 50%;
        overflow: hidden;
    }

        .section4 .article-image img {
            width: 100%;
            height: 300px;
            display: block;
            object-fit: cover;
        }

    .section4 .article-content {
        flex: 1; /* ينمو ليملأ باقي المساحة */
        display: flex;
        flex-direction: column; /* ترتيب العنوان ثم النص عموديًا */
        justify-content: flex-start; /* محاذاة رأسية عند الأعلى */

    }



    .section4 .article-title {
        margin: 0 0 8px;
        text-align: right;
    }

        .section4 .article-title a {
        
            font-weight: 700;
            font-size: 16px; /*big title size */
           color:#000; /*black*/
        }

        .section4 .article-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

    .section4 .article-text {
        text-align: right;
    
        font-size: 14px;
        line-height: 2;
        color: #555;
    }

    .section4 .news-item {
        display: flex;
        flex-direction: column;
    }

    .section4 .news-image {
        flex: 0 0 40%;
        overflow: hidden;
        height: 200px; /* إضافة هذا */
    }

        .section4 .news-image img {
            width: 100%;
            height: 100%; /* تعديل */
            object-fit: cover;
        }

    .section4 .news-content {
        padding-top: 8px;
    }

    .section4 .news-title {
        text-align: right;
        margin-bottom: 6px;
    }

        .section4 .news-title a {
        
            font-weight: 700;
            font-size: 14px; /*big title size */
            color:#000; /*black*/
        }

        .section4 .news-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

    .section4 .news-text {
        text-align: right;
    
        font-size: 14px;
        line-height: 2;
        color: #555;
    }

    .section4 .news-meta {
        font-size: .8rem;
        color: #666;
        margin-top: 10px;
    }

/* ========== Section 5 ========== */
.section5 {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin: 24px 0;
}

    .section5 .col-a {
        display: flex;
        flex-direction: column;
        flex: 0 0 25%;
    }

    .section5 .col-b {
        display: flex;
        flex-direction: column;
        flex: 0 0 25%;
    }

    .section5 .col-c {
        display: flex;
        flex-direction: column;
        flex: 0 0 25%;
    }

    .section5 .col-d {
        display: flex;
        flex-direction: column;
        flex: 0 0 25%;
    }

    .section5 .col-a .news-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .section5 .col-b .news-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .section5 .col-c .news-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .section5 .col-d .news-item {
        display: flex;
        flex-direction: column;
    }

        .section5 .col-d .news-item:first-child {
            margin-bottom: 16px;
        }

        .section5 .col-d .news-item + .news-item {
            border-top: 1px solid #ccc;
            padding-top: 16px;
        }

    .section5 .news-image {
        flex: 40% 40% 40%;
        overflow: hidden;
        height: 200px; /* إضافة هذا */
    }

        .section5 .news-image img {
            width: 100%;
            height: 100%; /* تعديل */
            object-fit: cover;
        }

    .section5 .news-content {
        padding-top: 8px;
    }

    .section5 .news-title {
        text-align: right;
        margin-bottom: 6px;
    }

        .section5 .news-title a {
        
            font-weight: 700;
            font-size: 14px; /*big title size */
            color:#000; /*black*/
        }

        .section5 .news-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

    .section5 .news-text {
        text-align: right;
    
        font-size: 14px;
        line-height: 2;
        color: #555;
        margin-bottom: 6px;
    }

    .section5 .news-meta {
        font-size: .8rem;
        color: #666;
        margin-top: 10px;
    }

/* =================== Footer =================== */
.site-footer {
    background-color: #b13446;
    padding: 40px 20px 20px;
    direction: rtl;
    text-align: right;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff; /* أبيض للعناوين */
    margin-bottom: 20px;
    border-bottom: 2px solid #ffffff50; /* خط سفلي شفاف قليلاً */
    padding-bottom: 8px;
}


.footer-logo {
    width: 300px;
    margin-bottom: 15px;
}

.footer-description {
    font-size: 0.9rem;
    color: #dddddd; /* 🔵 نبذة بلون رمادي فاتح واضح */
    line-height: 1.6;
}

/* =================== Social Post =================== */
/* توحيد ارتفاع كل بوست */
.social-post {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 100px;
    max-height: 100px;
    overflow: hidden;
    background-color: transparent;
    text-decoration: none;
    color: inherit;
}

/* إطار الصورة */
.social-img-frame {
    width: 130px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

    /* الصورة داخل الإطار */
    .social-img-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }


/* عند المرور تكبر الصورة */
.social-post:hover .social-img-frame img {
    transform: scale(1.1);
}
/* =================== Title and Date =================== */
.post-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #eeeeee;
    margin-bottom: 5px;
    line-height: 1.3;
    max-height: 2.6em; /* سطرين */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}




.post-date {
    font-size: 0.75rem;
    color: #cccccc; /* 🔵 تاريخ الخبر بلون رمادي أفتح */
}

/* =================== Hover Effects =================== */
/* عند المرور على الفيسبوك: لون خاص للعنوان */
.facebook .social-post:hover .post-title {
    color: #5ab0bd; /* لون وردي فاتح يتناسق مع الخلفية */
    transition: color 0.3s ease;
    font-weight: 700;
}

/* عند المرور على انستغرام: لون خاص للعنوان */
.instagram .social-post:hover .post-title {
    color: #f56040; /* لون أصفر ذهبي دافئ يتناسب مع الخلفية */
    transition: color 0.3s ease;
    font-weight: 700;
}


/* خط سفلي للفوتر */
.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: #dddddd; /* 🔵 نص الحقوق بلون واضح */
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ffffff50; /* 🔵 خط أبيض شفاف */
}

.fb-posts-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.fb-post-col {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ==== زر الهمبرغر ==== */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}



/* ==== عند ≤ 768px ==== */
@media (max-width: 768px) {
    /* أظهر زر الهمبرغر */
    .menu-toggle {
        display: block;
    }

    .header .row {
        flex-direction: column; /* تحويل الترتيب إلى عمودي */
        align-items: center; /* توسيط العناصر */
    }

    .header .logo img {
        height: 50px; /* تصغير اللوغو قليلاً */
    }

    .header .ads {
        display: none; /* إخفاء الإعلان على الشاشات المتوسطة */
    }

    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }


    /* أخفِ القائمة الافتراضية */
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #ddd;
        z-index: 1400;
    }
        /* عند فتح القائمة */
        nav ul.open {
            display: flex;
        }
    /* حوّل كل section-flex rows إلى عمود واحد */
    .section1,
    .section2,
    .section4,
    .section5 {
        flex-direction: column !important;
        align-items: stretch;
    }
        /* عناصر الأخبار تأخذ العرض كامل */
        .section1 .col-left,
        .section1 .col-center,
        .section1 .col-right,
        .section2 .col-first,
        .section2 .col-second,
        .section4 .col-side,
        .section4 .col-main,
        .section5 .col-a,
        .section5 .col-b,
        .section5 .col-c,
        .section5 .col-d {
            flex: 0 0 100% !important;
        }
}

@media (max-width: 576px) {
    /* تكبير المسافات وحجم الخط للعناصر اللمسية */
    nav ul li a {
        padding: 12px;
        font-size: 1rem;
    }
    /* تصغير الهوامش والعناوين */
    .header .info {
        font-size: 0.8rem;
    }

    .section1 .news-title a,
    .section2 .news-title a,
    .section4 .article-title a {
        font-size: 14px;
    }
    /* إذا أردت إخفاء الإعلانات تماماً على أجهزة ≤576px */
    .header .ads {
        display: none !important;
    }

    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }

}
