﻿/* ================= 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;
        }

/* ===== SECTION1 ===== */
.SECTION1 {
    display: grid;
    grid-template-columns: 30% 40% 30%;
    gap: 20px;
    margin-bottom: 40px;
    margin-top: 30px;
}



.SECTION1_COL1 .article, .SECTION1_COL3 .article {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

    .SECTION1_COL1 .article img {
        width: 130px;
        height: 100px;
    }

.SECTION1_COL1 .content, .SECTION1_COL3 .content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.SECTION1_COL1 .article .content .titel {
    text-align: right;
}

    .SECTION1_COL1 .article .content .titel a {
        font-weight: 700;
        font-size: 14px; /*big title size */
        color: #000; /*black*/
    }


        .SECTION1_COL1 .article .content .titel a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }



.SECTION1_COL1 .article .content .author {
    font-size: .8rem;
    color: #666;
}



.SECTION1_COL2 .main-article {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .SECTION1_COL2 .main-article img {
        height: 250px;
    }

    .SECTION1_COL2 .main-article .titel {
        text-align: right;
    }

        .SECTION1_COL2 .main-article .titel a {
            font-weight: 700;
            font-size: 14px; /*big title size */
            color: #000; /*black*/
        }


            .SECTION1_COL2 .main-article .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .SECTION1_COL2 .main-article .text {
        text-align: right;
        font-size: 14px;
        line-height: 2;
        color: #555;
    }

    .SECTION1_COL2 .main-article .author {
        font-size: .8rem;
        color: #666;
    }




.SECTION1_COL3 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    overflow: hidden;
}

    .SECTION1_COL3 .article {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        margin-bottom: 10px;
    }

    .SECTION1_COL3 .image-block {
        display: flex;
        flex-direction: column;
        gap: 5px;
        flex-shrink: 0;
        width: 100px;
    }

        .SECTION1_COL3 .image-block img {
            width: 100%;
            height: 100px;
            object-fit: cover;
        }


    .SECTION1_COL3 .article .content .titel {
        text-align: right;
        margin-top: 20px
    }

        .SECTION1_COL3 .article .content .titel a {
            font-weight: 700;
            font-size: 14px; /*big title size */
            color: #000; /*black*/
        }


            .SECTION1_COL3 .article .content .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }



    .SECTION1_COL3 .article .content .author {
        font-size: .8rem;
        color: #666;
        margin-top: 25px;
    }


    .SECTION1_COL3 .meta {
        font-size: 0.75rem;
        color: #666;
        text-align: right;
    }



/* ===== SECTION2 ===== */
.SECTION2 {
    margin-bottom: 40px;
}

.SECTION2_AD {
    width: 100%;
    height: 100px;
}

    .SECTION2_AD img {
        width: 100%;
        height: 100px;
        display: block;
    }


/* ===== SECTION3 ===== */
.SECTION3 {
    display: grid;
    grid-template-columns: 40% 30% 30%;
    gap: 20px;
    margin-bottom: 40px;
}

.SECTION3_title {
    display: inline-block;
    font-weight: 700;
    font-size: 14px;
    margin: 5px 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;
}

.SECTION3_COL1 .main-article {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .SECTION3_COL1 .main-article img {
        height: 300px;
    }


    .SECTION3_COL1 .main-article .titel {
        text-align: right;
    }

        .SECTION3_COL1 .main-article .titel a {
            font-weight: 700;
            font-size: 16px; /*big title size */
            color: #000; /*black*/
        }

            .SECTION3_COL1 .main-article .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .SECTION3_COL1 .main-article .text {
        text-align: right;
        font-size: 14px;
        line-height: 2;
        color: #555;
    }

    .SECTION3_COL1 .main-article .author {
        font-size: .8rem;
        color: #666;
    }





.SECTION3_COL2 .article {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}



    .SECTION3_COL2 .article img {
        width: 100px;
        height: 100px;
    }



    .SECTION3_COL2 .article .content .titel {
        text-align: right;
    }

        .SECTION3_COL2 .article .content .titel a {
            text-align: right;
            font-weight: 700;
            font-size: 14px; /*big title size */
            color: #000; /*black*/
        }


            .SECTION3_COL2 .article .content .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .SECTION3_COL2 .article .content .text {
        text-align: right;
        font-size: 14px;
        line-height: 2;
        color: #555;
    }



    .SECTION3_COL2 .article .content .author {
        font-size: .8rem;
        color: #666;
    }





.SECTION3_COL3 {
    border-right: 1px solid #cccccc;
    padding-right: 15px; /* أو أي قيمة تراها مناسبة */
}

    .SECTION3_COL3 .article {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
        align-items: flex-start;
    }

    .SECTION3_COL3 .image-block {
        display: flex;
        flex-direction: column;
        gap: 5px;
        flex-shrink: 0;
        width: 100px;
    }

        .SECTION3_COL3 .image-block img {
            width: 100%;
            height: 100px;
            object-fit: cover;
        }


    .SECTION3_COL3 .article .content .titel {
        text-align: right;
        margin-top: 20px
    }

        .SECTION3_COL3 .article .content .titel a {
            font-weight: 700;
            font-size: 14px; /*big title size */
            color: #000; /*black*/
        }


            .SECTION3_COL3 .article .content .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }



    .SECTION3_COL3 .article .content .author {
        font-size: .8rem;
        color: #666;
        margin-top: 30px
    }


    .SECTION3_COL3 .meta {
        font-size: 0.75rem;
        color: #666;
        text-align: right;
    }


/* ===== SECTION4 ===== */
.SECTION4 {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 20px;
    margin-bottom: 40px;
}

.SECTION4_title {
    display: inline-block;
    font-weight: 700;
    font-size: 14px;
    margin: 5px 0 20px;
    text-decoration-line: underline;
    text-decoration-style: double;
    text-decoration-color: #d32f2f;
    text-decoration-thickness: 1px;
    text-underline-offset: 10px;
    padding-bottom: 5px;
}

.SECTION4_LEFT {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

    .SECTION4_LEFT .top-main img {
        width: 100%;
        height: 400px;
    }

    .SECTION4_LEFT .top-main .titel {
        text-align: right;
    }

        .SECTION4_LEFT .top-main .titel a {
            font-weight: 700;
            font-size: 16px; /*big title size */
            color: #000; /*black*/
        }

            .SECTION4_LEFT .top-main .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .SECTION4_LEFT .top-main .source {
        font-size: .8rem;
        color: #666;
        text-align: left;
    }

    .SECTION4_LEFT .bottom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

        .SECTION4_LEFT .bottom .sub-article {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

            .SECTION4_LEFT .bottom .sub-article img {
                height: 200px;
            }

            .SECTION4_LEFT .bottom .sub-article .titel {
                text-align: right;
            }

                .SECTION4_LEFT .bottom .sub-article .titel a {
                    font-weight: 700;
                    font-size: 14px; /*big title size */
                    color: #000; /*black*/
                }

                    .SECTION4_LEFT .bottom .sub-article .titel a:hover {
                        color: #b13446; /*red*/
                        transition: color 0.7s ease;
                    }

            .SECTION4_LEFT .bottom .sub-article .source {
                font-size: .8rem;
                color: #666;
                text-align: left;
            }

.SECTION4_RIGHT {
    margin-right: calc(2% + 11px); /* محاذاة مع العمود الثالث في SECTION3 */
    border-right: 1px solid #cccccc;
    padding-right: 15px; /* أو أي قيمة تراها مناسبة */
}


    .SECTION4_RIGHT .article {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
    }



        .SECTION4_RIGHT .article img {
            width: 100px;
            height: 100px;
        }

    .SECTION4_RIGHT .image-block {
        display: flex;
        flex-direction: column;
        gap: 5px;
        flex-shrink: 0;
        width: 100px;
    }

    .SECTION4_RIGHT .article .content .titel {
        text-align: right;
        margin-top: 20px
    }

        .SECTION4_RIGHT .article .content .titel a {
            font-weight: 700;
            font-size: 14px; /*big title size */
            color: #000; /*black*/
        }

            .SECTION4_RIGHT .article .content .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }



    .SECTION4_RIGHT .article .content .author {
        font-size: .8rem;
        color: #666;
        margin-top: 30px
    }


    .SECTION4_RIGHT .meta {
        font-size: .8rem;
        color: #666;
    }

/* ===== SECTION5 ===== */
.SECTION5 {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 20px;
    margin-bottom: 40px;
}

.SECTION5_title {
    display: inline-block;
    font-weight: 700;
    font-size: 14px;
    margin: 5px 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;
}

.SECTION5_LEFT .main-article {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .SECTION5_LEFT .main-article img {
        height: 400px;
        width: 100%;
        object-fit: cover;
    }

    .SECTION5_LEFT .main-article .titel {
        text-align: right;
    }

        .SECTION5_LEFT .main-article .titel a {
            font-weight: 700;
            font-size: 16px; /*big title size */
            color: #000; /*black*/
        }

            .SECTION5_LEFT .main-article .titel a:hover {
                color: #b13446; /*red*/
                transition: color 0.7s ease;
            }

    .SECTION5_LEFT .main-article .author {
        font-size: .8rem;
        color: #666;
        text-align: left;
    }

    .SECTION5_LEFT .main-article .text {
        text-align: right;
        font-size: 14px;
        line-height: 2;
        color: #555;
    }



.SECTION5_RIGHT .article {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.SECTION5_RIGHT .image-container {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
}

    .SECTION5_RIGHT .image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }



.SECTION5_RIGHT .content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.SECTION5_RIGHT .article .content .titel {
    text-align: right;
}

    .SECTION5_RIGHT .article .content .titel a {
        font-weight: 700;
        font-size: 14px; /*big title size */
        color: #000; /*black*/
    }

        .SECTION5_RIGHT .article .content .titel a:hover {
            color: #b13446; /*red*/
            transition: color 0.7s ease;
        }

.SECTION5_RIGHT .article .content .text {
    text-align: right;
    font-size: 14px;
    line-height: 2;
    color: #555;
}


.SECTION5_RIGHT .article .content .author {
    font-size: .8rem;
    color: #666;
}
/* =================== 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 Additions ========== */

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}


/* ===== Tablets & Small Desktops (≤768px) ===== */
@media (max-width: 768px) {
    /* Navbar: hamburger & vertical menu */
    .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;
        z-index: 1001;
    }

        nav ul.open {
            display: flex;
        }

    nav .search input {
        width: 100%;
    }

    /* SECTION1: من 3 أعمدة إلى عمود واحد */
    .SECTION1 {
        grid-template-columns: 1fr !important;
    }

    .SECTION1_COL1,
    .SECTION1_COL2,
    .SECTION1_COL3 {
        width: 100% !important;
    }

    /* SECTION2: قائمة عمودية */
    .SECTION2 {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* SECTION3، SECTION4، SECTION5: من شبكة أعمدة إلى عمود واحد */
    .SECTION3,
    .SECTION4,
    .SECTION5 {
        grid-template-columns: 1fr !important;
    }

    .SECTION3_COL1,
    .SECTION3_COL2,
    .SECTION3_COL3,
    .SECTION4_LEFT,
    .SECTION4_RIGHT,
    .SECTION5_LEFT,
    .SECTION5_RIGHT {
        width: 100% !important;
    }

    /* Main Columns + second-main + third-main: عمودي */
    .main-columns,
    .second-main,
    .third-main {
        flex-direction: column;
        gap: 20px;
    }

        .main-left,
        .main-middle,
        .main-right,
        .second-main .col40,
        .second-main .col30,
        .third-main .right-half,
        .third-main .left-half {
            width: 100% !important;
        }

    /* Hot Stocks: يلتف */
    .hot-stocks {
        flex-wrap: wrap;
        padding: 10px;
    }

    /* What-to-watch + Success + Tech: عنصرين في الصف */
    .what-to-watch .watch-item,
    .success-section .news-item,
    .tech-section .news-item,
    .media-top .news-item {
        width: calc(50% - 15px) !important;
        margin-bottom: 20px;
    }

    .media-bottom {
        flex-direction: column;
        gap: 20px;
    }

    .media-col-40,
    .media-col-30 {
        width: 100% !important;
    }
}

/* ===== Mobile Portrait (≤576px) ===== */
@media (max-width: 576px) {
    /* تسهيل اللمس في القائمة */
    nav ul li a {
        padding: 10px 0;
        font-size: 1rem;
    }

    /* بطاقات الأخبار والعناوين تمتد لعروض كاملة */
    .what-to-watch .watch-item,
    .success-section .news-item,
    .tech-section .news-item,
    .media-top .news-item {
        width: 100% !important;
    }

    /* SECTION1: مقالات الجانبين تصبح عمودية */
    .SECTION1_COL1 .article,
    .SECTION1_COL3 .article {
        flex-direction: column;
        gap: 10px;
    }


    .header .social-icons {
        gap: 5px; /* تقليل المسافات بين الأيقونات */
    }

    .header .info {
        font-size: 0.8rem; /* تصغير النص */
    }

}
