/*
Theme Name: TA-alsaad-mover
Theme URI: https://www.alsaad-mover.com
Author: Al Saad Team
Description: قالب مخصص لشركة السعد - نقل عفش، شحن دولي، صيانة، مقاولات.
Version: 1.1
Text Domain: ta-alsaad
*/

/* --- 1. استدعاء الخطوط والمتغيرات --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

:root {
    --primary-blue: #0056b3; /* أزرق قوي */
    --primary-red: #d90429;  /* أحمر جذاب */
    --dark-text: #2b2d42;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --font-main: 'Cairo', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: #fff;
    color: var(--dark-text);
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
    line-height: 1.8;
}

a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; }

/* --- 2. الهيكل العام (Container) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 3. الهيدر والهيرو --- */
header.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.hero-img-desktop { display: block; width: 100%; }
.hero-img-mobile { display: none; width: 100%; }

.hero-content-box {
    background: linear-gradient(to bottom, #fff, #f4f4f4);
    padding: 50px 0;
    text-align: center;
    border-bottom: 5px solid var(--primary-red);
}
.hero-title {
    color: var(--primary-blue);
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 20px;
}
.hero-desc {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #555;
    background: #fff;
    padding: 20px;
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* --- 4. الأقسام الرئيسية (إطارات وتصميم) --- */
.service-section {
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}
.section-frame {
    border: 2px solid var(--primary-blue);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 40px;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}
/* تمييز العنوان بإطار */
.section-title-wrap {
    background: var(--primary-blue);
    color: #fff;
    padding: 15px 30px;
    display: inline-block;
    border-bottom-left-radius: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    border-right: 5px solid var(--primary-red);
}

.service-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* صورة جانبية + محتوى */
    gap: 30px;
    padding: 30px;
}
.service-side-img img {
    border-radius: 10px;
    border: 3px solid var(--primary-red);
}

/* --- 5. شبكة المقالات (Grid) --- */
.posts-grid-wrapper {
    background: var(--light-bg);
    padding: 30px;
    border-top: 2px dashed #ddd;
}
.section-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.post-item-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}
.post-item-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.post-card-img {
    height: 150px;
    overflow: hidden;
}
.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}
.post-item-card:hover .post-card-img img { transform: scale(1.1); }
.post-card-title {
    padding: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-text);
    text-align: center;
}

/* --- 6. صفحة المقالة (Single Post) وتحسين القراءة --- */
.single-post-content {
    background: #fff;
    padding: 40px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-top: 30px;
}
/* تحسين العناوين داخل المقال H1-H6 */
.single-post-content h1, .single-post-content h2, 
.single-post-content h3, .single-post-content h4, 
.single-post-content h5, .single-post-content h6 {
    color: var(--primary-blue);
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 10px 15px;
    border-right: 5px solid var(--primary-red);
    background: #f9f9f9;
    border-radius: 5px;
}
/* تحسين الفقرات */
.single-post-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #333;
}
/* الروابط داخل المقال (أبيض إلا TOC) */
.single-post-content a {
    color: var(--primary-blue); /* افتراضي */
    text-decoration: underline;
}
/* استثناء: روابط جدول المحتويات */
#toc_container a {
    color: #333 !important;
    text-decoration: none !important;
}

/* تحسين الجداول (الأسعار والتعريف) */
.single-post-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    overflow: hidden;
}
.single-post-content table th {
    background: var(--primary-blue);
    color: #fff;
    padding: 15px;
    font-weight: bold;
    text-align: center;
}
.single-post-content table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
    background: #fff;
}
.single-post-content table tr:last-child td { border-bottom: none; }
.single-post-content table tr:nth-child(even) td { background: #f8f9fa; }

/* --- 7. الفوتر --- */
footer.site-footer {
    background: #222;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 50px;
    border-top: 5px solid var(--primary-red);
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}
.footer-col h3 {
    color: var(--primary-red);
    border-bottom: 2px solid #444;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.footer-col ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}
.footer-col ul li a:hover {
    color: var(--primary-red);
    padding-right: 5px;
}
/* حقوق النشر */
.copyright-bar {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #aaa;
}

/* --- 8. التجاوب (Media Queries) --- */
@media (max-width: 768px) {
    .hero-img-desktop { display: none; }
    .hero-img-mobile { display: block; }
    .hero-title { font-size: 1.5rem; }
    .service-content-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    
    /* === تم تعديل هذا السطر ليصبح عمود واحد === */
    .section-posts-grid { grid-template-columns: 1fr; }
    .post-card-title { font-size: 1.1rem; padding: 15px; } /* تحسين حجم الخط في الجوال */
}

/* --- تخصيص روابط المقال (طلب خاص) --- */
.single-post-content p a,
.single-post-content li a {
    color: #fff !important;        /* لون أبيض إجباري */
    background-color: var(--primary-blue); /* خلفية زرقاء لتمييز الرابط */
    padding: 2px 6px;
    border-radius: 3px;
    text-decoration: none;
}

.single-post-content p a:hover,
.single-post-content li a:hover {
    background-color: var(--primary-red);
}

/* استثناء جدول المحتويات (TOC Plus Plugin) */
#toc_container a, 
.toc_title, 
ul.toc_list a {
    color: var(--primary-blue) !important; /* لون أزرق */
    background-color: transparent !important; /* بدون خلفية */
    font-weight: normal;
}
#toc_container {
    border: 2px solid var(--primary-blue) !important;
    background: #f9f9f9 !important;
    border-radius: 10px;
}