/*
Theme Name: Razan Training Hub Child
Template: RazanTrainingHub
Author: Royal Merger
Author URI: https://royalmerger.com
Description: لمركز رزان للتدريب واللغات 
Version: 1.0.0
Text Domain: razan-child
*/

/* إصلاح تداخل أعمدة Elementor في النسخة العربية RTL */
html[dir="rtl"] .elementor-column, 
html[dir="rtl"] .elementor-widget-wrap {
    text-align: right !important;
    direction: rtl !important;
}
/* ===== محاذاة النصوص لليمين فقط (RTL Text Align) ===== */

body {
    direction: rtl;
}

/* جميع النصوص الأساسية */
h1, h2, h3, h4, h5, h6,
p, li, span, a, label, div, td, th, figcaption, blockquote, cite, input, textarea, select, button {
    text-align: right;
}

/* الحفاظ على العناصر التي يجب أن تبقى متوسطة أو مخصصة */
.text-center,
.text-center *,
.centered,
.rmg-hero h1,
.rmg-hero p,
.rmg-modal-title,
.elementor-widget-heading.text-center,
.elementor-widget-text-editor.text-center,
.elementor-widget-button .elementor-button-text,
.elementor-button {
    text-align: center !important;
}

/* الأزرار تحافظ على محاذاتها التلقائية */
button,
input[type="button"],
input[type="submit"],
.elementor-button-wrapper {
    text-align: inherit;
}

/* إذا كنت تريد عكس الفقرات التي تظهر من اليسار فقط */
.text-left,
.text-left * {
    text-align: left !important;
}

/* تحسين العناوين في الـ Hero */
.rmg-hero h1,
.rmg-hero p {
    text-align: center;
}
/* ===== استثناءات: عناصر تبقى بلا محاذاة يمينية ===== */

/* 1. العداد (Counter) */
.counter-class,
.counter-class * {
    text-align: center !important;
}

/* 2. حقل بحث */
input[name="s"],
input[name="s"]::placeholder {
    text-align: left !important;
    direction: ltr !important;
}

/* 3. حقل البريد الإلكتروني */
input[name="email"],
input[name="email"]::placeholder {
    text-align: left !important;
    direction: ltr !important;
}

/* ===== محاذاة خاصة لليمين ===== */

/* 4. checkbox + label */
fieldset {
    text-align: right !important;
}
fieldset label {
    text-align: right !important;
}

/* 5. الأسئلة الشائعة (F.A.Q) – المحتوى بأكمله يمين */
.faq-style-one,
.faq-style-one .accordion-button,
.faq-style-one .accordion-body,
.faq-style-one .accordion-body p {
    text-align: right !important;
}
/* ===== إصلاح زر الأكورديون ===== */
button.accordion-button {
    text-align: right !important;
}

/* ===== إصلاح fieldset و checkbox ===== */
fieldset {
    text-align: right !important;
    direction: rtl !important;
}
fieldset label {
    text-align: right !important;
}
/* ===== إصلاح نهائي لزر الأكورديون ونصه ===== */
.faq-style-one .accordion-button,
.faq-style-one .accordion-button * {
    text-align: right !important;
}
/* تحويل نص زر الأكورديون لليمين مع أيقونة السهم في اليسار */
.faq-style-one .accordion-button {
    direction: rtl;
    text-align: right;
}
/* إصلاح زر البحث (أيقونة فقط) */
button[type="submit"] {
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* ===== التنسيقات المطلوبة بالضبط (بعد التصحيح) ===== */

/* العنصر الرئيسي للقسم (تأكد أن المحدد يشير إلى حاويتك) */
.elementor-118 .elementor-element.elementor-element-f073fbb {
    display: flex;
    padding-top: 87px;
    padding-bottom: 125px;
    padding-left: 37px;
    padding-right: 0;  /* كانت -30px ولا يمكن تطبيق قيمة سالبة */
}

/* تنسيقات عامة للنصوص */
body {
    font-family: var(--font-default);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    overflow-x: hidden;
    background-color: var(--white);
    color: var(--color-paragraph);
}

/* صورة التبويب */
.choose-us-style-two-content .thumb img {
    height: 100%;
    object-fit: cover;
    object-position: right;
    border-radius: 4px 0 0 17px;  /* أعلى اليسار 4px، أسفل اليسار 17px */
}

/* شريط التبويبات الجانبي */
.nav.nav-tabs.tab-style-two-nav {
    margin: 0;
    border: 1px solid rgba(0,0,0,0.1);  /* إضافة لون افتراضي للحد */
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 26px;
    border-radius: 0;  /* بلا تدوير */
}

/* تباعد الأعمدة Bootstrap */
.row {
    --bs-gutter-x: -21px;  /* سحب الأعمدة باتجاه بعضها (اختياري) */
}
/* ===== سهم لليمين على التبويب النشط (عبر li) ===== */
.tab-style-two-nav .nav-item {
    position: relative;
}
.tab-style-two-nav .nav-item:has(.nav-link.active)::before {
    content: "◀";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
    font-size: 1.2rem;
    color: #7f13e0;
    z-index: 5;
    opacity: 1;
}
/* إخفاء قسم السعر والتقييم */
.bottom-meta {
    display: none !important;
}

/* إخفاء قسم الكاتب (الصورة + الاسم) */
.author {
    display: none !important;
}
.wpcf7-response-output[aria-hidden="true"] {
  display: none !important;
}
/* ===== غلاف الزر ===== */
.rmg-btn-more {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
/* ===== زر ... المزيد مع ظل وتأثير هوفر ===== */
.rmg-btn-more {
    display: inline-block;
    background: linear-gradient(135deg, #8224e3 0%, #8576d6 100%);
    background-size: 200% 200%;
    animation: rmg-wave 3s ease infinite;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: block !important;
}

.rmg-btn-more:hover {
    box-shadow: 0 8px 25px rgba(130, 36, 227, 0.6);
    transform: translateY(-2px);
}

@keyframes rmg-wave {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.navbar-brand > img {
    display: block;
    max-height: 70px;
}
.live-course-items > img {
    background: #4f1384;
    padding: 20px;
    border-radius: 30px;
    margin-top: 50px;
    max-width: 120%;
}
/* تغيير لون خلفية القسم */
.elementor-8494 .elementor-element.elementor-element-4ed4d5a2 {
    background-color: #43126e !important;  /* استبدل باللون الذي تريده */
}

/* تغيير لون النص داخل القسم إذا أردت */
.elementor-8494 .elementor-element.elementor-element-4ed4d5a2,
.elementor-8494 .elementor-element.elementor-element-4ed4d5a2 * {
    color: #ffffff !important; /* أو أي لون فاتح */
}
/* تغيير لون خلفية القسم السفلي */
.elementor-8494 .elementor-element.elementor-element-3f2574e7 {
    background-color: #3a105f !important;
}
/* إخفاء مربع الاختيار ونص "أوافق على تلقي التحديثات" */
#privacy,
#privacy + label {
    display: none !important;
}
/* تصغير اللوغو */
nav.navbar.validnavs.navbar-fixed .logo {
    max-height: 70px;
    width: auto;
}
/* إخفاء قسم المدرب */
.lp-section-instructor {
    display: none !important;
}
.side .widget .logo::after {
    background: #4a145e;
}
.course-featured {
    background-color: #b330ff;
}
/* إخفاء قسم المدرب والتصنيف */
.course-instructor-category {
    display: none !important;
}
/* إخفاء شريط بيانات الدورة (المدة، المستوى، الدروس، العنوان) */
.course-wrap-meta {
    display: none !important;
}
/* إخفاء شريط بيانات الدورة (السعر اسفل المحاضرات) */
.course-price {
    display: none !important;
}
/* إزاحة القائمة لليمين وتنسيق عناصرها */
.list-style-four {
    text-align: right;
    direction: rtl;
}
.list-style-four li {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* المحتوى يبدأ من اليمين */
    gap: 15px;                     /* مسافة بين الأيقونة والنص */
}
.list-style-four .info {
    text-align: right;
}
@media (min-width: 768px) {
    .step-style-one-items {
        display: flex;
        flex-direction: row-reverse;
        justify-content: center;      /* يوسّط المجموعة كاملة */
        gap: 30px;                   /* مسافة بين العناصر (اختياري) */
    }
    .step-style-one-item {
        text-align: center;           /* ليظل النص والأرقام تحت بعضها بشكل جميل */
    }
}
/* تجاوز الخلفية المتغيرة مباشرة بتدرج لوني ثابت */
.choose-us-style-two-content .info {
    background: linear-gradient(90deg, rgb(90, 0, 183) 50%, #11322d 100%) !important;
}
a.vt-btn.btn-gradient::after {
    background-image: linear-gradient(90deg, rgb(90, 0, 183) 50%, #11322d 100%) !important;
}
.course-style-one-item a.btn {
    background: linear-gradient(90deg, rgb(90, 0, 183) 50%, #11322d 100%) !important;
}
button.lp-button.button-purchase-course {
    background: linear-gradient(90deg, rgb(90, 0, 183) 50%, #11322d 100%) !important;
}
span.course-featured {
    background: linear-gradient(90deg, rgb(90, 0, 183) 50%, #11322d 100%) !important;
}
/* زر "إبدأ الآن" – نفس تدرج أزرار LearnPress العامة */
.lp-button.button-enroll-course {
    background: linear-gradient(90deg, rgb(90, 0, 183) 50%, #11322d 100%) !important;
    color: #ffffff !important;
}

/* زر "إشتري الآن" عند الهوفر فقط */
.course-readmore a:hover {
    background: linear-gradient(90deg, rgb(90, 0, 183) 50%, #11322d 100%) !important;
    color: #ffffff !important;
}
/* إصلاح ترتيب الكلمات + توسيط النص */
.split-text .line {
    display: block !important;
    text-align: center !important;
    direction: rtl !important;
    unicode-bidi: normal !important;
    white-space: normal !important;
}
.split-text .line div {
    display: inline-block !important;
    position: static !important;
    transform: none !important;
}
/* إصلاح شامل لجميع القوائم في صفحات الكورسات – النقاط على اليمين */
.lp-content-area ul,
.lp-single-offline-course ul,
.course-summary-content ul,
.lp-entry-content ul {
    direction: rtl !important;
    text-align: right !important;
    padding-right: 1.8rem !important;
    padding-left: 0 !important;
    list-style-position: outside !important;
}

.lp-content-area ul li,
.lp-single-offline-course ul li,
.course-summary-content ul li,
.lp-entry-content ul li {
    text-align: right !important;
    direction: rtl !important;
}

/* مسار التنقل breadcrumb يبقى أفقياً */
.learn-press-breadcrumb {
    direction: rtl !important;
    text-align: right !important;
}
.learn-press-breadcrumb li {
    display: inline-block;
    text-align: right !important;
}
.default-padding {
    padding-top: 0px;
    padding-bottom: 120px;
}
/* إخفاء رأس صفحة أرشيف الدورات */
.learn-press-courses-header {
    display: none !important;
}

/* تأكيد لون خلفية الفوتر الصحيح (#43126e) وقسم الشريط السفلي (#3a105f) */
#RMG-global-footer {
    background-color: #43126e !important;
    background-image: none !important;
}
#RMG-global-footer .footer-bottom {
    background-color: #3a105f !important;
}
/* إزالة أي فراغات أو ألوان بينية */
#RMG-global-footer .e-con-inner,
#RMG-global-footer .elementor-widget-wrap {
    background-color: transparent !important;
}
/* إخفاء نجوم التقييم */
.ratings {
    display: none !important;
}

/* إخفاء أيقونة الاقتباس */
.icon img[src*="quote-1.png"] {
    display: none !important;
}
.top {
    text-align: right !important;
    direction: rtl !important;
}

.d-flex {
    direction: rtl !important;
    text-align: right !important;
}

/* تجاوز الخلفية الزرقاء الموروثة إلى بنفسجي شفاف خاص بمركز رزان */
.elementor-118 .elementor-element-f073fbb.bg-gray-gradient-secondary {
background: linear-gradient(to left, rgb(255 255 255 / 35%), rgb(248 248 248 / 25%), rgb(79 0 245 / 38%)) !important;
    background-color: transparent !important;
}
/* تجاوز الخلفية الزرقاء الموروثة إلى بنفسجي شفاف خاص بمركز رزان – قسم ae803f3 */
.elementor-118 .elementor-element-ae803f3.bg-gray-gradient-secondary {
background: linear-gradient(to left, rgb(90 0 183 / 3%), rgb(248 248 248 / 25%), rgb(255 255 255 / 35%)) !important;
    background-color: transparent !important;
}
/* تجاوز الخلفية الزرقاء الموروثة إلى بنفسجي شفاف خاص بمركز رزان – قسم 3ae610b */
.elementor-118 .elementor-element-3ae610b.bg-gray-gradient-secondary {
    background: linear-gradient(
        to left,
        rgba(239 239 239 / 35%),
        rgba(220, 200, 240, 0.25),
        rgba(255, 255, 255, 0.6)
    ) !important;
    background-color: transparent !important;
}
/* تجاوز الخلفية الزرقاء الموروثة إلى بنفسجي شفاف خاص بمركز رزان – قسم 525b0dd */
.elementor-118 .elementor-element-525b0dd.bg-gray-gradient-secondary {
    background: linear-gradient(to left, rgb(255 255 255 / 35%), rgb(152 50 255 / 6%), rgb(255 255 255 / 0%)) !important;
}
.elementor-118 .elementor-element.elementor-element-8f157b5 .testimonial-style-three-info {
    background: rgb(90, 0, 183);
  
  /* توسيط حاوية العنوان الفرعي بالكامل */
h4.sub-title.title1 {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: center !important;
    color: #ffffff !important;
}
.event-details-items .course-preview-info .content .top {
    background: #43126e !important;
    background-color: #43126e !important;
    --dark: #43126e !important;
}
/* قاعدة CSS قوية تُطبق قبل أي نمط آخر */
form.search-form button[type="submit"],
form.search-form button[type="submit"] .fa-search,
form.search-form button[type="submit"]:hover,
form.search-form button[type="submit"]:focus {
    background: rgb(90, 0, 183) !important;
    background-color: rgb(90, 0, 183) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
  /* تثبيت لون خلفية العداد إلى بنفسجي */
.event-details-thumb .counter-class,
.event-details-thumb .counter-class .counter-item,
.event-details-thumb .counter-class .item {
    background: rgb(90, 0, 183) !important;
    background-color: rgb(90, 0, 183) !important;
}
/* إخفاء الرسالة القديمة وقائمة المنتجات بعد إضافة الزر الجديد */
.course-via-product .learn-press-message.warning {
    display: none !important;
}
  
add_action('wp_head', function() {
    if (function_exists('is_checkout') && is_checkout()) {
        echo '<style>
            /* ===== تنسيق صفحة إتمام الدفع (Checkout) ===== */

            /* 1. الهيكل العام – خلفية فاتحة وحاويات محددة */
            .woocommerce-checkout .col2-set .col-1,
            .woocommerce-checkout .col2-set .col-2,
            #order_review {
                background: #ffffff;
                border-radius: 16px;
                padding: 2rem;
                box-shadow: 0 8px 25px rgba(0,0,0,0.05);
                margin-bottom: 2rem;
            }

            /* 2. عناوين الأقسام */
            .woocommerce-checkout h3 {
                color: #43126e !important;
                font-size: 1.5rem;
                font-weight: 700;
                border-bottom: 2px solid #e0d4f5;
                padding-bottom: 0.5rem;
                margin-bottom: 1.5rem;
                font-family: "Times New Roman", serif;
            }

            /* 3. زر "إتمام الطلب" */
            .woocommerce-checkout #place_order {
                background: linear-gradient(135deg, #8224e3, #43126e) !important;
                border: none !important;
                border-radius: 50px !important;
                color: #ffffff !important;
                font-weight: 700;
                font-size: 1.2rem;
                padding: 14px 40px;
                text-transform: uppercase;
                letter-spacing: 1px;
                transition: 0.3s;
                display: block;
                width: 100%;
                margin-top: 1rem;
            }
            .woocommerce-checkout #place_order:hover {
                transform: translateY(-2px);
                box-shadow: 0 6px 20px rgba(130,36,227,0.5);
            }

            /* 4. حقول الإدخال */
            .woocommerce-checkout input[type="text"],
            .woocommerce-checkout input[type="email"],
            .woocommerce-checkout textarea,
            .woocommerce-checkout select {
                border: 1px solid #d4c8e0 !important;
                border-radius: 8px !important;
                padding: 12px 16px !important;
                background-color: #faf9fc;
                font-size: 1rem;
                width: 100%;
                transition: 0.2s;
            }
            .woocommerce-checkout input:focus,
            .woocommerce-checkout textarea:focus {
                border-color: #8224e3 !important;
                box-shadow: 0 0 0 3px rgba(130,36,227,0.15);
                outline: none;
            }

            /* 5. جدول المنتجات */
            .woocommerce-checkout-review-order-table {
                background: #f5f0fa;
                border-radius: 12px;
                overflow: hidden;
                width: 100%;
            }
            .woocommerce-checkout-review-order-table th {
                background: #43126e;
                color: #ffffff;
                padding: 1rem;
                font-weight: 600;
            }
            .woocommerce-checkout-review-order-table td {
                padding: 1rem;
                border-bottom: 1px solid #e0d4f5;
            }
            .woocommerce-checkout-review-order-table .order-total th,
            .woocommerce-checkout-review-order-table .order-total td {
                background: #e0d4f5;
                font-weight: 700;
                color: #43126e;
            }

            /* 6. وسائل الدفع */
            .wc_payment_methods {
                background: #ffffff;
                border-radius: 12px;
                padding: 1.5rem;
                border: 1px solid #e0d4f5;
            }
            .wc_payment_method label {
                font-weight: 600;
                color: #43126e;
            }

            /* 7. الروابط (الكوبون، إلخ) */
            .woocommerce-checkout .showcoupon {
                color: #8224e3 !important;
                font-weight: 600;
            }
        </style>';
    }
});
  