/* ตั้งค่า Font และสีหลักให้ Sidebar */
.sidebar-main {
    font-family: 'Noto Sans Thai', sans-serif;
}

/* หัวข้อหลักสูตร */
.sidebar-main .widget_sow-headline h3.sow-headline {
    color: #D43E62 !important;
    font-weight: 700;
    margin-bottom: 10px !important;
}

/* ปรับแต่ง Container ของเมนู */
.sidebar-main ul.menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    overflow: hidden; /* เพื่อให้มุมมนทำงาน */
}

.sidebar-main ul.menu li {
    margin: 0 !important;
    padding: 0 !important; /* มั่นใจว่าไม่มีช่องว่างใน li */
    border-bottom: 1px solid #eeeeee;
}

.sidebar-main ul.menu li:last-child {
    border-bottom: none;
}

/* สไตล์ลิงก์เมนู (ปกติ) */
.sidebar-main ul.menu li a {
    display: block; /* ทำให้กว้างเต็มพื้นที่ li */
    padding: 15px 20px;
    color: #444444;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.5;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

/* ตอน Hover (เมาส์ชี้) - นิ่งสนิท ไม่ขยับ */
.sidebar-main ul.menu li a:hover {
    background-color: #D43E62;
    color: #ffffff !important;
    /* ไม่ใส่ padding-left เพิ่มเพื่อไม่ให้ตัวอักษรขยับ */
}

/* เมนูหน้าที่เปิดอยู่ (Active Page) */
.sidebar-main ul.menu li.current-menu-item a {
    background-color: #D43E62 !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* ลบช่องว่างส่วนเกินของ Widget */
.sidebar-main .widget {
    margin-bottom: 25px !important;
}

    /* Lecturer Table Style */
    .lecturer-container {
        width: 100%;
        margin: 20px 0;
        font-family: 'Sarabun', sans-serif;
    }
    .lecturer-table {
        width: 100%;
        border-collapse: collapse;
        background: #fff;
    }
    .lecturer-table tr {
        border-bottom: 2px solid #f4f4f4;
        transition: background 0.3s ease;
    }
    .lecturer-table tr:hover {
        background-color: #fafafa;
    }
    .lecturer-table td {
        padding: 30px 15px;
        vertical-align: top;
    }
    .img-col {
        width: 160px;
        text-align: center;
    }
    .lecturer-table img {
        width: 150px;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .info-col h3 {
        margin: 0 0 10px 0;
        color: #8e1c12; /* สีแดง มธ. */
        font-size: 1.4rem;
    }
    .info-col p {
        margin: 5px 0;
        line-height: 1.6;
        color: #333;
    }
    .academic-interest {
        margin-top: 15px !important;
        padding-top: 10px;
        border-top: 1px dashed #ddd;
    }
    .status-leave {
        color: #8b475d;
        font-weight: bold;
        font-size: 0.9rem;
    }
    .link-group a {
        color: #007bff;
        text-decoration: none;
        font-weight: 600;
    }
    .link-group a:hover {
        text-decoration: underline;
    }

    /* Mobile Responsive */
    @media (max-width: 768px) {
        .lecturer-table td {
            display: block;
            width: 100% !important;
            padding: 15px;
            box-sizing: border-box;
        }
        .img-col {
            text-align: center;
        }
        .info-col {
            text-align: left;
        }
    }