/* ================= COURSE PAGE ================= */

.course-list{

    max-width:1200px;

    margin:120px auto;

    padding:0 40px;

}

/* Header */

.course-header{

    max-width:700px;

    margin-bottom:80px;

}

.course-header h1{

    font-size:52px;

    font-weight:600;

    margin:15px 0 25px;

    color:#222;

}

.course-header p{

    color:#666;

    line-height:2;

    font-size:17px;

}

/* Item */

.course-item{

    display:grid;

    grid-template-columns:80px 1fr 60px;

    align-items:center;

    gap:40px;

    text-decoration:none;

    color:#222;

    padding:34px 10px;

    border-top:1px solid #ece8e1;

    transition:.35s;

}

.course-item:last-child{

    border-bottom:1px solid #ece8e1;

}

/* Number */

.course-no{

    font-size:14px;

    letter-spacing:2px;

    color:#999;

}

/* Title */

.course-title h2{

    font-size:30px;

    font-weight:400;

    letter-spacing:.5px;

    transition:.35s;

}

/* Arrow */

.course-arrow{

    font-size:26px;

    color:#999;

    transition:.35s;

    text-align:right;

}

/* Hover */

.course-item:hover{

    background:#faf8f4;

    padding-left:22px;

}

.course-item:hover .course-title h2{

    color:#A58A5A;

}

.course-item:hover .course-arrow{

    transform:translateX(10px);

    color:#A58A5A;

}

.course-item:hover .course-no{

    color:#A58A5A;

}

@media (max-width:768px){
    .course-list{ margin:72px auto; padding:0 24px; }
    .course-header{ margin-bottom:42px; }
    .course-header h1{ font-size:34px; }
    .course-item{ grid-template-columns:38px minmax(0, 1fr) 24px; gap:12px; padding:22px 0; }
    .course-title h2{ font-size:20px; line-height:1.35; }
    .course-arrow{ font-size:22px; }
    .course-item:hover{ padding-left:8px; }
}

/* ================= CATEGORY COURSE LIST (course_category.php) ================= */

.category-divider{
    width:100%;
    max-width:700px;
    height:1px;
    margin:40px 0;
    border:0;
    background:#ece8e1;
}

.category-course-divider{
    width:100px;
    height:1px;
    margin:12px 0 16px;
    border:0;
    background:#ece8e1;
}

.category-empty{
    color:#666;
    font-size:17px;
    line-height:1.8;
    padding:40px 0;
}

.category-intro{
    color:#666;
    line-height:1.8;
    text-align:justify;
}

.category-course-desc{
    margin:0 0 16px;
    color:#555;
    font-size:15px;
    line-height:1.7;
    text-align:justify;
}

.category-course-list{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
    gap:28px;
}

.category-course-item{
    background:#fff;
    border:1px solid #ece7de;
    border-radius:16px;
    padding:26px 28px;
    box-shadow:0 8px 24px rgba(34,34,34,.04);
    display:flex;
    flex-direction:column;
    transition:.35s ease;
}

.category-course-item:hover{
    transform:translateY(-5px);
    box-shadow:0 14px 34px rgba(34,34,34,.10);
}

.category-course-name{
    font-size:22px;
    font-weight:600;
    color:#1f1f1f;
    line-height:1.2;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    margin:0 0 12px;
}

.category-course-item:hover .category-course-name{
    color:#A58A5A;
}

.category-course-desc{
    margin:0 0 16px;
    color:#555;
    font-size:15px;
    line-height:1.7;
}

.category-course-price{
    margin-top:auto;
    font-size:17px;
    font-weight:700;
    color:#A58A5A;
}

@media(max-width:768px){
    .category-course-list{
        grid-template-columns:1fr;
        gap:22px;
    }
}

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 500;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    background: #F5F1E8;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s, visibility .3s, transform .3s, background .3s, box-shadow .3s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #ebe7dc;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
