/* Modern Course Cards CSS */
.modern-course-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modern-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Course Card Image Section */
.course-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.favorite-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    background: rgba(135, 206, 250, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-icon:hover {
    background: rgba(135, 206, 250, 1);
    transform: scale(1.1);
}

.favorite-icon i {
    color: #ffffff;
    font-size: 16px;
}

/* Course Card Content Section */
.course-card-content {
    padding: 20px;
    background: #f0f8ff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Course Details */
.course-details {
    margin-bottom: 20px;
}



.course-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 8px 0;
    line-height: 1.4;
    text-align: right;
    direction: rtl;
}

.age-range {
    font-size: 14px;
    color: #64748b;
    text-align: right;
    direction: rtl;
    margin-bottom: 8px;
    display: block;
}

.instructor {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.instructor-bullet {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.instructor-name {
    font-size: 14px;
    color: #64748b;
    text-align: right;
}

/* Course Schedule */
.course-schedule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.schedule-item i {
    color: #3b82f6;
    font-size: 14px;
}

.schedule-item span {
    font-size: 13px;
    color: #64748b;
    text-align: right;
}

.schedule-separator {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
}

/* Course Action */
.course-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.course-price {
    direction: rtl;
}

.price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    text-align: right;
}

.subscribe-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    direction: rtl;
    min-width: 120px;
}

.subscribe-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: #ffffff;
    text-decoration: none;
}

/* Modern Webinar Cards for Grid Layout */
.modern-webinar-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.modern-webinar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Webinar Card Image Section */
.webinar-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.webinar-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.webinar-card-image .favorite-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    background: rgba(135, 206, 250, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.webinar-card-image .favorite-icon:hover {
    background: rgba(135, 206, 250, 1);
    transform: scale(1.1);
}

.webinar-card-image .favorite-icon i {
    color: #ffffff;
    font-size: 16px;
}

/* Badges */
.badges-lists {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.offer-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.featured-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Progress Overlay */
.progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
}

.progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Webinar Notify */
.webinar-notify {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.webinar-notify:hover {
    background: rgba(59, 130, 246, 1);
    transform: scale(1.1);
    color: #ffffff;
}

.webinar-notify i {
    font-size: 16px;
}

/* Webinar Card Content Section */
.webinar-card-content {
    padding: 20px;
    background: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Instructor Section */
.instructor-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.instructor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.instructor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.instructor-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a8a;
}

.category-name {
    font-size: 12px;
    color: #374151;
}

/* Webinar Title */
.webinar-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.4;
    text-align: right;
    direction: rtl;
}

.age-range-section {
    margin-bottom: 16px;
}

.age-range {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* New layout rows */
.title-age-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.title-age-row .webinar-title {
    margin: 0 0 8px 0;
    flex: 1 1 auto;
}

.age-chip {
    display: block;
    white-space: nowrap;
    background: #f3f4f6;
    color: #374151;
    padding: 6px 10px;
    border-radius: 18px;
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    direction: rtl;
    width: fit-content;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin: 12px 0;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.meta-right,
.meta-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
}

.meta-right i,
.meta-left i {
    color: #3b82f6;
    font-size: 12px;
}

.bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}

.instructor-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.instructor-compact .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.instructor-compact .name {
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
}

.instructor-row {
    margin-bottom: 12px;
}

.price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.price-section .price-amount {
    font-size: 16px;
    font-weight: 700;
    color: #020617;
    text-align: right;
}

.price-section .price-amount.discounted {
    color: #ef4444;
}

.price-section .price-amount.points {
    color: #f59e0b;
}

.price-section .price-amount.free {
    color: #10b981;
}

.price-original {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    text-align: right;
}

/* Course Meta */
.course-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
}

.meta-item i {
    color: #3b82f6;
    font-size: 12px;
}

.meta-item span {
    font-size: 12px;
    color: #374151;
    text-align: right;
}

.meta-separator {
    width: 1px;
    height: 16px;
    background: #cbd5e1;
}

/* Webinar Action */
.webinar-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.webinar-price {
    direction: rtl;
}

.webinar-price .price-amount {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    text-align: right;
}

.webinar-price .price-amount.discounted {
    color: #ef4444;
}

.webinar-price .price-amount.points {
    color: #f59e0b;
}

.webinar-price .price-amount.free {
    color: #10b981;
}

.price-original {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 8px;
}

.view-course-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    text-align: center;
    direction: rtl;
    min-width: 80px;
}

.view-course-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: #ffffff;
    text-decoration: none;
}

/* Featured Modern Cards for Home Page Slider */
.featured-modern-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.featured-modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Featured Card Image Section */
.featured-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.featured-card-image .favorite-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    background: rgba(135, 206, 250, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.featured-card-image .favorite-icon:hover {
    background: rgba(135, 206, 250, 1);
    transform: scale(1.1);
}

.featured-card-image .favorite-icon i {
    color: #ffffff;
    font-size: 16px;
}

/* Featured Card Content Section */
.featured-card-content {
    padding: 20px;
    background: #f0f8ff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Featured Details */
.featured-details {
    margin-bottom: 15px;
}

.featured-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 12px 0;
    line-height: 1.4;
    text-align: right;
    direction: rtl;
}

.featured-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.featured-meta .instructor {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.featured-meta .instructor-bullet {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.featured-meta .instructor-name {
    font-size: 14px;
    color: #64748b;
    text-align: right;
}

/* Featured Description */
.featured-description {
    margin-bottom: 15px;
}

.featured-description p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    text-align: right;
    direction: rtl;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Featured Schedule */
.featured-schedule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.featured-schedule .schedule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.featured-schedule .schedule-item i {
    color: #3b82f6;
    font-size: 14px;
}

.featured-schedule .schedule-item span {
    font-size: 13px;
    color: #64748b;
    text-align: right;
}

.featured-schedule .schedule-separator {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
}

/* Featured Action */
.featured-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.featured-price {
    direction: rtl;
}

.featured-price .price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    text-align: right;
}

.featured-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    text-align: center;
    direction: rtl;
    min-width: 100px;
}

.featured-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: #ffffff;
    text-decoration: none;
}

/* View Toggle Buttons */
.view-toggle-buttons {
    margin-left: 20px;
}

.view-toggle-buttons .btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-toggle-buttons .btn:hover {
    transform: translateY(-1px);
}

.view-toggle-buttons .btn i {
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-course-card {
        margin-bottom: 20px;
    }

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

    .course-card-content {
        padding: 16px;
    }

    .course-title {
        font-size: 16px;
    }

    .subscribe-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 100px;
    }

    .modern-webinar-card {
        margin-bottom: 20px;
    }

    .webinar-card-image {
        height: 180px;
    }

    .webinar-card-content {
        padding: 16px;
    }

    .webinar-title {
        font-size: 14px;
    }

    .view-course-btn {
        padding: 6px 12px;
        font-size: 11px;
        min-width: 70px;
    }

    .featured-modern-card {
        margin: 0 5px;
    }

    .featured-card-image {
        height: 200px;
    }

    .featured-card-content {
        padding: 16px;
    }

    .featured-title {
        font-size: 16px;
    }

    .featured-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 80px;
    }

    .view-toggle-buttons {
        margin-left: 10px;
        flex-direction: column;
        gap: 10px;
    }

    .view-toggle-buttons .btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* RTL Support */
[dir="rtl"] .modern-course-card {
    text-align: right;
}

[dir="rtl"] .favorite-icon {
    left: auto;
    right: 12px;
}

[dir="rtl"] .course-action {
    flex-direction: row-reverse;
}

[dir="rtl"] .modern-webinar-card {
    text-align: right;
}

[dir="rtl"] .webinar-card-image .favorite-icon {
    left: auto;
    right: 12px;
}

[dir="rtl"] .badges-lists {
    right: auto;
    left: 12px;
}

[dir="rtl"] .webinar-notify {
    right: auto;
    left: 12px;
}

[dir="rtl"] .webinar-action {
    flex-direction: row-reverse;
}

[dir="rtl"] .featured-modern-card {
    text-align: right;
}

[dir="rtl"] .featured-card-image .favorite-icon {
    left: auto;
    right: 12px;
}

[dir="rtl"] .offer-badge {
    right: auto;
    left: 12px;
}

[dir="rtl"] .featured-action {
    flex-direction: row-reverse;
}

[dir="rtl"] .view-toggle-buttons .btn i {
    margin-right: 0;
    margin-left: 5px;
}

[dir="rtl"] .title-age-row,
[dir="rtl"] .meta-row,
[dir="rtl"] .bottom-row {
    flex-direction: row-reverse;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modern-course-card {
        background: #1f2937;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .course-card-content {
        background: #374151;
    }

    .course-title {
        color: #e5e7eb;
    }

    .age-range,
    .instructor-name,
    .schedule-item span {
        color: #9ca3af;
    }

    .price-amount {
        color: #020617;
    }

    .modern-webinar-card {
        background: #1f2937;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .webinar-card-content {
        background: #ffffff;
    }

    .webinar-title {
        color: #111827;
    }

    .age-range {
        background: #4b5563;
        color: #e5e7eb;
    }

    .instructor-name {
        color: #5778ba;
    }

    .category-name,
    .meta-item span {
        color: #5778ba;
    }

            .webinar-price .price-amount {
            color: #5778ba;
        }

        .price-section .price-amount {
            color: #020617;
        }

        .price-section .price-amount.discounted {
            color: #fca5a5;
        }

        .price-section .price-amount.points {
            color: #fcd34d;
        }

        .price-section .price-amount.free {
            color: #86efac;
        }

        .price-original {
            color: #9ca3af;
        }

    .featured-modern-card {
        background: #1f2937;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .featured-card-content {
        background: #374151;
    }

    .featured-title {
        color: #e5e7eb;
    }

    .featured-meta .instructor-name,
    .featured-description p,
    .featured-schedule .schedule-item span {
        color: #9ca3af;
    }

    .featured-price .price-amount {
        color: #e5e7eb;
    }
}
