/* الخطوط العامة */
body {
    font-family: 'Noto Kufi Arabic', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    overflow-x: hidden;

    /* تدرج ديناميكي أزرق فاتح + أبيض */
    background: linear-gradient(
        45deg,
        #ffffff,
        #eaf4ff,
        #d8ecff,
        #ffffff
    ) !important;
    background-size: 400% 400% !important;
    animation: gradientMove 25s ease infinite !important;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* الهيدر مع اللوجو */
.hero-section {
    padding: 20px;
    text-align: center;
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-container img.logo {
    height: 60px;
    width: auto;
}
.logo-container {
    background: #ffffff;          /* الخلفية البيضاء */
    padding: 10px;                /* مساحة حول اللوجو */
    border-radius: 12px;          /* زوايا منحنية مثل باقي التصميم */
    display: inline-block;        /* باش تبقى فقط حول اللوجو */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* لمسة أناقة خفيفة */
}
.title-text h1 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}

/* نموذج التسجيل */
.registration-container {
    max-width: 500px;
    margin: 40px auto;
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-top: 15px;
}

input, select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.price {
    margin-top: 10px;
    font-weight: bold;
    color: #E74C3C;
}

/* الأزرار موحدة مع بقية المنصة */
.btn {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background-color: #2C3E50;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: #34495E;
}
.top-bar {
    display: flex;
    justify-content: flex-start;
    padding: 10px 20px;
}

.back-btn {
    background-color: #2C3E50;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.back-btn:hover {
    background-color: #34495E;
}
/* متجاوب */
@media (max-width: 600px) {
    .registration-container {
        margin: 20px;
        padding: 20px;
    }

    .logo-title {
        flex-direction: column;
    }
}
/* === توحيد أزرار كل الصفحة === */
.btn, .back-btn, .card .btn, .video-card .btn, .lesson-card .btn, .test-card .btn {
    background: linear-gradient(135deg, #1e3a8a, #2563eb, #38bdf8) !important; /* نفس تدرّج أزرق المنصة */
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-family: 'Noto Kufi Arabic', sans-serif !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

/* تأثير الهوف */
.btn:hover, .back-btn:hover, .card .btn:hover, .video-card .btn:hover, 
.lesson-card .btn:hover, .test-card .btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6), 0 0 35px rgba(56, 189, 248, 0.5) !important;
    opacity: 0.95 !important;
}

.payment-container {
    max-width: 450px;
    margin: 40px auto;
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.payment-container label {
    font-weight: bold;
    margin-top: 15px;
    display: block;
}

.payment-container input,
.payment-container select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.payment-container .price {
    background: #f3f3f3;
    padding: 12px;
    border-radius: 10px;
    margin-top: 5px;
    text-align: center;
    font-weight: bold;
}

.payment-container .btn {
    margin-top: 20px;
}
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #5b73ff, #8a5bff);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    margin-top: 15px;
    transition: 0.3s;
}

.btn:hover {
    background: linear-gradient(135deg, #4a62e8, #7a4fe8);
    transform: translateY(-1px);
}

.registration-container form,
.payment-container form {
    display: flex;
    flex-direction: column;
}

.registration-container .btn,
.payment-container .btn {
    align-self: stretch; /* يملأ عرض الحاوية */
}
.registration-container,
.payment-container {
    max-width: 450px;     /* تحديد عرض مناسب */
    margin: 0 auto;       /* يضعها في المنتصف */
    padding: 20px;        /* مسافة داخلية متناسقة */
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.registration-container form,
.payment-container form {
    display: flex;
    flex-direction: column;
}

.registration-container input,
.payment-container input,
.registration-container select,
.payment-container select {
    width: 100%;           /* يملأ الحاوية بدون فراغات على الجوانب */
    box-sizing: border-box; /* يمنع التمدد الخارجي */
    margin-top: 8px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
}

 .logo-title {
    text-align: center;          /* يضع كل المحتوى في المنتصف أفقياً */
    margin-bottom: 20px;
}

.logo-title .logo-container {
    display: flex;
    justify-content: center;     /* يضع اللوغو في المنتصف */
    margin-bottom: 10px;
}

.logo-title h1 {
    font-size: 22px;            /* حجم العنوان الرئيسي */
    font-weight: 700;
    margin: 0;
    color: #333;
}

.stage-subtitle {
    font-size: 14px;            /* صغير للمراحل */
    font-weight: 500;
    color: #555;
    margin-top: 5px;
}
.back-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #5b73ff, #8a5bff);
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    margin-top: 15px;
}

.back-btn:hover {
    background: linear-gradient(135deg, #4a62e8, #7a4fe8);
}
.stage-subtitle {
    font-size: 14px;          /* حجم أصغر من العنوان الرئيسي */
    font-weight: 500;
    color: #555;
    margin-top: 5px;
    text-align: center;       /* يبقى في المنتصف أسفل العنوان الرئيسي */
}
.logo-title {
    display: flex;
    justify-content: center;  /* توسيط كامل الحاوية */
    margin-bottom: 20px;
}

.logo-header {
    display: flex;
    align-items: center;      /* يحافظ على استقامة اللوغو والعنوان عموديًا */
    gap: 15px;                /* مسافة بين اللوغو والعنوان */
}

.logo-container {
    background-color: #fff;   /* خلفية بيضاء للوغو */
    padding: 8px;
    border-radius: 50%;
    flex-shrink: 0;           /* يمنع اللوغو من التصغير */
}

.logo-container .logo {
    width: 80px;
    height: 80px;
}

.title-text h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.stage-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-top: 5px;
}
/* الأزرار الانتقالية بين المرحلتين */
.btn-transition {
    display: block;
    width: 100%;              /* يملأ عرض الحاوية */
    padding: 12px 0;          /* ارتفاع موحد */
    font-size: 14px;           /* حجم الخط */
    font-weight: 600;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(135deg, #5b73ff, #8a5bff);
    color: #fff;
    margin-top: 15px;         /* مسافة عن الحقول */
}

.btn-transition:hover {
    background: linear-gradient(135deg, #4a62e8, #7a4fe8);
}
/* حركة التدرج الديناميكي للخلفية */
body {
    font-family: 'Noto Kufi Arabic', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(45deg, #c7d2ff, #d6b3ff, #cce0ff, #e0c6ff);
    background-size: 400% 400%;
    animation: gradientMove 25s ease infinite;
    color: #1b1b1b;
}

/* حركة التدرج */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* تأثير الظهور التدريجي للعناصر */
.hero-section > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
    animation-delay: 0.3s;
}

.hero-section .logo-container {
    animation-delay: 0.5s;
}

.hero-section .title-text {
    animation-delay: 0.7s;
}

.hero-section .overview {
    animation-delay: 0.9s;
}

.hero-section .buttons {
    animation-delay: 1.1s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* الأزرار */
.buttons .btn {
    padding: 18px 50px;
    background: #5b6cc0;
    color: white;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.buttons .btn:hover {
    background: #4a57a0;
    transform: translateY(-3px);
}
/* ===== شعار مع تأثير Morph + Glow ===== */
.logo-container {
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    margin-bottom: 30px;
    animation: morphAppear 2s ease forwards;
    position: relative;
    overflow: hidden;
}
.logo-container {
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    margin-bottom: 30px;
    animation: morphAppear 2s ease forwards;
    position: relative;
    overflow: hidden;
}

/* الشعار نفسه */
.logo {
    width: 140px;
    display: block;
    position: relative;
    z-index: 1;
}

/* لمعة متحركة */
.logo-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.6) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    z-index: 2;
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -75%; }
    100% { left: 125%; }
}

/* Morph effect للشعار عند الظهور */
@keyframes morphAppear {
    0% {
        transform: scale(0) rotateY(180deg) rotateX(180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotateY(10deg) rotateX(-10deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotateY(0deg) rotateX(0deg);
    }
}

/* الشعار نفسه */
.logo {
    width: 140px;
    display: block;
    animation: logoGlow 2s ease-in-out 2s infinite alternate;
}

/* Morph effect: يظهر ويكبر ويتغير شكله */
@keyframes morphAppear {
    0% {
        transform: scale(0) rotateY(180deg) rotateX(180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotateY(10deg) rotateX(-10deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotateY(0deg) rotateX(0deg);
    }
}

/* Glow effect بعد الاستقرار */
@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 0px white); }
    50% { filter: drop-shadow(0 0 15px white); }
    100% { filter: drop-shadow(0 0 0px white); }
}

/* ===== نصوص مع تأثير كتابة وGlow ===== */
.title-text h1 {
    font-size: 42px;
    font-weight: 700;
    margin: 0;
    color: #1f2d3d;
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid rgba(0,0,0,0.7);
    white-space: nowrap;
    width: 0;
    animation: typewriter 2s steps(30) forwards 2.5s, glowText 2s ease-in-out infinite alternate 5s;
}

@keyframes typewriter { to { width: 100%; } }
@keyframes glowText {
    0% { text-shadow: 0 0 5px #fff, 0 0 10px #fff; }
    100% { text-shadow: 0 0 15px #fff, 0 0 25px #fff; }
}

.title-text span {
    display: block;
    font-size: 22px;
    font-weight: 400;
    color: #555;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards 5.5s;
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ===== لمحة عامة ===== */
.overview {
    font-size: 18px;
    color: #444;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 900px;
    background-color: rgba(255,255,255,0.85);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards 6.5s;
}

/* ===== الأزرار ===== */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards 7.5s;
}

.buttons .btn {
    padding: 18px 50px;
    background: linear-gradient(90deg, #6a5acd, #00bfff);
    color: white;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(106,90,205,0.6), 0 0 30px rgba(0,191,255,0.4);
}

.buttons .btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 0 30px rgba(106,90,205,0.8), 0 0 50px rgba(0,191,255,0.6);
}

/* ===== استجابة الشاشة ===== */
@media (min-width: 800px) {
    .logo-title {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
    .buttons {
        flex-direction: row;
        justify-content: center;
        gap: 25px;
    }
}
/* تأثير ظهور الخانات */
.form-box {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    animation: formReveal 0.9s ease forwards;
}

@keyframes formReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* تأثير صعود الصندوق كامل عند فتح الصفحة */
.registration-container,
.payment-container {
    opacity: 0;
    transform: translateY(40px);
    animation: containerFadeUp 0.8s forwards;
    animation-delay: 0.3s; /* ممكن تغيّري التأخير */
}

@keyframes containerFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ===== الهواتف الصغيرة جداً ===== */
@media (max-width: 480px) {
    body {
        font-size: 13px; /* تصغير حجم الخط أكثر */
        padding: 8px;
    }

    .hero-section {
        padding: 10px 8px;
    }

    .title-text h1 {
        font-size: 18px; /* تصغير العنوان الرئيسي */
    }

    .title-text span {
        font-size: 12px; /* تصغير العنوان الفرعي */
    }

    .overview {
        font-size: 12px;
        padding: 8px;
    }

    .buttons .btn {
        width: 90%;
        font-size: 12px;
        padding: 8px 12px;
    }

    .logo-container .logo {
        width: 80px; /* الشعار أصغر */
    }

    .top-bar {
        width: 95%;
        height: 40px;
    }

    .top-bar .logo {
        height: 22px;
    }

    .top-bar .btn {
        font-size: 11px;
        padding: 4px 6px;
    }
}
/* زر العودة للواجهة */
@media (max-width: 480px) {
    .top-buttons .btn {
        display: flex;              /* flex يجعل النص يتمركز عموديًا */
        align-items: center;        /* نص في الوسط عموديًا */
        justify-content: center;    /* نص في الوسط أفقيًا */
        height: 36px;               /* ارتفاع الزر */
        padding: 0 10px;            /* padding أفقي فقط */
        font-size: 12px;            /* حجم الخط */
        line-height: normal;        /* إعادة تعيين line-height */
        text-align: center;         /* تأكد من توسيط النص */
        box-sizing: border-box;
    }
}
/* زر العودة للواجهة الرئيسية - متوافق مع كل الأجهزة */
.back-btn {
    display: flex;               /* flex لتوسيط النص */
    align-items: center;         /* توسيط عمودي */
    justify-content: center;     /* توسيط أفقي */
    height: 40px;                /* ارتفاع ثابت */
    min-height: 36px;            /* لضمان عدم التقطيع */
    padding: 0 12px;             /* مسافة أفقية فقط */
    font-size: 13px;             /* حجم الخط */
    line-height: 1.2;            /* line-height مناسب لجميع الأجهزة */
    text-align: center;
    box-sizing: border-box;      /* نص يبقى داخل الصندوق */
    border-radius: 12px;         
    background: linear-gradient(135deg, #5b73ff, #8a5bff);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: linear-gradient(135deg, #4a62e8, #7a4fe8);
    transform: translateY(-1px);
}

/* استجابة الهواتف الصغيرة */
@media (max-width: 480px) {
    .back-btn {
        height: 36px;
        font-size: 12px;
        padding: 0 10px;
    }
}
@media (max-width: 480px) {
    .logo-title {
        flex-direction: column; /* يجعل الشعار فوق العنوان */
        align-items: center;
        gap: 10px; /* مسافة بين الشعار والعنوان */
    }
@media (max-width: 480px) {
    .logo-title {
        margin-top: 24px;
    }
}

    .logo {
        width: 80px; /* تصغير مناسب للشعار */
        height: auto;
    }

    .title-text h1 {
        text-align: center;
    }
}
/* ===================================
   تأثير احترافي لخانات الإدخال
   نفس ستايل أزرار المنصة
=================================== */

input,
select,
textarea {

    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px;
    font-family: 'Noto Kufi Arabic', sans-serif;

    transition: all 0.35s ease;
    outline: none;

    box-shadow: 0 0 0 rgba(37,99,235,0);
}

/* Hover — نفس إحساس الأزرار */
input:hover,
select:hover,
textarea:hover {

    transform: translateY(-2px);

    border-color: #38bdf8;

    box-shadow:
        0 0 15px rgba(37,99,235,0.35),
        0 0 25px rgba(56,189,248,0.25);
}

/* Focus — عند الكتابة */
input:focus,
select:focus,
textarea:focus {

    transform: scale(1.02) translateY(-3px);

    border-color: #2563eb;

    box-shadow:
        0 0 18px rgba(37,99,235,0.55),
        0 0 35px rgba(56,189,248,0.35);

    background: linear-gradient(#ffffff, #f8fbff);
}
/* ===== حدود زرقاء للصندوقين فقط ===== */
.registration-container,
.payment-container {
    border: 2px solid transparent;
    border-radius: 16px;
    transition: all 0.3s ease;
}

/* عند مرور الماوس */
.registration-container:hover,
.payment-container:hover {
    border-color: #2563eb; /* الخط الأزرق */
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}
/* الصندوقين الكاملين - حركة أنعم وخفيفة */
.registration-container,
.payment-container {
    border: 2px solid transparent !important;
    border-radius: 16px !important;
    transition: all 0.25s ease-in-out !important; /* أسرع وأنعم */
    will-change: transform, box-shadow, border-color;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); /* ظل أخف */
}

/* Hover كامل على الصندوق */
.registration-container:hover,
.payment-container:hover {
    border-color: #004aad !important;
    transform: translateY(-3px) !important; /* رفع أخف */
    box-shadow: 0 8px 20px rgba(0, 74, 173, 0.18) !important; /* ظل أخف */
}
.registration-container,
.payment-container {
    transition: transform 0.2s ease-out; /* حركة أنعم */
}

.registration-container:hover,
.payment-container:hover {
    transform: translateY(-2px); /* رفع أخف */
}