:root {
    --js-yellow: #f7df1e;
    --blue-btn: #0c55c3;
    --orange-btn: #ff6b00;
    --border-color: #e5e7eb;
    --text-gray: #6b7280;
}

.main-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    margin: 0 auto;
    margin-top: 30px;
}

.course-video {
    width: 100%;
    height: 527px;
    border-radius: 16px;
}
.video-overlay h1 {
    font-size: 3rem;
}

.video-overlay span {
    color: var(--js-yellow);
}

/* التبويبات - التصميم المسطح */
.tabs {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.tab {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: #f3f4f6;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
}

.tab.active {
    background: var(--blue-btn);
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.description-box {
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 30px;
}

.description-box p {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-gray);
}

.description-box .more-link {
    color: #0c55c3;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #0000000f;
    padding: 10px 25px;
    margin-bottom: 20px;
    width: fit-content;
    display: block;
}

/* الإحصائيات - أيقونات دائرية صغيرة (محاكاة) */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-top: 1px solid #0000001f;
    padding-top: 20px;
    margin-top: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.course-icon {
    height: 52px;
    width: 52px;
    border-radius: 50%;
    border: 1px solid #aaaaaa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card span {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: #081228;
    text-align: start;
    margin-top: 3px;
    white-space: nowrap;
}

.stat-card strong {
    font-size: 16px;
    font-weight: 400;
    color: #949494;
    text-align: start;
    white-space: nowrap;
}

/* الـ Sidebar المعلق */
.course-info-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.course-info-card li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 400;
    color: #081228;
}

.course-info-card h5 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 500;
}

.feature-icon {
    height: 41px;
    width: 41px;
    border: 1px solid #aaaaaa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-main {
    width: 100%;
    background: var(--orange-btn);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.btn-outline {
    width: 100%;
    background: white;
    color: #000000;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    border: 1px solid #0000001f;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#thread-bottom-container {
    display: none !important;
}

.btn-outline img,
.btn-main img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.curriculum-section {
    margin: 30px 0;
    background: #f6f7fd;
    padding: 18px;
    border: 1px solid #00000012;
    border-radius: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
}

.accordion-item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 18px 20px;
    background-color: #fff;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 5px;
}

.accordion-header:hover {
    background-color: #fafafa;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.arrow {
    font-size: 12px;
    transition: transform 0.3s;
    color: #0c55c3;
    /* اللون الأزرق في التصميم */
}

.chapter-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.leson-name {
    font-size: 14px;
    font-weight: 400;
    color: #202020;
}

.chapter-meta {
    font-size: 16px;
    font-weight: 500;
    color: #0c55c3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.chapter-meta:not(.active) {
    opacity: 0.65;
}

.chapter-meta.active {
    color: #0c55c3;
}

/* محتوى الدروس */
.accordion-content {
    display: none;
    /* مخفي افتراضياً */
    background: #fdfdfd;
    border-top: 1px solid #eee;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-item.active .arrow {
    transform: rotate(180deg);
}

.lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    padding: 12px 50px;
    gap: 25px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #555;
    transition: 0.2s;
}

.lesson-item:hover {
    background: #f0f7ff;
}

.active-lesson {
    color: #0c55c3;
    font-weight: 500;
    background: #f0f7ff;
}

.lesson-duration {
    min-width: 45px;
    color: #0c55c3;
    font-weight: 500;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    border: 1px solid #0000000d;
}

.card:hover {
    transform: translateY(-4px);
}

/* image */
.img-box {
    position: relative;
}

.img-box img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

/* time */
.time {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #ff7a00;
    color: #fff;
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 6px;
}

/* bookmark */
.bookmark {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f6f6f8;
    padding: 6px;
    border-radius: 5px;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 10px;
    padding-right: 12px;
    padding-left: 12px;
}

.views {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating {
    display: flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    gap: 3px;
}

.viewed {
    color: #8d8d8d;
    font-size: 10px;
    font-weight: 400;
}

.info {
    padding-bottom: 12px;
}
.info h1 {
    font-size: 23px;
    font-weight: 500;
    padding-right: 12px;
    padding-left: 12px;
    margin-bottom: 5px;
}

.info h3 {
    font-size: 16px;
    font-weight: 500;
    padding-right: 12px;
    padding-left: 12px;
}

.info p {
    font-size: 14px;
    font-weight: 500;
    color: #0059ff;
}

/* meta */
.meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #555;
    padding-right: 12px;
    padding-left: 12px;
}

.job-details-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: space-between;
    border-bottom: 1px solid #0000000d;
    align-items: center;
    border-radius: 12px;
    padding-bottom: 15px;
    margin-top: 10px;
}
.card-custom .job-details-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: space-between;
    border-bottom: 1px solid #0000000d;
    align-items: center;
    border-radius: 0;
    padding-bottom: 15px;
    margin-top: 10px;
}
.card-custom .detail-item .title {
    text-align: center;
    margin-bottom: 10px;
}
.card-custom .detail-item .sub-title {
    display: flex;
    gap: 5px;
}
.card-custom .job-details-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: space-between;
    border-bottom: 1px solid #0000000d;
    align-items: center;
    border-radius: 0;
    padding-bottom: 15px;
    margin-top: 10px;
}
.detail-item .title {
    text-align: center;
    margin-bottom: 10px;
}
.detail-item .sub-title {
    display: flex;
    gap: 5px;
}
.detail-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0;
    /* يوضع الخط على يسار كل عنصر ماعدا الأخير */
    top: 20%;
    height: 28px;
    width: 2px;
    background-color: #0000000d;
    /* لون الخط الفاصل الرمادي الرفيع */
}

.detail-item {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    flex: 1;
    justify-content: center;
    position: relative;
    font-size: 11px;
    color: #555;
}

.course-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.more-courses {
    border: 1px solid #00000012;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 18px;
    margin-top: 20px;
}

.course-top-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
}

.course-top-content h3 {
    font-size: 20px;
    font-weight: 500;
}

.course-top-content a {
    font-weight: 500;
    font-size: 16px;
    color: #0c55c3;
    text-decoration: none;
}
.active {
    color: #0059ff;
}
@media (max-width: 850px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .course-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 450px) {
    .course-cards {
        grid-template-columns: 1fr;
    }
    .chapter-meta {
        margin-inline-start: 15px;
    }
    .accordion-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
.coursedetail-page .stat-card {
    border-left: 0;
}
.coursedetail-page .stat-card img {
    width: 24px;
    margin-bottom: 0;
}
.coursedetail-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 25px 20px;
    background: #ffffff;
    margin-bottom: 50px;
    border: 0;
    border-top: 1px solid #0000001a;
    border-radius: 0;
    box-shadow: none;
    padding: 30px 0 0 0;
}

@media (max-width: 768px) {
    .coursedetail-page .stat-card {
        border-bottom: 0;
    }

    .description-box .stats-grid {
        justify-content: center;
    }

    .description-box .stats-grid .stat-card {
        width: 35%;
        border: none;
    }

    .coursedetail-page .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 25px 20px;
        background: #ffffff;
        margin-bottom: 50px;
        border: 0;
        border-top: 1px solid #0000001a;
        border-radius: 0;
    }
    .stat-card {
        flex-direction: column;
    }
}
.lesson-name {
    font-size: 14px;
    color: #202020;
}
