/* Create this file: wwwroot/css/courses-index.css */

:root {
    --primary-blue: #0040ff;
    --primary-green: #00d974;
    --dark-blue: #0030cc;
    --light-gray: #f8f9fa;
    --text-primary: #1a202c;
    --text-secondary: #6c757d;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    position: relative;
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Statistics Cards */
.stats-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stats-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.stats-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* Main Courses Section */
.courses-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--primary-blue) !important;
}

/* Sidebar Filters */
.filters-sidebar {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.filter-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
    appearance: none;
}

.filter-select {
    padding-right: 2.5rem;
    cursor: pointer;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 64, 255, 0.1);
}

.filter-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.875rem;
}

/* Course Cards */
.course-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-lessons {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 64, 255, 0.9);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-instructor {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.course-language {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.course-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.course-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 64, 255, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* Testimonials Section */
.testimonials-section {
    padding: 4rem 0;
    background: white;
}

.testimonial-card {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.author-name {
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
}

.author-role {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    padding: 4rem 0;
    color: white;
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.newsletter-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.newsletter-form {
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-input {
    border: none;
    border-radius: 25px 0 0 25px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: 2px solid transparent;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: none;
}

.newsletter-btn {
    background: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 0 25px 25px 0;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    color: white;
    border-left: none;
}

.newsletter-btn:hover {
    background: #00c766;
    border-color: #00c766;
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        min-height: 50vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .stats-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .course-actions {
        flex-direction: column;
    }

    .course-actions .btn {
        min-width: auto;
    }

    .newsletter-title {
        font-size: 2rem;
    }

    .newsletter-input,
    .newsletter-btn {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }

    .newsletter-form .input-group {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .courses-section {
        padding: 2rem 0;
    }

    .testimonials-section {
        padding: 2rem 0;
    }

    .newsletter-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* Animation for course cards */
.course-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.course-item:nth-child(1) { animation-delay: 0.1s; }
.course-item:nth-child(2) { animation-delay: 0.2s; }
.course-item:nth-child(3) { animation-delay: 0.3s; }
.course-item:nth-child(4) { animation-delay: 0.4s; }
.course-item:nth-child(5) { animation-delay: 0.5s; }
.course-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination Styles */
.pagination-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.pagination-info {
    color: #64748b;
    font-size: 0.875rem;
}

.pagination-list {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-list .page-item {
    border-radius: 8px;
    overflow: hidden;
}

.pagination-list .page-link {
    padding: 0.5rem 0.875rem;
    color: #64748b;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-list .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    border-color: var(--primary-blue);
}

.pagination-list .page-link:hover:not(.disabled) {
    background: rgba(0, 64, 255, 0.1);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.pagination-list .page-item.disabled .page-link {
    color: #cbd5e1;
    cursor: not-allowed;
}