@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary: #007bff;
    --secondary: #007bff;
    --accent: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4ade80;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    overflow-x: hidden;
}

/* Header Styles */
.headCourses {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 3rem;
}

.header-content {
    z-index: 1;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.header-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.2s;
}

.header-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.4s;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.6s;
}

    .search-bar input {
        flex: 1;
        border: none;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        border-radius: 50px;
        outline: none;
    }

    .search-bar button {
        background: var(--accent);
        color: white;
        border: none;
        padding: 0.8rem 1.8rem;
        border-radius: 50px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        .search-bar button:hover {
            background: var(--primary);
            transform: translateY(-2px);
        }

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
}

/* Main Content Styles */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.8s;
}

    .section-title::after {
        content: '';
        position: absolute;
        height: 4px;
        width: 60%;
        background: var(--accent);
        bottom: -8px;
        left: 0;
        border-radius: 10px;
    }

.categories {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--light);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 1s;
}

.category {
    padding: 0.8rem 1.5rem;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

    .category.active {
        background: var(--primary);
        color: white;
    }

    .category:hover {
        border-color: var(--primary);
        transform: translateY(-3px);
    }

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
}

    .course-card:nth-child(1) {
        animation: fadeInUp 0.6s forwards 1.0s;
    }

    .course-card:nth-child(2) {
        animation: fadeInUp 0.6s forwards 1.1s;
    }

    .course-card:nth-child(3) {
        animation: fadeInUp 0.6s forwards 1.2s;
    }

    .course-card:nth-child(4) {
        animation: fadeInUp 0.6s forwards 1.3s;
    }

    .course-card:nth-child(5) {
        animation: fadeInUp 0.6s forwards 1.4s;
    }

    .course-card:nth-child(6) {
        animation: fadeInUp 0.6s forwards 1.5s;
    }

    .course-card:hover {
        transform: translateY(-10px) scale(1.03);
        box-shadow: 0 15px 30px rgba(67, 97, 238, 0.2);
        border-bottom: 3px solid var(--primary);
    }

        .course-card:hover .course-image {
            transform: scale(1.05);
        }

        .course-card:hover .course-title {
            color: var(--primary);
        }

        .course-card:hover .enroll-btn {
            background: var(--secondary);
            padding: 0.5rem 1.3rem;
        }

        .course-card:hover::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 0;
            transition: height 0.4s ease;
        }

        .course-card:hover::before {
            height: 100%;
        }

.course-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-content {
    padding: 1.5rem;
}

.course-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.course-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.course-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #ffc107;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.course-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

.enroll-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .enroll-btn:hover {
        background: var(--secondary);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    }

    .enroll-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
        z-index: -1;
    }

    .enroll-btn:hover::before {
        width: 300%;
        height: 300%;
    }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-title {
        font-size: 2rem;
    }

    .header-content {
        padding: 2rem 1rem;
    }

    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.8rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .search-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem;
    }

        .search-bar input, .search-bar button {
            width: 100%;
        }

    .courses-grid {
        grid-template-columns: 1fr;
    }
}





.btn-lessons {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

    .btn-lessons:hover {
        background-color: #0056b3;
        color: #fff;
    }

.btn-pdf {
    border: 1px solid #007bff;
    color: #007bff;
    background-color: transparent;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn-pdf:hover {
        background-color: rgba(0, 123, 255, 0.1);
    }


.icon {
    margin-left: 0.5rem;
}