/* ========================================
   قسم الهيرو - Hero Section
   الملف: public/web/css/hero.css
======================================== */

/* ========================================
   المتغيرات
======================================== */
:root {
    --hero-height: 100vh;
    --hero-min-height: 700px;
}

/* ========================================
   الخلفية
======================================== */
.hero-section {
    position: relative;
    min-height: var(--hero-height);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.hero-bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #0a0a1a 0%, 
        #1a1a2e 25%, 
        #16213e 50%, 
        #1a1a2e 75%, 
        #0a0a1a 100%
    );
}

.hero-bg-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('https://mohammed-almalgami.com/public/web/img/pattern-3.jpg');
    opacity: 0.03;
}

/* الجسيمات */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ========================================
   الأشكال الزخرفية
======================================== */
.hero-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: floatShape 20s ease-in-out infinite;
}

.hero-shapes .shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15), transparent 70%);
    top: -200px;
    right: -200px;
}

.hero-shapes .shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

.hero-shapes .shape-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.08), transparent 70%);
    top: 50%;
    left: 30%;
    animation-delay: -10s;
}

.hero-shapes .shape-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08), transparent 70%);
    bottom: 20%;
    right: 20%;
    animation-delay: -15s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(0, 50px) scale(1.1); }
    75% { transform: translate(-30px, 20px) scale(1.05); }
}

/* الأكواد العائمة */
.floating-code {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 24px;
    color: rgba(255, 215, 0, 0.1);
    pointer-events: none;
    animation: floatCode 15s ease-in-out infinite;
}

.floating-code.code-1 {
    top: 20%;
    left: 10%;
    font-size: 40px;
    animation-delay: 0s;
}

.floating-code.code-2 {
    top: 60%;
    right: 15%;
    font-size: 35px;
    animation-delay: -5s;
}

.floating-code.code-3 {
    bottom: 30%;
    left: 20%;
    font-size: 30px;
    animation-delay: -10s;
}

@keyframes floatCode {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.1; }
    50% { transform: translateY(-30px) rotate(10deg); opacity: 0.2; }
}

/* ========================================
   المحتوى النصي
======================================== */
.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 0;
}

/* شارة الترحيب */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.3);
    border-radius: 50px;
    margin-bottom: 25px;
    animation: badgePulse 3s ease-in-out infinite;
}

.badge-dot {
    width: 10px;
    height: 10px;
    background: #00c853;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px #00c853;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.2); }
    50% { box-shadow: 0 0 0 15px rgba(0, 200, 83, 0); }
}

.badge-text {
    font-size: 14px;
    font-weight: 600;
    color: #00c853;
}

/* العنوان الرئيسي */
.hero-title {
    margin-bottom: 20px;
}

.hero-title .greeting {
    display: block;
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.hero-title .name {
    display: block;
    font-size: 56px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hero-title .highlight {
    background: linear-gradient(135deg, #ffd700 0%, #ffab00 50%, #ffd700 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* العنوان المتحرك */
.hero-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 22px;
}

.static-text {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.typing-wrapper {
    display: flex;
    align-items: center;
}

.typed-text {
    color: #ffd700;
    font-weight: 700;
    min-width: 250px;
}

.cursor {
    color: #ffd700;
    font-weight: 300;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* الوصف */
.hero-description {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.9;
    margin-bottom: 30px;
    max-width: 550px;
}

.hero-description strong {
    color: #ffd700;
    font-weight: 600;
}

/* ========================================
   الإحصائيات
======================================== */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 35px;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    display: inline;
}

.hero-stats .stat-suffix {
    font-size: 24px;
    color: #ffd700;
    font-weight: 700;
}

.hero-stats .stat-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.hero-stats .stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   أزرار الإجراء
======================================== */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 35px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-hero i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-hero:hover i {
    transform: scale(1.2);
}

/* الزر الأساسي */
.btn-hero.primary {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

.btn-hero.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.btn-hero.primary .btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: btnGlow 3s linear infinite;
}

@keyframes btnGlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* الزر الثانوي */
.btn-hero.secondary {
    background: linear-gradient(135deg, #ffd700 0%, #ffab00 100%);
    color: #1a1a2e;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-hero.secondary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.4);
    color: #1a1a2e;
}

/* الزر الخارجي */
.btn-hero.outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-hero.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffd700;
    color: #ffd700;
    transform: translateY(-5px);
}

/* ========================================
   روابط التواصل
======================================== */
.hero-social {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.4s ease;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    color: #fff;
}

.social-link.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.social-link.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    box-shadow: 0 10px 25px rgba(29, 161, 242, 0.4);
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(225, 48, 108, 0.4);
}

.social-link.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    box-shadow: 0 10px 25px rgba(0, 119, 181, 0.4);
}

.social-link.github:hover {
    background: #333;
    border-color: #333;
    box-shadow: 0 10px 25px rgba(51, 51, 51, 0.4);
}

/* ========================================
   قسم الصورة
======================================== */
.hero-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

/* الإطار */
.image-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed rgba(255, 215, 0, 0.2);
}

.frame-ring.ring-1 {
    width: 90%;
    height: 90%;
    animation: rotateRing 30s linear infinite;
}

.frame-ring.ring-2 {
    width: 100%;
    height: 100%;
    border-color: rgba(0, 212, 255, 0.15);
    animation: rotateRing 25s linear infinite reverse;
}

.frame-ring.ring-3 {
    width: 110%;
    height: 110%;
    border-color: rgba(255, 107, 107, 0.1);
    animation: rotateRing 35s linear infinite;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* الصورة */
.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.8), transparent);
    pointer-events: none;
}

/* ========================================
   الشارات العائمة
======================================== */
.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: floatBadge 4s ease-in-out infinite;
}

.floating-badge .badge-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 20px;
}

.floating-badge .badge-content {
    text-align: right;
}

.floating-badge .badge-number {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
}

.floating-badge .badge-text {
    font-size: 12px;
    color: #666;
}

/* شارة الخبرة */
.badge-experience {
    top: 15%;
    right: 5%;
    animation-delay: 0s;
}

.badge-experience .badge-icon {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
}

/* شارة المشاريع */
.badge-projects {
    bottom: 25%;
    left: 5%;
    animation-delay: 1s;
}

.badge-projects .badge-icon {
    background: linear-gradient(135deg, #00c853, #00a844);
    color: #fff;
}

/* شارة التقييم */
.badge-rating {
    top: 45%;
    right: -5%;
    animation-delay: 2s;
}

.badge-rating .badge-icon {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: #fff;
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ========================================
   أيقونات التقنيات
======================================== */
.tech-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.tech-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: orbitTech 20s linear infinite;
    animation-delay: var(--delay);
}

.tech-icon:nth-child(1) { top: 10%; left: 15%; }
.tech-icon:nth-child(2) { top: 5%; right: 20%; }
.tech-icon:nth-child(3) { top: 35%; left: 0; }
.tech-icon:nth-child(4) { bottom: 35%; right: 0; }
.tech-icon:nth-child(5) { bottom: 15%; left: 10%; }
.tech-icon:nth-child(6) { bottom: 10%; right: 15%; }

@keyframes orbitTech {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    25% { transform: translateY(-10px) rotate(5deg); opacity: 1; }
    50% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    75% { transform: translateY(10px) rotate(-5deg); opacity: 1; }
}

/* ========================================
   مؤشر التمرير
======================================== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.scroll-down:hover {
    color: #ffd700;
}

.mouse {
    width: 28px;
    height: 45px;
    border: 2px solid currentColor;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 10px;
    background: currentColor;
    border-radius: 4px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

.scroll-down .arrow {
    animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.scroll-down .text {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ========================================
   التجاوب مع الشاشات
======================================== */
@media (max-width: 1199px) {
    .hero-title .name {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .floating-badge {
        padding: 12px 16px;
    }
    
    .floating-badge .badge-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 991px) {
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-content {
        text-align: center;
        padding: 30px 0;
    }
    
    .hero-badge {
        justify-content: center;
    }
    
    .hero-title .name {
        font-size: 42px;
    }
    
    .hero-subtitle {
        justify-content: center;
        font-size: 18px;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-social {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-image-wrapper {
        padding: 30px;
        margin-bottom: 40px;
    }
    
    .floating-badge {
        display: none;
    }
    
    .tech-icons {
        display: none;
    }
    
    .frame-ring {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero-title .greeting {
        font-size: 16px;
    }
    
    .hero-title .name {
        font-size: 34px;
    }
    
    .hero-subtitle {
        flex-direction: column;
        gap: 5px;
        font-size: 16px;
    }
    
    .typed-text {
        min-width: auto;
    }
    
    .hero-description {
        font-size: 15px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .hero-stats .stat-divider {
        width: 50px;
        height: 1px;
    }
    
    .hero-stats .stat-number {
        font-size: 28px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-hero {
        width: 100%;
        justify-content: center;
        padding: 14px 28px;
    }
    
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
}

@media (max-width: 575px) {
    .hero-badge {
        padding: 8px 18px;
    }
    
    .badge-text {
        font-size: 12px;
    }
    
    .hero-title .name {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-stats .stat-number {
        font-size: 24px;
    }
    
    .hero-stats .stat-label {
        font-size: 12px;
    }
    
    .btn-hero {
        font-size: 14px;
        padding: 12px 24px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}