/**
 * Slider Animations
 * أنيميشن العناوين في السلايدر
 */

/* تنسيق العنوان الرئيسي */
.slider-title {
    font-size: 72px;
    font-weight: 900;
    color: #ffffff !important;
    line-height: 1.3;
    margin-bottom: 25px;
    text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.9),
        2px 2px 8px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(50px);
    position: relative;
    z-index: 10;
}

/* تنسيق العنوان الفرعي */
.slider-subtitle {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff !important;
    line-height: 1.5;
    margin-bottom: 30px;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9),
        2px 2px 6px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(50px);
    position: relative;
    z-index: 10;
}

/* تنسيق النص */
.slider-text {
    font-size: 22px;
    font-weight: 500;
    color: #ffffff !important;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9),
        2px 2px 5px rgba(0, 0, 0, 0.8),
        0 0 12px rgba(0, 0, 0, 0.6);
    opacity: 0;
    position: relative;
    z-index: 10;
}

/* إزالة تنسيق HTML من النص */
.slider-text p {
    margin: 0;
    color: #ffffff !important;
    font-size: inherit;
    line-height: inherit;
    text-shadow: inherit;
}

/* أنيميشن الانزلاق من الأسفل */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* أنيميشن الظهور التدريجي */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* تطبيق الأنيميشن على السلايد النشط */
.owl-item.active .animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.owl-item.active .animate-slide-up-delay {
    animation: slideUp 0.8s ease-out 0.3s forwards;
}

.owl-item.active .animate-fade-in {
    animation: fadeIn 1s ease-out 0.6s forwards;
}

/* للموبايل - تصغير الخطوط */
@media (max-width: 991px) {
    .slider-title {
        font-size: 48px;
    }

    .slider-subtitle {
        font-size: 32px;
    }

    .slider-text {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .slider-title {
        font-size: 36px;
    }

    .slider-subtitle {
        font-size: 24px;
    }

    .slider-text {
        font-size: 16px;
        max-width: 90%;
    }
}

/* تحسين المحاذاة في RTL */
[dir="rtl"] .slider-title,
[dir="rtl"] .slider-subtitle,
[dir="rtl"] .slider-text {
    text-align: right;
}

[dir="ltr"] .slider-title,
[dir="ltr"] .slider-subtitle,
[dir="ltr"] .slider-text {
    text-align: left;
}

/* تأثير التمرير (Hover) على العناوين */
.slider-title:hover,
.slider-subtitle:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* خط مزخرف تحت العنوان الرئيسي */
.slider-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #1e40af);
    margin: 15px auto 0;
    border-radius: 2px;
    animation: expandWidth 1s ease-out 0.5s forwards;
    transform-origin: center;
    transform: scaleX(0);
}

@keyframes expandWidth {
    to {
        transform: scaleX(1);
    }
}

/* للـ RTL */
[dir="rtl"] .slider-title::after {
    margin: 15px 0 0 auto;
}

[dir="ltr"] .slider-title::after {
    margin: 15px auto 0 0;
}

/* تأثير الوميض الخفيف */
.owl-item.active .slider-title::after {
    animation: expandWidth 1s ease-out 0.5s forwards,
        pulse 2s ease-in-out 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* تحسين ظهور النصوص بدون خلفية */
.banner-carousel .content-box {
    background: transparent !important;
    padding: 60px 40px;
    border-radius: 0;
    backdrop-filter: none;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: none;
}

@media (max-width: 768px) {
    .content-box {
        padding: 20px;
    }
}

/* تأثير إضافي: الحدود المتحركة */
.slider-subtitle {
    position: relative;
    padding-bottom: 15px;
}

.slider-subtitle::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    animation: slideIn 0.8s ease-out 0.8s forwards;
}

@keyframes slideIn {
    to {
        transform: translateX(-50%) scaleX(1);
    }
}

/* للشاشات الكبيرة جداً */
@media (min-width: 1920px) {
    .slider-title {
        font-size: 96px;
    }

    .slider-subtitle {
        font-size: 56px;
    }

    .slider-text {
        font-size: 24px;
        max-width: 1000px;
    }
}

/* تأثيرات إضافية عند التمرير */
.slide-item.active .content-box {
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0.8;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* تحسين الوضوح على الخلفيات الفاتحة */
.slider-title.light,
.slider-subtitle.light,
.slider-text.light {
    color: #1e3a8a;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

/* تأثير الكتابة بالآلة الكاتبة (اختياري) */
.slider-text.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40) 1s forwards,
        blink 0.5s step-end infinite alternate;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-right: 3px solid transparent;
    }
}