/* Courses Page Styles */

/* Hero Section */
.courses-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 100px 0;   /* 100 فوق وتحت، 0 يمين وشمال */
    position: relative;
    overflow: hidden;
}

.courses-hero::before {
    content: '';
    position: absolute;
    top: 0;
    
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.courses-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 2.7rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: var(--light-text);
}

.hero-text p {
     font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    color: var(--light-text);
}



/* Floating Cards Animation */
.hero-visual {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* حاوية الكروت */
.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;

    /* تحكم في مكان الكروت ككل */
    bottom: 50px;   /* المسافة من تحت */
    top: auto;      /* أو تقدر تستخدم top لو عايز */
}

/* الكارت نفسه */
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    color: #f8f8fb;
    animation: float 3s ease-in-out infinite;
    width: 220px;
    height: 180px;
    justify-content: center;
    margin: 0 20px;

    /* تحريك الكارت نفسه لأعلى/أسفل */
    transform: translateY(-40px); /* ترفع الكروت لفوق 40px */
}

/* أيقونة داخل الكارت */
.floating-card i {
    font-size: 5rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

/* النص داخل الكارت */
.floating-card span {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
}

/* الكروت الفردية */
.card-1 {
    top: 10%;
    left: calc(50% - 500px);
    animation-delay: 0s;
}

.card-2 {
    top: 30%;
    left: calc(50% - 240px);
    animation-delay: 1s;
}

.card-3 {
    top: 50%;
    left: calc(50% + 20px);
    animation-delay: 2s;
}

.card-4 {
    top: 70%;
    left: calc(50% + 280px);
    animation-delay: 3s;
}

/* حركة عائمة */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}



@media (max-width: 480px) {
    .hero-text h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero-text p {
        font-size: var(--font-size-base);
    }
    
    .stat-number {
        font-size: var(--font-size-xl);
    }
    
    .category-card {
        padding: var(--spacing-lg);
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .filter-buttons {
        gap: var(--spacing-sm);
    }
    
    .floating-card {
        width: 80px;
        height: 70px;
    }
    
    .floating-card i {
        font-size: 1.4rem;
    }
    
    .floating-card span {
        font-size: 10px;
    }
    
    .card-2 {
        left: calc(1% + 100px);
    }
    
    .card-3 {
        left: calc(1% + 200px);
    }
    
    .card-4 {
        left: calc(1% + 300px);
    }
}


/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.slide-up {
    animation: slideUp 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 

/* ===== Mobile Fix for Floating Cards ===== */
@media (max-width: 768px) {
  .courses-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-visual {
    height: auto;
    margin-top: 30px;
  }

  .floating-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    position: static; /* منع التراكب */
    height: auto;
  }

  .floating-card {
    position: static;   /* إلغاء الـ absolute */
    width: 140px;
    height: 120px;
    margin: 0;
    animation: float 3s ease-in-out infinite;
  }

  .floating-card i {
    font-size: 2rem;
  }

  .floating-card span {
    font-size: 14px;
  }
}
