/*
Theme Name: Abdullah Hussein Theme
Theme URI: https://abdullahhussein.com
Author: Abdullah Hussein
Description: قالب مخصص احترافي ومتجاوب بالكامل لمدونة عبدالله حسين - مينيمليست وحديث.
Version: 5.0
Text Domain: abdullah-theme
*/

/* 1. المتغيرات والألوان الأساسية */
:root {
    --color-bg: #F8F8F6;        
    --color-text-main: #1A1A1A; 
    --color-text-muted: #555555;
    --color-primary: #1A1A1A;   
    --color-secondary: #E8F5E9; 
    --color-white: #FFFFFF;     
    --radius-main: 12px;        
}

/* 2. إعادة ضبط العناصر العامة للموقع */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important; 
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    padding-bottom: 60px;
    width: 100%;
    direction: rtl;
}

.container {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 40px 4%;
}

/* 3. قسم الهيرو العلوي (الكمبيوتر) */
.hero-section { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 40px; 
    padding: 60px 0; 
}

.hero-avatar { 
    width: 300px; 
    height: 300px; 
    border-radius: 50%; 
    overflow: hidden; 
    border: 4px solid #fff; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    flex-shrink: 0; 
}

.hero-avatar img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center 15%; 
}

.hero-content { flex: 1; }
.hero-buttons { display: flex; gap: 15px; margin-top: 20px; }

.btn-primary { background: #000; color: #fff; padding: 12px 30px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
.btn-secondary { background: var(--color-secondary); color: #2E7D32; padding: 12px 30px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; max-width: 200px; }

/* 4. قسم المقالات */
.articles-section { margin-top: 60px; padding-bottom: 20px; width: 100%; }
.articles-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; }
.articles-title h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 5px; }
.articles-title p { color: #666; font-size: 1.1rem; }

/* أزرار السلايدر */
.slider-arrows { display: flex; align-items: center; gap: 10px; }
.arrow-btn { width: 40px; height: 40px; border-radius: 50%; border: none; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#prev-btn { background: #E2E2E0; color: #555; }
#next-btn { background: #4A4A48; color: #fff; }

/* الكروت */
.articles-slider { display: flex; gap: 24px; overflow-x: auto; padding-bottom: 20px; scrollbar-width: none; }
.articles-slider::-webkit-scrollbar { display: none; }
.post-card { flex: 0 0 calc(33.333% - 16px); min-width: 320px; background: #fff; border-radius: var(--radius-main); overflow: hidden; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.post-image { width: 100%; height: 220px; background: #E5E5E5; }
.post-image img { width: 100%; height: 100%; object-fit: cover; }
.post-content { padding: 24px; text-align: right; }
.post-content h3 { font-size: 1.3rem; margin-bottom: 8px; }
.post-date { font-size: 0.85rem; color: #999; display: block; margin-bottom: 10px; }

/* 5. قسم النشرة البريدية (البطاقة الداكنة) */
.newsletter-section { margin: 80px 0; display: flex; justify-content: center; width: 100%; }
.newsletter-card { background-color: #2C2C2C; padding: 50px 40px; border-radius: 20px; text-align: center; max-width: 550px; width: 100%; color: #FFFFFF; box-shadow: 0 20px 40px rgba(0,0,0,0.2); box-sizing: border-box; }
.newsletter-card h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 20px; color: #FFFFFF; }
.newsletter-card p { font-size: 1.1rem; color: #A0A0A0; line-height: 1.7; margin-bottom: 35px; }

/* --- إجبار نموذج MailPoet على أخذ تصميم البطاقة الداكنة باحترافية وتكبير الحقول --- */
.custom-mailpoet-form form,
.custom-mailpoet-form .mailpoet_form { 
    display: flex !important; 
    flex-direction: column !important; 
    gap: 15px !important; 
    width: 100% !important;
}

.custom-mailpoet-form .mailpoet_paragraph { 
    width: 100% !important; 
    margin-bottom: 0 !important; 
}

/* تكبير وتنسيق حقل البريد الإلكتروني */
.custom-mailpoet-form input[type="email"], 
.custom-mailpoet-form input.mailpoet_text { 
    width: 100% !important;
    height: 55px !important; /* الارتفاع الضخم الاحترافي الجديد */
    background-color: #333333 !important; 
    border: 1px solid #4D4D4D !important; 
    border-radius: 10px !important; 
    color: #FFFFFF !important; 
    font-family: 'IBM Plex Sans Arabic', sans-serif !important; 
    font-size: 1.1rem !important; 
    text-align: right !important; 
    padding: 0 20px !important; 
    outline: none !important; 
    box-sizing: border-box !important; 
}

.custom-mailpoet-form input[type="email"]::placeholder {
    color: #999999 !important;
}

/* تكبير وتنسيق زر الاشتراك */
.custom-mailpoet-form input[type="submit"], 
.custom-mailpoet-form button.mailpoet_submit { 
    width: 100% !important;
    height: 55px !important; /* متناسق تماماً مع طول الحقل */
    background-color: #FFFFFF !important; 
    color: #000000 !important; 
    border-radius: 10px !important; 
    font-family: 'IBM Plex Sans Arabic', sans-serif !important; 
    font-weight: 800 !important; 
    font-size: 1.2rem !important; 
    border: none !important; 
    cursor: pointer !important; 
    transition: all 0.3s ease !important; 
    box-sizing: border-box !important;
}

.custom-mailpoet-form input[type="submit"]:hover, 
.custom-mailpoet-form button.mailpoet_submit:hover { 
    background-color: #E5E5E5 !important;
    transform: translateY(-2px) !important; 
}

.custom-mailpoet-form .mailpoet_validate_error { 
    color: #ff6b6b !important; 
    font-size: 0.9rem !important; 
    margin-top: 5px !important; 
}

/* 6. نظام التجاوب الكامل مع الجوال والآيفون */
@media (max-width: 768px) {
    .hero-section {
        display: flex !important;
        flex-direction: column-reverse !important; 
        align-items: center !important;
        text-align: center !important;
        margin-top: 30px !important;
        gap: 20px !important;
    }

    .hero-content { width: 100% !important; padding: 0 5% !important; }
    .hero-avatar { order: -1 !important; margin-bottom: 20px !important; }
    
    .hero-avatar img {
        width: 180px !important; 
        height: 180px !important;
        margin: 0 auto;
        display: block;
    }

    .hero-content h1 { font-size: 1.8rem !important; line-height: 1.4 !important; }
    .hero-buttons { justify-content: center !important; width: 100% !important; }

    .newsletter-card { padding: 40px 25px; margin: 0 10px; width: auto; }
    .newsletter-card h2 { font-size: 1.8rem; }
    
    .articles-header { flex-direction: column; text-align: center; gap: 15px; }
    .post-card { flex: 0 0 95% !important; min-width: 95% !important; margin: 0 auto !important; }
}