/*!* Modern Soft Courses Page Styles *!*/
:root {
    /* ---- PRIMARY COLORS ---- */
    --primary-color: #46837E;
    --primary-hover: #3D726D;
    --primary-active: #33615C;
    --primary-light: #F0F7F6;
    --primary-soft: rgba(70, 131, 126, 0.1);
    --primary-rgba: rgba(70, 131, 126, 0.1);

    /* ---- SECONDARY & ACCENTS ---- */
    --secondary-color: #6AA59F;
    --info-color: #4299E1;
    --success-color: #48BB78;
    --warning-color: #ECC94B;
    --error-color: #F56565;

    /* ---- BACKGROUNDS ---- */
    --bg-body: #F8FAF9;
    --bg-card: #FFFFFF;

    /* ---- TEXT COLORS ---- */
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --text-muted-2: #A0AEC0;
    --text-light: #FFFFFF;

    /* ---- BORDERS & SHADOWS ---- */
    --border-color: rgba(70, 131, 126, 0.15);
    --shadow-soft: 0 4px 20px rgba(70, 131, 126, 0.08);
    --shadow-hover: 0 10px 40px rgba(70, 131, 126, 0.12);

    /* ---- GLOBAL CONFIG ---- */
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0 3rem;
    padding: 1rem;
    width: 100%;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0.75rem 1.5rem;
    margin: 0;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.page-item {
    margin: 0;
    padding: 0;
    position: relative;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.5rem;
    margin: 0 1px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.25;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.page-link:hover:not(:disabled) {
    background: var(--bg-soft);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.page-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-rgba);
    border-color: var(--primary-color);
    z-index: 1;
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.page-item.disabled .page-link {
    color: #9ca3af;
    background: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.page-link i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

.page-link:hover i {
    transform: scale(1.15);
}

.dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    color: #9ca3af;
    user-select: none;
    pointer-events: none;
    font-size: 1.1rem;
    padding: 0;
    margin: 0 2px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        padding: 0.5rem;
        gap: 0.3rem;
        border-radius: 14px;
    }

    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 0.4rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .page-link i {
        font-size: 0.8rem;
    }

    .dots {
        min-width: 20px;
        height: 20px;
        font-size: 1rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pagination-container {
    animation: fadeIn 0.5s ease-out;
}

/* Hover effect for better feedback */
.page-link:not(.disabled) {
    position: relative;
    overflow: hidden;
}

.page-link:not(.disabled)::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-link:not(.disabled):hover::after {
    opacity: 1;
}

/* Focus state for accessibility */
.page-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 131, 126, 0.25);
}

/* Loading state */
.pagination-loading .page-link {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.pagination-loading .page-link::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.courses-section {
    background: var(--bg-soft);
    min-height: 100vh;
    padding: 3rem 0;
}

.courses-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg,
    rgba(70, 131, 126, 0.12),
    rgba(106, 165, 159, 0.12)
    );
    z-index: 0;
}

/* Hero Header */
.courses-hero {
    padding: 2rem 0;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 100px;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--bg-soft);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-rgba);
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.filter-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.filter-option:hover {
    background: var(--bg-soft);
    color: var(--text-primary);
}

.filter-option.active {
    background: linear-gradient(135deg, var(--primary-rgba) 0%, rgba(106, 165, 159, 0.1) 100%);
    color: var(--primary-color);
    font-weight: 600;
}

.filter-radio {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.filter-option.active .filter-radio {
    border-color: var(--primary-color);
}

.filter-option.active .filter-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.filter-count {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filter-badge {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-badge.free {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-soft);
}

.filter-badge.premium {
    background: var(--primary-rgba);
    color: var(--primary-color);
}

/* Instructor List */
.instructor-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.instructor-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.instructor-option:hover {
    background: var(--bg-soft);
    color: var(--text-primary);
}

.instructor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructor-avatar i {
    color: white;
    font-size: 0.9rem;
}

.instructor-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Topics Cloud */
.topics-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-soft);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.results-count {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card-wrapper {
    height: 100%;
}

.modern-course-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.modern-course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.course-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.modern-course-card:hover .course-image {
    transform: scale(1.1);
}

.course-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-course-card:hover .course-overlay {
    opacity: 1;
}

.quick-view-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--text-primary);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.course-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.free-badge {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.premium-badge {
    background: var(--primary-color);
    color: white;
}

/* Course Body */
.course-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.instructor-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructor-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.instructor-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructor-avatar-small i {
    color: white;
    font-size: 0.8rem;
}

.instructor-name-small {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.course-price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.course-price-tag .currency {
    font-size: 0.75rem;
    font-weight: 500;
}

.course-card-title {
    font-size: 1.125rem;
    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-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.course-card-title a:hover {
    color: var(--primary-color);
}

.course-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.course-meta-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* Pagination Styles */
.pagination-wrapper {
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.showing-results {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0 0.15rem;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--bg-soft);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .showing-results {
        margin-bottom: 0.5rem;
    }

    .pagination {
        justify-content: center;
    }
}

.course-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-view-course {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    flex: 1;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
}

.btn-view-course:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: white;
}

.btn-add-cart {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--bg-soft);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Empty State */
.empty-courses-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.empty-illustration {
    font-size: 5rem;
    color: var(--border-color);
    margin-bottom: 2rem;
}

.empty-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Floating Shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(60px);
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(99, 102, 241, 0.1);
    top: 10%;
    right: 5%;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: rgba(236, 72, 153, 0.1);
    bottom: 15%;
    left: 5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: rgba(16, 185, 129, 0.1);
    top: 50%;
    right: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-30px, 30px) rotate(240deg);
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-image-wrapper {
        height: 180px;
    }

    .course-actions {
        flex-direction: column;
    }

    .btn-view-course {
        width: 100%;
    }

    .btn-add-cart {
        width: 100%;
        height: 44px;
    }
}

/* Pagination Styling */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination-wrapper .pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrapper .page-item {
    display: inline-block;
}

.pagination-wrapper .page-link {
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.pagination-wrapper .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination-wrapper .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
    color: white;
}

.pagination-wrapper .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Smooth Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom Scrollbar */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: var(--bg-soft);
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
