html,
body,
.body {
    font-family: var(--bs-body-font-family), 'Kanit', 'Tahoma', sans-serif;
    background-color: var(--bs-white);
}

@font-face {
    font-family: 'SUKHUMVIT';
    src: url('font/SUKHUMVITSET-BOLD.ttf') format('ttf'),
        url('font/SUKHUMVITSET-BOLD.woff') format('woff');
}

@font-face {
    font-family: 'BaiJamjuree';
    src: url('font/BaiJamjuree-Light.ttf') format('ttf'),
        url('font/BaiJamjuree-Light.woff') format('woff');
}


:root {
    --bg-def: #00519A;
}

main>.container {
    padding: 70px 15px 20px;
}

.bg-charcoal {
    background-color: #3d3c3c;
}

.text-charcoal {
    color: #3d3c3c;
}

.cursor-pointer {
    cursor: pointer;
}
.f-size-mt14-d26 {
    font-size: 14px; /* mobile + tablet */
}
/*btn*/
.btn-charcoal {
    background-color: #3d3c3c;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 500;
    transition: all .25s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn-charcoal:hover {
    background-color: #2f2e2e;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.btn-charcoal:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.navbar-gold {
    border-bottom: 5px solid;
    border-image: linear-gradient(45deg,
            #efde57,
            #815714,
            #fdce72,
            #af7e30) 1;
}

.btn-gold {
    background: linear-gradient(135deg, #c9973e, #af7e30);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: all .25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #d8a94d, #996a25);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-gold:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn-gold-light {
    background: linear-gradient(135deg, #f6e873, #efde57);
    color: #00519A;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all .25s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-gold-light:hover {
    background: linear-gradient(135deg, #ffe96a, #e0cc3a);
    color: #00519A;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.btn-gold-light:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-gray-modern {
    background: linear-gradient(135deg, #b6bcc5, #9ca3af);
    color: #1f2937;
    border: 1px solid #8b939f;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all .25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.btn-gray-modern:hover {
    background: linear-gradient(135deg, #a7adb7, #8f96a3);
    color: #111827;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.btn-gray-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/*btn*/

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer>.container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

.default-color {
    background-color: #00519A;

}

/* add sorting icons to gridview sort links */
a.asc:after,
a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li>form>button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {

    .nav li>form>button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }

    .tab-text {
        display: none;
    }

    .tab-item {
        padding: 10px;
        justify-content: center;
    }

    .exam-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 18px 20px;
    }

    .exam-title {
        font-size: 20px;
    }

    .exam-timer {
        width: 100%;
    }

    .timer-label {
        text-align: left;
    }

    .countdown-ui1 {
        justify-content: flex-start;
    }

}

.nav>li>form>button.logout:focus,
.nav>li>form>button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav>li>form>button.logout:focus {
    outline: none;
}

.form-group {
    margin-bottom: 1rem;
}


/*Yii2TimerCountDown*/
/* กรอบการ์ด */
.countdown-card {
    /*display:inline-block;*/
    /*padding:16px 18px;*/
    /*border-radius:16px;*/
    /*border:1px solid rgba(0,0,0,.08);*/
    /*background:#fff;*/
    /*box-shadow:0 10px 24px rgba(0,0,0,.08);*/
}

.countdown-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    opacity: .85;
}

/* ตัว timer */
.countdown-ui {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ตัวคั่น ":" ที่เราส่งผ่าน countDownResSperator */
.countdown-ui .cd-sep {
    display: inline-block;
    font-weight: 800;
    font-size: 22px;
    opacity: .4;
    transform: translateY(-1px);
}

/*
  widget จะใส่ span เป็นกลุ่ม ๆ เมื่อ addSpanForResult/addSpanForEachNum = true
  คลาสมาตรฐานตาม README:
  - item-counter-down
  - inner-item-counter-down
  :contentReference[oaicite:8]{index=8}
*/
.countdown-ui .item-counter-down {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* color: #000; */
}

/* กล่องตัวเลข */
.countdown-ui .inner-item-counter-down {
    min-width: 46px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .10);
    background: linear-gradient(180deg, #ffffff, #f6f7fb);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);

    font-weight: 800;
    font-size: 22px;
    letter-spacing: .5px;
}

/* (ออปชัน) โฮเวอร์ให้ดูมีชีวิต */
.countdown-card:hover .inner-item-counter-down {
    transform: translateY(-1px);
    transition: .15s ease;
}


/*radioList*/
.box_response {
    height: calc(100vh - 240px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    /* กันตัวอักษรชน scrollbar */
}

.response-list {
    margin: 5px;
}

.label-response {
    display: inline-block;
    min-width: 30px;
    padding: 10px 15px;
    text-align: center;
    font-weight: bold;
}

.choice-box {
    display: inline-block;
    margin-right: 10px;
}

/* ซ่อน radio จริง */
.choice-radio {
    display: none;
}

/* กล่องตัวเลือก */
.choice-label {
    display: inline-block;
    min-width: 45px;
    padding: 10px 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: 0.2s;
    font-weight: 500;
    color: #000000;
}

/* ตอน hover */
.choice-label:hover {
    border-color: #4e73df;
}

/* ตอนเลือกแล้ว */
.choice-radio:checked+.choice-label {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.2);
}

.action-choose {
    background: rgba(78, 115, 223, 0.12);
    outline: 2px solid rgba(78, 115, 223, 0.25);
}

.locked-input {
    pointer-events: none;
    background-color: #f5f5f5;
}


.container-side {
    border: 1px solid gray;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.col-divider {
    border-right: 1px solid gray;
    min-height: auto;

}

.lesson-sidebar {
    width: 100%;
    /* background-color: #f8f9fa; */
    /* border-right: 1px solid #dee2e6; */
    padding: 0.5rem;
}

.lesson-header .nav-link {
    cursor: pointer;
    font-weight: 600;
    color: #212529;
    border-radius: 0.5rem;
}

.lesson-header .nav-link:hover {
    background-color: #e9ecef;
}

.lesson-child>.nav-link {
    font-size: 0.9rem;
    padding-left: 1.5rem;
}

.video-list .video-link {
    font-size: 0.88rem;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    align-items: center !important;
}

.video-list .video-link:hover {
    /* background-color: #dee2e6; */
    color: #000;
    text-decoration: none;
}

.video-list .video-link.active {
    background-color: #0d6efd;
    color: #fff;
}

.toggle-icon {
    transition: transform 0.2s ease;
}

/* ค่าเริ่มต้น = ปิด */
.lesson-header .toggle-icon {
    transition: transform 0.2s ease;
}

/* ถ้า collapse เปิดอยู่ */
.lesson-header a[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* ทำให้ nav-link ทุกตัวใน sidebar เป็น flex */
.lesson-item .nav-link {
    display: flex !important;
    /* align-items: flex-start !important; */
    gap: 8px;
}

/* ไอคอลไม่ให้โดนบีบ */
.lesson-item .nav-link i {
    flex-shrink: 0;
    margin-top: 4px;
}

/* ตัวข้อความ */
.lesson-item .nav-link {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.exam-card {
    display: flex;
    flex-direction: column;
}

.exam-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* ทำให้ body ขยายเต็มความสูง */
}

.exam-card-actions {
    margin-top: auto;
    /* ดันปุ่มลงล่างสุด */
}

#toggleSidebarBtn {
    display: none;
}

.code-check {
    /* background-color: #f8f9fa; */
    /* เทาอ่อนสะอาดตา */
    border: 2px solid rgb(255, 255, 255);
    /* เส้นกรอบสีหลัก */
    border-radius: 12px;
    /* มุมโค้ง */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* เงานุ่มขึ้น */
    padding: 10px;
}

.content-course {
    padding: 15px;
    background-color: #f8f9fa;
    /* เทาอ่อนสะอาดตา */
    border: 2px solid rgb(255, 255, 255);
    /* เส้นกรอบสีหลัก */
    border-radius: 12px;
    /* มุมโค้ง */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* เงานุ่มขึ้น */
}
.content-course img{
    width: 100% !important;
}

.carousel-item,
.carousel-item img {
    height: 50vh;
    object-fit: cover;
}

.img-height {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    width: 100%;
    height: auto;
    max-height: 85vh;
}

.px-n2 {
    padding: 70px 15px 20px;
}

.fix-col {
    height: 85vh;
    display: flex;
}

.swal-top-title {
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 24px;
    text-align: center;
}

.swal-custom-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.responsive-swal {
    max-width: 90vw !important;
}

/* Layout หลัก */
.edu-layout {
    display: flex;
    /* min-height: 100vh; */
    background: #f4f6f9;
    border-radius: 12px;
    margin: 10px;
}

/* Sidebar */
.edu-panel {
    width: 300px;
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.edu-panel-header {
    padding: 20px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.edu-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.edu-group {
    border-bottom: 1px solid #f0f0f0;
}

.edu-group-title {
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    word-break: break-all;
}

.edu-submenu {
    list-style: none;
    padding: 0 0 10px 0;
}

.edu-link {
    display: block;
    padding: 10px 30px;
    text-decoration: none;
    color: #444;
    font-size: 14px;
    transition: 0.2s;
    word-break: break-all;
}

.edu-link:hover {
    background: #eef3ff;
    color: #2b6cff;
}

.edu-link.active {
    background: #e0ebff;
    color: #2b6cff;
    border-left: 3px solid #2b6cff;
}

/* Content */
.edu-content {
    flex: 1;
    padding: 40px;
    min-height: auto;
}

/* Mobile top bar */
.edu-mobile-bar {
    display: none;
}

.edu-group-title,
.edu-link {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ===== Sidebar Container ===== */
.course-nav {
    width: 300px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    overflow: hidden;
    max-height: 100vh;
    overflow-y: auto;
    /* 🔥 ทำให้ scroll ได้ */
}

/* ===== Section Header ===== */
.course-nav-section>.nav-link {
    font-weight: 600;
    padding: 14px 20px;
    color: #222;
    border-radius: 12px;
    margin: 4px 10px;
    transition: 0.25s ease;
}

/* .course-nav-section>.nav-link:hover {
    background: #f3f6ff;
    color: #2b6cff;
} */
.course-nav-section>.nav-link:hover,
.course-nav-section>.nav-link:not(.collapsed) {
    background: #f3f6ff;
    color: #2b6cff;
}

/* ===== Arrow animation ===== */
.toggle-icon {
    transition: transform 0.3s ease;
}

.nav-link[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* ===== Collapse content ===== */
.course-nav-body {
    padding-bottom: 10px;
}

/* ===== Nested group title ===== */
.course-nav-group>.nav-link {
    font-size: 14px;
    color: #6c757d;
    padding: 8px 20px;
}

/* ===== Video links ===== */
.video-link {
    font-size: 14px;
    padding: 10px 25px;
    border-radius: 10px;
    margin: 2px 10px;
    transition: 0.2s ease;
    color: #444;
    display: flex;
    align-items: center;
    /* gap: 8px; */

}

.video-link:hover {
    background: #eef3ff;
    color: #2b6cff;
}

.video-link.active {
    background: #e0ebff;
    color: #2b6cff;
    font-weight: 600;
    border-left: 3px solid #2b6cff;
}

/* ===== Prevent overflow ===== */
.course-nav .nav-link,
.video-link {
    word-break: break-word;
    overflow-wrap: break-word;
}

.full-width-card {
    width: 100%;
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.card-button {
    width: 220px;
    height: 220px;
    background-color: #e6e6e6;
    border-radius: 28px;
    box-shadow:
        8px 8px 16px rgba(0, 0, 0, 0.15),
        -4px -4px 10px rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.card-button img {
    width: 80px;
    margin-bottom: 12px;
}

.card-button span {
    font-size: 20px;
    font-weight: bold;
    color: #000;
}

.card-button:hover {
    transform: translateY(-6px);
    box-shadow:
        12px 12px 22px rgba(0, 0, 0, 0.2),
        -6px -6px 14px rgba(255, 255, 255, 0.9);
}

.content-course-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 15px;
    transition: 0.25s ease;
    cursor: pointer;
}

/* hover effect */
.content-course-2:hover {
    background: #e6e6e6;
    transform: translateY(-2px);
}

/* ซ้าย */
.course-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #3b5bff, #364fc7);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    flex-shrink: 0;
}

.course-icon-2 {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #00B649, #00A844);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    flex-shrink: 0;
}

.course-icon,
.course-icon-2 i {
    font-size: 32px;
    color: #fff;
}

/* กลาง */
.course-text {
    flex: 1;
}

.course-title {
    font-size: 20px;
    font-weight: 600;
    color: #111;
}

.course-subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 4px;
}

/* ขวา */
.course-download {
    font-size: 24px;
    color: #777;
    margin-left: 15px;
    transition: 0.2s;
}

.course-next {
    font-size: 24px;
    color: #777;
    margin-left: 15px;
    transition: 0.2s;
}

.content-course-2:hover .course-download {
    color: #3b5bff;
}

.content-course-2:hover .course-next {
    color: #00B649;
}

.score-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.score-card {
    width: 900px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.score-header {
    background: #f3f3f3;
    padding: 20px 25px;
    border-bottom: 1px solid #ddd;
}

.score-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.score-header p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.score-table th,
.score-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
}

.score-table th {
    background: #e9e9e9;
    font-weight: 600;
}

.text-left {
    text-align: left !important;
}

.indent {
    padding-left: 35px !important;
}

.indent-2 {
    padding-left: 50px !important;
}

.row-main {
    background: #008BF5;
    color: #fff;
    font-weight: 600;
}

.row-section {
    background: #99D2FE;
    font-weight: 600;
}

.row-section-2 {
    background: #D2ECFF;
    /* font-weight: 600; */
}

/* Layout หลัก */
.exam-wrapper {
    background: #f4f6fb;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Prompt', sans-serif;
}

/* ===== Header ===== */
.exam-header {
    background: linear-gradient(90deg, #074ADA, #5ED1FF);
    color: #fff;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exam-title {
    font-size: 28px;
    font-weight: 600;
}

.timer-label {
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
    opacity: .9;
    text-align: end;
}

.timer-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timer-box span {
    background: #fff;
    color: #074ADA;
    font-weight: 600;
    font-size: 20px;
    width: 36px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
}

.timer-box .colon {
    background: transparent;
    color: #fff;
    font-size: 20px;
    width: auto;
}

/* ตัว timer */
.countdown-ui1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ตัวคั่น ":" ที่เราส่งผ่าน countDownResSperator */
.countdown-ui1 .cd-sep1 {
    display: inline-block;
    /* font-weight: 800; */
    font-size: 22px;
    /* opacity: .4; */
    transform: translateY(-1px);

}

.countdown-ui1 .item-counter-down {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0900B0;
}

/* กล่องตัวเลข */
.countdown-ui1 .inner-item-counter-down {
    min-width: 46px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .10);
    background: linear-gradient(180deg, #ffffff, #f6f7fb);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);

    font-weight: 800;
    font-size: 22px;
    letter-spacing: .5px;
}

.exam-body {
    display: flex;
    min-height: 600px;
}

.exam-left {
    flex: 2;
    background: rgb(226, 224, 224);
    padding: 20px;
}

.exam-content {
    background: #eee;
    height: 100%;
    border-radius: 8px;
}

/* Right Answer Panel */
.exam-right {
    /* flex: 0; */
    background: #eaf2ff;
    padding: 20px;
    border-left: 1px solid #d9e3ff;
}

/* ===== Answer Card ===== */
.answer-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.answer-header {
    font-weight: 600;
    color: #074ADA;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.answer-header .count {
    background: #eef3ff;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Submit Button */
.btn-submit1 {
    width: 100%;
    background: linear-gradient(90deg, #074ADA, #5ED1FF);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
    cursor: pointer;
    transition: .2s;
}

.btn-submit1:hover {
    opacity: .9;
}

.response-list1 {
    margin: 5px;
    text-align: center;
}

.action-choose1 {
    background: #e8f7ee;
    border-left: 4px solid #1cc88a;
    border-radius: 8px;
}

/* กล่องตัวเลือก */
.choice-label1 {
    display: inline-block;
    /*min-width: 45px;*/
    padding: 3px 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #000000;
}

.choice-label1:hover {
    border-color: #34c38f;
    background: #e9f9f2;
}

.choice-radio:checked+.choice-label1 {
    background: #34c38f;
    /* เขียวหลัก */
    color: #ffffff;
    border-color: #2aa876;
    box-shadow: 0 4px 10px rgba(52, 195, 143, 0.35);
    transform: translateY(-2px);
}

/* ========== BANNER ========== */
.top-banner {
    /* height: 40vh; */
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.5);
}

.top-banner img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    /* ทำให้เต็มกรอบโดยไม่ยืด */
    display: block;
}

.top-banner-home {
    /* height: 40vh; */
    /* background: #e0e0e0; */
    /* border-radius: 10px; */
    margin-bottom: 10px;
    overflow: hidden;
    /* box-shadow: 0 0px 10px rgba(0, 0, 0, 0.5); */
}

.top-banner-home img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    /* ทำให้เต็มกรอบโดยไม่ยืด */
    display: block;
}

/* ========== 2 COLUMN LAYOUT ========== */
.content-layout {
    /* display: grid; */
    grid-template-columns: 320px 1fr;
    gap: 20px;
}

/* ========== LEFT COLUMN ========== */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== RIGHT COLUMN ========== */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* width: 50%; */
}

/* ========== CARD STYLE ========== */
.content-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.content-card img {
    max-width: 100%;
    height: auto;
}

.content-card-home {
    background: #fff;
    padding: 20px 0 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.content-card-home img {
    max-width: 100%;
    height: auto;
}

/* ========== BUTTONS ========== */
.btn-enroll {
    width: 100%;
    padding: 12px;
    background: #118c3e;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-enroll:disabled {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.btn-enroll:hover {
    background: #0e6f32;
}

.btn-facebook {
    width: 100%;
    padding: 10px;
    background: #3b5998;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

/* ========== COURSE ITEM ========== */
.course-item {
    margin-bottom: 20px;
}

.course-thumb {
    /* height: 120px; */
    background: #cfcfcf;
    border-radius: 8px;
    margin-bottom: 10px;
}

.course-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    /* ทำให้เต็มกรอบโดยไม่ยืด */
    display: block;
}

/* ========== RIGHT CONTENT BLOCKS ========== */
.content-block {
    height: 180px;
    background: #bdbdbd;
    border-radius: 12px;
}

.content-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    /* ทำให้เต็มกรอบโดยไม่ยืด */
    display: block;
}

.content-block.large {
    height: 260px;
}

.tabs-wrapper {
    display: flex;
    justify-content: center;
}

.modern-tabs1 {
    display: inline-flex;
    background: #eef1f6;
    padding: 6px;
    border-radius: 999px;
    gap: 4px;
    width: 100%;
    justify-content: center;
}

.modern-tabs1 .tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.25s ease;
}

.modern-tabs1 .tab-item i {
    font-size: 16px;
}

/* Hover */
.modern-tabs1 .tab-item:hover {
    background: #e2e8f0;
    color: #1f2937;
}

/* Active */
.modern-tabs1 .tab-item.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}

/* เส้นใต้เล็ก ๆ */
.modern-tabs1 .tab-item.active::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: #2563eb;
    border-radius: 10px;
}

.text-limit {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-course p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* กล่องหลัก */
/* .exam-report {
    font-family: "Tahoma", sans-serif;
    font-size: 14px;
} */

/* กล่อง header */
.exam-header-report {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    background: linear-gradient(to right, #00407c, #1161ab);
    height: 55px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.exam-header-detail {
    font-size: 20px;
    color: white;
    /* text-align: center; */
    display: flex;
    align-items: center;
}

.exam-info table {
    border-collapse: collapse;
}

.exam-info td {
    border: 1px solid #999;
    padding: 5px 10px;
}

/* section box */
.report-box {
    border: 1px solid #777;
    padding: 10px;
    margin-bottom: 15px;
    background: #f5f5f5;
}

.report-title {
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
}

/* summary score */
.summary-score {
    display: flex;
    gap: 20px;
}

/* .score-card-2 { */
/* background: #eee; */
/* border-radius: 20px;
    padding: 15px 25px;
    text-align: center;
    border: 1px solid #ccc;
    width: 100%; */
/* min-width: 160px; */
/* } */

.left {
    text-align: left;
}

.score-value {
    color: #1ea85f;
    font-weight: bold;
}

/* table analysis */
.analysis-table {
    width: 100%;
    border-collapse: collapse;
}

.analysis-table th,
.analysis-table td {
    border: 1px solid #999;
    padding: 5px 8px;
    text-align: center;
}

.analysis-head {
    background: #f2c75c;
    font-weight: bold;
}

.analysis-sub td:first-child {
    padding-left: 25px;
}

/* progress bar */
.progress-bar.custom {
    background-color: var(--progress-bar-bgColor) !important;
    color: #fff;
    font-weight: 600;
    height: 100%;
    align-items: center;
    /* ให้ % อยู่กลางแนวตั้ง */
}

/* คุมกล่องข้อความของ Bootstrap Tooltip */
.tooltip .tooltip-inner {
    white-space: normal;
    max-width: min(800px, 80vw);
    width: 100%;
    word-break: break-word;
    text-align: center;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* ถ้าอยากคุมสีลูกศรด้วย */
.tooltip .tooltip-arrow::before {
    border-top-color: rgba(0, 0, 0, .85) !important;
}

/* progress bar */

/*วงกลม*/
.circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--circle-color, #0d6efd);
    position: relative;
    overflow: hidden;
}

/* ลายเฉียงวิ่ง */
.circle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, .18) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, .18) 50%,
            rgba(255, 255, 255, .18) 75%,
            transparent 75%,
            transparent);
    background-size: 1rem 1rem;
    animation: circleStripeMove 1s linear infinite;
}

@keyframes circleStripeMove {
    0% {
        background-position: 1rem 0;
    }

    100% {
        background-position: 0 0;
    }
}

/*วงกลม*/


.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-name {
    width: 80%;
}

/* .score-value {
    width: 20%;
    text-align: right;
    font-weight: 500;
} */

.score-card-2 {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    width: 100%;
    border: 1px solid #ccc;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* หัวข้อ */
.score-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* layout หลัก */
.score-grid {
    display: grid;
    grid-template-columns: 1fr 50px 50px;
    column-gap: 15px;
    align-items: center;
}

/* label header */
.score-head {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
}

.score-full {
    grid-column: 2;
    text-align: center;
}

.score-get {
    grid-column: 3;
    text-align: center;
    /* color: #2aa9b9; */
    font-weight: 600;
}

.score-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px 70px;
    column-gap: 16px;
    align-items: center;
    /* ให้คอลัมน์ขวาอยู่กึ่งกลางแนวตั้ง */
}

.score-left {
    display: grid;
    grid-template-rows: auto 26px;
    /* หัวข้อ + progress */
    row-gap: 8px;
}

.score-title {
    margin: 12px 0 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-custom {
    height: var(--height-progress-custom, 26px);
    border-radius: 25px;
    overflow: hidden;
    margin: 0;
}

.score-full-detail,
.score-get-detail {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    align-self: end;
    /* ให้ลงมาใกล้เส้น progress */
    margin-top: 34px;
    /* ขยับให้ตรงกับเส้น */
}

/* title */
.score-title1 {
    border: 2px solid #ddd;
    display: inline-block;
    padding: 8px 25px;
    border-radius: 30px;
    margin-bottom: 25px;
    font-weight: 600;
}

.detail-chart {
    border: 2px solid #ddd;
    display: inline-block;
    padding: 8px 25px;
    border-radius: 30px;
    margin-bottom: 25px;
    font-weight: 600;
    /* background: #5ED1FF; */
    color: white;
}

/*.chart-wrapper {*/
/*    position: relative;*/
/*    width: 700px;*/
/*    margin: auto;*/
/*}*/

/*.chart-wrapper canvas {*/
/*    width: 100% !important;*/
/*    height: 100% !important;*/
/*}*/

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 70%;
}

.percent1 {
    font-weight: 700;
    font-size: clamp(24px, 6vw, 46px);
    line-height: 1;
}

.score1 {
    font-size: clamp(14px, 3vw, 22px);
    color: #666;
}

/* .chart {
    transform: rotate(-90deg);
}

.bg {
    fill: none;
    stroke: #eee;
    stroke-width: 20;
}

.seg {
    fill: none;
    stroke-width: 20;
    stroke-linecap: round;
}

.red {
    stroke: #ac0e0e;
    stroke-dasharray: 60 440;
}

.yellow {
    stroke: #ccbd00;
    stroke-dasharray: 75 425;
    stroke-dashoffset: -60;
}

.green {
    stroke: #2e606b;
    stroke-dasharray: 225 275;
    stroke-dashoffset: -135;
} */

/* ─── FILES SECTION ──────────────────── */
.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7a8299;
    margin-bottom: 0.9rem;
    padding-left: 0.1rem;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    animation: fadeUp 0.5s 0.15s ease both;
    margin: 5px 0;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 1.5px solid #e4e8f0;
    border-radius: 14px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.file-card.disabled {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #e1e1e2;
    border: 1.5px solid #e4e8f0;
    border-radius: 14px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.file-card:hover {
    border-color: rgba(79, 142, 247, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.file-thumb {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-thumb.pdf {
    background: rgba(248, 113, 113, 0.12);
}

.file-thumb.mp4 {
    background: rgba(79, 142, 247, 0.12);
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.78rem;
    color: #7a8299;
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.file-meta svg {
    width: 12px;
    height: 12px;
}

/* .file-size-badge {
    padding: 0.18rem 0.6rem;
    background: #1a1e2a;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7a8299;
    white-space: nowrap;
} */

.dl-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f8ef7, #7c5cfc);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 142, 247, 0.25);
    transition: all 0.2s;
    text-decoration: none;
}

.dl-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(79, 142, 247, 0.25);
}

.dl-btn svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.dl-btn.disabled {
    pointer-events: none;
    opacity: .5;
}

.tab-container {
    background: var(--bg-def);
    padding: 10px;
    display: inline-flex;
    gap: 10px;
    border-radius: 0 0 8px 8px;
    width: 100%;
    padding-left: 7%;
}

/* ปุ่ม */
.tab-btn {
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    /*font-size: 14px;*/
    cursor: pointer;
    background: white;
    color: #333;
    transition: all 0.25s ease;
    text-decoration: none;
    /* เอาเส้นใต้ออก */
    color: inherit;
    /* ใช้สีตามที่กำหนด */
    display: inline-block;
    /* ให้เหมือนปุ่ม */
}

/* hover */
.tab-btn:hover {
    background: #d4d4d4;
}

.custom-footer {
    background: #f2f2f2;
    padding: 40px;
    font-size: 14px;
}

/* column */
.footer-col h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-logo {
    width: 60px;
    margin-bottom: 10px;
}

/* item */
.footer-item,
.social {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
}

/* icon */
.footer-item i,
.footer-item span,
.social i,
.social span {
    font-size: 18px;
}

/* QR */
.qr {
    width: 100px;
    margin-top: 10px;
}

/* ============================= */
/* Tablet & Mobile */
@media (max-width: 1200px) {

    .responsive-swal {
        width: 95vw !important;
        margin: 0 !important;
    }

    .col-mg-12 {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .col-divider {
        border-right: none;
        min-height: auto;
    }

    .container-side {
        min-height: auto;
        padding: 0.75rem;
    }

    .lesson-sidebar {
        max-height: 300px;
        /* จำกัดความสูง */
        overflow-y: auto;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 1rem;
    }

    .lesson-header .nav-link {
        font-size: 0.95rem;
    }

    .video-list .video-link {
        font-size: 0.85rem;
    }

    #lessonSidebar {
        display: none;
        transition: all 0.3s ease;
    }

    #lessonSidebar.show {
        display: block;
    }

    #toggleSidebarBtn {
        display: inline-block;
    }

    .fix-col {
        height: 100vh;
    }

    .img-height {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border-radius: 12px;
        width: 100%;
        max-height: 100vh;
        height: auto;
    }

    .edu-layout {
        flex-direction: column;
        border-radius: 12px;
        min-height: auto;
    }

    .edu-mobile-bar {
        display: block;
        padding: 15px;
        background: #2b6cff;
    }

    .edu-menu-toggle {
        background: white;
        border: none;
        padding: 10px 16px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
    }

    .edu-panel {
        max-height: 0;
        overflow: hidden;
        transition: 0.3s;
    }

    .edu-panel.open {
        max-height: 800px;
        overflow-y: auto;
    }

    .edu-content {
        padding: 20px;
        min-height: auto;
    }

    .course-nav {
        width: 100%;
        border-radius: 14px;
        max-height: 0;
        transition: max-height 0.4s ease;
    }

    .course-nav.show {
        max-height: 800px;
        overflow-y: auto;
    }

    .card-button {
        width: 180px;
        height: 180px;
    }

    /*video-js*/
    .video-js {
        width: 1000px;
        height: 500px;
    }

    .video-js,
    .video-js * {
        touch-action: none;
    }

    .video-js .vjs-control-bar {
        touch-action: auto;
    }

    /* ให้ปุ่มกดได้ */
    .video-js .vjs-tech {
        transform-origin: center center;
    }

    /*video-js*/
    .content-layout {
        grid-template-columns: 1fr;
    }

    .exam-header-report {
        height: 15vh;
    }

    .chart-wrapper {
        width: 240px;
        height: 240px;
    }

    .numberHead {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 0px;
    }

    .btn-submit1 {
        padding: 5px;
        margin-bottom: 10px;
    }

    .label-response {
        padding: 10px 3px;
    }

    .choice-box {
        margin-right: 0px;
    }

    .box_response {
        height: calc(100vh - 143px);
    }
}

.swal2-popup .select2-container {
    width: 100% !important;
    text-align: left;
    color: #0a0a0a;
}

.swal2-popup .select2-selection--single {
    height: 38px !important;
    border-radius: 6px;
    padding: 4px 10px;
}

.swal2-popup .select2-selection__rendered {
    line-height: 28px !important;
}

.swal2-popup .select2-selection__arrow {
    height: 36px !important;
}

@media (min-width:1600px) {
    .percent1 {
        font-size: 56px;
    }
}

/* 📱 Mobile */
@media (max-width: 576px) {
    .choice-label1 {
        padding: 0px 7px;
    }
}

/* 📱 Tablet */
@media (min-width: 577px) and (max-width: 991px) {
    .choice-label1 {
        padding: 0px 7px;
    }
}

/* 💻 Desktop */
@media (min-width: 992px) {
    .f-size-mt14-d26 {
        font-size: 26px;
    }

}