﻿* {
    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;
        }


/*<!-- ================ القسم الأول: 3 صور متساوية مع نصوص فوق الصورة ================ -->*//* Section 1: ثلاثة بطاقات متساوية */
.section1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

    /* حاوية الصورة بنظام padding trick للحفاظ على نسبة 1:1 */
    .section1 .image-container {
        position: relative;
        width: 100%;
        padding-top: 100%; /* يجعل الارتفاع مساويًا للعرض */
        overflow: hidden;
    }

    /* الصورة الذاتية */
    .section1 img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* الـ Overlay الأسود الشفاف للنصوص */
    .section1 .overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding:150px 10px 40px 10px;
        /* تدرج لوني من أسفل (أسود شفّاف جزئيًا) إلى أعلى (شفّاف) */
        background: linear-gradient( to top, rgba(0, 0, 0, 0.6), /* أسفل: أسود مع 60% عتامة */
        rgba(0, 0, 0, 0) /* أعلى: شفّاف */
        );
        color: #fff;
        box-sizing: border-box;
    }


        /* تنسيق النصوص داخل الـ Overlay */
        .section1 .overlay .source,
        .section1 .overlay .date {
            display: block;
            font-size: 0.8rem;
            opacity: 0.8;
          
        }

        .section1 .overlay .source {
            position: relative;
            top: -35px; /* ارفع المصدر 5px; زِد القيمة للمزيد من الارتفاع */
        }

        .section1 .overlay .date {
            position: relative;
            top: -25px; /* ارفع المصدر 5px; زِد القيمة للمزيد من الارتفاع */
        }


        .section1 .overlay .title {
            position: relative;
            top: -20px;
            text-align: right;
        }

            .section1 .overlay .title a {
            
                font-weight: 700;
                font-size: 16px; /*big title size */
                color: #fff; /*white*/
            }


                .section1 .overlay .title a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }


/* ====== CSS القسم الثاني (Section 2) بعد التعديل ====== */

/* ====== أضف إلى نهاية SiteEco.css ====== */

/* نحدد ارتفاع ثابت للـ section2 (عدّله كما تشاء) */
.section2 {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* العمود الأيمن أعرض */
    grid-template-rows: repeat(4, 1fr); /* 4 صفوف متساوية */
    gap: 20px; /* المسافات بين الخلايا */
    height: 600px; /* إجمالي ارتفاع الشبكة */
}
    .section2 .col-right,
    .section2 .col-left {
        grid-row: 1 / -1;
    }


    /* العمود الأيمن:  
   ● الـ image-container يملأ كامل الارتفاع  
   ● الـ overlay يوضع أسفل الصورة */
    .section2 .col-right .image-container {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

        .section2 .col-right .image-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .section2 .col-right .overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 150px 10px 40px 10px;
        /* تدرج لوني من أسفل (أسود شفّاف جزئيًا) إلى أعلى (شفّاف) */
        background: linear-gradient( to top, rgba(0, 0, 0, 0.6), /* أسفل: أسود مع 60% عتامة */
        rgba(0, 0, 0, 0) /* أعلى: شفّاف */
        );
        color: #fff;
        box-sizing: border-box;
    }

        .section2 .col-right .overlay .source,
        .section2 .col-right .overlay .date {
            position: relative;
            top: -35px; /* ارفع المصدر 5px; زِد القيمة للمزيد من الارتفاع */
            font-size: .8rem;
            color: #fff;
        }



        .section2 .col-right .overlay .title {
            position: relative;
            top: -20px;
            text-align: right;
        }

            .section2 .col-right .overlay .title a {
                font-weight: 700;
                font-size: 16px; /*big title size */
                color: #fff; /*white*/
            }


            .section2 .col-right .overlay .title a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }




    /* العمود الأيسر:  
   ● تقسيم العمود إلى 4 صفوفٍ متساوية  
   ● فصل بقرابة 20px بين كل بطاقة */
    .section2 .col-left {
        display: grid;
        grid-template-rows: repeat(4, 1fr);
        row-gap: 20px; /* نفس قيمة الفجوة في .section2 */
    }


    /* كل بطاقة صغيرة تظهر بشكل أفقي (صورة + نص) */
    .section2 .small-card {
        display: flex;
        gap: 10px;
        align-items: center;
        height: 120px; /* ارتفاع البطاقة كاملة */
    }


        /* حاوية الصورة في البطاقة الصغيرة */
        .section2 .small-card .image-container {
            flex-shrink: 0;
            width: 200px; /* عرض الصورة */
            height: 100%; /* تملأ ارتفاع البطاقة */
            overflow: hidden;
        }

            .section2 .small-card .image-container img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        /* نص البطاقة الصغيرة يحتل المساحة المتبقية */
        .section2 .small-card .news-meta {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-size: 0.85rem;
        
        }

            .section2 .small-card .news-meta .title {
                text-align: right;
            }

            .section2 .small-card .news-meta .title a {
            
                font-weight: 700;
                font-size: 14px; /*big title size */
               color:#000; /*black*/
            }

                .section2 .small-card .news-meta .title a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }

            .section2 .small-card .news-meta .source,
            .section2 .small-card .news-meta .date {
                font-size: .8rem;
                color: #666;
            }



/* ====== CSS كامل للقسم 3 بعد التعديل ====== */

/* الحاوية الرئيسة: عمودان متجاوران */
.section3 {
    display: flex;
    gap: 20px;
    margin: 40px 0;
}

    /* كل عمود يحتوي على 4 بطاقات رأسية */
    .section3 .col {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* البطاقات الصغيرة تعرض الصورة والنص أفقياً */
  .section3 .small-card {
  display: flex;
  align-items: center;      /* vertical centering */
  gap: 10px;
}

        /* حاوية الصورة داخل البطاقة: حجم ثابت ونسبة 16:9 */
        .section3 .small-card .image-container {
            flex-shrink: 0;
            width: 250px;
            aspect-ratio: 16 / 12;
            overflow: hidden;
        }

            /* جميع الصور داخل section3 تملأ حاوياتها دون تشويه */
            .section3 .small-card .image-container img,
            .section3 .col .image-container img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        /* نص البطاقة: عمودي مع فراغ بسيط */
    .section3 .small-card .news-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 0.9rem;
    
    }


            .section3 .small-card .news-meta .title {
                text-align: right;
            }

        .section3 .small-card .news-meta .title a {
        
            font-weight: 700;
            font-size: 14px; /*big title size */
            color:#000; /*black*/
        }

            .section3 .small-card .news-meta .title a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

        .section3 .small-card .news-meta .source,
        .section3 .small-card .news-meta .date {
            font-size: .8rem;
            color: #666;
        }

    /* لضمان عدم تجاوز أي صورة لحاويتها */
    .section3 .image-container {
        overflow: hidden;
    }

  

/* Section 4 */
.section4 {
    margin: 40px 0;
}

    .section4 .ad-container {
        width: 100%;
        overflow: hidden;
    }

    .section4 img {
        width: 100%;
        height: 100px;
        object-fit: cover;
    }
/*<!-- ================ Section 5: Three-column mix ================ -->*/
/* Section 5 */

/* الحاوية الرئيسة: 3 أعمدة متجاورة */
.section5 {
    display: flex;
    gap: 20px;
    margin: 40px 0;
    align-items: flex-start;
}

/* تنسيق عنوان القسم */
.section5-title {
    animation: pulseColor 3s ease-in-out infinite;
    padding-bottom:7px;
    text-align: right;
    font-weight: 700;
    font-size: 14px; /*big title size */
    color: #000; /*black*/
    text-decoration-line: underline;
    text-decoration-style: double;
    text-decoration-color: #d32f2f;
    text-decoration-thickness: 1px;
    text-underline-offset: 10px;
}

@keyframes pulseColor {
    0% {
        color: #333; /* اللون الأساسي (غامق) */
    }

    50% {
        color: #b13446; /* تدرج لوني خفيف (غامق قليلًا) */
    }

    100% {
        color: #333; /* العودة إلى اللون الأساسي */
    }
}



    /* العمودين الأيمن والأوسط: News Cards */
    .section5 .col-news {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* كل بطاقة خبر في العمودين الأيمن والأوسط */
    .section5 .news-card {
        position: relative;
        overflow: hidden;
    }

        /* حاوية الصورة (نسبة 16:9) */
        .section5 .news-card .image-container {
            position: relative;
            width: 100%;
    aspect-ratio: 16 /20.6; /* ← هنا قلّل الارتفاع بتغيير النسبة */
            overflow: hidden;
        }

            /* الصورة تملأ الحاوية */
            .section5 .news-card .image-container img {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        /* Overlay للنصوص */
        .section5 .news-card .overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 150px 10px 40px 10px;
            /* تدرج لوني من أسفل (أسود شفّاف جزئيًا) إلى أعلى (شفّاف) */
            background: linear-gradient( to top, rgba(0, 0, 0, 0.6), /* أسفل: أسود مع 60% عتامة */
            rgba(0, 0, 0, 0) /* أعلى: شفّاف */
            );
            color: #fff;
            box-sizing: border-box;
        
        }

            /* تنسيق المصدر والتاريخ */
            .section5 .news-card .overlay .source,
            .section5 .news-card .overlay .date {
                display: block;
                font-size: .8rem;
                color: #fff;
            }

            /* تنسيق العنوان */
            .section5 .news-card .overlay .source {
                position: relative;
                top: -35px; /* ارفع المصدر 5px; زِد القيمة للمزيد من الارتفاع */
            }

            .section5 .news-card .overlay .date {
                position: relative;
                top: -25px; /* ارفع المصدر 5px; زِد القيمة للمزيد من الارتفاع */
            }


            .section5 .news-card .overlay .title {
                position: relative;
                top: -10px;
                text-align: right;
            }

                .section5 .news-card .overlay .title a {
                
                    font-weight: 700;
                    font-size: 16px; /*big title size */
                    color: #fff; /*white*/
                }

                .section5 .news-card .overlay .title a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }

    /* العمود الجانبي */
    .section5 .col-sidebar {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* الإعلان الأفقي */
    .section5 .ad-horizontal {
        width: 100%;
        overflow: hidden;
    }

        .section5 .ad-horizontal img {
            width: 100%;
            height: 420px;
            object-fit: cover;
            aspect-ratio: 3 / 4;
        }

    /* قائمة الأكثر مشاهدة */
    .section5 .most-viewed-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* كل عنصر في قائمة الأكثر مشاهدة */
    .section5 .viewed-item {
        display: flex;
        gap: 10px;
        align-items: center;
    }

        /* صورة العنصر */
        .section5 .viewed-item .image-container {
            width: 200px;
            height: 150px;
            overflow: hidden;
            flex: 0 0 auto; /* يمنع الانكماش والتمدد في Flexbox */
            /* أو بديلًا: flex-shrink: 0; */
        }

            .section5 .viewed-item .image-container img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                display: block;
            }

        /* عنوان العنصر */
        .section5 .viewed-item .title {
          
            text-align: right;
        }

            .section5 .viewed-item .title a {
            
                font-weight: 700;
                font-size: 14px; /*big title size */
              color:#000; /*black*/
            }

                .section5 .viewed-item .title a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }



/* =================== Footer =================== */
/* =================== 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;
}

/* ===== Hamburger Menu (≤768px) ===== */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 0.5rem;
}



/* ===== Tablet (≤1024px) ===== */
@media (max-width: 1024px) {
    .container {
        width: 90%;
    }

    /* Section 1: from 3 cols → 2 cols */
    .section1 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Section 2: stack → single column */
    .section2 {
        grid-template-columns: 1fr;
        height: auto;
    }

    /* Section 3: wrap sidebar under main */
    .section3 {
        flex-wrap: wrap;
    }

        .section3 .col {
            flex: 1 1 100%;
        }

    /* Section 4 ad height auto */
    .section4 img {
        height: auto;
    }

    /* Section 5: wrap 3-col → 2/1 */
    .section5 {
        flex-wrap: wrap;
    }

        .section5 .col-news,
        .section5 .col-sidebar {
            flex: 1 1 100%;
        }
}

/* ===== Mobile-Large (≤768px) ===== */
@media (max-width: 768px) {
    /* ===== Hamburger Menu ===== */
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        background: #fff;
        position: absolute;
        top: 100%;
        right: 0;
        width: 200px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 1400;
    }

        nav ul li {
            border-bottom: 1px solid #eee;
        }

            nav ul li:last-child {
                border-bottom: none;
            }

            nav ul li a {
                display: block;
                padding: 12px;
                font-size: 14px;
            }

        nav ul.open {
            display: flex;
        }

    nav .search {
        display: none;
    }

    /* ===== Header ===== */
    .header .row {
        flex-direction: column;
        align-items: center;
    }

    .header .logo img {
        height: 50px;
    }

    .header .ads {
        display: none;
    }

    .header .social-icons {
        gap: 5px;
    }

    /* ===== Sections 1–5 ===== */
    .section1 {
        grid-template-columns: 1fr;
    }

    .section2 {
        grid-template-columns: 1fr;
        height: auto;
    }

    .section3 {
        flex-direction: column;
    }

    .section5 {
        flex-direction: column;
    }
}


/* ===== Mobile-Small (≤480px) ===== */
@media (max-width: 480px) {
    /* scale down fonts */
    .section1 .overlay .title a,
    .section2 .col-right .overlay .title a,
    .section3 .small-card .news-meta .title a,
    .section5 .news-card .overlay .title a {
        font-size: 14px;
    }

    nav ul li a {
        font-size: 10px;
    }


    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }


}

@media (max-width: 576px) {

    /* scale down fonts */
    .section1 .overlay .title a,
    .section2 .col-right .overlay .title a,
    .section3 .small-card .news-meta .title a,
    .section5 .news-card .overlay .title a {
        font-size: 14px;
    }

    nav ul li a {
        padding: 10px;
        font-size: 1rem;
    }


    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }

}