/*
Theme Name: El Farama
Theme URI: https://elfarama.com
Author: El Farama Team
Description: قالب إخباري عصري مخصص لموقع الفرما
Version: 1.0.0
*/

/* --- الألوان الأساسية والمتغيرات --- */
:root {
    --red: #FF5B5B;
    --purple: #685AFF;
    --blue: #9CCFFF;
    --green: #F0FFC3;
    --bg-dark: #0f0f13;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }

body {
    background-color: var(--bg-dark);
    color: #fff;
    display: flex;
    overflow-x: hidden;
}

/* --- أنميشن دخول الصفحة --- */

.fade-in-right { animation: fadeInRight 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: var(--delay); }

@keyframes fadeInRight { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }

/* --- الإضاءة الخلفية --- */

.bg-glow {
    position: fixed; width: 500px; height: 500px;
    background: radial-gradient(circle, var(--purple) 0%, transparent 60%);
    top: -150px; left: -150px; opacity: 0.25; filter: blur(100px);
    z-index: -1; animation: pulse-glow 8s infinite alternate;
}

@keyframes pulse-glow { 0% { transform: scale(1); opacity: 0.25; } 100% { transform: scale(1.2); opacity: 0.4; } }

/* --- القائمة الجانبية (Sidebar) --- */

.sidebar {
    width: 260px; height: 100vh; background: var(--glass-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border); position: fixed; right: 0; top: 0;
    padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 2rem; z-index: 100;
}

.logo { font-size: 2.2rem; font-weight: 900; color: #fff; text-align: center; }
.logo span { color: var(--red); }

.menu { list-style: none; display: flex; flex-direction: column; gap: 1rem; }

.menu-item {
    display: flex; align-items: center; gap: 15px; padding: 12px 15px;
    border-radius: 12px; cursor: pointer; transition: all 0.3s ease; font-weight: 700; color: #aaa;
}

.menu-item i { font-size: 1.2rem; transition: all 0.3s ease; }
.menu-item:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.menu-item:hover .fa-fire { color: var(--red); animation: pulse-fire 0.6s infinite alternate; }
.menu-item:hover .fa-futbol { color: var(--blue); animation: bounce-roll 0.6s ease-in-out infinite alternate; }
.menu-item:hover .fa-microchip { color: var(--purple); text-shadow: 0 0 15px var(--purple); animation: tech-glow 1s infinite alternate; }
.menu-item:hover .fa-chart-line { color: var(--green); animation: chart-up 0.5s ease forwards; }
.menu-item:hover .fa-clapperboard { color: var(--blue); animation: clap-board 0.4s ease-in-out forwards; }

.scrollable-menu { max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 5px; }
.scrollable-menu::-webkit-scrollbar { width: 4px; }
.scrollable-menu::-webkit-scrollbar-track { background: transparent; }
.scrollable-menu::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
.scrollable-menu:hover::-webkit-scrollbar-thumb { background: var(--purple); }
.menu-label { font-size: 0.75rem; color: #555; text-transform: uppercase; letter-spacing: 1px; margin-top: 15px; margin-bottom: 5px; padding-right: 15px; font-weight: 900; }

@keyframes pulse-fire { 0% { transform: scale(1); } 100% { transform: scale(1.3); text-shadow: 0 0 10px var(--red); } }
@keyframes bounce-roll { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(-8px) rotate(180deg); } }
@keyframes tech-glow { 0% { opacity: 0.7; } 100% { opacity: 1; text-shadow: 0 0 20px var(--purple); } }
@keyframes chart-up { 0% { transform: translateY(5px) scale(0.8); } 100% { transform: translateY(-3px) scale(1.1); } }
@keyframes clap-board { 0% { transform: rotate(0deg); } 50% { transform: rotate(-20deg) scale(1.1); } 100% { transform: rotate(0deg) scale(1); } }

/* --- المحتوى الرئيسي --- */

.main-content { margin-right: 260px; width: calc(100% - 260px); padding: 2rem; }
.marquee-container { width: 100%; overflow: hidden; background: var(--red); color: #111; padding: 10px 0; border-radius: 8px; font-weight: 700; margin-bottom: 2rem; display: flex; white-space: nowrap; }
.marquee-content { display: inline-block; animation: marquee 20s linear infinite; }
.marquee-container:hover .marquee-content { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* إعداد أساسي لأيقونات القائمة عشان تقبل الحركة بنعومة */

.menu-item i {
    transition: all 0.3s ease;
    display: inline-block;
    transform-origin: center;
}

/* ---------------------------------- */
/* 1. الرئيسية (Home) - تأثير النبض والترحيب */
/* ---------------------------------- */

@keyframes pulseHome {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) translateY(-2px); color: var(--blue); }
    100% { transform: scale(1); }
}

.menu-item:hover .icon-home {
    animation: pulseHome 0.5s ease-in-out;
    color: var(--blue);
}

/* ---------------------------------- */
/* 2. عاجل (Fire) - تأثير اشتعال النار */
/* ---------------------------------- */

@keyframes flickerFire {
    0% { transform: scale(1) rotate(0deg); color: #ff9800; }
    25% { transform: scale(1.1) rotate(-5deg); color: #f44336; }
    50% { transform: scale(1.2) rotate(5deg); color: #ffeb3b; }
    75% { transform: scale(1.1) rotate(-5deg); color: #f44336; }
    100% { transform: scale(1) rotate(0deg); color: var(--red); }
}

.menu-item:hover .icon-fire {
    /* الحركة دي مستمرة طول ما الماوس على الزرار */
    animation: flickerFire 0.6s infinite alternate;
}

/* ---------------------------------- */
/* 3. أخبار مصر (Flag) - تأثير رفرفة العلم */
/* ---------------------------------- */

@keyframes waveFlag {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg) scale(1.1); color: #c00; }
    75% { transform: rotate(15deg) scale(1.1); color: #fff; text-shadow: 0 0 3px rgba(0,0,0,0.5); }
    100% { transform: rotate(0deg); color: #000; }
}

.menu-item:hover .icon-flag {
    animation: waveFlag 0.6s ease-in-out;
}

/* ---------------------------------- */
/* 4. عالم وعرب (Earth) - تأثير دوران الكرة الأرضية */
/* ---------------------------------- */

@keyframes spinEarth {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); color: var(--blue); }
    100% { transform: rotate(360deg) scale(1); color: var(--blue); }
}

.menu-item:hover .icon-earth {
    animation: spinEarth 0.8s linear;
    color: var(--blue);
}

/* ---------------------------------- */
/* 5. محافظات (Map/Location) - تأثير قفزة دبوس الخريطة */
/* ---------------------------------- */

@keyframes dropPin {
    0% { transform: translateY(0); }
    30% { transform: translateY(-8px) scale(1.1); color: var(--green); }
    60% { transform: translateY(0); }
    80% { transform: translateY(-4px); }
    100% { transform: translateY(0); color: var(--green); }
}

.menu-item:hover .icon-map {
    animation: dropPin 0.6s ease;
    color: var(--green);
}

/* ---------------------------------- */
/* 6. حوادث (Handcuffs) - تأثير الكلبشة / الاهتزاز */
/* ---------------------------------- */

@keyframes shakeHandcuffs {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(-20deg) scale(1.1); color: #555; }
    40% { transform: rotate(20deg) scale(1.1); color: var(--red); }
    60% { transform: rotate(-20deg) scale(1.1); color: #555; }
    80% { transform: rotate(20deg) scale(1.1); color: var(--red); }
    100% { transform: rotate(0deg) scale(1); color: #888; }
}

.menu-item:hover .icon-handcuffs {
    animation: shakeHandcuffs 0.5s ease-in-out;
}

/* ---------------------------------- */
/* 7. إقتصاد (Chart Line) - تأثير السهم الصاعد */
/* ---------------------------------- */

@keyframes chartUp {
    0% { transform: scale(1) translateY(0) translateX(0); }
    50% { transform: scale(1.2) translateY(-3px) translateX(3px); color: #4caf50; /* أخضر بيعبر عن المكسب */ }
    100% { transform: scale(1) translateY(0) translateX(0); color: #4caf50; }
}

.menu-item:hover .icon-economy {
    animation: chartUp 0.6s ease-in-out;
    color: #4caf50;
}

/* ---------------------------------- */
/* 8. رياضة محلية (Futbol) - تأثير دوران الكرة */
/* ---------------------------------- */

@keyframes rollBall {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); color: #fff; }
    100% { transform: rotate(360deg) scale(1); color: #fff; }
}

.menu-item:hover .icon-sports-local {
    animation: rollBall 0.6s linear;
}

/* ---------------------------------- */
/* 9. رياضة عالمية (Trophy) - تأثير الكأس الذهبي اللامع */
/* ---------------------------------- */

@keyframes shineTrophy {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); color: #ffd700; /* ذهبي */ }
    50% { transform: scale(1.2) rotate(10deg); color: #ffeb3b; /* أصفر لامع */ }
    75% { transform: scale(1.2) rotate(-10deg); color: #ffd700; }
    100% { transform: scale(1) rotate(0deg); color: #ffd700; }
}

.menu-item:hover .icon-sports-global {
    animation: shineTrophy 0.7s ease-in-out;
    color: #ffd700;
}

/* ---------------------------------- */
/* 10. طاقة وبترول (Gas Pump) - تأثير الضخ (حركة لفوق ولتحت) */
/* ---------------------------------- */

@keyframes pumpGas {
    0% { transform: scale(1) translateY(0); }
    30% { transform: scale(1.15) translateY(-3px); color: #ff9800; /* برتقالي بترولي */ }
    50% { transform: scale(1.05) translateY(1px); color: #ff5722; }
    70% { transform: scale(1.15) translateY(-3px); color: #ff9800; }
    100% { transform: scale(1) translateY(0); color: #ff5722; }
}

.menu-item:hover .icon-energy {
    animation: pumpGas 0.6s ease-in-out;
    color: #ff5722;
}

/* ---------------------------------- */
/* 11. تكنولوجيا (Microchip) - تأثير نبض النيون (Processing) */
/* ---------------------------------- */

@keyframes techNeon {
    0% { transform: scale(1); text-shadow: 0 0 0 transparent; color: #00bcd4; }
    50% { transform: scale(1.15); text-shadow: 0 0 10px #00bcd4, 0 0 20px #00bcd4; color: #fff; }
    100% { transform: scale(1); text-shadow: 0 0 0 transparent; color: #00bcd4; }
}

.menu-item:hover .icon-tech {
    animation: techNeon 0.6s infinite alternate; /* بيستمر كأنه شغال */
    color: #00bcd4; /* لون سيان تكنولوجي */
}

/* ---------------------------------- */
/* 12. فنون وثقافة (Masks Theater) - تأثير الحركة المسرحية */
/* ---------------------------------- */

@keyframes theaterDrama {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.2); color: #9c27b0; /* بنفسجي فني */ }
    75% { transform: rotate(15deg) scale(1.2); color: #e91e63; /* وردي غامق */ }
    100% { transform: rotate(0deg) scale(1); color: #9c27b0; }
}

.menu-item:hover .icon-arts {
    animation: theaterDrama 0.6s ease-in-out;
    color: #9c27b0;
}

/* ---------------------------------- */
/* 13. مرأة ومنوعات (Venus) - تأثير الطفو النّاعم */
/* ---------------------------------- */

@keyframes gentleFloat {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.1); color: #f06292; }
    100% { transform: translateY(0) scale(1); color: #f06292; }
}

.menu-item:hover .icon-women {
    animation: gentleFloat 0.8s ease-in-out infinite;
    color: #f06292; /* لون وردي أنثوي */
}

/* ---------------------------------- */
/* 14. صحة (Heart Pulse) - تأثير نبض القلب الحقيقي */
/* ---------------------------------- */

@keyframes heartbeatPulse {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); color: #e53935; }
    30% { transform: scale(1); }
    45% { transform: scale(1.3); color: #e53935; }
    100% { transform: scale(1); color: var(--red); }
}

.menu-item:hover .icon-health {
    animation: heartbeatPulse 0.8s ease-in-out;
    color: var(--red);
}

/* ---------------------------------- */
/* 15. حظك اليوم (Clover) - تأثير الدوران السحري لجلب الحظ */
/* ---------------------------------- */

@keyframes magicSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); color: #8bc34a; }
    100% { transform: rotate(360deg) scale(1); color: #4caf50; }
}

.menu-item:hover .icon-luck {
    animation: magicSpin 0.6s ease-in-out;
    color: #4caf50; /* لون أخضر للحظ */
}

/* ---------------------------------- */
/* 16. تليفزيون (TV) - تأثير وميض الشاشة */
/* ---------------------------------- */

@keyframes tvFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: #e0f7fa; text-shadow: 0 0 10px #00bcd4; /* إضاءة شاشة */ }
    100% { transform: scale(1); color: #607d8b; }
}

.menu-item:hover .icon-tv {
    animation: tvFlash 0.5s ease-in-out;
    color: #607d8b; /* لون رمادي مزرق */
}

/* ---------------------------------- */
/* 17. ألبومات (Images) - تأثير تصفح الصور (دوران خفيف وتكبير) */
/* ---------------------------------- */

@keyframes photoSnap {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(15deg); color: #ffeb3b; }
    100% { transform: scale(1) rotate(0deg); color: #ff9800; }
}

.menu-item:hover .icon-albums {
    animation: photoSnap 0.5s ease;
    color: #ff9800; /* لون برتقالي دافئ */
}

/* ---------------------------------- */
/* 18. كاريكاتير (Pen Nib) - تأثير الرسم السريع الساخر */
/* ---------------------------------- */

@keyframes sketchComic {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-4px, 4px) rotate(-15deg); color: #ffb300; }
    40% { transform: translate(3px, -3px) rotate(10deg); }
    60% { transform: translate(-4px, 4px) rotate(-15deg); color: #ff9800; }
    80% { transform: translate(3px, -3px) rotate(10deg); }
    100% { transform: translate(0, 0) rotate(0deg); color: #ffb300; }
}

.menu-item:hover .icon-comic {
    animation: sketchComic 0.6s ease-in-out;
    color: #ffb300; /* لون أصفر/برتقالي مبهج */
}

/* ---------------------------------- */
/* 19. مقالات وتحقيقات (Newspaper) - تأثير تصفح الجريدة */
/* ---------------------------------- */

@keyframes readArticle {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.15) translateY(-3px) rotate(-3deg); color: #1a237e; }
    100% { transform: scale(1) translateY(0); color: #3f51b5; }
}

.menu-item:hover .icon-article {
    animation: readArticle 0.6s ease-in-out;
    color: #3f51b5; /* لون أزرق رسمي ووقور للمقالات */
}

/* ========================================= */
/* إعدادات عامة للأنيميشن عند التمرير */
/* ========================================= */

.scroll-animate {
    opacity: 0; /* القسم هيكون مخفي في البداية */
    visibility: hidden;
}

.scroll-animate.active {
    opacity: 1;
    visibility: visible;
}
/* تأثير الـ Hover على الأيقونة (لون بنفسجي وحركة) */
.menu-item:hover .variety-menu-icon {
    color: #d178e2 !important;
    animation: glowAndFloat 1.5s infinite ease-in-out;
}

/* تأثير الـ Hover على الكلمة (لون أبيض) */
/* بنستخدم :has عشان نحدد الـ menu-item اللي جواه أيقونة المنوعات فقط */

.menu-item:has(.variety-menu-icon):hover span {
    color: #fff !important;
}

/* حركة الأيقونة (بدون تغيير) */

@keyframes glowAndFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 5px rgba(209, 120, 226, 0.4));
    }
    50% {
        transform: translateY(-4px) scale(1.1);
        filter: drop-shadow(0 0 15px rgba(209, 120, 226, 0.9));
    }
}

/* ========================================= */
/* إعدادات هيدر الموبايل الجديد               */
/* ========================================= */
.mobile-top-bar {
    display: none; /* مخفي على الشاشات الكبيرة */
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(15, 15, 19, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 998;
}

.mobile-top-bar .logo { font-size: 1.8rem; }
#mobile-menu-btn { background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; transition: color 0.3s; }
#mobile-menu-btn:hover { color: var(--red); }
.close-sidebar-btn { display: none; text-align: left; cursor: pointer; color: #fff; font-size: 1.5rem; padding-bottom: 15px; }

/* ========================================= */
/* التجاوب (Responsiveness) للموبايل والتابلت*/
/* ========================================= */
@media (max-width: 992px) {
    /* إظهار هيدر الموبايل */
    .mobile-top-bar {
        display: flex;
    }

    /* تعديل القائمة الجانبية عشان تكون Off-Canvas */
    .sidebar {
        right: -300px; /* مخفية بره الشاشة يمين */
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        width: 280px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    }
    
    .sidebar.active {
        right: 0; /* لما بندوس على الزرار بتدخل الشاشة */
    }

    .desktop-logo { display: none; /* إخفاء اللوجو الداخلي لتوفير المساحة */ }
    .close-sidebar-btn { display: block; /* إظهار زرار الـ X للإغلاق */ }

    /* تعديل مساحة المحتوى الرئيسي */
    .main-content {
        width: 100%;
        margin-right: 0;
        padding: 90px 1rem 1rem 1rem; /* زودنا المسافة من فوق عشان شريط الموبايل */
    }

    /* تصغير حجم خط شريط الأخبار العاجلة */
    .marquee-container {
        font-size: 0.9rem;
        padding: 8px 0;
    }
}

/* ========================================= */
/* الدخلة السينمائية - أحمر كامل             */
/* ========================================= */

:root {
    --red: #FF5B5B; 
}

.farma-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.curtain {
    position: absolute;
    width: 100%;
    height: 50vh;
    background: #070a13;
    z-index: 1;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.top-curtain {
    top: 0;
    border-bottom: 2px solid rgba(255, 91, 91, 0.2); 
}

.bottom-curtain {
    bottom: 0;
}

.intro-content {
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* كلمة الفرما - الشاشات الكبيرة */
.farma-mega-text {
    font-size: 100px;
    font-weight: 900;
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 2px var(--red); 
    letter-spacing: 30px;
    opacity: 0;
    animation: textFormingRed 2s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.laser-slash {
    width: 0;
    height: 4px;
    background: #ffffff;
    box-shadow: 0 0 20px var(--red), 0 0 40px var(--red);
    margin-top: 10px;
    border-radius: 50%;
    animation: laserShoot 1.5s 0.5s ease-in-out forwards;
}

/* ========================================= */
/* الأكشن النهائي والانشقاق                  */
/* ========================================= */

.farma-intro.reveal .top-curtain { transform: translateY(-100%); }
.farma-intro.reveal .bottom-curtain { transform: translateY(100%); }
.farma-intro.reveal .farma-mega-text { animation: explodeZoom 1s cubic-bezier(0.77, 0, 0.175, 1) forwards; }
.farma-intro.reveal .laser-slash { opacity: 0; transition: 0.3s; }

/* ========================================= */
/* Keyframes للأنيميشن الأساسي               */
/* ========================================= */

@keyframes textFormingRed {
    0% { opacity: 0; filter: blur(20px); transform: scale(1.5); }
    40% { opacity: 1; filter: blur(0); letter-spacing: 5px; transform: scale(1); -webkit-text-fill-color: transparent; text-shadow: none; }
    80% { letter-spacing: 2px; -webkit-text-fill-color: rgba(255, 91, 91, 0.5); text-shadow: 0 0 20px rgba(255, 91, 91, 0.5); }
    100% { letter-spacing: 0px; -webkit-text-fill-color: var(--red); text-shadow: 0 0 15px rgba(255, 91, 91, 0.4); opacity: 1; }
}

@keyframes laserShoot {
    0% { width: 0; opacity: 0; }
    50% { width: 120%; opacity: 1; }
    100% { width: 0; opacity: 0; }
}

@keyframes explodeZoom {
    0% { transform: scale(1); opacity: 1; }
    30% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(40); opacity: 0; }
}

/* ========================================= */
/* التجاوب (Responsiveness) للموبايل والتابلت*/
/* ========================================= */

@media (max-width: 768px) {
    .farma-mega-text {
        font-size: 45px; /* تصغير الخط عشان يناسب الموبايل */
        -webkit-text-stroke: 1px var(--red); /* تقليل سمك التحديد */
        animation: textFormingRedMobile 2s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    }

    /* أنيميشن مخصص للموبايل بمسافات (letter-spacing) أصغر */
    @keyframes textFormingRedMobile {
        0% { opacity: 0; filter: blur(15px); transform: scale(1.2); letter-spacing: 15px; }
        40% { opacity: 1; filter: blur(0); letter-spacing: 3px; transform: scale(1); -webkit-text-fill-color: transparent; text-shadow: none; }
        80% { letter-spacing: 1px; -webkit-text-fill-color: rgba(255, 91, 91, 0.5); text-shadow: 0 0 15px rgba(255, 91, 91, 0.5); }
        100% { letter-spacing: 0px; -webkit-text-fill-color: var(--red); text-shadow: 0 0 10px rgba(255, 91, 91, 0.4); opacity: 1; }
    }
}

/* ========================================== */
/* شبكة الأخبار الرئيسية (Bento Box Grid) */
/* ========================================== */
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 1.5rem; }
.bento-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 1.5rem; position: relative; overflow: hidden; cursor: pointer; transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); display: flex; flex-direction: column; justify-content: flex-end; z-index: 1; }
.bento-card:hover { transform: translateY(-8px) scale(1.02); border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.03); }
.bento-card::after { content: ''; position: absolute; top: 0; left: -150%; width: 50%; height: 100%; background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.06), transparent); transform: skewX(-25deg); transition: all 0.7s ease; z-index: 2; pointer-events: none; }
.bento-card:hover::after { left: 150%; }

.card-hero { grid-column: span 2; grid-row: span 2; background-image: linear-gradient(to top, rgba(15, 15, 19, 0.95) 0%, rgba(15, 15, 19, 0.2) 60%, transparent 100%), url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80'); background-position: center; background-size: 100%; background-repeat: no-repeat; transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-size 6s linear; }
.card-hero:hover { background-size: 110%; }

.card-tag { position: absolute; top: 1.5rem; right: 1.5rem; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; background: var(--glass-bg); backdrop-filter: blur(10px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 3; }
.tag-red { color: var(--red); border: 1px solid rgba(255, 91, 91, 0.3); }
.tag-green { color: var(--green); border: 1px solid rgba(240, 255, 195, 0.3); }
.tag-blue { color: var(--blue); border: 1px solid rgba(156, 207, 255, 0.3); }
.tag-purple { color: var(--purple); border: 1px solid rgba(104, 90, 255, 0.3); }

.bento-card:hover .card-tag { transform: translateY(-4px) scale(1.08); background: rgba(255, 255, 255, 0.08); }
.bento-card:hover .tag-red { box-shadow: 0 5px 15px rgba(255, 91, 91, 0.25); border-color: var(--red); }
.bento-card:hover .tag-green { box-shadow: 0 5px 15px rgba(240, 255, 195, 0.25); border-color: var(--green); }
.bento-card:hover .tag-blue { box-shadow: 0 5px 15px rgba(156, 207, 255, 0.25); border-color: var(--blue); }
.bento-card:hover .tag-purple { box-shadow: 0 5px 15px rgba(104, 90, 255, 0.25); border-color: var(--purple); }

.bento-card h3 { font-size: 1.4rem; margin-bottom: 10px; line-height: 1.4; transition: transform 0.4s ease; z-index: 3; position: relative; }
.card-hero h3 { font-size: 2.2rem; }
.bento-card p { color: #aaa; font-size: 0.95rem; transition: transform 0.4s ease, color 0.4s ease; z-index: 3; position: relative; }
.bento-card:hover h3 { transform: translateY(-5px); }
.bento-card:hover p { transform: translateY(-5px); color: #fff; }

/* Scroll Reveal Classes */
.scroll-reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; }
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

/* ========================================== */
/* القوالب العامة للأقسام (Layout Families) */
/* ========================================== */
.single-category-section { margin-top: 5rem; }
.section-title { margin-bottom: 2rem; position: relative; }
.section-title h2 { font-size: 1.8rem; color: #fff; }
.title-line { width: 60px; height: 4px; background: var(--purple); border-radius: 2px; margin-top: 8px; }

/* 1. قالب عاجل (Urgent Grid) */
.urgent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.urgent-card { background: rgba(255, 91, 91, 0.05); border: 1px solid rgba(255, 91, 91, 0.3); border-radius: 12px; padding: 1.5rem; position: relative; transition: all 0.3s ease; cursor: pointer; }
.urgent-card:hover { background: rgba(255, 91, 91, 0.1); transform: translateY(-5px); box-shadow: 0 5px 20px rgba(255, 91, 91, 0.15); }
.urgent-time { color: var(--red); font-size: 0.85rem; font-weight: bold; margin-bottom: 10px; display: inline-block; padding-right: 15px; }
.urgent-card h3 { font-size: 1.15rem; line-height: 1.5; color: #fff; }
.pulse-dot { position: absolute; right: 1.5rem; top: 1.8rem; width: 8px; height: 8px; background: var(--red); border-radius: 50%; animation: blink-urgent 1s infinite; }
@keyframes blink-urgent { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

/* 2. قالب المجلة (Magazine Layout) */
.layout-magazine { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.mag-main-card { position: relative; border-radius: 16px; overflow: hidden; cursor: pointer; height: 400px; }
.mag-main-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.mag-main-card:hover img { transform: scale(1.05); }
.mag-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem; background: linear-gradient(transparent, rgba(15,15,19,0.95) 80%); }
.mag-content h3 { font-size: 1.5rem; margin-bottom: 10px; }
.mag-content p { color: #aaa; font-size: 0.95rem; }
.mag-side-cards { display: flex; flex-direction: column; gap: 1.5rem; }
.mag-small-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; background: var(--glass-bg); padding: 1rem; border-radius: 12px; border: 1px solid var(--glass-border); transition: all 0.3s ease; }
.mag-small-card:hover { border-color: var(--red); transform: translateX(-5px); }
.mag-small-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.mag-small-card h4 { font-size: 1rem; line-height: 1.4; }

/* 3. قالب البطاقات الأفقية (Horizontal Layout) */
.layout-horizontal { display: flex; flex-direction: column; gap: 1.5rem; }
.horiz-card { display: flex; gap: 1.5rem; align-items: center; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 1.5rem; cursor: pointer; transition: all 0.3s ease; }
.horiz-card:hover { border-color: var(--purple); background: rgba(255,255,255,0.05); transform: translateY(-5px); }
.horiz-img { width: 220px; height: 140px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.horiz-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s ease; }
.horiz-card:hover .horiz-img img { transform: scale(1.1); }
.horiz-text h3 { font-size: 1.3rem; margin-bottom: 8px; }
.horiz-text p { color: #aaa; margin-bottom: 15px; font-size: 0.95rem; }
.horiz-author { color: var(--purple); font-weight: bold; font-size: 0.85rem; }

/* 4. قالب الألبوم الشفاف (Glass Gallery Layout) */
.layout-glass-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.glass-item { position: relative; border-radius: 16px; overflow: hidden; height: 280px; cursor: pointer; }
.glass-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, filter 0.6s ease; filter: brightness(0.8); }
.glass-item:hover img { transform: scale(1.1); filter: brightness(1); }
.glass-caption { position: absolute; bottom: -100%; left: 0; width: 100%; padding: 1.5rem; background: rgba(15, 15, 19, 0.8); backdrop-filter: blur(10px); font-weight: bold; line-height: 1.5; transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.glass-item:hover .glass-caption { bottom: 0; border-top: 2px solid var(--blue); }

/* 5. قسم الاقتصاد (Trading Cards Layout) */
.economy-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.eco-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 1.5rem; position: relative; overflow: hidden; cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; justify-content: space-between; }
.eco-card:hover { transform: translateY(-10px); }
.eco-card.trend-up:hover { border-color: rgba(240, 255, 195, 0.4); box-shadow: 0 10px 30px rgba(240, 255, 195, 0.1); }
.eco-card.trend-down:hover { border-color: rgba(255, 91, 91, 0.4); box-shadow: 0 10px 30px rgba(255, 91, 91, 0.15); }
.eco-glow { position: absolute; top: -30px; left: -30px; width: 120px; height: 120px; border-radius: 50%; filter: blur(40px); opacity: 0.15; transition: opacity 0.4s ease; z-index: 0; }
.eco-card:hover .eco-glow { opacity: 0.35; }
.trend-up .eco-glow { background: var(--green); }
.trend-down .eco-glow { background: var(--red); }
.eco-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.8rem; z-index: 1; }
.eco-ticker { font-family: monospace; font-weight: 900; letter-spacing: 1px; color: #fff; background: rgba(255, 255, 255, 0.05); padding: 5px 12px; border-radius: 8px; font-size: 0.9rem; }
.trend-up .eco-percent { color: var(--green); font-weight: 900; font-size: 1.1rem; }
.trend-down .eco-percent { color: var(--red); font-weight: 900; font-size: 1.1rem; }
.eco-card h3 { font-size: 1.15rem; line-height: 1.5; margin-bottom: 1.5rem; z-index: 1; }
.eco-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: #777; z-index: 1; }
.eco-icon { font-size: 2rem; opacity: 0.3; }
.trend-up .eco-icon { color: var(--green); }
.trend-down .eco-icon { color: var(--red); }

/* ========================================== */
/* 6. قسم التكنولوجيا (Cyber Deck Layout) */
/* ========================================== */
.cyber-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cyber-card {
    background: #0a0a0d; border: 1px solid rgba(104, 90, 255, 0.2);
    padding: 2rem 1.5rem; border-radius: 8px; position: relative;
    border-right: 4px solid var(--purple); cursor: pointer; transition: all 0.3s ease;
}
.cyber-card:hover { background: rgba(104, 90, 255, 0.05); border-right-color: var(--blue); transform: scale(1.02); box-shadow: 0 10px 30px rgba(104, 90, 255, 0.1); }
.cyber-deco { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-top: 2px solid rgba(156, 207, 255, 0.3); border-left: 2px solid rgba(156, 207, 255, 0.3); opacity: 0; transition: 0.3s; }
.cyber-card:hover .cyber-deco { opacity: 1; left: 15px; top: 15px; }
.cyber-tag { font-family: monospace; color: var(--blue); font-size: 0.85rem; display: block; margin-bottom: 15px; letter-spacing: 1px; }
.cyber-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: #fff; line-height: 1.5; }
.cyber-card p { color: #888; font-size: 0.9rem; line-height: 1.6; }

/* ========================================== */
/* 7. قسم الفنون والثقافة (Spotlight Layout) */
/* ========================================== */
.spotlight-layout { display: flex; flex-direction: column; gap: 1.5rem; }
.spotlight-main {
    width: 100%; height: 350px; border-radius: 16px; overflow: hidden; position: relative; cursor: pointer;
}
.spotlight-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.spotlight-main:hover img { transform: scale(1.05); }
.spotlight-overlay { position: absolute; bottom: 0; right: 0; width: 100%; padding: 2.5rem; background: linear-gradient(to top, rgba(15,15,19,0.95), transparent); }
.spotlight-tag { background: var(--blue); color: #000; padding: 4px 12px; border-radius: 4px; font-weight: bold; font-size: 0.8rem; margin-bottom: 10px; display: inline-block; }
.spotlight-overlay h3 { font-size: 1.8rem; max-width: 800px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.spotlight-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.spotlight-sub-card { display: flex; gap: 1rem; align-items: center; background: var(--glass-bg); padding: 1rem; border-radius: 12px; cursor: pointer; transition: 0.3s ease; }
.spotlight-sub-card:hover { background: rgba(255,255,255,0.06); transform: translateY(-5px); }
.spotlight-sub-card img { width: 100px; height: 80px; border-radius: 8px; object-fit: cover; }
.sub-text h4 { font-size: 1.1rem; margin-bottom: 5px; }
.sub-date { color: #aaa; font-size: 0.8rem; }

/* ========================================== */
/* 8. قسم المرأة والمنوعات (Elegant Portrait Layout) */
/* ========================================== */
.elegant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.elegant-card { text-align: center; cursor: pointer; transition: 0.4s ease; }
.elegant-card:hover { transform: translateY(-10px); }
.elegant-img-wrapper {
    width: 100%; height: 300px; border-radius: 150px 150px 0 0; /* شكل القوس (Arch) */
    border: 1px solid rgba(255, 91, 91, 0.3); padding: 6px; margin-bottom: 1.5rem; transition: 0.4s;
}
.elegant-card:hover .elegant-img-wrapper { border-color: var(--red); padding: 10px; }
.elegant-img-wrapper img { width: 100%; height: 100%; border-radius: 140px 140px 0 0; object-fit: cover; }
.elegant-content h3 { font-size: 1.25rem; color: #eee; line-height: 1.5; font-weight: 400; margin-bottom: 15px; }
.elegant-line { width: 40px; height: 2px; background: var(--red); margin: 0 auto; transition: 0.4s; }
.elegant-card:hover .elegant-line { width: 80px; }
/* ========================================== */
/* 9. قسم الرياضة المحلية (Action Slant Layout) */
/* ========================================== */
.action-sports-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.action-card { position: relative; overflow: hidden; border-radius: 12px; cursor: pointer; transform: skewX(-4deg); transition: 0.4s ease; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.action-card:hover { transform: skewX(0deg) translateY(-8px); border-color: var(--blue); box-shadow: 0 15px 30px rgba(156, 207, 255, 0.15); }
.action-img-container { width: 110%; height: 100%; transform: skewX(4deg); margin-left: -5%; overflow: hidden; }
.action-card:hover .action-img-container { transform: skewX(0deg); margin-left: 0; width: 100%; }
.action-img-container img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s ease; filter: contrast(1.1); }
.action-card:hover img { transform: scale(1.08); }
.action-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem; background: linear-gradient(transparent, #050508 90%); transform: skewX(4deg); transition: 0.4s ease; }
.action-card:hover .action-content { transform: skewX(0deg); }
.action-badge { background: var(--blue); color: #000; font-weight: 900; padding: 4px 12px; border-radius: 4px; display: inline-block; margin-bottom: 10px; font-size: 0.85rem; }
.main-action { height: 420px; }
.main-action h3 { font-size: 1.6rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.action-side-column { display: flex; flex-direction: column; gap: 1.5rem; }
.small-action { height: calc(210px - 0.75rem); }
.small-action .action-content { padding: 1.5rem 1rem; }
.small-action h4 { font-size: 1.1rem; line-height: 1.4; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }

/* ========================================== */
/* 10. قسم الرياضة العالمية (Stadium Cards Layout) */
/* ========================================== */
.stadium-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stadium-card { background: #0c0c10; border-radius: 16px; overflow: hidden; cursor: pointer; transition: 0.4s ease; border: 1px solid var(--glass-border); position: relative; }
.stadium-card:hover { transform: translateY(-10px); border-color: rgba(104, 90, 255, 0.4); }
.stadium-img { width: 100%; height: 220px; position: relative; overflow: hidden; }
.stadium-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; filter: grayscale(20%); }
.stadium-card:hover img { filter: grayscale(0%); transform: scale(1.05); }
.stadium-glow { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); width: 80%; height: 40px; background: var(--purple); filter: blur(25px); opacity: 0; transition: 0.4s; z-index: 1; }
.stadium-card:hover .stadium-glow { opacity: 0.6; bottom: 0; }
.stadium-info { padding: 1.5rem; position: relative; z-index: 2; background: linear-gradient(to bottom, transparent, #0c0c10 20%); margin-top: -20px; }
.stadium-league { color: var(--purple); font-size: 0.85rem; font-weight: 800; letter-spacing: 1px; display: block; margin-bottom: 8px; text-transform: uppercase; }
.stadium-info h3 { font-size: 1.15rem; line-height: 1.5; color: #f0f0f0; }

/* ========================================== */
/* 11. قسم طاقة وبترول (Industrial Dashboard Layout) */
/* ========================================== */
.industrial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.industrial-card { background: #08080a; border: 1px solid #222; padding: 1rem; position: relative; cursor: pointer; transition: 0.3s; }
/* الخط العلوي اللي شبه الماسورة */
.industrial-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: #333; transition: 0.3s; }
.industrial-card:hover { background: #0d0d12; border-color: rgba(240, 255, 195, 0.2); }
.industrial-card:hover::before { background: var(--green); box-shadow: 0 0 15px var(--green); }
/* شكل الماسورة الجانبية */
.ind-pipe { position: absolute; left: -1px; top: 20px; width: 3px; height: 0; background: var(--green); transition: 0.4s ease; }
.industrial-card:hover .ind-pipe { height: calc(100% - 40px); box-shadow: 0 0 10px var(--green); }
.ind-img { width: 100%; height: 180px; overflow: hidden; margin-bottom: 1rem; border: 1px solid #222; }
.ind-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: 0.4s; }
.industrial-card:hover .ind-img img { opacity: 1; transform: scale(1.05); }
.ind-content h3 { font-size: 1.15rem; color: #e0e0e0; margin-bottom: 10px; line-height: 1.4; }
.ind-content p { font-size: 0.9rem; color: #777; line-height: 1.6; font-family: monospace; }

/* ========================================== */
/* 12. قسم الصحة (Wellness Layout) */
/* ========================================== */
.wellness-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.wellness-card { background: transparent; border-radius: 24px; position: relative; cursor: pointer; transition: 0.4s ease; padding-bottom: 20px; }
.well-img { width: 100%; height: 220px; border-radius: 24px; overflow: hidden; position: relative; box-shadow: 0 10px 20px rgba(0,0,0,0.3); transition: 0.4s ease; }
.well-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s ease; filter: brightness(0.9); }
.wellness-card:hover .well-img { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(240, 255, 195, 0.15); }
.wellness-card:hover .well-img img { transform: scale(1.05); filter: brightness(1); }
.well-badge { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.9); color: #111; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.85rem; box-shadow: 0 5px 10px rgba(0,0,0,0.2); }
.well-content { background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 20px; padding: 1.5rem; width: 90%; margin: -40px auto 0; position: relative; z-index: 2; transition: 0.4s ease; }
.wellness-card:hover .well-content { border-color: rgba(240, 255, 195, 0.4); background: rgba(255,255,255,0.05); }
.well-content h3 { font-size: 1.15rem; line-height: 1.5; margin-bottom: 10px; color: #fff; }
.well-content p { color: #aaa; font-size: 0.9rem; line-height: 1.5; }

/* ========================================== */
/* 13. قسم حظك اليوم (Cosmic Zodiac Layout) */
/* ========================================== */
.zodiac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.zodiac-card { background: #07070a; border: 1px solid rgba(104, 90, 255, 0.15); border-radius: 16px; padding: 2rem 1.5rem; text-align: center; cursor: pointer; position: relative; overflow: hidden; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.zodiac-card::before { content: ''; position: absolute; top: -50px; left: 50%; transform: translateX(-50%); width: 100px; height: 100px; background: var(--purple); filter: blur(50px); opacity: 0.1; transition: 0.4s; }
.zodiac-card:hover { transform: translateY(-10px); border-color: var(--purple); box-shadow: 0 10px 30px rgba(104, 90, 255, 0.15); }
.zodiac-card:hover::before { opacity: 0.4; }
.zodiac-icon-wrapper { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1.5rem; border: 2px solid rgba(104, 90, 255, 0.4); padding: 5px; position: relative; z-index: 2; transition: 0.4s; }
.zodiac-card:hover .zodiac-icon-wrapper { border-color: var(--purple); transform: scale(1.1) rotate(5deg); box-shadow: 0 0 20px rgba(104, 90, 255, 0.3); }
.zodiac-icon-wrapper img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.zodiac-name { font-size: 1.4rem; color: #fff; margin-bottom: 5px; position: relative; z-index: 2; }
.zodiac-date { color: var(--purple); font-size: 0.85rem; font-weight: bold; margin-bottom: 15px; position: relative; z-index: 2; }
.zodiac-divider { width: 40px; height: 2px; background: rgba(255,255,255,0.1); margin: 0 auto 15px; transition: 0.4s; position: relative; z-index: 2; }
.zodiac-card:hover .zodiac-divider { width: 80px; background: var(--purple); }
.zodiac-text { color: #999; font-size: 0.95rem; line-height: 1.6; position: relative; z-index: 2; }

/* ========================================== */
/* 14. قسم التليفزيون (Cinematic Screen Layout) */
/* ========================================== */
.tv-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tv-card { cursor: pointer; transition: 0.3s ease; }
.tv-card:hover { transform: translateY(-5px); }
.tv-screen { width: 100%; height: 200px; border-radius: 12px; overflow: hidden; position: relative; background: #000; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.tv-screen img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: 0.4s ease; }
.tv-card:hover .tv-screen img { opacity: 0.4; transform: scale(1.05); }
.tv-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); width: 50px; height: 50px; background: rgba(255, 91, 91, 0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; opacity: 0; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); padding-left: 4px; /* توسيط أيقونة التشغيل */ }
.tv-card:hover .tv-play-btn { opacity: 1; transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 20px rgba(255, 91, 91, 0.5); }
.tv-progress-bar { position: absolute; bottom: 0; left: 0; height: 4px; background: var(--red); width: 0%; transition: 0.8s ease; }
.tv-card:hover .tv-progress-bar { width: 45%; /* شريط تقدم وهمي */ }
.tv-info { padding: 1.2rem 0.5rem 0; }
.tv-info h3 { font-size: 1.15rem; line-height: 1.5; margin-bottom: 8px; color: #eef; transition: 0.3s; }
.tv-card:hover .tv-info h3 { color: var(--blue); }
.tv-meta { color: #888; font-size: 0.85rem; font-weight: bold; }

/* ========================================== */
/* 15. قسم الألبومات (Photo Stack Layout) */
/* ========================================== */
.albums-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.album-card { cursor: pointer; }
.album-stack { position: relative; width: 100%; height: 250px; margin-bottom: 1.5rem; perspective: 1000px; }
.album-stack img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 2px solid #222; }
/* الصورة الخلفية مائلة ومصغرة قليلاً */
.stack-back { transform: scale(0.9) rotate(4deg) translate(10px, 10px); opacity: 0.6; z-index: 1; }
/* الصورة الأساسية مستقيمة في الأمام */
.stack-main { transform: scale(1) rotate(0deg); z-index: 2; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.album-counter { position: absolute; bottom: 15px; left: 15px; background: rgba(0,0,0,0.8); color: #fff; padding: 5px 12px; border-radius: 6px; font-size: 0.85rem; z-index: 3; border: 1px solid rgba(255,255,255,0.2); }
/* تأثيرات الهوفر (فتح الألبوم) */
.album-card:hover .stack-main { transform: scale(1.02) rotate(-2deg) translate(-5px, -5px); border-color: var(--blue); }
.album-card:hover .stack-back { transform: scale(0.95) rotate(8deg) translate(20px, 15px); opacity: 0.9; }
.album-info h3 { font-size: 1.15rem; line-height: 1.5; color: #eee; text-align: center; transition: 0.3s; }
.album-card:hover .album-info h3 { color: var(--blue); }

/* ========================================== */
/* 16. قسم الكاريكاتير (Art Frame Layout) */
/* ========================================== */
.caricature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.caricature-card { text-align: center; cursor: pointer; }
.caricature-frame { background: #fff; padding: 12px; padding-bottom: 35px; border-radius: 4px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); position: relative; overflow: hidden; transition: 0.4s ease; transform: rotate(-1deg); }
/* تأثير الظل الورقي */
.caricature-frame::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; box-shadow: inset 0 -20px 20px -20px rgba(0,0,0,0.5); pointer-events: none; }
.caricature-frame img { width: 100%; height: 280px; object-fit: cover; filter: contrast(1.1) grayscale(10%); transition: 0.4s ease; }
.caricature-card:hover .caricature-frame { transform: rotate(1deg) translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.7); }
.caricature-card:hover .caricature-frame img { filter: contrast(1.1) grayscale(0%); transform: scale(1.05); }
.caricature-zoom { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.5); background: rgba(0,0,0,0.7); color: #fff; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; opacity: 0; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 2; }
.caricature-card:hover .caricature-zoom { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.caricature-caption { margin-top: 15px; font-family: monospace; font-size: 1rem; color: #aaa; letter-spacing: 0.5px; }

/* ========================================== */
/* 17. مقالات وتحقيقات (Editorial Column) */
/* ========================================== */
.editorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 30px; }
.editorial-card { position: relative; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 2.5rem 1.5rem 1.5rem; margin-top: 40px; transition: 0.4s ease; }
.editorial-card:hover { border-color: var(--red); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255, 91, 91, 0.1); }
/* صورة الكاتب بارزة للأعلى */
.author-avatar { position: absolute; top: -40px; right: 20px; width: 80px; height: 80px; border-radius: 50%; padding: 4px; background: #0f0f13; border: 2px solid var(--red); z-index: 2; transition: 0.4s; }
.author-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.editorial-card:hover .author-avatar { transform: scale(1.1); box-shadow: 0 5px 15px rgba(255, 91, 91, 0.3); }
.editorial-content { position: relative; z-index: 1; }
/* علامة التنصيص المائية */
.quote-icon { position: absolute; top: -10px; left: 0; font-size: 4rem; color: rgba(255, 91, 91, 0.1); z-index: -1; }
.author-name { display: block; color: var(--red); font-size: 0.9rem; font-weight: bold; margin-bottom: 10px; }
.editorial-content h3 { font-size: 1.3rem; line-height: 1.5; color: #fff; margin-bottom: 12px; }
.editorial-content p { color: #999; font-size: 0.95rem; line-height: 1.7; margin-bottom: 20px; }
.read-article-btn { display: inline-block; color: #fff; text-decoration: none; font-size: 0.9rem; border-bottom: 1px solid var(--red); padding-bottom: 3px; transition: 0.3s; }
.read-article-btn:hover { color: var(--red); letter-spacing: 1px; }

/* ---------------------------------- */
/* 1. قسم عاجل (Urgent) - دخول مفاجئ وسريع */
/* ---------------------------------- */
.section-urgent {
    transform: scale(0.85) translateY(30px);
}
.section-urgent.active {
    animation: urgentEntrance 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes urgentEntrance {
    0% { opacity: 0; transform: scale(0.85) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------------------------------- */
/* 2. قسم أخبار مصر (Egypt News) - انزلاق انسيابي من اليمين */
/* ---------------------------------- */
.section-egypt {
    transform: translateX(80px); /* البداية من اليمين */
}
.section-egypt.active {
    animation: slideInRTL 0.8s ease-out forwards;
}
@keyframes slideInRTL {
    0% { opacity: 0; transform: translateX(80px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ---------------------------------- */
/* 3. قسم عالم وعرب (World News) - ظهور مع تكبير (Scale-up) */
/* ---------------------------------- */
.section-world {
    transform: translateY(50px) scale(0.95);
}
.section-world.active {
    animation: worldExpand 0.9s ease-out forwards;
}
@keyframes worldExpand {
    0% { opacity: 0; transform: translateY(50px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* ---------------------------------- */
/* 4. قسم محافظات (Governorates) - حركة الفتح كأنها خريطة (3D Flip Up) */
/* ---------------------------------- */
.section-gov {
    transform: perspective(1000px) rotateX(-20deg) translateY(40px);
    transform-origin: top;
}
.section-gov.active {
    animation: unfoldMap 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes unfoldMap {
    0% { opacity: 0; transform: perspective(1000px) rotateX(-20deg) translateY(40px); }
    100% { opacity: 1; transform: perspective(1000px) rotateX(0deg) translateY(0); }
}

/* ---------------------------------- */
/* 5. قسم حوادث (Accidents) - دخول حاد ومائل (Sharp Skew) للانتباه */
/* ---------------------------------- */
.section-accidents {
    transform: translateX(-50px) skewX(10deg);
}
.section-accidents.active {
    animation: sharpSkewIn 0.6s ease-out forwards;
}
@keyframes sharpSkewIn {
    0% { opacity: 0; transform: translateX(-50px) skewX(10deg); }
    70% { transform: translateX(10px) skewX(-5deg); }
    100% { opacity: 1; transform: translateX(0) skewX(0); }
}

/* ---------------------------------- */
/* 6. قسم إقتصاد (Economy) - حركة صعود زي المؤشرات المالية (Rise Up) */
/* ---------------------------------- */
.section-economy {
    transform: translateY(60px) scale(0.95);
    transform-origin: bottom;
}
.section-economy.active {
    animation: economyRise 0.9s ease-out forwards;
}
@keyframes economyRise {
    0% { opacity: 0; transform: translateY(60px) scale(0.95); }
    50% { opacity: 0.5; transform: translateY(10px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* ---------------------------------- */
/* 7. قسم رياضة محلية (Local Sports) - دخول سريع مع ارتداد (Bounce Slide) */
/* ---------------------------------- */
.section-local-sports {
    transform: translateX(60px);
}
.section-local-sports.active {
    /* استخدمنا cubic-bezier لعمل تأثير الارتداد الرياضي */
    animation: sportsBounce 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes sportsBounce {
    0% { opacity: 0; transform: translateX(60px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ---------------------------------- */
/* 8. قسم رياضة عالمية (Global Sports) - دوران 3D خفيف كأنه كرة (3D Rotate In) */
/* ---------------------------------- */
.section-global-sports {
    transform: perspective(1000px) rotateY(30deg) scale(0.9);
    transform-origin: center;
}
.section-global-sports.active {
    animation: globalSportsSpin 0.8s ease-out forwards;
}
@keyframes globalSportsSpin {
    0% { opacity: 0; transform: perspective(1000px) rotateY(30deg) scale(0.9); }
    100% { opacity: 1; transform: perspective(1000px) rotateY(0deg) scale(1); }
}

/* ---------------------------------- */
/* 9. قسم طاقة وبترول (Energy) - ظهور قوي وراسي (Heavy Reveal) */
/* ---------------------------------- */
.section-energy {
    transform: translateY(40px) scale(1.02);
}
.section-energy.active {
    animation: energyReveal 0.9s ease-out forwards;
}
@keyframes energyReveal {
    0% { opacity: 0; transform: translateY(40px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* ---------------------------------- */
/* 10. قسم تكنولوجيا (Technology) - ظهور رقمي سريع (Digital Snap) */
/* ---------------------------------- */
.section-tech {
    transform: translateY(30px) scale(0.98);
    filter: blur(4px); /* تمويه خفيف بيختفي بسرعة زي الشاشات */
}
.section-tech.active {
    animation: techSnap 0.6s cubic-bezier(0.0, 0.9, 0.3, 1) forwards;
}
@keyframes techSnap {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ---------------------------------- */
/* 11. قسم فنون وثقافة (Arts & Culture) - ظهور أنيق مع دوران بسيط (Elegant Drift) */
/* ---------------------------------- */
.section-arts {
    transform: translateY(50px) rotate(-2deg);
    transform-origin: bottom left;
}
.section-arts.active {
    animation: artsElegantIn 0.8s ease-out forwards;
}
@keyframes artsElegantIn {
    0% { opacity: 0; transform: translateY(50px) rotate(-2deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ---------------------------------- */
/* 12. قسم مرأة ومنوعات (Women & Variety) - صعود انسيابي وناعم (Soft Float) */
/* ---------------------------------- */
.section-women {
    transform: translateY(40px);
}
.section-women.active {
    animation: softFloat 1s ease-out forwards;
}
@keyframes softFloat {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* ---------------------------------- */
/* 13. قسم صحة (Health) - ظهور بنبضة خفيفة (Heartbeat Pulse) */
/* ---------------------------------- */
.section-health {
    transform: scale(0.9);
}
.section-health.active {
    animation: healthPulseIn 0.8s ease-in-out forwards;
}
@keyframes healthPulseIn {
    0% { opacity: 0; transform: scale(0.9); }
    50% { opacity: 0.7; transform: scale(1.03); } /* النبضة */
    100% { opacity: 1; transform: scale(1); }
}

/* ---------------------------------- */
/* 14. قسم حظك اليوم (Horoscope) - دوران غامض (Mystical Spin Reveal) */
/* ---------------------------------- */
.section-horoscope {
    transform: rotate(-10deg) scale(0.85);
}
.section-horoscope.active {
    animation: mysticReveal 0.9s ease-out forwards;
}
@keyframes mysticReveal {
    0% { opacity: 0; transform: rotate(-10deg) scale(0.85); }
    100% { opacity: 1; transform: rotate(0deg) scale(1); }
}

/* ---------------------------------- */
/* 15. قسم تليفزيون (Television) - وميض شاشة (Screen Glow/Pop) */
/* ---------------------------------- */
.section-tv {
    transform: scale(0.95);
}
.section-tv.active {
    animation: tvScreenOn 0.7s ease-out forwards;
}
@keyframes tvScreenOn {
    0% { opacity: 0; transform: scale(0.95); filter: brightness(2); }
    50% { opacity: 1; transform: scale(1.02); filter: brightness(1.5); }
    100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}
/* ---------------------------------- */
/* 16. قسم ألبومات (Albums) - حركة تتابع وانزلاق للصور (Slide Stack) */
/* ---------------------------------- */
.section-albums {
    transform: translateX(-40px) scale(0.95);
}
.section-albums.active {
    animation: albumStack 0.8s ease-out forwards;
}
@keyframes albumStack {
    0% { opacity: 0; transform: translateX(-40px) scale(0.95); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* ---------------------------------- */
/* 17. قسم كاريكاتير (Caricature) - ظهور مرح ومطاطي (Playful Pop) */
/* ---------------------------------- */
.section-caricature {
    transform: scale(0.8) rotate(5deg);
}
.section-caricature.active {
    /* الـ cubic-bezier هنا بيدي تأثير المطاطية والارتداد */
    animation: comicPop 0.7s cubic-bezier(0.25, 1.5, 0.5, 1) forwards;
}
@keyframes comicPop {
    0% { opacity: 0; transform: scale(0.8) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ---------------------------------- */
/* 18. قسم مقالات وتحقيقات (Articles) - ظهور هادي وعميق للتركيز (Deep Focus) */
/* ---------------------------------- */
.section-articles {
    transform: translateY(20px);
    filter: blur(6px); /* بداية مموهة بتوضح بالتدريج */
}
.section-articles.active {
    animation: deepFocus 1.2s ease-in-out forwards;
}
@keyframes deepFocus {
    0% { opacity: 0; transform: translateY(20px); filter: blur(6px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ========================================= */
/* قسم أسواق وتداول (شريط الأسعار الدائم)    */
/* ========================================= */

/* 1. ضبط المسافة من فوق ومن تحت عشان تكون متساوية مع باقي الأقسام */
.trading-section {
    margin-top: 5rem;    /* المسافة بين قسم عاجل وقسم التداول */
    margin-bottom: 5rem; /* المسافة بين قسم التداول وقسم أخبار مصر */
    width: 100%;
}

/* 2. تظبيط حاوية العنوان */
.trading-section .category-header {
    text-align: right;
    margin-bottom: 2rem;
}

/* 3. إضافة الخط تحت العنوان */
.trading-title {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 12px; /* مسافة بين الكلمة والخط */
}

/* رسم الخط نفسه */
.trading-title::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60px; /* طول الخط */
    height: 3px; /* سُمك الخط */
    background-color: #00e676; /* لون الخط (أخضر متناسق مع التداول) */
    border-radius: 5px;
}

.ticker-wrapper {
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 15px;
    padding: 15px 0;
    margin-bottom: 2rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
}

.ticker-track {
    display: flex;
    width: max-content; /* بياخد حجم العناصر كلها */
}

/* كل مجموعة بتتحرك مع بعضها */
.ticker-content {
    display: flex;
    gap: 50px;
    padding-left: 50px; /* دي أهم نقطة: بتعمل مسافة بين المجموعة الأولى والتانية مساوية للـ gap */
    animation: seamlessTicker 20s linear infinite;
}

/* توقيف الشريط عند مرور الماوس */
.ticker-wrapper:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ticker-name { color: #a8b2d1; }
.ticker-price { color: #fff; letter-spacing: 1px; }

.ticker-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}
.ticker-change.positive { color: #00e676; }
.ticker-change.negative { color: #ff4d4d; }

/* ========================================= */
/* حركة الشريط اللانهائية للغة العربية (RTL) */
/* ========================================= */
@keyframes seamlessTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        /* بيتحرك بنسبة 100% من حجم المجموعة الواحدة، 
           عشان المجموعة التانية تحل محل الأولى بالظبط بدون أي قطع */
        transform: translateX(100%); 
    }
}

/* حالة الإخفاء قبل السكرول */
.trading-section.scroll-animate {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* حالة الظهور بعد السكرول (هنا الجافاسكريبت هيتدخل) */
.trading-section.scroll-animate.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* دخول شريط الأسعار */
.trading-section.scroll-animate.show .ticker-container {
    opacity: 0;
    animation: slideInTicker 1s ease-out 0.3s forwards;
}

@keyframes slideInTicker {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================= */
/* 2. تنسيق قسم المنوعات والعنوان            */
/* ========================================= */
.variety-section {
    margin-top: 5rem;
    margin-bottom: 5rem;
    width: 100%;
}

.variety-section .category-header {
    text-align: right;
    margin-bottom: 2rem;
}

.variety-title {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.variety-title::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #d178e2; /* خط بنفسجي */
    border-radius: 5px;
}

.variety-header-icon {
    color: #d178e2;
}

/* ========================================= */
/* 3. تصميم كروت المنوعات (Glassmorphism + Gradient) */
/* ========================================= */
.variety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.variety-card {
    /* خلفية زجاجية بلمسة لون مختلفة عن باقي الموقع */
    background: linear-gradient(135deg, rgba(209, 120, 226, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(209, 120, 226, 0.2);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
    
    /* تجهيز الكارت لأنيميشن الدخول (3D Flip) */
    opacity: 0; 
    transform: perspective(600px) rotateX(90deg) translateY(50px);
}

.variety-card:hover {
    transform: perspective(600px) rotateX(0deg) translateY(-10px) !important;
    box-shadow: 0 15px 35px rgba(209, 120, 226, 0.15);
    border-color: rgba(209, 120, 226, 0.5);
}

.variety-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 2px solid rgba(209, 120, 226, 0.1);
    transition: transform 0.5s ease;
}

.variety-card:hover .variety-img img {
    transform: scale(1.05);
}

.variety-content {
    padding: 1.5rem;
}

.variety-badge {
    background: rgba(209, 120, 226, 0.15);
    color: #d178e2;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
}

.variety-content h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.variety-content p {
    color: #a8b2d1;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========================================= */
/* 4. كلاس أنيميشن الدخول (3D Flip Entry)    */
/* ========================================= */
.variety-card.show-flip {
    animation: flipIn3D 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* تأخير الحركة عشان الكروت تدخل ورا بعض */
.variety-card:nth-child(1).show-flip { animation-delay: 0.1s; }
.variety-card:nth-child(2).show-flip { animation-delay: 0.3s; }
.variety-card:nth-child(3).show-flip { animation-delay: 0.5s; }

@keyframes flipIn3D {
    0% {
        opacity: 0;
        transform: perspective(600px) rotateX(90deg) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: perspective(600px) rotateX(0deg) translateY(0);
    }
}

/* ========================================= */
/* تنسيق شريط البحث المنزلق                  */
/* ========================================= */

.search-overlay {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 25px 0;
    transition: top 0.4s ease-in-out;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-overlay.active {
    top: 0;
}

/* تعديل بسيط: الـ container بقى هو الـ form نفسها */
.search-container {
    display: flex;
    align-items: center;
    width: 90%;
    max-width: 800px;
    gap: 15px;
}

.search-container input {
    flex: 1;
    padding: 15px 20px;
    font-size: 18px;
    border: 1px solid #2d3748;
    border-radius: 8px;
    background: #1e293b;
    color: #fff;
    outline: none;
    font-family: inherit;
}

.search-container input::placeholder {
    color: #a8b2d1;
}

.search-btn, .close-search-btn {
    background: none;
    border: none;
    color: #a8b2d1;
    font-size: 22px;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #d178e2; 
}

.close-search-btn:hover {
    color: #ff4d4d; 
}

/* ========================================= */
/* تأثيرات الـ Hover لزرار البحث في المنيو   */
/* ========================================= */
.search-trigger:hover span {
    color: #fff !important;
    transition: color 0.3s ease;
}

.search-trigger:hover i {
    color: #d178e2 !important;
    animation: glowAndFloat 1.5s infinite ease-in-out;
}

/* ========================================= */
/* التجاوب (Responsiveness) لشريط البحث      */
/* ========================================= */
@media (max-width: 768px) {
    .search-overlay {
        padding: 15px 0; /* تقليل الارتفاع على الموبايل */
    }

    .search-container {
        width: 95%; /* توسيع العرض شوية على الشاشات الصغيرة */
        gap: 10px;
    }

    .search-container input {
        padding: 12px 15px; /* تصغير الـ padding */
        font-size: 16px; /* تصغير الخط */
    }

    .search-btn, .close-search-btn {
        font-size: 18px; /* تصغير الأيقونات */
        padding: 8px;
    }
}

/* ======================================================== */
/* أكواد التجاوب (Media Queries) للشاشات الصغيرة والمتوسطة   */
/* ======================================================== */

@media (max-width: 1024px) {
    /* تحويل شبكات الـ 4 أعمدة و 3 أعمدة لـ 2 عمود في التابلت */
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .urgent-grid, .economy-cards-grid, .stadium-grid, 
    .industrial-grid, .wellness-grid, .zodiac-grid, 
    .tv-showcase, .albums-grid, .caricature-grid, 
    .editorial-grid, .cyber-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    /* تحويل كل الشبكات (Grids) لعمود واحد فقط للموبايل */
    .bento-grid, .urgent-grid, .layout-glass-gallery, 
    .economy-cards-grid, .stadium-grid, .industrial-grid, 
    .wellness-grid, .zodiac-grid, .tv-showcase, 
    .albums-grid, .caricature-grid, .editorial-grid, 
    .variety-grid, .cyber-grid {
        grid-template-columns: 1fr;
    }

    /* إصلاح أحجام كروت البينتو (Hero) على الموبايل */
    .card-hero { grid-column: span 1; grid-row: span 1; background-size: cover; }
    .card-hero h3 { font-size: 1.5rem; }

    /* إصلاح قسم المجلة (أخبار مصر) */
    .layout-magazine { grid-template-columns: 1fr; }
    .mag-main-card { height: 300px; }

    /* إصلاح الكروت الأفقية (عالم وعرب & حوادث) لتصبح عمودية */
    .horiz-card { flex-direction: column; text-align: right; }
    .horiz-img { width: 100%; height: 200px; }

    /* إصلاح قسم الرياضة المحلية (إزالة الميلان لسهولة القراءة) */
    .action-sports-layout { grid-template-columns: 1fr; }
    .action-card { transform: none; border-radius: 12px; }
    .action-card:hover { transform: translateY(-5px); }
    .action-img-container, .action-content { transform: none; margin: 0; width: 100%; }
    .main-action { height: 300px; }
    
    /* إصلاح قسم الفنون (Spotlight) */
    .spotlight-subs { grid-template-columns: 1fr; }
    .spotlight-main { height: 250px; }
    .spotlight-overlay h3 { font-size: 1.3rem; }
    .spotlight-sub-card { flex-direction: column; align-items: flex-start; }
    .spotlight-sub-card img { width: 100%; height: 150px; }

    /* إصلاح قسم المرأة (الصور المقوسة) */
    .elegant-grid { grid-template-columns: 1fr; }
    .elegant-img-wrapper { height: 250px; border-radius: 100px 100px 0 0; }
    .elegant-img-wrapper img { border-radius: 95px 95px 0 0; }

    /* إصلاح كارت الكاتب */
    .editorial-card { margin-top: 50px; text-align: center; }
    .author-avatar { right: 50%; transform: translateX(50%); top: -50px; }
    .editorial-card:hover .author-avatar { transform: translateX(50%) scale(1.1); }
    .quote-icon { left: 50%; transform: translateX(-50%); }

    /* تصغير أحجام الخطوط العناوين */
    .section-title h2 { font-size: 1.5rem; }
    .single-category-section { margin-top: 3rem; }
}

/* ========================================== */
/* تصميم صفحة المقال (Article Page) */
/* ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

:root {
    --bg-color: #0f0f13; /* لون الخلفية الداكن */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --purple: #685aff;
    --red: #FF5B5B;
    --blue: #00b4d8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color); /* هنا بنطبق اللون الداكن */
    color: #fff; /* لون النص الأساسي أبيض */
    min-height: 100vh;
}

.main-content { margin-right: 260px; width: calc(100% - 260px); padding: 2rem; }

.marquee-container { width: 100%; overflow: hidden; background: var(--red); color: #111; padding: 10px 0; border-radius: 8px; font-weight: 700; margin-bottom: 2rem; display: flex; white-space: nowrap; }
.marquee-content { display: inline-block; animation: marquee 20s linear infinite; }
.marquee-container:hover .marquee-content { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }


/* تنسيق هيكل الموقع (شريط جانبي + محتوى) */
.app-container {
    display: flex;
    min-height: 100vh;
}

.article-container {
    max-width: 900px;
    /* التعديل هنا: 10vh من فوق وتحت، و auto من اليمين والشمال */
    margin: 10vh auto; 
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.category-badge {
    background: rgba(104, 90, 255, 0.2);
    color: var(--purple);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid var(--purple);
}

.article-title {
    font-size: 2.2rem;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.meta-item i {
    color: var(--blue);
    margin-left: 5px;
}

.article-featured-img {
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.article-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-featured-img:hover img {
    transform: scale(1.03);
}

.article-body p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #ddd;
    margin-bottom: 1.5rem;
}

.article-quote {
    background: linear-gradient(90deg, rgba(104, 90, 255, 0.05), transparent);
    border-right: 4px solid var(--purple);
    padding: 20px;
    margin: 2rem 0;
    font-size: 1.3rem;
    line-height: 1.6;
    color: #fff;
    font-style: italic;
    border-radius: 10px 0 0 10px;
    position: relative;
}

.quote-mark {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 3rem;
    color: rgba(104, 90, 255, 0.1);
    z-index: 0;
}

/* --- أزرار المشاركة --- */
.article-share {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 20px;
}

.article-share h3 {
    font-size: 1.2rem;
    color: #fff;
}

.share-buttons {
    display: flex;
    gap: 15px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-btn.facebook:hover { background: #1877F2; border-color: #1877F2; transform: translateY(-5px) scale(1.1); box-shadow: 0 10px 20px rgba(24, 119, 242, 0.3); }
.share-btn.twitter:hover { background: #000; border-color: #333; transform: translateY(-5px) scale(1.1); box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1); }
.share-btn.whatsapp:hover { background: #25D366; border-color: #25D366; transform: translateY(-5px) scale(1.1); box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3); }
.share-btn.telegram:hover { background: #0088cc; border-color: #0088cc; transform: translateY(-5px) scale(1.1); box-shadow: 0 10px 20px rgba(0, 136, 204, 0.3); }
.share-btn.copy-link:hover { background: var(--purple); border-color: var(--purple); transform: translateY(-5px) scale(1.1); box-shadow: 0 10px 20px rgba(104, 90, 255, 0.3); }

/* ========================================== */
/* قسم: أخبار ذات صلة */
/* ========================================== */
.related-news-title {
    position: relative;
    padding-bottom: 12px; /* المسافة بين الكلمة والخط اللي تحتها */
    margin-bottom: 40px; /* مسافة كبيرة بين العنوان والكروت عشان الـ Hover مياكلش منها */
    z-index: 10; /* عشان نضمن إن العنوان دايماً فوق الكروت */
    display: inline-block; /* عشان الخط يكون على قد الكلمة بالظبط */
}

/* عمل الخط تحت العنوان */
.related-news-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* لأن الموقع بالعربي (RTL) */
    width: 60%; /* طول الخط، تقدري تخليه 100% لو عايزاه بعرض الكلمة كلها */
    height: 3px; /* سمك الخط */
    background-color: #00e5ff; /* لون الخط (لبني مقارب للون الأيقونة في الصورة) */
    border-radius: 2px;
}

.related-news {
    max-width: 900px;
    margin: 4rem auto 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-8px);
    border-color: var(--blue);
    box-shadow: 0 10px 25px rgba(156, 207, 255, 0.15);
}

.related-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.related-card:hover .related-img img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.related-content {
    padding: 1rem;
}

.related-content h4 {
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.related-card:hover .related-content h4 {
    color: var(--blue);
}

/* ========================================= */
/* أنيميشن الدخول عند تحميل الصفحة (Fade In Up) */
/* ========================================= */

@keyframes pageLoadFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px); /* بيبدأ من تحت شوية */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* بيرجع لمكانه الطبيعي */
    }
}

/* 1. أنيميشن الخبر (بيظهر فوراً) */
.article-container {
    /* ضيفي السطرين دول مع التنسيقات الموجودة أصلاً عندك */
    animation: pageLoadFadeInUp 0.8s ease-out forwards;
}

/* 2. أنيميشن الأخبار ذات الصلة (بيظهر بعد الخبر بـ 0.3 ثانية) */
.related-news {
    opacity: 0; /* مخفي في البداية */
    animation: pageLoadFadeInUp 0.8s ease-out 0.3s forwards;
}

/* 3. أنيميشن الفوتر (بيظهر بعدهم بـ 0.6 ثانية) */
.modern-footer {
    opacity: 0; /* مخفي في البداية */
    animation: pageLoadFadeInUp 0.8s ease-out 0.6s forwards;
}

/* ======================================================== */
/* أكواد التجاوب (Media Queries) لصفحة المقال (Single Post)  */
/* ======================================================== */

@media (max-width: 992px) {
    .article-container {
        margin: 5vh auto;
        padding: 2rem;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-featured-img {
        height: 350px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr); /* عمودين في التابلت للقسم الخاص بالأخبار ذات الصلة */
    }
}

@media (max-width: 768px) {
    .article-container {
        margin: 2vh auto;
        padding: 1.5rem;
        border-radius: 12px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .category-badge {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .article-meta {
        flex-direction: column; /* جعل بيانات الكاتب والتاريخ تحت بعض لتوفير المساحة */
        gap: 10px;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .article-featured-img {
        height: 220px;
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }

    .article-body p {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .article-quote {
        font-size: 1.1rem;
        padding: 15px;
        margin: 1.5rem 0;
    }

    .quote-mark {
        font-size: 2rem;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .share-buttons {
        flex-wrap: wrap; /* السماح للأزرار بالنزول لسطر جديد لو الشاشة صغيرة جداً */
    }

    .related-news {
        margin: 3rem auto 2rem;
    }

    .related-grid {
        grid-template-columns: 1fr; /* عمود واحد في الموبايل */
    }

    .related-img {
        height: 200px;
    }
}

/* ========================================= */
/* دعم الترقيم الافتراضي لووردبريس (Pagination) */
/* ========================================= */
.pagination-list li {
    display: inline-block;
}

.pagination-list .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-list a.page-numbers:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* الصفحة الحالية (Active) في ووردبريس تاخد كلاس current */
.pagination-list .current {
    background: linear-gradient(135deg, #00bcd4, #2196f3);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.4);
    color: #fff;
    pointer-events: none;
}

/* أزرار السابق والتالي */
.pagination-list .prev,
.pagination-list .next {
    background: rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
}

.pagination-list .prev:hover,
.pagination-list .next:hover {
    background: #00bcd4;
    color: #fff;
}

.pagination-list .dots {
    color: #8892b0;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 0 5px;
    background: none;
}


/* ======================================================== */
/* أكواد التجاوب (Media Queries) لصفحة التصنيفات             */
/* ======================================================== */

@media (max-width: 992px) {
    .category-grid {
        /* تقليل المسافات الجانبية على الشاشات المتوسطة */
        gap: 1.5rem;
        padding: 0;
    }
    
    .category-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .category-header {
        margin-bottom: 2rem;
        padding-top: 1rem;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .category-desc {
        font-size: 0.95rem;
        padding: 0 15px;
    }

    .category-grid {
        /* الـ auto-fit هيحولها لعمود واحد تلقائياً، بس بنقلل المسافات */
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .card-img-wrapper {
        height: 180px; /* تصغير ارتفاع الصورة قليلاً للموبايل */
    }

    .card-content {
        padding: 1.2rem;
    }

    .card-title {
        font-size: 1.15rem;
    }

    /* تصغير حاوية الترقيم عشان متخرجش برا الشاشة */
    .pagination-list {
        padding: 8px 15px;
        gap: 5px;
    }

    .pagination-list .page-numbers {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* تظبيط الترقيم لو الشاشة صغيرة جداً */
    .pagination-list .page-numbers:not(.current):not(.prev):not(.next) {
        /* إخفاء بعض الأرقام وترك الحالي والسابق والتالي فقط لتوفير المساحة */
        display: none; 
    }
}

/* --- الفوتر (Modern Footer) --- */
/* ================================= */
/*          تنسيقات الفوتر            */
/* ================================= */
.modern-footer { 
    margin-top: 5rem; 
    padding: 3rem 2rem; 
    background: linear-gradient(180deg, transparent, rgba(104, 90, 255, 0.05)); 
    border-top: 1px solid var(--glass-border); 
    border-radius: 30px 30px 0 0; 
    text-align: center; 
}

.footer-content { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1.5rem; 
    margin-bottom: 2rem; 
}

.footer-brand h2 { 
    font-size: 2.5rem; 
    font-weight: 900; 
}

.footer-brand h2 span { 
    color: var(--red); 
}

.footer-brand p { 
    color: #aaa; 
    max-width: 400px; 
    margin-top: 10px; 
}

/* --- تنسيق الروابط الجديدة --- */
.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--purple); /* هيتغير للون البنفسجي مع الهوفر زي باقي الأيقونات */
}
/* ----------------------------- */

.footer-social { 
    display: flex; 
    gap: 15px; 
}

.social-icon { 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    background: var(--glass-bg); 
    border: 1px solid var(--glass-border); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    font-size: 1.2rem; 
    text-decoration: none; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.social-icon:hover { 
    background: var(--purple); 
    transform: translateY(-5px) scale(1.1); 
    box-shadow: 0 10px 20px rgba(104, 90, 255, 0.3); 
    border-color: var(--purple); 
}

.footer-bottom { 
    border-top: 1px solid var(--glass-border); 
    padding-top: 1.5rem; 
    font-size: 0.9rem; 
    color: #777; 
}

.footer-bottom span { 
    color: var(--purple); 
    font-weight: bold; 
}

/* ========================================= */
/* التجاوب (Responsiveness) للفوتر في الموبايل*/
/* ========================================= */
@media (max-width: 768px) {
    .modern-footer { 
        margin-top: 3rem; /* تقليل المسافة العلوية في الموبايل */
        padding: 2rem 1rem; 
        border-radius: 20px 20px 0 0; /* تقليل دوران الحواف */
    }

    .footer-content {
        gap: 1.2rem;
    }

    .footer-brand h2 { 
        font-size: 2rem; /* تصغير حجم اللوجو */
    }

    .footer-brand p { 
        font-size: 0.9rem;
        padding: 0 10px; /* مسافة جانبية عشان الكلام ميبقاش لازق في الشاشة */
    }

    .footer-links {
        gap: 15px; /* تقليل المسافة بين الروابط */
    }

    .footer-links a {
        font-size: 0.9rem; /* تصغير خط الروابط */
    }

    .footer-social {
        gap: 10px; /* تقليل المسافة بين أيقونات السوشيال */
    }

    .social-icon { 
        width: 40px; /* تصغير دوائر السوشيال ميديا */
        height: 40px; 
        font-size: 1rem; 
    }

    .footer-bottom { 
        padding-top: 1rem; 
        font-size: 0.8rem; /* تصغير خط الحقوق المحفوظة */
    }
}