/*
Theme Name: Mustamal Moving Theme
Description: قالب ديناميكي مخصص لشركات نقل العفش والخدمات، مبني من الصفر لضمان أعلى أداء في محركات البحث.
Author: مطور ووردبريس
Version: 1.0
Text Domain: mustamal-theme
*/

/* --- 1. المتغيرات السريعة (تسهل تغيير الألوان لاحقاً) --- */
:root {
    /* الألوان - تم اختيارها لتجاوز فحص التباين في PageSpeed */
    --primary-color: #0b3d91; /* أزرق داكن (ثقة، أمان، شركات كبرى) */
    --secondary-color: #ff9800; /* برتقالي (أزرار الاتصال وطلب الخدمة) */
    --text-color: #2b2b2b; /* رمادي داكن مريح للقراءة الطويلة */
    --bg-color: #fcfcfc; /* أبيض مكسور لراحة العين */
    
    /* خطوط النظام (أسرع خيار على الإطلاق - لا تحتاج تحميل) */
    --font-arabic: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* --- 2. إعادة ضبط العناصر (لمنع مشكلة انزياح التخطيط CLS) --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-arabic);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8; /* مسافة ممتازة للقراءة */
    font-size: 17px;
    direction: rtl; /* دعم اللغة العربية */
}

/* حل سحري لمشكلة CLS (يمنع الصور من كسر تخطيط الموقع) */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 3. الهيكل الأساسي المتجاوب --- */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الترويسة (Header) */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* ظل خفيف */
    padding: 20px 0;
    position: sticky; /* لجعل القائمة تتبع الزائر أثناء النزول */
    top: 0;
    z-index: 999;
}

.site-branding a {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
}

/* تنسيق المقالات والمحتوى الطويل (Pillar Content) */
.site-main {
    padding: 50px 0;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

.entry-title, .location-entry-title {
    font-size: 2.5rem;
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 10px;
}

.entry-content p, .location-entry-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* تنسيق الروابط داخل المقال (لإبرازها بشكل طبيعي) */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* تنسيق القائمة العلوية لتصبح أفقية وبدون نقاط */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 0;
    margin: 0;
}
.main-navigation ul li a {
    text-decoration: none;
    font-weight: bold;
    color: var(--primary-color);
}

/* تنسيقات شبكة المقالات الديناميكية في الرئيسية */
.section-title {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
}
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.grid-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}
.grid-item:hover {
    transform: translateY(-5px);
}
.grid-item img {
    border-radius: 5px;
    margin-bottom: 15px;
    max-width: 100%;
    height: auto;
}
.grid-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.read-more-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 5px;
}
.read-more-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- تأثيرات الحركة الانسيابية (Scroll Animations) --- */

/* حالة العنصر قبل الظهور (مخفي ومسحوب للأسفل) */
.animate-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

/* حالة العنصر عند الظهور (مرئي في مكانه الطبيعي) */
.animate-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* إزالة الفراغ الزائد تحت الهيدر في الصفحة الرئيسية تحديداً */
.front-page-container {
    padding-top: 20px !important; 
}

/* تقليل المساحة فوق عنوان المقالات */
.section-title {
    margin-top: 10px !important;
    margin-bottom: 30px;
}

/* في حال وجود محتوى نصي، نعطيه مسافة سفلية بسيطة فقط */
.hero-content {
    margin-bottom: 20px;
}