/* ========================================
   MODERN PREMIUM PAGE HEADER
======================================== */
.modern-courses-header {
    position: relative;
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}

[data-theme="dark"] .modern-courses-header {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
}

.header-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(201, 48, 44, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(243, 156, 18, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.header-content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Breadcrumb */
.header-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(201, 48, 44, 0.1);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.header-breadcrumb:hover {
    background: rgba(201, 48, 44, 0.15);
    transform: translateY(-2px);
}

.header-breadcrumb a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.header-breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Header Main Content */
.header-main-content {
    margin-bottom: 3rem;
}

.header-icon-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 
        0 10px 30px rgba(201, 48, 44, 0.25),
        0 0 0 8px rgba(201, 48, 44, 0.1);
    animation: float 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.header-icon-badge:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 15px 40px rgba(201, 48, 44, 0.35),
        0 0 0 12px rgba(201, 48, 44, 0.15);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.modern-page-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.modern-page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* Quick Stats */
.header-quick-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(201, 48, 44, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .header-quick-stats {
    background: rgba(22, 33, 62, 0.8);
    border-color: rgba(201, 48, 44, 0.2);
}

.quick-stat-card {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(201, 48, 44, 0.3), transparent);
}

/* ========================================
   MODERN ADVANCED FILTER SECTION
======================================== */
.modern-filter-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 10;
}

.filter-container {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(201, 48, 44, 0.05);
    transition: all 0.3s ease;
}

.filter-container:hover {
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(201, 48, 44, 0.1);
}

/* Search Bar */
.filter-search-wrapper {
    margin-bottom: 2rem;
}

.search-input-group {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.modern-search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 3.5rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.modern-search-input:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(201, 48, 44, 0.1);
}

.modern-search-input:focus ~ .search-icon {
    color: var(--primary-color);
}

.modern-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 48, 44, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-clear-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

/* Filter Controls */
.filter-controls-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.filter-control-group {
    width: 100%;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

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

/* Category Chips */
.category-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chip-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chip-button:hover {
    background: rgba(201, 48, 44, 0.1);
    border-color: rgba(201, 48, 44, 0.2);
    transform: translateY(-2px);
}

.chip-button.active {
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(201, 48, 44, 0.3);
}

.chip-button.active:hover {
    transform: translateY(-2px) scale(1.02);
}

.chip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.chip-button.active .chip-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* Filters Row */
.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

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

.select-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.select-label i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.modern-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6c7d' d='M1.41 0L6 4.59 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.modern-select:hover {
    background-color: var(--bg-primary);
    border-color: rgba(201, 48, 44, 0.2);
}

.modern-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(201, 48, 44, 0.1);
}

/* Reset Button */
.reset-filters-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--primary-color);
    background: rgba(201, 48, 44, 0.1);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reset-filters-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 48, 44, 0.3);
}

.reset-filters-btn i {
    transition: transform 0.3s ease;
}

.reset-filters-btn:hover i {
    transform: rotate(-360deg);
}

/* ========================================
   COURSE CARDS (Existing styles - kept for consistency)
======================================== */
.courses-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
}

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

.results-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 12px;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(201, 48, 44, 0.1);
    color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.courses-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.courses-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

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

.luxury-course-card {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(201, 48, 44, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.luxury-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(201, 48, 44, 0.2);
}

.course-card-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(201, 48, 44, 0.05) 0%, rgba(243, 156, 18, 0.05) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.course-icon-wrapper {
    position: relative;
}

.course-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border-radius: 16px;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(201, 48, 44, 0.3);
    transition: all 0.3s ease;
}

.luxury-course-card:hover .course-icon {
    transform: scale(1.1) rotate(5deg);
}

.icon-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border-radius: 16px;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
}

.luxury-course-card:hover .icon-glow {
    opacity: 0.5;
}

.course-category-badge {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(201, 48, 44, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
}

.course-card-body {
    padding: 2rem;
    flex: 1;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.course-title a {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

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

.course-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.course-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

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

.meta-item i {
    color: var(--primary-color);
}

.course-card-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prerequisites-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(243, 156, 18, 0.1);
    color: var(--secondary-color);
    border-radius: 8px;
}

.btn-course-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-course-detail:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(201, 48, 44, 0.4);
}

.btn-course-detail i {
    transition: transform 0.3s ease;
}

.btn-course-detail:hover i {
    transform: translateX(4px);
}

/* List View Styles */
.courses-grid.list-view .luxury-course-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr;
}

.courses-grid.list-view .course-card-header {
    grid-column: 1;
    grid-row: 1;
}

.courses-grid.list-view .course-card-body {
    grid-column: 2;
    grid-row: 1;
}

.courses-grid.list-view .course-card-footer {
    grid-column: 3;
    grid-row: 1;
    flex-direction: column;
    gap: 1rem;
}

/* No Results */
.no-results-message,
.no-courses-found {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(201, 48, 44, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-radius: 50%;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.no-results-message h3,
.no-courses-found h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.no-results-message p,
.no-courses-found p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-reset-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 48, 44, 0.4);
}

/* ========================================
   CTA SECTION
======================================== */
.courses-cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .courses-cta-section {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
}

.courses-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(201, 48, 44, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(243, 156, 18, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content-wrapper {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg-primary);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.cta-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    border-radius: 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(201, 48, 44, 0.3);
    animation: float 3s ease-in-out infinite;
}

.cta-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cta-buttons-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-cta-modern.btn-primary {
    background: linear-gradient(135deg, #c9302c 0%, #f39c12 100%);
    color: white;
    border: none;
}

.btn-cta-modern.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(201, 48, 44, 0.4);
}

.btn-cta-modern.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-cta-modern.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
    .filters-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reset-filters-btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .modern-courses-header {
        padding: 120px 0 60px;
    }
    
    .header-icon-badge {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .modern-page-title {
        font-size: 2rem;
    }
    
    .header-quick-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .quick-stat-divider {
        width: 100%;
        height: 1px;
    }
    
    .filter-container {
        padding: 1.5rem;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .reset-filters-btn {
        width: 100%;
    }
    
    .courses-grid.grid-view {
        grid-template-columns: 1fr;
    }
    
    .courses-grid.list-view .luxury-course-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .courses-grid.list-view .course-card-header,
    .courses-grid.list-view .course-card-body,
    .courses-grid.list-view .course-card-footer {
        grid-column: 1;
    }
    
    .courses-grid.list-view .course-card-footer {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .results-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cta-content-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .cta-buttons-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-cta-modern {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .category-chips-container {
        flex-direction: column;
    }
    
    .chip-button {
        width: 100%;
        justify-content: space-between;
    }
}