/* ========================================
   Hero Slider - Professional Animations
   ======================================== */

/* Hero Slider Container */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

/* Slide Item */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease-in-out, visibility 2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slide.prev {
    z-index: 0;
}

/* Slide Background */
.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: kenburns 20s ease-in-out infinite alternate;
}

/* Ken Burns Effect (Zoom Animation) */
@keyframes kenburns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* Slide Content Animation */
.hero-slide-content {
    position: relative;
    z-index: 2;
}

.hero-slide.active .hero-slide-content h1 {
    animation: slideInFromLeft 1s ease-out 0.3s both;
}

.hero-slide.active .hero-slide-content p {
    animation: slideInFromLeft 1s ease-out 0.6s both;
}

.hero-slide.active .hero-slide-content .hero-buttons {
    animation: slideInFromBottom 1s ease-out 0.9s both;
}

.hero-slide.active .hero-slide-card {
    animation: slideInFromRight 1.2s ease-out 0.5s both;
}

/* Slide Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slider Controls */
.hero-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.hero-dot.active {
    background: white;
    width: 40px;
    border-radius: 6px;
}

.hero-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 0;
    height: 2px;
    background: #84cc16;
    transform: translateY(-50%);
    animation: dotProgress 5s linear;
}

@keyframes dotProgress {
    to {
        width: 100%;
    }
}

/* Navigation Arrows - HIDDEN */
.hero-nav {
    display: none; /* مخفي تماماً */
}

/* Slide Overlay */
.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(79, 0, 140, 0.9) 0%,
        rgba(79, 0, 140, 0.7) 50%,
        rgba(168, 85, 247, 0.4) 100%
    );
    z-index: 1;
}

/* Floating Elements Animation */
.hero-floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float-random 20s ease-in-out infinite;
}

.hero-floating-element:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.hero-floating-element:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.hero-floating-element:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float-random {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(20px, -30px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translate(-15px, -50px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translate(30px, -20px) rotate(270deg);
        opacity: 0.6;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slider {
        height: 650px; /* زيادة الارتفاع على الموبايل */
    }
    
    .hero-nav {
        width: 40px;
        height: 40px;
    }
    
    .hero-controls {
        bottom: 20px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-slider {
        height: 600px; /* ارتفاع للشاشات الصغيرة جداً */
    }
}

/* Pause on Hover */
.hero-slider:hover .hero-slide-bg {
    animation-play-state: paused;
}

/* Text Gradient Animation */
.hero-gradient-text {
    background: linear-gradient(
        90deg,
        #fff 0%,
        #84cc16 25%,
        #a855f7 50%,
        #84cc16 75%,
        #fff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradientFlow 3s linear infinite;
}

@keyframes textGradientFlow {
    to {
        background-position: 200% center;
    }
}

/* Loading Animation */
.hero-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    z-index: 20;
}

.hero-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #84cc16;
    animation: loadingBar 5s linear infinite;
}

@keyframes loadingBar {
    to {
        width: 100%;
    }
}
