/*
Theme Name: Devomura
Author: Moamen Fathi
Description: A custom WordPress theme for digital services, optimized for Arabic (RTL).
Version: 1.0
Text Domain: devomura
*/


/* =================================================================
   2. Theme Colors Root & Basic Setup
   ================================================================= */
:root {
  --primary-color: #9EFF00;
  --text-color: #2D3940;
  --background-color: #F6F8F7;
  --description-color: #838383;
  --white-color: #FFFFFF;
  --black-color: #000000;
  --font-main: 'Cairo', sans-serif; /* Define font variable */
}

/* Base Body Styles */
body {
    margin: 0;
    font-family: var(--font-main); /* Apply Cairo font */
    box-sizing: border-box;
    overflow-x: hidden;
    /* Arabic Direction Settings */
    direction: rtl;
    text-align: right;
}

/* LTR Support (Optional, if you switch language) */
html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

/* Common Container */
.raqmana-container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 15px;
}

/* Images Global Style */
img {
    max-width: 100%;
    height: auto;
}

/* =================================================================
   3. Header Styling
   ================================================================= */
.raqmana-header {
    background-color: var(--black-color);
    padding-block: 20px;
    position: relative; 
    z-index: 100;
}

.raqmana-header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Logo */
.raqmana-header__logo img {
    max-height: 40px;
    display: block; 
}

/* Main Navigation (Desktop) */
.raqmana-header__nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 30px;
}

.raqmana-header__nav a {
    color: var(--white-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.raqmana-header__nav a:hover {
    color: var(--primary-color);
}

/* Header Actions (Button and Mobile Toggle) */
.raqmana-header__actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.raqmana-button--cta {
    background-color: var(--white-color);
    color: var(--text-color);
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.raqmana-button--cta:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

/* Mobile Toggle Button */
.raqmana-mobile-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.raqmana-mobile-toggle .line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white-color);
    margin-block: 4px;
}

/* Mobile Menu Active State (Handled by JS) */
.raqmana-header__nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--black-color);
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.raqmana-header__nav.active ul {
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* =================================================================
   4. Responsive (Mobile) Header
   ================================================================= */
@media (max-width: 992px) {
    .raqmana-header__nav {
        display: none; /* Hidden by default on mobile */
    }

    .raqmana-button--cta {
        display: none; /* Hide CTA button on small screens if needed */
    }

    .raqmana-mobile-toggle {
        display: block;
    }
}

/* =================================================================
   5. Single Project Page Styles (Block Editor Ready)
   ================================================================= */

.project-header {
    background-color: var(--text-color);
    padding-block: 60px;
    margin-bottom: 50px;
}

.project-header .entry-title {
    color: var(--white-color);
    font-size: 52px;
    text-align: center;
    margin: 0;
}

/* This is the main container for the content rows */
.project-single .raqmana-container {
    max-width: 1200px;
}

/* Base style for all content rows */
.project-content-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
    padding: 60px 40px; 
    border-radius: 20px; 
    margin-bottom: 30px; 
}

/* Alternate background colors */
.project-content-row:nth-child(odd) {
    background-color: var(--background-color);
}
.project-content-row:nth-child(even) {
    background-color: #F8FFF0; 
}

/* Image on the Right layout */
.project-content-row.layout-image-right .project-row__image {
    order: 2;
}
.project-content-row.layout-image-right .project-row__text {
    order: 1;
}

.project-row__image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.project-row__text {
    font-size: 18px;
    line-height: 1.8;
}

/* Responsive for project rows */
@media (max-width: 768px) {
    .project-content-row {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }
    .project-content-row.layout-image-right .project-row__image,
    .project-content-row.layout-image-right .project-row__text {
        order: initial; /* Reset order on mobile */
    }
}

/* =================================================================
   Footer Styling (Dark Modern)
   ================================================================= */
.site-footer {
    background-color: #000000; /* خلفية سوداء */
    color: #fff;
    padding-top: 60px;
    padding-bottom: 30px;
    position: relative;
    border-top: 1px solid #333;
    overflow: hidden;
}

/* 1. Footer Top Section */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 40px;
}

/* Branding */
.footer-branding img {
    max-height: 50px;
    filter: brightness(0) invert(1); /* جعل اللوجو أبيض إذا كان ملوناً */
}
/* إذا أردت اللوجو الأصلي احذف سطر الفلتر */

/* Footer Menu */
.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.footer-navigation a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-navigation a:hover {
    color: var(--primary-color);
}

/* Social Box (The Boxed Style) */
.footer-socials-box {
    display: flex;
    align-items: center;
    background-color: #111; /* لون خلفية الصندوق */
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 12px;
    gap: 20px;
}

.social-label {
    font-size: 14px;
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #222;
    border-radius: 8px;
    color: var(--primary-color); /* الأيقونة باللون الأخضر */
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: #000; /* عند الهوفر تصبح الأيقونة سوداء والخلفية خضراء */
    border-color: var(--primary-color);
}

/* 2. Divider */
.footer-divider {
    height: 1px;
    background-color: #333;
    width: 100%;
    margin-bottom: 40px;
}

/* 3. Footer Bottom Section */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 15px;
}

.footer-contact-info {
    display: flex;
    gap: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
}

.contact-item a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* أيقونات التواصل */
.contact-item span[class^="icon-"] {
    color: var(--primary-color); /* الأيقونات خضراء */
    font-size: 18px;
}

.footer-copyright {
    color: #666;
}
.footer-logo-img {
    max-height: 50px; 
    width: auto;
    filter: brightness(0) invert(1);
}

/* =================================================================
   Responsive Footer
   ================================================================= */
@media (max-width: 992px) {
    .footer-top,
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-contact-info {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
.footer-socials-box {
       /* width: 100%;*/       
        max-width: 100%;   
        padding: 20px 10px; /* تقليل الحواف الجانبية قليلاً لتوفير مساحة */
        
        display: flex;
        flex-direction: column; /* النص فوق والأيقونات تحت */
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .social-icons {
        display: flex;
        flex-wrap: wrap;       /* هذا هو السطر السحري: يجعل الأيقونات تنزل لسطر جديد */
        justify-content: center; /* توسيط الأيقونات */
        gap: 8px;              /* تقليل المسافة بين الأيقونات قليلاً لتناسب الموبايل */
        width: 100%;           /* تأكد من أن الحاوية تأخذ العرض المتاح */
    }
    
    /* تصغير حجم الأيقونات قليلاً جداً في الموبايل إذا لزم الأمر */
    .social-icon {
        width: 35px;
        height: 35px;
    }
}

/* =================================================================
   Single Post Page Styling (Modern & Profitable)
   ================================================================= */

/* 1. Post Hero Section */
.single-post-hero {
    position: relative;
    height: 400px; /* ارتفاع الهيرو */
    display: flex;
    align-items: center;
    background-color: #1a1a1a;
    color: #fff;
    margin-bottom: 50px;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(4px); /* تمويه خفيف للخلفية للتركيز على النص */
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, #000 0%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Breadcrumbs */
.post-breadcrumbs {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.post-breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

/* Post Title */
.post-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #fff;
}

/* Meta Data */
.post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    align-items: center;
    color: #ddd;
}

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

.meta-item.author img {
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}
.meta-item.author a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* 2. Layout (Sidebar Right) */
.single-post-layout {
    display: block; /* إلغاء الـ Grid لأننا حذفنا العمود الجانبي */
    max-width: 900px; /* تحديد عرض أقصى للقراءة المريحة (الأفضل بين 800-900 بيكسل) */
    margin: 0 auto 60px; /* توسيط المحتوى في الصفحة */
}

/* 3. Main Content Typography */
.entry-content {
    font-size: 19px; /* تكبير الخط قليلاً ليناسب العرض */
    line-height: 2;   /* زيادة تباعد الأسطر */
    color: #2D3940;
}

.entry-content p {
    margin-bottom: 25px;
}

.entry-content h2, .entry-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--black-color);
}

.entry-content img {
    border-radius: 10px;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.entry-content blockquote {
    border-right: 5px solid var(--primary-color);
    background: #f9f9f9;
    padding: 20px 30px;
    font-style: italic;
    margin: 30px 0;
    color: #555;
}

/* 4. Post Footer (Tags & Share) */
.post-footer-meta {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.post-tags a {
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
    margin-left: 5px;
}
.post-tags a:hover {
    background: var(--primary-color);
    color: #000;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
}
.share-btn {
    width: 35px; height: 35px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}
.share-btn.fb { background: #3b5998; }
.share-btn.tw { background: #000; }
.share-btn.wa { background: #25D366; }

/* 5. Author Box */
.author-box {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 15px;
    display: flex;
    gap: 20px;
    margin-top: 40px;
    align-items: center;
}
.author-avatar img {
    border-radius: 50%;
    width: 80px; height: 80px;
}
.author-info h3 {
    margin: 0 0 10px;
    font-size: 20px;
}
.author-info p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

/* 6. Related Posts */
.related-posts {
    margin-top: 60px;
}
.related-title {
    font-size: 24px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 10px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.related-item .related-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}
.related-item h4 {
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}
.related-item h4 a {
    color: #000;
    text-decoration: none;
}

/* 7. Sidebar (Sticky) */
.sticky-sidebar {
    position: sticky;
    top: 30px; /* المسافة من الأعلى عند التمرير */
}

/* تنسيق الودجات داخل السيدبار */
.widget {
    background: #fff;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #eee;
    border-radius: 10px;
}
.widget-title {
    font-size: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px; right: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

/* Responsive Mobile */
@media (max-width: 992px) {
    .single-post-layout {
        grid-template-columns: 1fr; /* عمود واحد */
    }
    
    .single-post-hero {
        height: auto;
        padding: 60px 0;
    }
    .post-title {
        font-size: 30px;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* =================================================================
   Single Post - Boxed Layout & Comments
   ================================================================= */

/* 1. Background Setup (لإظهار الإطار الأبيض) */
body.single {
    background-color: #f4f6f8; /* لون رمادي فاتح جداً للخلفية */
}

/* 2. The "Box" Frame Style (الكروت) */
.content-card-box {
    background: #ffffff;
    padding: 50px; /* زيادة المساحة الداخلية لراحة أكثر */
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05); /* ظل ناعم وأنيق */
    border: 1px solid rgba(0,0,0,0.02);
    margin-bottom: 40px;
}

/* 3. Typography Updates inside the box */

/* 4. Share Buttons (تحديث للأيقونات) */
.share-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.2s;
}
.share-btn:hover { transform: translateY(-3px); }
.share-btn.fb { background-color: #1877F2; }
.share-btn.tw { background-color: #000; }
.share-btn.wa { background-color: #25D366; }

/* 5. Author Box inside card */
.author-box {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 40px;
    border: 1px solid #eee;
}
.author-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}
.author-info h3 { margin: 0 0 5px; font-size: 18px; }

/* =================================================================
   COMMENTS SECTION STYLING (Modern & Clean)
   ================================================================= */

/* العنوان "اترك تعليقاً" */
.comments-title, .comment-reply-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 10px;
}

/* قائمة التعليقات */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .comment {
    margin-bottom: 30px;
}

.comment-body {
    background: #fff;
    border: 1px solid #eee; /* إطار خفيف حول التعليق */
    padding: 20px;
    border-radius: 12px;
    position: relative;
    transition: 0.3s;
}

.comment-body:hover {
    border-color: var(--primary-color);
}

/* رأس التعليق (صورة + اسم + تاريخ) */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.comment-metadata {
    font-size: 13px;
    color: #999;
}
.comment-metadata a { color: #999; text-decoration: none; }
.fn { font-style: normal; font-weight: bold; font-size: 16px; color: #000; display: block; }

/* نص التعليق */
.comment-content p {
    margin: 0;
    font-size: 16px;
    color: #555;
}

/* زر الرد */
.reply {
    margin-top: 15px;
    text-align: left; /* زر الرد على اليسار */
}
.comment-reply-link {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    color: #333;
    font-size: 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}
.comment-reply-link:hover {
    background: var(--primary-color);
    color: #000;
}

/* التعليقات الفرعية (الردود) */
.children {
    list-style: none;
    padding-right: 40px; /* إزاحة لليمين في اللغة العربية */
    margin-top: 20px;
    border-right: 2px solid #eee; /* خط يربط الردود */
}

/* =================================================================
   COMMENT FORM STYLING
   ================================================================= */
.comment-respond {
    margin-top: 40px;
    background: #fdfdfd;
    padding: 30px;
    border-radius: 12px;
    border: 1px dashed #ccc;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    background: #fff;
    transition: 0.3s;
    outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(158, 255, 0, 0.2);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.comment-form-cookies-consent input { width: auto; }

/* زر إرسال التعليق */
.form-submit .submit {
    background-color: #000;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
}

.form-submit .submit:hover {
    background-color: var(--primary-color);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(158, 255, 0, 0.4);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .content-card-box {
        padding: 25px; /* تقليل الحواف في الموبايل */
    }
    .children {
        padding-right: 15px;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}