/*
Theme Name: AkhbarPress Ultimate Pro
Theme URI: https://example.com/akhbarpress
Author: AI Collaborator
Description: قالب ووردبريس إخباري إبداعي وفائق الاحترافية، متجاوب بالكامل ويدعم المتاجر والمدونات الإخبارية الكبرى.
Version: 3.0
Text Domain: akhbarpress
*/

/* --- المتغيرات والتنسيقات العامة --- */
:root {
    --primary-color: #0f172a;
    --accent-red: #e11d48;
    --accent-blue: #2563eb;
    --bg-light: #f1f5f9;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', Tahoma, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    width: 94%;
    max-width: 1280px;
    margin: 0 auto;
}

/* --- شريط الأخبار العاجلة المتحرك --- */
.breaking-news-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #1e293b;
}

.breaking-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-badge {
    background-color: var(--accent-red);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- الهيدر الرئيسي الاحترافي --- */
header.site-header {
    background-color: var(--white);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.site-title a {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.site-title a span {
    color: var(--accent-red);
}

.site-description {
    font-size: 13px;
    color: var(--text-muted);
}

/* شريط التنقل (القوائم) */
nav.main-nav {
    background-color: var(--primary-color);
}

nav.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav.main-nav ul li a {
    color: var(--white);
    padding: 12px 18px;
    display: block;
    font-size: 15px;
    font-weight: 600;
}

nav.main-nav ul li a:hover {
    background-color: var(--accent-red);
}

/* --- التخطيط العام للمحتوى (Grid Layout) --- */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 35px;
    margin: 40px auto;
}

@media (min-width: 992px) {
    .content-wrapper {
        grid-template-columns: 2.7fr 1fr;
    }
}

/* --- شبكة الأخبار (أحدث المقالات) --- */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* جعل أول مقال يظهر كخبر رئيسي كبير عريض */
    .posts-grid article:first-child {
        grid-column: span 2;
    }
}

article.post {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

article.post:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

article.post:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.meta-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    font-weight: 500;
}

.meta-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

article.post h2 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
}

article.post:first-child h2 {
    font-size: 26px; /* حجم أكبر للخبر الرئيسي البارز */
}

article.post h2 a {
    color: var(--primary-color);
}

article.post h2 a:hover {
    color: var(--accent-blue);
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.read-more-btn {
    align-self: flex-start;
    font-size: 13px;
    font-weight: bold;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more-btn:hover {
    color: var(--accent-red);
}

/* --- الشريط الجانبي (Sidebar) --- */
aside.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

.widget h3, 
.widget .widget-title {
    font-size: 18px;
    color: var(--primary-color);
    border-right: 4px solid var(--accent-red);
    padding-right: 10px;
    margin-bottom: 20px;
    font-weight: 800;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 14px;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-main);
    font-weight: 500;
}

.widget ul li a:hover {
    color: var(--accent-blue);
}

/* تصميم حقل البحث في الودجت */
.widget input[type="search"], 
.widget input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.widget input[type="search"]:focus {
    border-color: var(--accent-blue);
    background: var(--white);
}

/* --- التذييل (Footer) الاحترافي --- */
footer.site-footer {
    background-color: var(--primary-color);
    color: #94a3b8;
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 4px solid var(--accent-red);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media(min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-col h4 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #1e293b;
    padding-bottom: 8px;
}

.footer-col p, .footer-col ul li a {
    font-size: 14px;
    color: #94a3b8;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    font-size: 13px;
}