/**
 * Professional Hero Component Styles
 * أنماط قسم البطل الاحترافي
 */

/* استيراد خطوط Google */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

/* متغيرات CSS للتخصيص السهل */
:root {
    --hero-primary-color: #fca311;
    --hero-primary-dark: #e69500;
    --hero-text-color: #ffffff;
    --hero-text-secondary: rgba(255, 255, 255, 0.9);
    --hero-text-muted: rgba(255, 255, 255, 0.7);
    --hero-overlay-color: rgba(0, 0, 0, 0.7);
    --hero-border-radius: 50px;
    --hero-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hero-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --hero-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* إعادة تعيين الأساسيات */
.professional-hero * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* القسم الرئيسي */
.professional-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    isolation: isolate;
    margin: 0 !important;
    padding: 0 !important;
}

/* إصلاح الفراغات غير المرغوبة */
.professional-hero::after,
.professional-hero::before {
    display: none !important;
}

/* إزالة أي هوامش من العناصر المحيطة */
.professional-hero + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.professional-hero:last-child {
    margin-bottom: 0 !important;
}

/* إصلاح شامل للفراغات */
body .professional-hero {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* إزالة أي فراغات من الحاوي الرئيسي */
.professional-hero .hero-container {
    margin: 0 !important;
    padding: 60px 20px !important;
}

/* إصلاح الفراغات في المحتوى */
.professional-hero .hero-content {
    margin: 0 auto !important;
    padding: 0 !important;
}

/* إزالة الفراغات من الإحصائيات */
.professional-hero .hero-stats {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}



/* الخلفية مع التأثيرات الاحترافية */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    border-radius: 0;
}

/* تأثيرات الفيديو/الصورة الاحترافية */
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.8) contrast(1.1) saturate(1.2);
}

/* تأثير الإضاءة الثابتة */
.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 30% 20%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 30%
    ),
    radial-gradient(
        circle at 70% 80%,
        rgba(0, 123, 255, 0.05) 0%,
        transparent 40%
    );
    z-index: 1;
    pointer-events: none;
}

/* تأثير التدرج الثابت */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 2;
}

.hero-gradient {
    background: linear-gradient(135deg, 
        var(--hero-primary-color) 0%, 
        var(--hero-primary-dark) 50%, 
        #1a1a1a 100%);
}

/* الطبقة العلوية */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--hero-overlay-color) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    z-index: 2;
}

/* الحاوية */
.hero-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 3;
}

/* المحتوى */
.hero-content {
    max-width: 700px;
    margin-right: auto;
    color: var(--hero-text-color);
    text-align: right;
}

/* العنوان الفرعي */
.hero-subtitle {
    display: inline-block;
    color: var(--hero-primary-color);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-right: 2rem;
}

.hero-subtitle::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 2px;
    background: var(--hero-primary-color);
    border-radius: 1px;
}

/* العنوان الرئيسي */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, 
        var(--hero-text-color) 0%, 
        rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* الوصف */
.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.8;
    color: var(--hero-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    font-weight: 400;
}

/* الأزرار */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    border-radius: var(--hero-border-radius);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--hero-transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}



.btn-primary {
    background: linear-gradient(135deg, 
        var(--hero-primary-color) 0%, 
        var(--hero-primary-dark) 100%);
    color: var(--hero-text-color);
    box-shadow: var(--hero-shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        var(--hero-primary-dark) 0%, 
        #d48806 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--hero-text-color);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
}

/* الإحصائيات */
.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--hero-primary-color);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover::after {
    opacity: 1;
}

.stat-number {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--hero-primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--hero-text-muted);
    font-weight: 500;
}

/* مؤشر التمرير */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    z-index: 3;
    cursor: pointer;
    transition: var(--hero-transition);
}

.scroll-indicator:hover {
    border-color: var(--hero-primary-color);
}

.scroll-dot {
    width: 6px;
    height: 6px;
    background: var(--hero-text-color);
    border-radius: 50%;
    margin: 10px auto 0;
    animation: scrollBounce 2s infinite;
}

/* الأنيميشن */
@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(15px);
        opacity: 0.5;
    }
}

/* تأثيرات الحركة المتقدمة */
.hero-content > * {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-subtitle { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.4s; }
.hero-description { animation-delay: 0.6s; }
.hero-actions { animation-delay: 0.8s; }
.hero-stats { animation-delay: 1s; }

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

/* التصميم المتجاوب */
@media (max-width: 1200px) {
    .hero-container {
        padding: 0 1.5rem;
    }
    
    .hero-stats {
        gap: 3rem;
    }
    
    /* تحسينات الأداء للهواتف المحمولة */
@media (max-width: 768px) {
    .professional-hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    /* تقليل التأثيرات على الهواتف لتحسين الأداء */
    .hero-video {
        animation: kenBurnsEffectMobile 20s ease-in-out infinite alternate;
        filter: brightness(0.8) contrast(1.05);
        transform: scale(1.02);
    }
    
    /* تأثير مبسط للهواتف */
    @keyframes kenBurnsEffectMobile {
        0% {
            transform: scale(1.02) translateX(0);
        }
        100% {
            transform: scale(1.05) translateX(-1%);
        }
    }
    
    /* تقليل تأثيرات الإضاءة على الهواتف */
    .hero-background::before {
        animation: lightMovementMobile 15s ease-in-out infinite;
        background: radial-gradient(
            circle at 50% 50%,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 40%
        );
    }
    
    @keyframes lightMovementMobile {
        0%, 100% {
            transform: translate(0, 0);
        }
        50% {
            transform: translate(-5px, -5px);
        }
    }
    
    /* تبسيط التدرج للهواتف */
    .hero-background::after {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.3) 100%
        );
        animation: none; /* إيقاف الحركة لتوفير البطارية */
    }
    
    .hero-content {
        padding: 0 1rem;
        text-align: center;
        z-index: 10; /* التأكد من ظهور المحتوى فوق التأثيرات */
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 2rem;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    }
    
    .stat-label {
        font-size: 0.8rem;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .professional-hero {
        min-height: 60vh;
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* تحسينات الأداء العامة */
@media (prefers-reduced-motion: reduce) {
    .hero-video,
    .hero-background::before,
    .hero-background::after {
        animation: none !important;
        transform: none !important;
    }
    
    .btn {
        transition: none !important;
    }
}

.stat-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: right;
    }
    
    .stat-number {
        font-size: 2rem;
        margin-bottom: 0;
    }
}

/* الشاشات عالية الدقة */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-title {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* تقليل الحركة للمستخدمين الذين يفضلون ذلك */
@media (prefers-reduced-motion: reduce) {
    .hero-content > *,
    .scroll-dot,
    .btn {
        animation: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* الوضع المظلم */
@media (prefers-color-scheme: dark) {
    :root {
        --hero-overlay-color: rgba(0, 0, 0, 0.8);
    }
}

/* تحسينات الطباعة */
@media print {
    .professional-hero {
        min-height: auto;
        page-break-inside: avoid;
    }
    
    .hero-video,
    .hero-overlay,
    .scroll-indicator {
        display: none;
    }
    
    .hero-content {
        color: #000;
    }
}

/* تخصيصات إضافية للمطورين */
.professional-hero[data-theme="dark"] {
    --hero-overlay-color: rgba(0, 0, 0, 0.9);
}

.professional-hero[data-theme="light"] {
    --hero-overlay-color: rgba(255, 255, 255, 0.1);
    --hero-text-color: #333;
}

/* تأثيرات تفاعلية متقدمة */
.hero-content:hover .hero-title {
    text-shadow: 0 0 20px rgba(252, 163, 17, 0.3);
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* تحسينات الأداء */
.professional-hero {
    will-change: transform;
    transform: translateZ(0);
}

.hero-background {
    will-change: transform;
    backface-visibility: hidden;
}
