/* 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: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8edf3;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 64, 255, 0.12);
    border-color: rgba(0, 64, 255, 0.15);
}

.course-card:hover::before {
    opacity: 1;
}

.course-image {
    position: relative;
    height: 190px;
    overflow: hidden;
    flex-shrink: 0;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.04);
}

.course-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.course-content {
    padding: 1.125rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-description {
    color: #64748b;
    font-size: 0.815rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.875rem;
}

.course-instructor,
.course-offerings {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 0;
}

.course-instructor i,
.course-offerings i {
    font-size: 0.85rem;
    flex-shrink: 0;
    color: #94a3b8;
}

.course-instructor span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.875rem;
}

.lang-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b5bdb;
    background: #eef2ff;
    padding: 3px 9px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

.course-actions {
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid #f1f5f9;
}

.course-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-blue);
    background: transparent;
    border: 2px solid var(--primary-blue);
    transition: all 0.25s ease;
}

.course-cta:hover {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 64, 255, 0.28);
    text-decoration: none;
}

.course-cta:focus-visible {
    outline: 3px solid rgba(0, 64, 255, 0.4);
    outline-offset: 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;
}