﻿* {
    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 (Hero + 4 Small Cards) ================= */
.section-1 {
    display: flex;
    gap: 20px;
    margin: 30px 0;

}

    /* العناصر الرئيسية */
    .section-1 .large {
        flex: 7;
        height: 400px;
        position: relative;
        overflow: hidden;

    }

    .section-1 .small-container {
        flex: 3;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(2, 1fr);
        gap: 10px;
    }

    .section-1 .small {
        width: 250px;
        height: 195px;
        position: relative;
        overflow: hidden;
    }

    /* حاوية الصورة */
    .section-1 .img-container {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

        /* الطبقة السوداء السفلية */
        .section-1 .img-container::before {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 70%;
            background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
            z-index: 1;
        }

        /* تنسيق الصورة */
        .section-1 .img-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 0;
            transition: transform 0.5s ease;
        }

        .section-1 .img-container:hover img {
            transform: scale(1.05);
        }

        /* التاريخ العام */
        .section-1 .img-container .date {
            position: absolute;
            top: 10px;
            right: 8px;
            font-size: 0.8rem;
            color: #fff;
            z-index: 2;
        }

    /* تاريخ مخصص للصورة الكبيرة */
    .section-1 .large .img-container .date {
        top: 300px;
        right: 20px;
    }

    /* العنوان العام */
    .section-1 .img-container .title {
        position: absolute;
        bottom: 25px;
        right: 8px;
        font-size: 16px;
        font-weight: bold;
        color: #fff;
        z-index: 2;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.4;
        text-align: right;
    }

    /* العنوان داخل الكبيرة */
    .section-1 .large .img-container .title {
        bottom: 20px;
        right: 20px;
        font-size: 20px;
        text-align: right;
    }

    /* الروابط داخل العناوين */
    .section-1 .img-container .title a {
        font-weight: 700;
        color: #fff;
        transition: color 0.7s ease;
    }

    /* حجم مختلف لعناوين الصغيرة */
    .section-1 .large .img-container .title a {
        font-size: 16px;
    }

    .section-1 .small .img-container .title a {
        font-size: 14px;
    }

    .section-1 .img-container .title a:hover {
        color: #b13446;
    }


/* ================= Section 2 (4 Grid Cards) ================= */
.section-2 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
    margin: 40px 0;
}

    .section-2 .card {
        background: #f9f9f9;
        display: flex;
        flex-direction: column;
        position: relative;
        height: 300px;
    }

        .section-2 .card .img-container {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

            .section-2 .card .img-container img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        .section-2 .card .overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,1) 0%,rgba(0,0,0,0)100%);
            color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 20px;
        }

            .section-2 .card .overlay .date {
                position: absolute;
                top: 10px;
                font-size: 12px;
                white-space: nowrap;
            }

            .section-2 .card .overlay .title {
                position: absolute;
                bottom: 30px;
                left: 10px;
                right: 10px;
                text-align: right;
            }

                .section-2 .card .overlay .title a {
                    font-weight: 700;
                    font-size: 14px; /*big title size */
                    color: #fff; /*white*/
                }

                .section-2 .card .overlay .title a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }

/* ================= Section 3 (Main Columns) ================= */
.section-3 {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: flex-start;
}

/* -- Left Column (70%) -- */
.col70 {
    flex: 7;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- Two-cols wrapper ---- */
.two-cols {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

    .two-cols .subcol {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
        min-height: 0;
    }

        .two-cols .subcol .news-item {
            /* لديك بالفعل: */
            flex: 1;
            display: flex;
            flex-direction: column;
            /* أضف هذا: */
            justify-content: space-between;
        }


/* ---- News Item ---- */
.news-item,
.news-item-tall,
.news-item-small {
    border: 1px solid #d0d0d0;
}

/* ------ Standard News Item ------ */
.news-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .news-item .img-container {
        width: 100%;
        height: 250px; /* زيادة الارتفاع هنا */
        overflow: hidden;
        margin-bottom: 8px;
    }

        .news-item .img-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .news-item .date {
        font-size: .8rem;
        color: #666;
        margin-bottom: 20px;
        padding-right: 10px;
    }

    .news-item .title {
        margin-bottom: 20px;
        padding-right: 10px;
        text-align: right;
    }

        .news-item .title a {
            font-weight: 700;
            font-size: 16px; /*big title size */
            color:#000; /*black*/
        }

            .news-item .title a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .news-item .text {
        margin-bottom: 20px;
        padding-right: 10px;
        text-align: right;
        font-size: 14px;
        line-height: 2;
        color: #555;
    }

    .news-item hr {
        border-top: 1px solid #ccc;
        margin-top: 60px; /* أو أي قيمة تريدها، لكن ثابتة لكليهما */
    }

    .news-item .info-line {
        display: flex;
        justify-content: space-between;
        font-size: .8rem;
        color: #666;
    }

        .news-item .info-line .source {
            padding-right: 10px;
            margin-bottom: 20px;
            margin-top: 15px;
            
        }

        .news-item .info-line .views {
            padding-left: 10px;
            margin-bottom: 20px;
            margin-top: 15px;
        }

/* ------ Tall News Item ------ */
.subcol {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px; /* مسافة بين الأخبار داخل العمود */
}



    .subcol .news-item-tall {
        flex: 1; /* يسمح لكل خبر بالتمدد بالتساوي */
        min-height: 300px; /* تحفظ الحد الأدنى كما هو */
    }

.news-item-tall {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* تجعل كل عنصر يأخذ نفس الطول داخل العمود */
    background: #fff; /* لو تحتاج خلفية موحدة */
    box-sizing: border-box;
}

.img-container-tall {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 15px;
}

    .img-container-tall img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.title-tall, .date-tall, .info-line-tall {
    padding-right: 10px;
    padding-left: 10px; /* توحيد الحواف */
}


.date-tall {
    font-size: .8rem;
    color: #666;
    margin-bottom: 10px;
}

.title-tall {
    text-align: right;
    margin-bottom: 6px;
    min-height: 40px; /* اختياري لتوحيد الارتفاع */
}

    .title-tall a {
        font-weight: 700;
        font-size: 14px; /*big title size */
        color:#000; /*black*/
    }

    .title-tall a:hover {
        color: #b13446; /*red*/
        transition: color 0.7s ease;
    }


    .news-item-tall hr {
        border-top: 1px solid #ccc;
        margin-top: 40px; /* أو أي قيمة تريدها، لكن ثابتة لكليهما */
    }

.info-line-tall {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: #666;
    margin: 10px 0;
}

       .small-source {
            padding-right: 10px;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .small-views {
            padding-left: 10px;
            margin-top: 10px;
            margin-bottom: 10px;
        }




/* ---------------- Horizontal Ad ---------------- */
.horizontal-ad {
    width: 100%;
    height: 115px;
    overflow: hidden;
    
}

    .horizontal-ad img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ================= Main News (Full-width) ================= */
.main-news {
    display: flex;
    gap: 20px;
    /* بدل flex-start نستخدم stretch ليملأ الجميع نفس الارتفاع */
    align-items: stretch;
    border: 1px solid #ddd;
    position: relative;
    background-color: #fff;
    overflow: hidden;
}

    .main-news .img-container {
        flex: 4;
        height: 250px; /* اجعل الحاوية ثابتة الطول */
        overflow: hidden;
    }


        .main-news .img-container img {
            width: 100%; /* اجعل العرض 100% من عرض الحاوية */
            height: 100%; /* اجعل الارتفاع 100% من ارتفاع الحاوية */
            object-fit: cover; /* حافظ على نسبة الأبعاد ولا تترك المساحات الفارغة */
        }

    .main-news .text-content {
        flex: 6;
        display: flex;
        flex-direction: column;
        /* ضفنا padding حتى لا تلتصق العناصر بالأعلى والأسفل */
        
    }

        /* ـــــــــ info-line تحت النص مباشرة */
        .main-news .text-content .info-line {
            display: flex;
            justify-content: space-between; /* يسار: source — يمين: views */
            font-size: 12px;
            color: #777;
            margin-top: 10px; /* مسافة قليلة تحت الفقرة */
        }

        .main-news .text-content .date {
            font-size: .8rem;
            color: #666;
            margin: 20px 0 6px;
        }

        .main-news .text-content .title {
            text-align: right;
            margin-bottom: 10px;
        }

            .main-news .text-content .title a {
                font-weight: 700;
                font-size: 16px; /*big title size */
                color:#000; /*black*/
            }

            .main-news .text-content .title a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

        .main-news .text-content .text {
            text-align: right;
            font-size: 14px;
            line-height: 2;
            color: #555;
            margin-bottom: 20px;
        }



.main-news .info-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #777;
    margin-top: 90px;
}

    .main-news .info-line .source {
        order: 1;
        padding-right: 5px;
    }

    .main-news .info-line .views {
        order: 2;
        padding-left: 15px;
    }

/* ================= Image-Text Small News ================= */
.image-text-news-item-small {
    display: flex;
    gap: 10px;
    border: 1px solid #ddd;


  align-items: flex-start;
  overflow: hidden;


  align-items: flex-start;
  /* height: 120px; */      /* نحذفه */
  min-height: 120px;        /* يضمن حدًّا أدنى فقط */
  padding: 10px;            /* يحافظ على تنفس المحتوى */
}

   

    .image-text-news-item-small .img-container {
        width: 120px;
        height: 100px;
        overflow: hidden;
        flex-shrink: 0;
    }


        .image-text-news-item-small .img-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }




.img-container-small {
    flex-shrink: 0;
    width: 100px; /* أو حسب التصميم */
    height: 80px;
    overflow: hidden;
}

    .img-container-small img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
.text-container-small {
    display: flex;
    flex-direction: column;
     justify-content: space-between;

    flex: 1;
}

.title-small a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    max-height: 2.8em;
}

    .text-container-small .date-small {
        font-size: .8rem;
        color: #666;
        margin-top: 10px;
    }

    .text-container-small .title-small {
        text-align: right;
        margin-top: 10px;
    }

        .text-container-small .title-small a {
            font-weight: 700;
            font-size: 14px; /*big title size */
            color:#000; /*black*/
        }

            .text-container-small .title-small a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

/* ================= Sidebar (30%) ================= */
.col30 {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

    .col30 .ad-vertical {
        background: #eee;
        height: 517px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700; /* = bold (الافتراضي) */
    }

        .col30 .ad-vertical img {
            height: 100%;
            width: 100%;
            object-fit: cover;
        }

    .col30 .news-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

/* ================= Sidebar Section Title ================= */
.sidebar-section-title {
    animation: pulseColor 3s ease-in-out infinite;
    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;
    padding-bottom: 10px;

}

@keyframes pulseColor {
    0% {
        color: #333; /* اللون الأساسي (غامق) */
    }

    50% {
        color: #b13446; /* تدرج لوني خفيف (غامق قليلًا) */
    }

    100% {
        color: #333; /* العودة إلى اللون الأساسي */
    }
}


/* ================= Sidebar Feature (Big) ================= */
.sidebar-feature {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: -5px;
}

    .sidebar-feature img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .35s ease;
    }

    .sidebar-feature .section {
        position: absolute;
        top: 10px;
        right: 0;
        padding: 5px 10px;
        font-size: .8rem;
        font-weight: 700;
        color: #000;
        background-color: #fff;
        background-image: linear-gradient(#d32f2f,#d32f2f);
        background-repeat: no-repeat;
        background-size: 0% 100%;
        background-position: right center;
        transition: background-size .5s ease, color .5s ease;
        z-index: 3;
    }

    .sidebar-feature .overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top,rgba(0,0,0,.6)0%,rgba(0,0,0,0)60%);
        transition: background .35s ease;
    }

    .sidebar-feature .ov {
        position: absolute;
        bottom: 30px;
        right: 10px;
        color: #fff;
    }

     
        .sidebar-feature .ov .title {
            text-align: right;
        }

                .sidebar-feature .ov .title a {
                    font-weight: 700;
                    font-size: 14px; /*big title size */
                    color: #fff; /*white*/
                   
                }

                    .sidebar-feature .ov .title a:hover {
                        color: #b13446; /*red*/
                        transition: color 0.7s ease;
                    }

       


            .sidebar-feature .ov .meta {
                display: inline-flex;
                align-items: center;
                gap: 8px;
                font-size: .8rem;
                color: #fff;
            }

        .sidebar-feature .ov .sidebar-featuredate,
        .sidebar-feature .ov .sidebar-featureview {
            display: flex;
            font-size: .9rem;
        }

    .sidebar-feature .section:hover,
    .sidebar-feature:hover .section {
        background-size: 100% 100%;
        color: #fff;
    }

    .sidebar-feature:hover img {
        transform: scale(1.1);
    }

    .sidebar-feature:hover .overlay {
        background: rgba(0,0,0,0.5);
    }

  

/* ================= Sidebar List (Mini Items) ================= */
.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .sidebar-list .sb {
        display: flex;
        gap: 8px;
        align-items: center;
        border: 1px solid #d0d0d0;
    }

    .sidebar-list img {
        width: 120px;
        height: 100px;
        object-fit: cover;
        transition: filter .3s ease;
    }

    .sidebar-list .si {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }

        .sidebar-list .si .date, 
        .sidebar-list .si .sidebar-featureviews {
            font-size: .8rem;
            color: #666;
        }


    .sidebar-list .si .title {
        text-align: right;
        margin-bottom: 10px;
    }

            .sidebar-list .si .title a {
                font-weight: 700;
                font-size: 14px; /*big title size */
              color:#000; /*black*/
            }

            .sidebar-list .si .title a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .sidebar-list .sb:hover img {
        filter: grayscale(100%);
    }

   

/* ================= Science Group ================= */
.science-group .sg-title {
    display: inline-block;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 20px 0 20px;
    text-decoration-line: underline;
    text-decoration-style: double;
    text-decoration-color: #d32f2f;
    text-decoration-thickness: 1px;
    text-underline-offset: 10px;
    padding-bottom: 10px;
}

.science-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.science-card {
    position: relative;
    overflow: hidden;
}

    .science-card img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        transition: transform .35s ease;
        display: block; /* هذا يمنع المسافة أسفل الصورة */
    }

.science-section {
    position: absolute;
    top: 10px;
    right: 0;
    padding: 5px 10px;
    font-size: .8rem;
    font-weight: 700;
    background-color: #fff;
    background-image: linear-gradient(#d32f2f,#d32f2f);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: right center;
    transition: background-size .5s ease, color .5s ease;
    z-index: 3;
}

.science-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,rgba(0,0,0,.6)0%,rgba(0,0,0,0)60%);
    transition: background .35s ease;
}

.science-ov {
    position: absolute;
    bottom: 30px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #fff;
}

.science-title {
    text-align: right;
    margin: 4px 0 8px;
}

    .science-title a {
        font-weight: 700;
        font-size: 16px; /*big title size */
        color: #fff; /*white*/
    }

        .science-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

.science-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.science-date,
.science-views {
    display: flex;
    font-size: .8rem;
}

.science-card:hover img {
    transform: scale(1.1);
}

.science-card:hover .science-overlay {
    background: rgba(0,0,0,0.5);
}



/* =================== 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 for Mobile ≤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: wrap small cards under hero */
    .section-1 {
        flex-wrap: wrap;
    }

        .section-1 .large {
            flex: 1 1 100%;
            height: 300px;
        }

        .section-1 .small-container {
            flex: 1 1 100%;
            grid-template-columns: repeat(4, 1fr);
        }

    /* Section-2: two columns instead of four */
    .section-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Section-3: stack sidebar under main */
    .section-3 {
        flex-wrap: wrap;
    }

    .col70, .col30 {
        flex: 1 1 100%;
    }

    /* Main-news: shorten image height */
    .main-news .img-container {
        height: 200px;
    }
}

/* ========= Mobile-Large ≤768px (Layout) ========= */
@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;
    }

    /* ===== Layout Adjustments ===== */
    .section-1,
    .section-2,
    .section-3,
    .section-5,
    .main-news,
    .image-text-news-item-small {
        flex-direction: column;
        width: 100%;
    }

    .section-2 {
        grid-template-columns: 1fr;
    }

    .section-1 {
        grid-template-columns: 1fr;
    }
}


/* ========= Mobile-Small ≤480px ========= */
@media (max-width: 480px) {
    /* scale down typography */
    .section-1 .img-container .title,
    .section-2 .overlay .title a,
    .news-item .title a,
    .main-news .text-content .title a {
        font-size: 14px;
    }

    .section-2 .overlay .date,
    .news-item .date,
    .main-news .text-content .date {
        font-size: 0.75rem;
    }

    .science-title a,
    .science-meta,
    .sidebar-feature .section {
        font-size: 0.75rem;
    }

    nav ul li a {
        font-size: 10px;
    }


    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }

}


@media (max-width: 576px) {

    /* scale down typography */
    .section-1 .img-container .title,
    .section-2 .overlay .title a,
    .news-item .title a,
    .main-news .text-content .title a {
        font-size: 14px;
    }

    .section-2 .overlay .date,
    .news-item .date,
    .main-news .text-content .date {
        font-size: 0.75rem;
    }

    .science-title a,
    .science-meta,
    .sidebar-feature .section {
        font-size: 0.75rem;
    }

    nav ul li a {
        padding: 10px;
        font-size: 1rem;
    }


    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }
}