/*
Theme Name: Arabic News Theme V4
Description: قالب إخباري عربي متوافق مع الجوال (مع قائمة منسدلة احترافية للموبايل)، متوافق مع Rank Math، دعم شعار مخصص.
Author: Assistant
Version: 4.0
Text Domain: arabic-news
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    background-color: #f4f4f4;
    color: #000;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 { color: red; }
a { color: blue; text-decoration: none; transition: 0.3s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* شريط الأخبار */
.news-ticker-container {
    background: #e74c3c; color: #fff; display: flex; align-items: center; overflow: hidden; padding: 5px 10px;
}
.ticker-title {
    background: #c0392b; padding: 5px 15px; font-weight: bold; margin-left: 10px; white-space: nowrap; border-radius: 3px;
}
.ticker-content { display: flex; white-space: nowrap; animation: ticker 25s linear infinite; }
.ticker-content a { color: #fff; margin: 0 15px; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* الترويسة واللوجو */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; box-sizing: border-box; }
.header { background: #fff; padding: 20px 0; text-align: center; border-bottom: 2px solid #e74c3c; }
.site-branding img { max-width: 100%; height: auto; max-height: 120px; object-fit: contain; } /* لضمان ظهور اللوجو بشكل ممتاز على كل الشاشات */

/* القوائم الأساسية */
.main-nav { background: #333; position: relative; }
.menu-toggle {
    display: none;
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    outline: none;
}
.menu-toggle:hover { background: #1a252f; }

.nav-list { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; flex-wrap: wrap; transition: all 0.3s ease; }
.nav-list a { display: block; padding: 15px 20px; color: #fff; font-weight: bold; }
.nav-list a:hover { background: #e74c3c; text-decoration: none; }

/* فتات الخبز (Rank Math Breadcrumbs) */
.rank-math-breadcrumb { background: #fff; padding: 10px 15px; margin-bottom: 20px; border-radius: 5px; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

/* البطاقات والشبكة */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { background: #fff; padding: 15px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.3s; }
.post-card:hover { transform: translateY(-3px); }
.post-card img { width: 100%; height: auto; border-radius: 5px; object-fit: cover; }

.read-more {
    display: inline-block; margin-top: 10px; padding: 5px 15px; background: #e74c3c; color: #fff !important; border-radius: 3px; font-size: 14px;
}
.read-more:hover { background: #c0392b; text-decoration: none; }

/* الفوتر */
.footer { background: #333; color: #fff; padding: 30px 20px; text-align: center; margin-top: 40px; }
.footer a { color: #ccc; }
.footer-nav ul { list-style: none; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px;}

/* الإعلانات */
.ads-container { text-align: center; margin: 20px 0; overflow: hidden; }

/* ======= التوافق مع الجوال (Responsive Design) ======= */
@media screen and (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    
    /* القائمة للموبايل */
    .menu-toggle { display: block; }
    .nav-list { display: none; flex-direction: column; width: 100%; background: #222; }
    .nav-list.active { display: flex; } /* يتم تفعيلها عن طريق جافاسكريبت */
    .nav-list a { padding: 12px 20px; border-bottom: 1px solid #444; }
    .nav-list li:last-child a { border-bottom: none; }
    
    .ticker-title { font-size: 12px; padding: 5px 10px; margin-left: 5px; }
    .ticker-content a { font-size: 14px; margin: 0 10px; }
    .footer-nav ul { flex-direction: column; gap: 10px; }
    .post-card { padding: 10px; }
    .post-content { font-size: 16px !important; }
}
