:root {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0b1729;
}

/* Override header styles for course pages */
#header-container {
    background: transparent;
    padding: 0;
    margin: 0;
}

.nav-container {
    background: #ffffff;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body {
    background: linear-gradient(135deg, rgba(0, 196, 255, 0.08), rgba(13, 34, 58, 0.08));
}

.course-hero {
    padding: 140px 20px 60px;
    text-align: center;
}

.course-hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    color: #0f2742;
}

.course-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: #45607d;
    font-size: 1.05rem;
}

.course-grid {
    max-width: 1100px;
    margin: 0 auto 100px;
    padding: 0 20px;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.course-card {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(13, 34, 58, 0.12);
    border: 1px solid rgba(13, 34, 58, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 70px rgba(13, 34, 58, 0.18);
}

.course-card img {
    width: 100%;
    border-radius: 14px;
    height: 180px;
    object-fit: cover;
    background: #f1f6fb;
}

.course-card h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #0f2742;
}

.course-card p {
    margin: 0;
    color: #4d637c;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #1f567d;
    font-weight: 600;
}

.course-meta span {
    background: rgba(0, 196, 255, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.course-card button {
    align-self: flex-start;
    padding: 0.75rem 1.4rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00c4ff, #0074d9);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Kajabi Course Badge */
.kajabi-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kajabi-badge i {
    font-size: 0.7rem;
}

.kajabi-course {
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.kajabi-course:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.free-badge {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

.course-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 116, 217, 0.35);
}

.empty-state {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 16px;
    padding: 2rem;
    color: #48607d;
    border: 1px dashed rgba(13, 34, 58, 0.2);
}

/* My Courses Page Styles - Redesign */
.my-courses-page {
    min-height: 100vh;
    padding-top: 0;
    background: #ffffff;
}

.my-courses-header {
    background: linear-gradient(135deg, #0f2742 0%, #1a3d5f 100%);
    padding: 40px 20px;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(13, 34, 58, 0.1);
}

.my-courses-header-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.my-courses-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.my-courses-title i {
    font-size: 2.2rem;
    color: #008a8a;
}

.my-courses-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Navigation Tabs */
.my-courses-tabs {
    background: linear-gradient(135deg, #0f2742 0%, #1a3d5f 100%);
    padding: 0 20px;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-list {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
}

.tab-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding-bottom: 12px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-item:hover {
    color: #ffffff;
    border-bottom-color: rgba(0, 138, 138, 0.5);
}

.tab-item.active {
    color: #ffffff;
    border-bottom-color: #008a8a;
}

.my-courses-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Controls Section */
.course-controls-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
    padding-top: 24px;
}

.controls-left {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 12px;
    font-weight: 700;
    color: #0f2742;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-select-wrapper {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    min-width: 200px;
    transition: border-color 0.2s;
    height: 44px;
    display: flex;
    align-items: center;
}

.custom-select-wrapper:focus-within {
    border-color: #008a8a;
    outline: none;
}

.custom-select-wrapper:hover {
    border-color: #008a8a;
}

.custom-select-wrapper select {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: #0f2742;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
}

.custom-select-wrapper select:focus {
    outline: none;
}

.custom-select-wrapper i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #64748b;
    pointer-events: none;
}

.controls-right {
    flex-grow: 0;
    display: flex;
    justify-content: flex-end;
    min-width: 280px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.search-box input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #0f2742;
    background: #ffffff;
    font-family: inherit;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #008a8a;
}

.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 48px;
    background: #008a8a;
    border: none;
    border-radius: 0 8px 8px 0;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-box button:hover {
    background: #006a6a;
    transform: translateY(-1px);
}

/* My Courses Grid - List/Grid Hybrid */
.my-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.my-courses-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Enhanced Course Card for My Courses (Udemy Style) */
.my-courses-grid .course-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: opacity 0.2s;
    cursor: pointer;
    position: relative;
}

.my-courses-grid .course-card:hover .course-card-image-overlay {
    opacity: 1;
}

.my-courses-grid .course-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain; /* Changed from 'cover' to 'contain' to show full image */
    border-radius: 12px;
    transition: transform 0.2s;
    background-color: #f1f6fb; /* Background color for letterboxing */
}

.course-card-image-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.course-card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.course-card-image-overlay i {
    font-size: 3rem;
    color: #ffffff;
}

.my-courses-grid .course-card .course-card-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.my-courses-grid .course-card h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f2742;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.my-courses-grid .course-card .instructor-name {
    font-size: 12px;
    color: #6a6f73;
    margin-bottom: 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.my-courses-grid .course-card p {
    display: none;
    /* Hide summary text in grid view */
}

/* Updated Progress Bar */
.progress-section {
    margin-top: 8px;
}

.progress-header {
    display: none;
    /* Hide 'Progress' text and percentage */
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 0;
    margin-bottom: 8px;
}

.progress-fill {
    background: linear-gradient(90deg, #00c4ff 0%, #0074d9 100%);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.progress-text-bottom {
    font-size: 12px;
    font-weight: 600;
    color: #0f2742;
}

.start-course-text {
    font-size: 13px;
    font-weight: 600;
    color: #0f2742;
    margin-top: 8px;
    text-align: left;
    display: block;
}

/* Progress Bar Styles */
.progress-section {
    margin-top: auto;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-percentage {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f2742;
}

/* Progress Bar Styles - Unified */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #d1d7dc;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #5624d0;
    border-radius: 0;
    transition: width 0.3s ease;
}

.course-progress-text {
    font-size: 12px;
    color: #6a6f73;
    margin-bottom: 4px;
    display: block;
}

/* Completion Badge */
.completion-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.completion-badge i {
    font-size: 0.7rem;
}

/* Refund Badge */
.refund-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.refund-badge i {
    font-size: 0.7rem;
}

/* Payment Info Section (Admin) */
.payment-info-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.payment-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
}

.payment-info-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.payment-label {
    color: #64748b;
    font-weight: 600;
}

.payment-status {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-value {
    color: #0f2742;
    font-weight: 700;
}

.payment-date {
    color: #64748b;
    font-size: 0.85rem;
}

.refund-reason {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.refund-reason-text {
    color: #ef4444;
    font-size: 0.85rem;
    font-style: italic;
}

/* Course Actions Section */
.course-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-actions .button {
    width: 100%;
    min-width: 120px;
}

.refund-button {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
}

.refund-button:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4) !important;
}

/* Refund Modal */
.refund-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.refund-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 39, 66, 0.7);
    backdrop-filter: blur(4px);
}

.refund-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(13, 34, 58, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.refund-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e2e8f0;
}

.refund-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #0f2742;
    display: flex;
    align-items: center;
    gap: 12px;
}

.refund-modal-header h2 i {
    color: #ef4444;
}

.refund-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.refund-modal-close:hover {
    background: #f1f5f9;
    color: #0f2742;
}

.refund-modal-body {
    padding: 28px;
}

.refund-course-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.refund-course-info h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    color: #0f2742;
}

.refund-course-info p {
    margin: 6px 0;
    color: #64748b;
    font-size: 0.95rem;
}

.refund-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #0f2742;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #ef4444;
}

.form-group textarea,
.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f2742;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00c4ff;
    box-shadow: 0 0 0 3px rgba(0, 196, 255, 0.1);
}

.form-group small {
    color: #64748b;
    font-size: 0.85rem;
}

.refund-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.refund-alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.refund-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.refund-alert i {
    font-size: 1.1rem;
}

.refund-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid #e2e8f0;
    justify-content: flex-end;
}

.refund-modal-footer .button {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refund-modal-footer .button.outline {
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.refund-modal-footer .button.outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.refund-modal-footer .button.primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.refund-modal-footer .button.primary:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.refund-modal-footer .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Course Card Button */
.my-courses-grid .course-card .button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: #008a8a;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.my-courses-grid .course-card .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 138, 138, 0.4);
    background: #006a6a;
}

.my-courses-grid .course-card .button.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.my-courses-grid .course-card .button.completed:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

/* Empty State */
.my-courses-empty {
    max-width: 600px;
    margin: 80px auto;
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    padding: 60px 40px;
    box-shadow: 0 8px 32px rgba(13, 34, 58, 0.08);
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(0, 196, 255, 0.1), rgba(13, 34, 58, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon i {
    font-size: 4rem;
    color: #00c4ff;
}

.my-courses-empty h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f2742;
    margin: 0 0 12px 0;
}

.my-courses-empty p {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.empty-state-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #00c4ff 0%, #0074d9 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 196, 255, 0.3);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.empty-state-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 196, 255, 0.4);
    background: linear-gradient(135deg, #00d4ff 0%, #0084e9 100%);
}

.empty-state-button i {
    font-size: 0.9rem;
}

/* Loading State */
.courses-loader {
    text-align: center;
    padding: 80px 20px;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    border: 4px solid rgba(0, 196, 255, 0.1);
    border-top-color: #00c4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.courses-loader p {
    color: #64748b;
    font-size: 1.05rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 720px) {
    .course-hero {
        padding-top: 110px;
    }

    .course-hero h1 {
        font-size: 2.2rem;
    }

    .my-courses-page {
        padding-top: 80px;
    }

    .my-courses-header {
        padding: 40px 20px;
    }

    .my-courses-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 12px;
    }

    .my-courses-title i {
        font-size: 1.8rem;
    }

    .my-courses-subtitle {
        font-size: 1rem;
    }

    .my-courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .my-courses-empty {
        padding: 40px 24px;
        margin: 40px auto;
    }

    .empty-state-icon {
        width: 100px;
        height: 100px;
    }

    .empty-state-icon i {
        font-size: 3rem;
    }

    .my-courses-empty h2 {
        font-size: 1.5rem;
    }

    .course-actions {
        flex-direction: column;
    }

    .course-actions .button {
        width: 100%;
    }

    .refund-modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }

    .refund-modal-header,
    .refund-modal-body,
    .refund-modal-footer {
        padding: 20px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - COURSE GRID LAYOUT
   ======================================== */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .my-courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 40px;
    }
}

/* Desktop (1200px - 1440px) */
@media (max-width: 1439px) and (min-width: 1200px) {
    .my-courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 32px;
    }
}

/* Medium Desktop (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .my-courses-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }

    .my-courses-content {
        padding: 0 16px 60px;
    }
}

/* Tablet Landscape (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .my-courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .my-courses-content {
        padding: 0 16px 50px;
    }

    .my-courses-header {
        padding: 32px 16px;
    }

    .my-courses-title {
        font-size: 1.75rem;
    }

    .my-courses-title i {
        font-size: 1.9rem;
    }

    .course-controls-section {
        flex-direction: column;
        align-items: stretch;
    }

    .controls-left {
        width: 100%;
    }

    .controls-right {
        width: 100%;
        min-width: unset;
    }

    .search-box {
        max-width: 100%;
    }
}

/* Tablet Portrait (640px - 767px) */
@media (max-width: 767px) and (min-width: 640px) {
    .my-courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .my-courses-content {
        padding: 0 12px 40px;
    }

    .my-courses-header {
        padding: 28px 12px;
    }

    .my-courses-title {
        font-size: 1.5rem;
        gap: 12px;
    }

    .my-courses-title i {
        font-size: 1.6rem;
    }

    .my-courses-subtitle {
        font-size: 0.9rem;
    }

    .my-courses-tabs {
        padding: 0 12px;
    }

    .tab-list {
        gap: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-item {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .course-controls-section {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .controls-left {
        flex-direction: column;
        width: 100%;
    }

    .control-group {
        width: 100%;
    }

    .custom-select-wrapper {
        min-width: 100%;
    }

    .controls-right {
        width: 100%;
        min-width: unset;
    }

    .search-box {
        max-width: 100%;
    }

    .my-courses-grid .course-card h3 {
        font-size: 1rem;
    }

    .my-courses-grid .course-card .instructor-name {
        font-size: 11px;
    }
}

/* Mobile Landscape (480px - 639px) */
@media (max-width: 639px) and (min-width: 480px) {
    .my-courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .my-courses-content {
        padding: 0 12px 32px;
    }

    .my-courses-header {
        padding: 24px 12px;
    }

    .my-courses-title {
        font-size: 1.4rem;
        gap: 10px;
        flex-direction: column;
    }

    .my-courses-title i {
        font-size: 1.5rem;
    }

    .my-courses-subtitle {
        font-size: 0.85rem;
    }

    .my-courses-tabs {
        padding: 0 12px;
        margin-bottom: 24px;
    }

    .tab-list {
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-item {
        font-size: 0.85rem;
        padding-bottom: 10px;
        white-space: nowrap;
    }

    .course-controls-section {
        flex-direction: column;
        gap: 12px;
        padding-top: 16px;
        margin-bottom: 24px;
    }

    .controls-left {
        flex-direction: column;
        gap: 12px;
    }

    .control-group label {
        font-size: 11px;
    }

    .custom-select-wrapper {
        height: 40px;
        min-width: 100%;
    }

    .custom-select-wrapper select {
        font-size: 14px;
        padding: 10px 36px 10px 10px;
    }

    .search-box input {
        height: 40px;
        font-size: 14px;
        padding: 0 44px 0 14px;
    }

    .search-box button {
        width: 44px;
    }

    .my-courses-grid .course-card h3 {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
    }

    .my-courses-grid .course-card .instructor-name {
        font-size: 10px;
    }

    .start-course-text {
        font-size: 12px;
    }

    .progress-bar {
        height: 6px;
    }
}

/* Mobile Portrait (< 480px) */
@media (max-width: 479px) {
    .my-courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .my-courses-content {
        padding: 0 10px 28px;
    }

    .my-courses-header {
        padding: 20px 10px;
    }

    .my-courses-title {
        font-size: 1.3rem;
        gap: 8px;
        flex-direction: column;
    }

    .my-courses-title i {
        font-size: 1.4rem;
    }

    .my-courses-subtitle {
        font-size: 0.8rem;
    }

    .my-courses-tabs {
        padding: 0 10px;
        margin-bottom: 20px;
    }

    .tab-list {
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-item {
        font-size: 0.8rem;
        padding-bottom: 8px;
        white-space: nowrap;
    }

    .course-controls-section {
        flex-direction: column;
        gap: 12px;
        padding-top: 12px;
        margin-bottom: 20px;
    }

    .controls-left {
        flex-direction: column;
        gap: 12px;
    }

    .control-group label {
        font-size: 10px;
    }

    .custom-select-wrapper {
        height: 38px;
        min-width: 100%;
    }

    .custom-select-wrapper select {
        font-size: 13px;
        padding: 8px 32px 8px 10px;
    }

    .search-box input {
        height: 38px;
        font-size: 13px;
        padding: 0 42px 0 12px;
    }

    .search-box button {
        width: 42px;
    }

    .my-courses-grid .course-card {
        max-width: 100%;
    }

    .my-courses-grid .course-card h3 {
        font-size: 1.05rem;
        -webkit-line-clamp: 2;
    }

    .my-courses-grid .course-card .instructor-name {
        font-size: 11px;
    }

    .start-course-text {
        font-size: 12px;
    }

    .progress-bar {
        height: 6px;
    }

    .course-card-image-overlay i {
        font-size: 2.5rem;
    }

    .kajabi-badge,
    .completion-badge,
    .refund-badge {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

/* Extra Small Mobile (< 360px) */
@media (max-width: 359px) {
    .my-courses-grid {
        gap: 16px;
    }

    .my-courses-title {
        font-size: 1.2rem;
    }

    .my-courses-title i {
        font-size: 1.3rem;
    }

    .my-courses-grid .course-card h3 {
        font-size: 1rem;
    }

    .course-card-image-overlay i {
        font-size: 2rem;
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .my-courses-header {
        padding: 20px;
    }

    .my-courses-title {
        font-size: 1.5rem;
    }

    .my-courses-tabs {
        margin-bottom: 20px;
    }
}