﻿/* =========================================================
   COURSE DETAILS - RESPONSIVE MASTER CSS
   Consolidated / duplicate-free version
   ========================================================= */

.course-details-page {
    width: min(95%, 1500px);
    margin: 40px auto 80px;
    padding-bottom: 40px;
    direction: rtl;
    color: #071a52;
}

/* =========================================================
   COURSE DETAILS HERO
   ========================================================= */

.course-details-hero {
    position: relative;
    display: grid;
    grid-template-columns: 42% 58%;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #071a52, #0b2f77, #1343a5);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .30);
}

/* Hero image */

.course-hero-image {
    position: relative;
    width: 100%;
    height: 280px;
    min-width: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, .15);
}

    .course-hero-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

/* No image */

.course-no-image {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b2f77, #071a52);
    color: #ffc400;
    font-size: 70px;
}

/* Hero content */

.course-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    height: 280px;
    padding: 25px 45px;
    text-align: right;
    overflow: hidden;
}

/* Course level */

.course-level {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    margin-bottom: 10px;
    background: rgba(255, 196, 0, .15);
    border: 1px solid rgba(255, 196, 0, .35);
    border-radius: 50px;
    color: #ffc400;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* Title */

.course-hero-content h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 36px;
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* Short description */

.course-short-description {
    max-width: 500px;
    margin: 0 0 15px;
    color: #dbe5ff;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* Hero meta */

.course-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

    .course-hero-meta > div {
        display: flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
        padding: 8px 12px;
        background: rgba(255, 255, 255, .08);
        border: 1px solid rgba(255, 255, 255, .10);
        border-radius: 12px;
        color: #fff;
        font-size: 12px;
    }

    .course-hero-meta i {
        flex: 0 0 auto;
        color: #ffc400;
        font-size: 14px;
    }

/* Register button */

.course-register-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    max-width: 100%;
    padding: 14px 28px;
    background: #ffc400;
    color: #08204f !important;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}

    .course-register-btn:hover {
        transform: translateY(-3px);
        background: #ffd43b;
        color: #08204f !important;
        box-shadow: 0 10px 25px rgba(255, 196, 0, .30);
    }

/* =========================================================
   COURSE INFORMATION
   ========================================================= */

.course-info-section {
    margin-top: 35px;
    padding: 32px;
    background: #fff;
    border: 1px solid rgba(7, 17, 38, .07);
    border-radius: 24px;
    box-shadow: 0 10px 35px rgba(7, 17, 38, .08);
}

    .course-info-section h2 {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0 0 28px;
        padding-bottom: 18px;
        color: #071126;
        font-size: 24px;
        font-weight: 800;
        border-bottom: 1px solid rgba(7, 17, 38, .08);
    }

        .course-info-section h2 i {
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 44px;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: #071126;
            color: #d4af37;
            font-size: 18px;
        }

.course-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.course-info-item {
    min-width: 0;
    min-height: 105px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid rgba(7, 17, 38, .08);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

    .course-info-item:hover {
        transform: translateY(-3px);
        background: #fff;
        border-color: rgba(212, 175, 55, .45);
        box-shadow: 0 10px 25px rgba(7, 17, 38, .10);
    }

    .course-info-item span {
        display: block;
        margin-bottom: 7px;
        color: #8a94a6;
        font-size: 12px;
        font-weight: 700;
    }

    .course-info-item strong {
        display: block;
        color: #071126;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

/* =========================================================
   COURSE TOPICS
   ========================================================= */

.course-topics-section {
    width: 100%;
    margin: 45px 0;
    padding: 32px;
    background: #fff;
    border: 1px solid rgba(7, 17, 38, .06);
    border-radius: 24px;
    box-shadow: 0 10px 35px rgba(7, 17, 38, .08);
}

    .course-topics-section > h2 {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0 0 28px;
        padding-bottom: 18px;
        color: #071126;
        font-size: 24px;
        font-weight: 800;
        border-bottom: 1px solid rgba(7, 17, 38, .08);
    }

        .course-topics-section > h2 i {
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 44px;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: #071126;
            color: #d4af37;
            font-size: 18px;
        }

.course-topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.course-topic {
    display: flex;
    align-items: stretch;
    min-width: 0;
    padding: 0;
    background: #f8fafc;
    border: 1px solid rgba(7, 17, 38, .08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

    .course-topic:hover {
        transform: translateY(-3px);
        background: #fff;
        border-color: rgba(212, 175, 55, .45);
        box-shadow: 0 10px 25px rgba(7, 17, 38, .10);
    }

.topic-number {
    flex: 0 0 52px;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #071126;
    color: #d4af37;
    font-size: 18px;
    font-weight: 800;
}

.topic-content {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
}

.topic-course-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(150px, .85fr);
    align-items: center;
    gap: 20px;
}

.topic-course-name {
    min-width: 0;
}

.topic-label {
    display: block;
    margin-bottom: 5px;
    color: #8a94a6;
    font-size: 11px;
    font-weight: 700;
}

.topic-course-name h3 {
    margin: 0;
    color: #071126;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.topic-prerequisite {
    min-width: 0;
    padding-right: 18px;
    border-right: 1px solid rgba(7, 17, 38, .08);
}

    .topic-prerequisite strong {
        display: block;
        color: #26364d;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

.no-prerequisite {
    display: block;
    color: #8a94a6;
    font-size: 13px;
    font-weight: 600;
}

/* =========================================================
   SYLLABUS BUTTONS
   ========================================================= */

.topic-syllabus-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #edf0f4;
}

.syllabus-view-btn,
.syllabus-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all .25s ease;
}

.syllabus-view-btn {
    background: #f4f7fa;
    color: #0b1f3a;
    border: 1px solid #dce3eb;
}

    .syllabus-view-btn:hover {
        background: #0b1f3a;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 5px 14px rgba(11, 31, 58, .15);
    }

.syllabus-download-btn {
    background: #d6a928;
    color: #fff;
    border: 1px solid #d6a928;
}

    .syllabus-download-btn:hover {
        background: #bd921d;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 5px 14px rgba(214, 169, 40, .25);
    }

    .syllabus-view-btn i,
    .syllabus-download-btn i {
        font-size: 14px;
    }

/* =========================================================
   COURSE TEACHERS
   ========================================================= */

.course-teachers-section {
    margin-top: 35px;
    padding: 30px;
    background: #0b2f77;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .22);
}

    .course-teachers-section h2 {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0 0 30px;
        color: #ffc400;
        font-size: 28px;
        font-weight: 800;
    }

        .course-teachers-section h2 i {
            font-size: 24px;
        }

.course-teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
    justify-content: center;
    gap: 25px;
}

.course-teacher-card {
    min-width: 0;
    padding: 25px 20px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    text-align: center;
    transition: .35s ease;
}

    .course-teacher-card:hover {
        transform: translateY(-7px);
        background: rgba(255, 255, 255, .10);
        border-color: rgba(255, 196, 0, .30);
        box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
    }

    .course-teacher-card img,
    .teacher-placeholder {
        width: 120px;
        height: 120px;
        margin: 0 auto 18px;
        border-radius: 50%;
    }

    .course-teacher-card img {
        display: block;
        object-fit: cover;
        border: 4px solid rgba(255, 196, 0, .75);
        box-shadow: 0 8px 25px rgba(0, 0, 0, .30);
    }

.teacher-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b2f77, #1343a5);
    border: 4px solid rgba(255, 196, 0, .75);
    color: #ffc400;
    font-size: 45px;
}

.course-teacher-card h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.course-teacher-card span {
    display: block;
    margin-bottom: 8px;
    color: #ffc400;
    font-size: 14px;
    font-weight: 700;
}

.course-teacher-card small {
    display: block;
    color: #b9c7e6;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* =========================================================
   REGISTER SECTION
   ========================================================= */

.course-register-section {
    margin-top: 35px;
    padding: 40px;
    background: #0b2f77 !important;
    border: 3px solid #ffc400 !important;
    border-radius: 30px !important;
    text-align: center !important;
}

.course-register-large-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 260px;
    max-width: 100%;
    padding: 17px 38px;
    background: #ffc400 !important;
    color: #071a52 !important;
    border: 2px solid #ffc400;
    border-radius: 16px;
    font-size: 18px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    transition: all .3s ease;
}

    .course-register-large-btn i {
        font-size: 20px;
    }

    .course-register-large-btn:hover {
        background: #ffd43b !important;
        color: #071a52 !important;
        transform: translateY(-4px);
        box-shadow: 0 14px 30px rgba(255, 196, 0, .35);
    }

/* =========================================================
   COURSE CHART
   ========================================================= */

.course-chart-section {
    margin: 35px 0;
    padding: 30px;
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(212, 175, 55, .25);
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(7, 17, 38, .08);
}

    .course-chart-section h2 {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0 0 25px;
        color: #071126;
        font-size: 24px;
        font-weight: 700;
    }

        .course-chart-section h2 i {
            color: #c9a227;
            font-size: 25px;
        }

.course-chart-content {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(7, 17, 38, .97), rgba(13, 31, 63, .97));
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.course-chart-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(201, 162, 39, .12);
    border: 1px solid rgba(201, 162, 39, .35);
    color: #c9a227;
    font-size: 32px;
}

.course-chart-text {
    flex: 1;
    min-width: 0;
}

    .course-chart-text h3 {
        margin: 0 0 8px;
        color: #fff;
        font-size: 19px;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

    .course-chart-text p {
        margin: 0;
        color: rgba(255, 255, 255, .75);
        font-size: 14px;
        line-height: 1.9;
        overflow-wrap: anywhere;
    }

.course-chart-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex: 0 0 auto;
}

.chart-view-btn,
.chart-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 135px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.chart-view-btn {
    background: #c9a227;
    color: #071126 !important;
}

    .chart-view-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(201, 162, 39, .28);
        background: #d8b43a;
    }

.chart-download-btn {
    background: rgba(255, 255, 255, .08);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .2);
}

    .chart-download-btn:hover {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, .14);
        border-color: rgba(201, 162, 39, .5);
    }

/* =========================================================
   LARGE LAPTOP / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1200px) {

    .course-details-page {
        width: 94%;
    }

    .course-details-hero {
        grid-template-columns: 45% 55%;
    }

    .course-hero-content {
        padding: 24px 32px;
    }

        .course-hero-content h1 {
            font-size: 32px;
        }

    .course-info-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .topic-course-row {
        grid-template-columns: minmax(0, 1fr) minmax(130px, .8fr);
        gap: 15px;
    }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .course-details-page {
        width: 92%;
        margin-top: 30px;
    }

    .course-details-hero {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .course-hero-image,
    .course-no-image {
        height: 250px;
    }

    .course-hero-content {
        height: auto;
        min-height: 260px;
        padding: 28px 30px 32px;
        overflow: visible;
    }

        .course-hero-content h1 {
            font-size: 30px;
        }

    .course-short-description {
        max-width: none;
    }

    .course-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-topics {
        grid-template-columns: 1fr;
    }

    .course-chart-content {
        flex-wrap: wrap;
    }

    .course-chart-text {
        flex-basis: calc(100% - 100px);
    }

    .course-chart-actions {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .course-details-page {
        width: 94%;
        margin: 20px auto 50px;
        padding-bottom: 20px;
    }

    .course-details-hero {
        border-radius: 20px;
    }

    .course-hero-image,
    .course-no-image {
        height: 210px;
    }

    .course-no-image {
        font-size: 55px;
    }

    .course-hero-content {
        min-height: 0;
        padding: 24px 20px 26px;
    }

    .course-level {
        padding: 5px 12px;
        font-size: 11px;
    }

    .course-hero-content h1 {
        margin-bottom: 9px;
        font-size: 25px;
        line-height: 1.45;
    }

    .course-short-description {
        margin-bottom: 15px;
        font-size: 13px;
        line-height: 1.9;
    }

    .course-hero-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

        .course-hero-meta > div {
            padding: 8px 9px;
            font-size: 11px;
        }

    .course-register-btn {
        width: 100%;
        padding: 13px 18px;
        font-size: 14px;
    }

    .course-info-section,
    .course-topics-section,
    .course-teachers-section {
        padding: 20px 16px;
        border-radius: 18px;
    }

        .course-info-section h2,
        .course-topics-section > h2,
        .course-teachers-section h2,
        .course-chart-section h2 {
            font-size: 20px;
            gap: 9px;
        }

            .course-info-section h2 i,
            .course-topics-section > h2 i {
                flex-basis: 38px;
                width: 38px;
                height: 38px;
                font-size: 16px;
            }

    .course-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .course-info-item {
        min-height: 88px;
        padding: 15px;
    }

        .course-info-item strong {
            font-size: 15px;
        }

    .course-topic {
        flex-direction: row;
    }

    .topic-number {
        flex: 0 0 44px;
        width: 44px;
        font-size: 16px;
    }

    .topic-content {
        padding: 14px;
    }

    .topic-course-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .topic-course-name h3 {
        font-size: 15px;
    }

    .topic-prerequisite {
        padding-right: 0;
        padding-top: 9px;
        border-right: 0;
        border-top: 1px solid rgba(7, 17, 38, .08);
    }

    .topic-syllabus-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .syllabus-view-btn,
    .syllabus-download-btn {
        width: 100%;
    }

    .course-teachers-grid {
        grid-template-columns: 1fr;
    }

    .course-teacher-card {
        width: 100%;
        max-width: 320px;
        margin: auto;
    }

    .course-register-section {
        padding: 25px 16px !important;
        border-radius: 20px !important;
    }

    .course-register-large-btn {
        width: 100%;
        min-width: 0;
        padding: 15px 18px;
        font-size: 16px !important;
    }

    .course-chart-section {
        margin: 25px 0;
        padding: 20px 16px;
        border-radius: 18px;
    }

    .course-chart-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px 16px;
        text-align: center;
    }

    .course-chart-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin: 0 auto;
        font-size: 27px;
    }

    .course-chart-text {
        flex-basis: auto;
    }

        .course-chart-text h3 {
            font-size: 17px;
        }

        .course-chart-text p {
            font-size: 13px;
        }

    .course-chart-actions {
        flex-direction: column;
        width: 100%;
    }

    .chart-view-btn,
    .chart-download-btn {
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .course-details-page {
        width: 96%;
    }

    .course-hero-image,
    .course-no-image {
        height: 185px;
    }

    .course-hero-content {
        padding: 20px 15px 22px;
    }

        .course-hero-content h1 {
            font-size: 22px;
        }

    .course-hero-meta {
        grid-template-columns: 1fr;
    }

    .course-info-section,
    .course-topics-section,
    .course-teachers-section,
    .course-chart-section {
        padding-left: 13px;
        padding-right: 13px;
    }

    .topic-number {
        flex-basis: 40px;
        width: 40px;
    }

    .topic-content {
        padding: 12px;
    }

    .course-teacher-card {
        padding: 20px 15px;
    }
}
