﻿/* ================= 0. Reset & Globals ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}


body {
    font-family: sans-serif;
    background: #fff;
    direction: rtl
}

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;
        }

/* ================= Share Article ========================== */

.share-icons a .fa-brands {
    font-size: 1.25em; /* تقريباً 25px */
    color: #555; /* اللون الافتراضي */
    transition: color 0.3s ease;
}

/* عند المرور بالماوس على زرّ Bluesky */
.share-icons a.bluesky:hover .fa-brands {
    color: #00FFFF; /* لون Bleusky من لوحة الألوان الرسمية (#00FFFF) :contentReference[oaicite:1]{index=1} */
}


.share-bar {
    margin-top: 20px;
    padding: 10px;
    border-top: 2px solid #ddd;
    text-align: right;
}

    .share-bar h4 {
        margin-bottom: 10px;
        font-size: 16px;
        color: #333;
    }

.share-icons a {
    margin-left: 10px;
    font-size: 20px;
    color: #555;
    transition: color 0.3s ease;
}

    .share-icons a:hover {
        color: #007bff;
    }

    .share-icons a .fa-brands {
        font-size: 1.25em; /* يساوي تقريباً 25px إذا كان font-size الأساسي 20px */
        color: #555; /* اللون الافتراضي */
        transition: color 0.3s ease;
    }

    .share-icons a.bluesky:hover .fa-brands {
        color: #00FFFF; /* اللون الرسمي لـ Bluesky */
    }

    /* أيقونة Threads الافتراضيّة */
    .share-icons a.threads .fa-threads {
        color: #555; /* لون افتراضي رمادي */
        transition: color .3s ease;
    }

    /* عند المرور عليها تتحوّل إلى اللون الرسمي الأسود */
    .share-icons a.threads:hover .fa-threads {
        color: #000000; /* اللون الرسمي لـ Threads */
    }

/* 1. نخصّص زرّ المشاركة */
#btnWebShare {
    background: transparent; /* إزالة الخلفية */
    border: none; /* إزالة الإطار القياسي */
    padding: 0; /* إزالة الحشوة */
    margin-left: 10px; /* مسافة بسيطة عن الأيقونات السابقة */
    cursor: pointer; /* أيقونة المؤشر عند المرور */
    outline: none; /* إزالة حدّ التحديد الافتراضي */
}

    /* 2. نكبر حجم الأيقونة داخل الزر */
    #btnWebShare .fa-share-alt {
        font-size: 1.4em; /* يكبر الأيقونة (~28px إذا كان font-size الأب 20px) */
        color: #555; /* لون افتراضي متناسق مع بقية الأيقونات */
        transition: color 0.3s;
    }

    /* 3. لون الأيقونة عند المرور (اختياري) */
    #btnWebShare:hover .fa-share-alt {
        color: #007bff; /* أزرق Twitter مثلاً، أو أي لون تفضّله */
    }


/* ================= 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: 13px;
        }

            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. Body ========================= */
/* الحاوية الرئيسة */
.content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 60px;
}

/* نسب الأعمدة */
.col70 {
    flex: 7;
}


.col30 {
    flex: 3;
}

/* العمود الأول */
.news-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.source-info {
    display: flex;
    flex-direction: row-reverse; /* يضمن الصورة على اليسار في صفحة RTL */
    align-items: center;
    gap: 6px; /* مسافة بين الصورة والنص */
    margin-bottom: 15px;
}

/* قياس صورة الشعار لتكون صغيرة */
.source-logo {
    width: 60px; /* عرض صغير مناسب */
    height: 60px; /* ارتفاع مطابق للحفاظ على النسبة */
    object-fit: cover; /* يملأ الإطار من دون تشويه */
    border-radius: 50px; /* حواف دائرية خفيفة (اختياري) */
}


/* تنسيق اسم المصدر */
.source-info .source-name {
    font-weight: bold;
    font-size: 16px;
}


.news-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 15px;
}

.news-text p {
    margin-top: 1em;
    margin-bottom: 1.5em;
    line-height: 2;
}



    .news-text .news-paragraph {
        line-height: 2;
        justify-content: right;
    }


.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .social-share span {
        font-weight: bold;
    }

    .social-share a {
        font-size: 18px;
        color: #555;
        text-decoration: none;
    }

/*    ////// most view //////*/

/* مسافة أعلى قسم الأكثر مشاهدة */
.mv-section {
    margin-top: 30px; /* مسافة عن شريط المشاركة */
}

    /* عنوان القسم */
    .mv-section .mv-title-section {
        font-size: 20px;
        margin-bottom: 12px;
        border-bottom: 2px solid #ddd;
        padding-bottom: 6px;
    }

    /* توزيع العمودين */
    .mv-section .mv-columns {
        display: flex;
        gap: 10px;
    }

    /* عرض كل عمود 50% */
    .mv-section .mv-column {
        width: 50%;
        box-sizing: border-box;
    }

    /* كل خبر داخل العمود */
    .mv-section .mv-item {
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
    }

    /* غلاف الصورة مربّع */
    .mv-section .mv-img-wrapper {
        width: 100%; /* عرض ثابت */
        height: 300px; /* ارتفاع ثابت */
        overflow: hidden;
        position: relative;
        /* نلغي aspect-ratio لأننا نعطي أبعاد صريحة */
        aspect-ratio: auto;
    }


    /* الصورة تملأ الغلاف كاملاً */
    .mv-section .mv-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* حاوية النص أسفل الصورة */
    .mv-section .mv-info {
        padding: 8px;
        text-align: right;
        direction: rtl;
    }

    /* تنسيق التاريخ */
    .mv-section .mv-meta {
        display: block;
        font-size: 12px;
        color: #777;
        margin-bottom: 4px;
    }

    /* تنسيق العنوان */
    .mv-section .mv-title {
        font-size: 16px;
        font-weight: bold;
        line-height: 1.4;
        margin: 0;
    }


/* العمود الرئسي الثاني 30% */
.ad-vertical {
    width: 100%;
    max-height: 440px;
    object-fit: contain;
    margin-bottom: 20px;
}

/* الأقسام الجانبية */
.picked-for-you {
    margin-bottom: 30px;
}

    .picked-for-you h3 {
        font-size: 20px;
        margin-bottom: 12px;
        border-bottom: 2px solid #ddd;
        padding-bottom: 6px;
    }

/* ================ اخترنا لك (science-card) ================ */

.science-cards {
    display: flex;
    flex-wrap: wrap; /* تسمح بانتقال البطاقات للسطر التالي */
    gap: 20px 15px; /* 20px أفقياً، 15px عمودياً */
}
/* الحاوية الرئيسية لكل بطاقة */
.science-card {
    position: relative;
    width: 100%;
    height: 300px; /* يمكنك تعديل الارتفاع حسب التصميم */
    overflow: hidden;
    transition: transform .35s ease;


}

    /* الصورة تملأ البطاقة كاملة */
    .science-card img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .35s ease;
    }

    /* شارة الفئة */
    .science-card .science-section {
        position: absolute;
        top: 10px;
        right: 10px; /* في RTL تكون من اليمين */
        background: rgba(255,255,255,0.8);
        color: #333;
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 3px;
        z-index: 2;
        transition: background-size .5s ease, color .35s ease;
        background-image: linear-gradient(#d32f2f, #d32f2f);
        background-repeat: no-repeat;
        background-size: 0% 100%;
        background-position: right center;
    }

    /* طبقة التدرّج فوق الصورة */
    .science-card .science-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient( to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 60% );
        transition: background .35s ease;
        z-index: 1;
    }

    /* محتوى العنوان والتفاصيل */
    .science-card .science-ov {
        position: absolute;
        bottom: 10px;
        right: 10px;
        left: 10px;
        z-index: 2;
        color: #fff;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

        /* العنوان */
        .science-card .science-ov .science-title {
            font-size: 1rem;
            font-weight: 700;
            transition: color .35s ease;
        }

        /* الميتا */
        .science-card .science-ov .science-meta {
            display: flex;
            gap: 12px;
            font-size: .85rem;
            align-items: center;
        }

        /* التاريخ و الأيقونة */
        .science-card .science-ov .science-date,
        .science-card .science-ov .science-views {
            display: flex;
            align-items: center;
            gap: 4px;
        }

    /* ===== Hover Effects ===== */

    /* تكبير الصورة داخلياً */
    .science-card:hover img {
        transform: scale(1.1);
    }

    /* تغميق الطبقة */
    .science-card:hover .science-overlay {
        background: rgba(0,0,0,0.5);
    }

    /* تحول شارة الفئة */
    .science-card:hover .science-section {
        background-size: 100% 100%;
        color: #fff;
    }

    /* تحول لون العنوان والمشاهدات */
    .science-card:hover .science-title,
    .science-card:hover .science-views {
        color: #d32f2f;
    }



/* =================== 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%;
    }
    /* stack share-bar عمودي */
    .share-bar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    /* تكديس الأعمدة الرئيسية */
    .content {
        flex-direction: column;
    }

    .col70,
    .col30 {
        width: 100%;
    }
    /* الأكثر مشاهدة: عمود واحد */
    .mv-columns {
        flex-direction: column;
    }

    .mv-column {
        width: 100%;
    }
    /* اخترنا لك: عمود واحد لكل بطاقة */
    .science-cards {
        flex-direction: column;
    }
}

/* ========== Mobile-Large (≤768px) ========== */
@media (max-width: 768px) {
    /* ===== Share‐bar & Content Stack ===== */
    .share-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .content {
        flex-direction: column;
    }

    .col70,
    .col30 {
        width: 100%;
    }

    .mv-columns {
        flex-direction: column;
    }

    .mv-column {
        width: 100%;
    }

    .science-cards .science-card {
        width: 100%;
        height: 250px;
    }

    .ad-vertical {
        max-height: none;
        height: auto;
    }

    /* ===== Hamburger & Header ===== */
    .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;
    }

    /* ===== Navbar Dropdown ===== */
    nav {
        position: relative;
    }

        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: 1001;
        }

            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;
        }
}


/* ========== Mobile-Small (≤480px) ========== */
@media (max-width: 480px) {
    /* تقليص الخطوط */
    nav ul li a {
        font-size: 10px;
    }

    .news-title {
        font-size: 24px;
    }

    .share-bar h4 {
        font-size: 14px;
    }

    .share-icons a {
        font-size: 18px;
    }

    .mv-title-section {
        font-size: 18px;
    }

    .science-card .science-section {
        font-size: 10px;
        padding: 3px 6px;
    }

    .science-card .science-ov .science-title {
        font-size: 14px;
    }

    .science-card .science-ov .science-meta {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }

}
