﻿/* ================= 0. Reset & Globals ================= */
* {
    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;
        }

/* ================= Hot Stocks Bar ================= */
.positive {
    color: #28a745; /* أخضر */
    font-weight: 700;
}

.negative {
    color: #dc3545; /* أحمر */
    font-weight: 700;
}

.hot-stocks {
    color: #000;
    font-weight: 700;
    padding: 8px 15px;
    white-space: nowrap;
    overflow-x: auto;
    font-size: 0.9rem;
    user-select: none;
    display: flex; /* استخدم flex لتوزيع العناصر أفقياً */
    align-items: center; /* لمحاذاة العناصر عمودياً */
    gap: 10px; /* مسافة بين النص والنتائج */
}

    .hot-stocks strong {
        flex-shrink: 0; /* لا يسمح للنص بالتقلص */
        white-space: nowrap; /* لمنع التفاف النص */
        font-size: 1.2rem;
    }

    .hot-stocks #stocks-data {
        display: inline-block;
        white-space: nowrap;
    }

        .hot-stocks #stocks-data span {
            margin-right: 15px;
        }




/* ================= Main Columns Layout ================= */
.main-columns {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* 40% Main Left Column */
.main-left {
    width: 40%;
}

/* 30% Middle and Right Columns */
.main-middle, .main-right {
    width: 30%;
}

/* Section titles */
.section-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 12px;
    padding-bottom: 6px;
}

/* Main left large image + title */
.main-left .main-image {
    width: 100%;
    height: 270px;
    object-fit: cover;
}



.main-left .main-title {
    margin-top: 8px;
    text-align: right;
}

    .main-left .main-title a {
    
        font-weight: 700;
        font-size: 16px; /*big title size */
       color:#000; /*black*/
    }

        .main-left .main-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

/* News list in main left - 8 news items */
.news-list-left {
    margin-top: 18px;
}

    .news-list-left .news-item {
        display: flex;
        gap: 12px;
        margin-bottom: 12px;
        align-items: center;
        cursor: pointer;
        
    }

        .news-list-left .news-item img {
            width: 80px;
            height: 60px;
            object-fit: cover;
        }

        .news-list-left .news-item .news-text {
            text-align: right;
        }

            .news-list-left .news-item .news-text a {
            
                font-weight: 700;
                font-size: 14px; /*big title size */
                color:#000; /*black*/
            }

                .news-list-left .news-item .news-text a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }

/* Main middle image + title */
.main-middle .main-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.main-middle .main-title {
    margin-top: 8px;
    text-align: right
}

    .main-middle .main-title a {
    
        font-weight: 700;
        font-size: 14px; /*big title size */
        color: #000; /*black*/
    }

    .main-middle .main-title a:hover {
        color: #b13446; /*red*/
        transition: color 0.7s ease;
    }

.news-list-middle {
    margin-top: 15px;
    max-height: 520px;
    overflow-y: auto;
}

    .news-list-middle .news-item {
        text-align: right;
        margin-bottom: 9px;
       
    }

        .news-list-middle .news-item a {
        
            font-weight: 700;
            font-size: 14px; /*big title size */
            color: #000; /*black*/
        }

            .news-list-middle .news-item a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }



/* Main right column */
.main-right .ad-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
}



/* Market Movers vertical bar */
.market-movers {
    border: 1px solid #ccc;
    padding: 12px 16px;
    font-size: 1rem;
    
    font-weight: 700;
    color: #b13446;
    background-color: #fff;
    border-radius: 6px;
    margin-bottom: 15px;
    user-select: none;
}
    .market-movers .section-title {
        font-size: 1.3rem;
        font-weight: 900;
        margin-bottom: 12px;
        color: #b13446;
        border-bottom: 2px solid #b13446;
        padding-bottom: 6px;
    }

    .market-movers .mm-header,
    .market-movers .mm-item {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        align-items: center;
        font-weight: 600;
    }

    .market-movers .mm-header {
        font-weight: 700;
        border-bottom: 2px solid #b13446;
        margin-bottom: 10px;
        color: #b13446;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }


        .market-movers .mm-header span,
        .market-movers .mm-item span {
            flex: 1;
            text-align: center;
            min-width: 60px;
        }

    .market-movers .mm-item {
        color: #444;
        border-bottom: 1px solid #eee;
        cursor: default;
    }



        .market-movers .mm-item:last-child {
            border-bottom: none;
        }




        .market-movers .mm-item:hover {
            background-color: #f9f0f2;
        }


.market-positive {
    color: #28a745; /* أخضر */
    font-weight: 700;
}

.market-negative {
    color: #dc3545; /* أحمر */
    font-weight: 700;
}

.disclaimer {
    font-size: 0.600rem;
    color: #666666;
    margin-top: 10px;
    font-style: italic;
}

/* ================= What to Watch Horizontal Block ================= */
.what-to-watch {
    margin-top: 30px; /* لتوفير المسافة المناسبة */
    padding: 20px 0;
    text-align: right;
}

    .what-to-watch .section-title {
        font-size: 1.3rem;
        font-weight: 700;
        color: #333;
        margin-bottom: 18px;
    }

    .what-to-watch .watch-list {
        display: flex;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .what-to-watch .watch-item {
        width: 22%; /* عرض الأخبار بشكل مناسب داخل العمود */
        padding: 10px;
        text-align: right;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }



        .what-to-watch .watch-item .watch-title {
            margin-top: 10px;
            text-align: right;
        }

            .what-to-watch .watch-item .watch-title a {
            
                font-weight: 700;
                font-size: 14px; /*big title size */
               color:#000; /*black*/
            }

        .what-to-watch .watch-item .watch-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

        .what-to-watch .watch-item img {
            width: 100%;
            height: 170px;
            object-fit: cover;
        }


/* Scrollbar for news-list-middle */
.news-list-middle::-webkit-scrollbar {
    width: 6px;
}

.news-list-middle::-webkit-scrollbar-thumb {
    background-color: #b13446;
}



/* ================= Second Main Section (الرئيسية الثانية) ================= */
.second-main {
    margin-top: 35px;
    display: flex;
    gap: 15px;
}

    .second-main .col40, .second-main .col30 {
        padding-top: 8px;
    }

    .second-main .col40 {
        width: 40%;
    }

        .second-main .col40 img {
            width: 100%;
            height:300px;
            object-fit: cover;
        }

    .second-main .col30 {
        width: 30%;
    }

    .second-main .col30 img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }




    .second-main .col40 .title {
        text-align: right;
        margin: 10px 0 12px 0;
    }

.second-main .col40 .title a {

    font-weight: 700;
    font-size: 16px; /*big title size */
    color: #000; /*black*/
}

.second-main .col40 .title a:hover {
    color: #b13446; /*red*/
    transition: color 0.7s ease;
}

    /*  صورة وعنوان الخبر الرئيسي */
    .second-main .col30 .title {
        margin: 10px 0 12px 0;
    }

        .second-main .col30 .title a {
            text-align: right;
        
            font-weight: 700;
            font-size: 16px; /*big title size */
           color:#000; /*black*/
        }

        .second-main .col30 .title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }
    /* News titles in second main section */
    .second-main .col30 .news-titles .news-titles-item {
        margin-bottom: 9px;
        text-align: right;
    }

        .second-main .col30 .news-titles .news-titles-item a {
        
            font-weight: 700;
            font-size: 12px; /*big title size */
            color: #000; /*black*/
        }

            .second-main .col30 .news-titles .news-titles-item a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

       
        /* ================= Horizontal full width ad ================= */
        .full-width-ad {
    margin: 40px 0;
}

    .full-width-ad img {
        width: 100%;
        height: 100px;
        object-fit: cover;
    }

/* ================= Third Main Section (الرئيسية الثالثة) ================= */
.third-main {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

    /* Right half (40%) */
    .third-main .right-half {
        width: 50%;
    }

        .third-main .right-half img {
            width: 100%;
            height: 300px;
            object-fit: cover;
            margin-bottom: 10px;
        }

        .third-main .right-half .news-title {
           
            margin: 10px 0 12px 0;
            text-align: right;
        }

            .third-main .right-half .news-title a {
            
                font-weight: 700;
                font-size: 16px; /*big title size */
                color:#000; /*black*/
            }

                .third-main .right-half .news-title a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }

        .third-main .right-half .news-content {
            text-align: right;
        
            font-size: 14px;
            line-height: 2;
            color: #555;
            margin: 10px 0 12px 0;
        }

    /* Left half with 2 columns each with 2 news */
    .third-main .left-half {
        width: 50%;
        display: flex;
        gap: 10px;
    }

.left-half .col {
    width: 50%;
}

.left-half .news-item {
    margin-bottom: 15px;
    cursor: pointer;
}

    .left-half .news-item img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .left-half .news-item .title {
        margin-top: 6px;
        text-align: right;
    }

        .left-half .news-item .title a {
        
            font-weight: 700;
            font-size: 14px; /*big title size */
            or font-size: 12px; /*big title size */
            color:#000; /*black*/
        }

        .left-half .news-item .title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

/* ================= Horizontal Success & Tech Sections ================= */
.success-section,
.tech-section {
    margin-bottom: 35px;
}

    .success-section .section-title,
    .tech-section .section-title {
        margin-bottom: 15px;
    }

    /* Horizontal news lists (4 items each) */
    .success-section .news-list,
    .tech-section .news-list {
        display: flex;
        gap: 15px;
        justify-content: center;
    }

    .success-section .news-item,
    .tech-section .news-item {
        width: 23%;
    }

        .success-section .news-item img,
        .tech-section .news-item img {
            width: 100%;
            height: 160px;
            object-fit: cover;
        }

        .success-section .news-item .title,
        .tech-section .news-item .title {
            margin-top: 8px;
            text-align: right;
        }

            .success-section .news-item .title a,
            .tech-section .news-item .title a {
            
                font-weight: 700;
                font-size: 14px; /*big title size */
               color:#000; /*black*/
            }

            .success-section .news-item .title a:hover,
            .tech-section .news-item .title a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

/* ================= Media Section ================= */
.media-section {
    margin-bottom: 40px;
    
}

/* Top horizontal with 4 news */
.media-top {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

    .media-top .news-item {
        width: 23%;
    }

        .media-top .news-item img {
            width: 100%;
            height: 160px;
            object-fit: cover;
        }

        .media-top .news-item .title {
            margin-top: 8px;
            text-align: right;
            margin-bottom: 10px;
        }

            .media-top .news-item .title a {
                
            
                font-weight: 700;
                font-size: 14px; /*big title size */
                color:#000; /*black*/
            }

                .media-top .news-item .title a:hover {
                    color: #b13446; /*red*/
                    transition: color 0.7s ease;
                }

/* Bottom horizontal split into 3 vertical columns */
.media-bottom {
    display: flex;
    gap: 15px;
}

/* Each vertical column */
.media-col-40 {
    width: 40%;
}

.media-col-30 {
    width: 30%;
}

    .media-col-30 img {
        width: 100%;
        height: 160px;
        object-fit: cover;
    }

.media-col-40 img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}



.media-col-40 .news-title {
    text-align: right;
    margin-bottom: 8px;
    padding: 10px 15px;
    border-bottom: none;
}

    .media-col-40 .news-title a {
        
    
        font-weight: 700;
        font-size: 16px; /*big title size */
       color:#000; /*black*/
    }


        .media-col-40 .news-title a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

.media-col-30 .news-title {
    margin-bottom: 8px;
    padding: 10px 15px;
    border-bottom: none;
    text-align: right;
}

    .media-col-30 .news-title a {
    
        font-weight: 700;
        font-size: 14px; /*big title size */
       color:#000; /*black*/
    }

    .media-col-30 .news-title a:hover {
        color: #b13446; /*red*/
        transition: color 0.7s ease;
    }






/* =================== 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;
}

/* ===================== Responsive Media Queries ===================== */

/* أخفِ زرّ الهامبرغر على الشاشات الكبيرة */
.menu-toggle {
    display: none;
}

/* ===== أجهزة التابلت والمتوسطة (≤768px) ===== */
@media (max-width: 768px) {
    /* زرّ الهامبرغر */
    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        background: transparent;
        border: none;
        cursor: pointer;
        margin: 10px;
    }

    .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;
    }

        nav ul.open {
            display: flex;
        }

    nav .search input {
        width: 100%;
    }

    /* Hot Stocks يلتف عمودي */
    .hot-stocks {
        flex-wrap: wrap;
        padding: 10px;
    }

    /* Main-columns تصبح عمودية */
    .main-columns {
        flex-direction: column;
    }

    .main-left,
    .main-middle,
    .main-right {
        width: 100%;
        margin-bottom: 20px;
    }

    /* SECTION1: الصورة الرئيسية تتكيّف و الأخبار الثانوية تتكدّس */
    .SECTION1_MAIN_IMAGE {
        height: auto !important;
    }

    .SECTION1_SECONDARY {
        position: static;
        transform: none;
        width: 100%;
        flex-wrap: wrap;
        background: transparent;
        box-shadow: none;
        padding: 10px 0;
    }

    .SECTION1_SECONDARY_ITEM {
        flex: 1 1 calc(50% - 20px);
        margin-bottom: 20px;
    }

    /* SECTION2, SECTION4: قوائم عمودية */
    .SECTION2_LIST,
    .SECTION4_LIST {
        flex-direction: column;
    }

    .SECTION2_ITEM,
    .SECTION4_ITEM {
        width: 100%;
        margin-bottom: 15px;
    }

    /* SECTION3 & SECTION5: الصور تتكيّف */
    .SECTION3 img,
    .SECTION5_LIST .SECTION5_ITEM img {
        height: auto;
        width: 100%;
    }

    .SECTION5_ITEM {
        flex-direction: column;
    }

    /* What-to-watch: عنصرين في الصف */
    .what-to-watch .watch-item {
        width: calc(50% - 15px);
        margin-bottom: 20px;
    }

    /* second-main, third-main: تتكدّس عمودي */
    .second-main,
    .third-main {
        flex-direction: column;
    }

        .second-main .col40,
        .second-main .col30,
        .third-main .right-half,
        .third-main .left-half {
            width: 100%;
        }

    /* success-section & tech-section: عنصرين في الصف */
    .success-section .news-item,
    .tech-section .news-item {
        width: calc(50% - 15px);
        margin-bottom: 20px;
    }

    /* media-top: عنصرين في الصف */
    .media-top .news-item {
        width: calc(50% - 15px);
    }

    .media-bottom {
        flex-direction: column;
    }

    .media-col-40,
    .media-col-30 {
        width: 100%;
    }
}

/* ===== الهواتف الصغيرة (≤576px) ===== */
@media (max-width: 576px) {
    nav ul li a {
        padding: 10px;
        font-size: 1rem;
    }
    /* SECTION1_SECONDARY عنصر بعرض كامل */
    .SECTION1_SECONDARY_ITEM {
        flex: 1 1 100%;
    }
    /* what-to-watch عنصر بعرض كامل */
    .what-to-watch .watch-item {
        width: 100%;
    }
    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }



}
