/*
Theme Name: Moamen Dev Theme
Author: Moamen & Gemini Partner
Description: Custom minimalist theme for SEO Expert
Version: 1.0
*/

:root {
    --moamen-primary-color: #1a62e3; /* Blue from button */
    --moamen-text-color: #333333;
    --moamen-bg-color: #ffffff;
    --moamen-border-color: #e5e5e5;
    --moamen-top-border: #ffecd1; /* Light orange top border hint */
    --moamen-font-family: 'Cairo', sans-serif;
    --moamen-container-width: 1200px;
}

/* 1. Global Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--moamen-font-family);
    background-color: var(--moamen-bg-color);
    color: var(--moamen-text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* 2. Layout Utility */
.moamen-container {
    max-width: var(--moamen-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. Header Styling */
.moamen-main-header {
    background-color: #fff;
    /* Top border hint based on image */
    border-top: 4px solid var(--moamen-top-border); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Subtle shadow */
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.moamen-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.moamen-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #000;
}

.moamen-logo-icon svg {
    display: block; /* Fix vertical alignment */
}

.moamen-logo-icon {
    background: #eef4ff; /* Light blue background behind icon */
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.moamen-nav-list {
    display: flex;
    gap: 30px;
}

.moamen-nav-list li a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--moamen-text-color);
    position: relative;
}

.moamen-nav-list li a:hover {
    color: var(--moamen-primary-color);
}

/* CTA Button */
.moamen-cta-btn {
    background-color: var(--moamen-primary-color);
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 700;
    display: inline-block;
}

.moamen-cta-btn:hover {
    background-color: #1550b9;
    transform: translateY(-1px);
}

/* Mobile Responsive Placeholder */
@media (max-width: 768px) {
    .moamen-nav-list {
        display: none; /* Will handle mobile menu with JS later */
    }
}

/* --- General Utilities --- */
.moamen-section-wrapper {
    padding: 60px 0;
    position: relative;
    background-color: #F8F9FA;
}

/* Grid System for consistency */
.moamen-grid-2-cols {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 40px;
    align-items: center; /* توسيط عمودي */
}

/* --- Hero Typography --- */
.moamen-hero-heading {
    font-size: 2.8rem;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
    margin-bottom: 20px;
}

.moamen-block-color {
    display: block; /* ينزل سطر جديد */
    color: var(--moamen-primary-color); /* اللون الأزرق المعرف سابقاً */
}

.moamen-hero-desc {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    max-width: 500px;
}

/* --- Buttons --- */
.moamen-hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.moamen-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.moamen-btn-primary {
    background-color: var(--moamen-primary-color);
    color: #fff;
    border: 2px solid var(--moamen-primary-color);
}

.moamen-btn-primary:hover {
    background-color: #1550b9;
    border-color: #1550b9;
}

.moamen-btn-outline {
    background-color: transparent;
    color: #333;
    border: 2px solid #e5e5e5;
}

.moamen-btn-outline:hover {
    border-color: var(--moamen-primary-color);
    color: var(--moamen-primary-color);
}

/* --- Features (Checkmarks) --- */
.moamen-hero-features {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

.moamen-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Hero Image Styling --- */
.moamen-hero-media img {
    width: 100%;
    max-width: 550%;
    height: auto;
    border-radius: 20px; /* تدوير الحواف للصورة */
    /* إضافة ظل ناعم للصورة */
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
}

/* --- Mobile Responsive (The SEO Part) --- */
@media (max-width: 992px) {
    .moamen-grid-2-cols {
        grid-template-columns: 1fr; /* عمود واحد */
        text-align: center; /* توسيط النص في الموبايل */
        gap: 40px;
    }

    .moamen-hero-actions {
        justify-content: center; /* توسيط الأزرار */
    }

    .moamen-hero-features {
        justify-content: center;
    }

    .moamen-hero-heading {
        font-size: 2rem;
    }
    
    .moamen-hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

}

/* --- Background Utilities --- */
.moamen-bg-white {
    background-color: #ffffff;
}

.moamen-bg-light {
    background-color: #fafbfc; /* لون الهيرو السابق */
}

/* --- Section Headers --- */
.moamen-section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.moamen-main-heading {
    font-size: 2.2rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 15px;
}

.text-highlight {
    color: #e74c3c; /* اللون الأحمر للكلمة المميزة */
}

.moamen-sub-desc {
    font-size: 1.1rem;
    color: #666;
}

/* --- Grid System (3 Cols) --- */
.moamen-grid-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 أعمدة متساوية */
    gap: 30px;
}

/* --- Icon Cards --- */
.moamen-icon-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid #f0f0f0; /* إطار خفيف جداً */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* في حالة كان السكشن بخلفية بيضاء، نجعل الكارت يبرز قليلاً بالظل */
    box-shadow: 0 10px 30px rgba(0,0,0,0.02); 
}

.moamen-icon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

/* Icons styling */
.moamen-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
}

/* ألوان خلفيات الأيقونات بناء على التصميم */
.icon-bg-red { background-color: #fef2f2; }
.icon-bg-orange { background-color: #fff7ed; }
.icon-bg-red-light { background-color: #fef2f2; }

/* Titles & Descriptions */
.moamen-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #222;
}

.moamen-card-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
}

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    .moamen-grid-3-cols {
        grid-template-columns: 1fr; /* عمود واحد في الموبايل */
        gap: 20px;
    }
    
    .moamen-main-heading {
        font-size: 1.8rem;
    }
}

/* --- Solution Strategy Section --- */

.moamen-blue-card {
    background: linear-gradient(135deg, #1a62e3 0%, #1668e7 100%); 
    border-radius: 20px;
    padding: 60px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(26, 98, 227, 0.2);
}
.moamen-blue-card .solution-grid {
    grid-template-columns: 2fr 1fr; /* المساحة: ثلثين للنص - ثلث للجرافيك */
    gap: 50px; /* زيادة المسافة الفاصلة قليلاً */
    align-items: center;
}
/* Typography & Content */
.moamen-sol-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.moamen-sol-heading {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
}

.text-orange {
    color: #ff9f43; /* برتقالي للتأكيد */
}

.moamen-sol-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9); /* زيادة الوضوح قليلاً */
    margin-bottom: 30px;
    max-width: 90%; /* السماح للنص بأخذ راحته في المساحة الأوسع */
    line-height: 1.8;
}

/* Features Pills */
.moamen-sol-features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.moamen-sol-feat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.feat-icon svg {
    display: block;
}

/* --- The Graph Visual (CSS Art) --- */
.moamen-sol-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.moamen-graph-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    width: 100%;
    max-width: 450px;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.moamen-graph-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.graph-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.graph-stat {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ff9f43;
}

.graph-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 120px; /* ارتفاع الرسم البياني */
}

.graph-bars .bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
}

.graph-bars .bar.active {
    background: linear-gradient(to top, #ff9f43, #feb47b); /* العمود المميز */
    box-shadow: 0 0 15px rgba(255, 159, 67, 0.4);
}
/* --- Graph Labels --- */
.graph-labels {
    display: flex;
    justify-content: space-between; /* يوزع العناصر: واحد في أقصى اليمين وواحد في أقصى اليسار */
    margin-top: 12px; /* مسافة بين الأعمدة والنص */
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* خط أفقي رفيع يمثل محور السينات X-axis */
}

.graph-labels span {
    font-size: 0.85rem; /* خط صغير وأنيق */
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}
/* Mobile Responsive */
@media (max-width: 992px) {
    .moamen-blue-card .solution-grid {
        grid-template-columns: 1fr; /* عمود واحد */
        gap: 40px;
    }
    
    .moamen-sol-desc {
        max-width: 100%;
    }
    .moamen-blue-card {
        padding: 40px 20px;
    }
    
    .moamen-sol-heading {
        font-size: 1.8rem;
    }
    
    .moamen-graph-card {
        margin-top: 40px;
        transform: rotate(0);
    }
}

/* --- Archive Header --- */
.moamen-archive-header {
    padding: 60px 0 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

/* --- Pagination --- */
.moamen-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.moamen-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 8px;
    border: 1px solid #eee;
    color: #333;
    font-weight: 700;
}

.moamen-pagination .page-numbers.current,
.moamen-pagination .page-numbers:hover {
    background-color: var(--moamen-primary-color);
    color: #fff;
    border-color: var(--moamen-primary-color);
}


/* --- Single Project Layout --- */
.moamen-project-header {
    padding: 40px 0;
    text-align: center;
}

.entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 15px;
}

.moamen-project-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* المحتوى ثلثين - السايدبار ثلث */
    gap: 50px;
    align-items: start; /* مهم عشان السايدبار ميمطش */
}

/* Featured Image */
.project-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

/* Content Styling (Shared for Projects & Posts) */
.project-content-body,
.entry-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
}

/* Headings */
.project-content-body h2, .entry-content h2,
.project-content-body h3, .entry-content h3,
.project-content-body h4, .entry-content h4 {
    color: #111;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
    padding-right: 15px; /* RTL spacing */
}

.project-content-body h2::before, .entry-content h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background: var(--moamen-primary-color);
    border-radius: 4px;
}

.project-content-body h2, .entry-content h2 { font-size: 1.8rem; }
.project-content-body h3, .entry-content h3 { font-size: 1.5rem; }
.project-content-body h4, .entry-content h4 { font-size: 1.3rem; }

/* Paragraphs */
.project-content-body p, .entry-content p {
    margin-bottom: 25px;
}

/* Lists */
.project-content-body ul, .entry-content ul,
.project-content-body ol, .entry-content ol {
    margin-bottom: 30px;
    margin-right: 20px; /* RTL indentation */
}

.project-content-body ul, .entry-content ul {
    list-style: none; /* remove default bullets */
}

.project-content-body ul li, .entry-content ul li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 12px;
}

.project-content-body ul li::before, .entry-content ul li::before {
    content: '✔'; /* Checkmark bullet */
    position: absolute;
    right: 0;
    top: 2px;
    color: #27ae60; /* Green check */
    font-weight: bold;
    font-size: 1.1rem;
}

/* Ordered Lists */
.project-content-body ol, .entry-content ol {
    list-style: decimal;
    padding-right: 20px;
}
.project-content-body ol li, .entry-content ol li {
    margin-bottom: 10px;
    padding-right: 10px;
}

/* Blockquotes */
.project-content-body blockquote, .entry-content blockquote {
    background: #f9f9f9;
    border-right: 5px solid var(--moamen-primary-color);
    padding: 20px 30px;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.2rem;
    color: #555;
    border-radius: 8px;
    position: relative;
}

.project-content-body blockquote::before, .entry-content blockquote::before {
    content: '“';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 4rem;
    color: rgba(26, 98, 227, 0.1);
    font-family: serif;
}

/* Links (Anchor Text) */
.project-content-body a, .entry-content a {
    color: var(--moamen-primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 600;
}
.project-content-body a:hover, .entry-content a:hover {
    color: #111;
}

/* Tables */
.project-content-body table, .entry-content table {
    width: 100%;
    margin-bottom: 40px;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.project-content-body table th, .entry-content table th {
    background: var(--moamen-primary-color);
    color: #fff;
    padding: 15px;
    text-align: right;
    font-weight: 700;
}

.project-content-body table td, .entry-content table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.project-content-body table tr:last-child td, .entry-content table tr:last-child td {
    border-bottom: none;
}

.project-content-body table tr:nth-child(even), .entry-content table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Code Blocks */
.project-content-body pre, .entry-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    direction: ltr; /* Code always LTR */
    text-align: left;
    margin-bottom: 30px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
}

.project-content-body code, .entry-content code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    color: #c7254e;
    font-family: monospace;
    font-size: 0.9em;
}

.project-content-body pre code, .entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Sidebar Card (Shared) */
.project-info-card, .sidebar-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #eee;
    position: sticky; /* يثبت لما تعمل سكرول */
    top: 100px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}
.sidebar-card h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .moamen-project-layout {
        grid-template-columns: 1fr;
    }
    
    .project-info-card {
        position: static; /* الغاء التثبيت في الموبايل */
        margin-top: 30px;
    }
}

/* إخفاء العناصر حسب الشاشة */
.mobile-only-cta { display: none; }
.moamen-mobile-toggle { display: none; }

@media (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-only-cta { display: block; margin-top: 20px; text-align: center; }

    /* تنسيق زر الهامبرغر */
    .moamen-mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }
    .moamen-mobile-toggle span {
        width: 25px;
        height: 3px;
        background-color: var(--moamen-primary-color);
        transition: 0.3s;
    }

    /* تحويل القائمة لـ Overlay */
    .moamen-main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* مخفية خارج الشاشة */
        width: 80%;
        height: 100vh;
        background: #fff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 80px 40px;
        transition: 0.4s ease;
        display: flex;
        flex-direction: column;
        z-index: 1000;
    }

    .moamen-main-nav.active { right: 0; }

    .moamen-nav-list {
        display: flex;
        flex-direction: column;
        gap: 0px;
    }
    .moamen-nav-list li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0; /* بوردر خفيف جداً بين العناصر */
    }
    .moamen-nav-list li:last-child {
        border-bottom: none;
    }
    .moamen-nav-list li a {
        display: block;
        padding: 15px 0; /* مساحة نقر مريحة */
        font-size: 1.1rem;
        transition: padding-right 0.3s ease;
    }

    /* حركة تفاعلية بسيطة عند تمرير الماوس أو الضغط */
    .moamen-nav-list li a:hover {
        padding-right: 10px;
        color: var(--moamen-primary-color);
    }

    /* تنسيق زر الاستشارة المخصص داخل القائمة */
    .mobile-only-cta {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 2px solid var(--moamen-top-border); /* فاصل بلون مختلف لتمييز زر الـ CTA */
    }

    /* زر الاستشارة داخل القائمة */
    .mobile-only-cta .moamen-cta-btn {
        width: 100%;
        text-align: center;
        background-color: var(--moamen-primary-color);
    }
}