/* تأثير الـ Pop-up (يظهر فجأة من مكانه مع تكبير بسيط) */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    70% {
        transform: scale(1.05);
        /* تأثير ارتداد خفيف لجعلها حيوية */
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* تأثير الظهور من اليسار إلى اليمين (للمحتوى النصي) */
@keyframes slideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
        /* يبدأ من يسار مكانه */
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* تنسيقات عامة */
.hero {
    background: var(--clr-bg-gradient);
    min-height: 80vh;
    display: flex;
    align-items: start;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
    color: var(--clr-light);
    direction: rtl;
    overflow: hidden;
    width: 100%;
}

.hero__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xl);
}



/* 2- تأثير الـ Content (Slide from Left) */
.hero__content {
    opacity: 0;
    animation: slideFromLeft 0.8s ease-out forwards;
    animation-delay: 0.5s;
    /* يظهر بعد الـ Badge */
}


/* الشارة العلوية */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: var(--br-lg);
    border: 1px solid rgb(31, 94, 255, 0.3);
    box-shadow: var(--shadow-blue);
    font-size: var(--fs-sm);
    color: var(--clr-light);

    opacity: 0;
    /* مخفي في البداية */
    animation: popIn 0.6s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards;
    animation-delay: 0.2s;
    /* يظهر أولاً بعد جزء من الثانية */
}

/* العنوان الرئيسي */
.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    /* يتكيف مع حجم الشاشة */
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.text-gradient {
    /* background: linear-gradient(to left, #60a5fa, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; */
    color: var(--clr-primary);
}

/* الوصف */
.hero__description {
    font-size: var(--fs-lg);
    color: var(--clr-muted);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

/* الأزرار */
.hero__actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: var(--br-sm);
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
    gap: 10px;
}

.btn--primary {
    background: var(--clr-btn-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(31, 94, 255, 0.3);
}

.btn--outline {
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* الإحصائيات */
.hero__stats {
    display: flex;
    gap: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--clr-gold);
}

.stat-label {
    font-size: var(--fs-sm);
    color: var(--clr-muted);
}

/* الصورة والعنصر العائم */
.hero__image-container {
    position: relative;
    flex: 1;
    display: none;
    /* مخفي في الموبايل */

    /* 3- تأثير الـ Image Container (Pop-up) */
    opacity: 0;
    animation: popIn 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards;
    animation-delay: 0.8s;
    /* يظهر آخراً لاكتمال المشهد */
}

/* تأثير إضافي للـ Floating Badge داخل الصورة ليظهر بعد الصورة بقليل */
.hero__floating-badge {
    position: absolute;
    bottom: -20px;
    /* جعلها تبرز قليلاً عن حافة الصورة */
    right: -20px;
    background-color: var(--clr-light);
    padding: 12px 20px;
    border-radius: var(--br-sm);
    /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); */
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    /* مسافة بين النص والأيقونة الزرقاء */
    direction: rtl;
    z-index: 10;

    /* تفعيل الأنيميشن الذي عطلته في كودك */
    opacity: 0;
    animation: popIn 0.5s ease-out forwards;
    animation-delay: 1.2s;
}

.badge-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-title {
    color: var(--clr-primary);
    /* تم تصحيح اسم المتغير */
    font-weight: 800;
    font-size: 1rem;
    display: block;
}

.badge-subtitle {
    color: var(--clr-text);
    /* تم تصحيح اسم المتغير */
    font-size: 0.85rem;
    white-space: nowrap;
}

/* تنسيق الدائرة الزرقاء التي تحتوي على الأيقونة */
.badge-icon-bg {
    background-color: var(--clr-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

@media (min-width: 1025px) {
    .hero__image-container {
        display: block;
    }
}

.hero__img {
    width: 100%;
    height: 100%;
    border-radius: var(--br-sm);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .hero__wrapper {
        flex-direction: column;
        text-align: center;
    }

    .hero__badge,
    .hero__actions,
    .hero__stats {
        justify-content: center;
    }

    .hero__description {
        margin-inline: auto;
    }
}

@media (max-width: 425px) {
    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__stats {
        gap: var(--space-md);
        flex-wrap: wrap;
        justify-content: center;
    }
}