/*
Theme Name: Pro News - قالب الأخبار الاحترافي
Theme URI: https://example.com/pro-news
Description: قالب ووردبريس احترافي للمواقع الإخبارية مع سلايدر وتخطيطات متعددة وإدارة إعلانات محسّنة. خفيف وسريع ومتوافق مع SEO والعربية
Author: Pro Themes
Author URI: https://example.com
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pro-news
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ============================================
   إعادة تعيين وأساسيات
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    direction: rtl;
    text-align: right;
}

/* ============================================
   الرؤوس والنصوص
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: #222;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1em;
}

a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #005a87;
}

/* ============================================
   الحاوية والشبكة
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ============================================
   الرأس (Header)
   ============================================ */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo img {
    max-width: 50px;
    height: auto;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.site-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================
   القائمة الرئيسية
   ============================================ */
.main-navigation {
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: #fff;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   السلايدر الرئيسي
   ============================================ */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.slider-item.active {
    opacity: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 40px 30px;
    text-align: right;
}

.slider-content h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 2rem;
}

.slider-content p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dot.active {
    background: #fff;
}

/* ============================================
   شبكة المقالات
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.article-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-title a {
    color: #222;
}

.article-title a:hover {
    color: #667eea;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-author img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* ============================================
   الشريط الجانبي
   ============================================ */
.sidebar {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 8px;
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

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

.widget ul li a {
    color: #333;
    font-weight: 500;
}

.widget ul li a:hover {
    color: #667eea;
}

/* ============================================
   الإعلانات
   ============================================ */
.ad-space {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    border-radius: 8px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.ad-space.horizontal {
    min-height: 90px;
}

.ad-space.vertical {
    min-height: 300px;
}

/* ============================================
   التذييل (Footer)
   ============================================ */
.site-footer {
    background: #222;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #ccc;
}

.footer-widget a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #999;
}

/* ============================================
   صفحة المقالة الفردية
   ============================================ */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.post-featured-image {
    width: 100%;
    height: auto;
    margin-bottom: 30px;
    border-radius: 8px;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

/* ============================================
   الأزرار
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background: #764ba2;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ============================================
   التصميم المتجاوب
   ============================================ */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }

    .hero-slider {
        height: 300px;
    }

    .slider-content {
        padding: 20px 15px;
    }

    .slider-content h2 {
        font-size: 1.3rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .main-navigation {
        gap: 15px;
        font-size: 0.9rem;
    }

    .post-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .site-header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .hero-slider {
        height: 200px;
    }

    .slider-content h2 {
        font-size: 1.1rem;
    }

    .main-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .post-title {
        font-size: 1.5rem;
    }
}
