/* =========================================
   ไฟล์: teacher.css
   รายละเอียด: สไตล์สำหรับแสดงผลบุคลากร (รองรับ Bootstrap 3.3.7)
   ========================================= */

/* 1. ตั้งค่าฟอนต์หลัก */
/* หมายเหตุ: ถ้าเว็บเดิมมีฟอนต์อื่นอยู่แล้ว และอยากใช้เฉพาะส่วนนี้ ให้เปลี่ยนจาก body เป็น .personnel-section แทน */
body {
    font-family: 'Kanit', sans-serif;
    background-color: #f4f6f9; /* สีพื้นหลังอ่อนๆ */
}

.personnel-section {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* 2. สร้าง Loading Spinner (เพราะ BS3 ไม่มี class นี้) */
.custom-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #337ab7; /* สีน้ำเงิน BS3 */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 3. หัวข้อแต่ละส่วน */
.section-header {
    border-left: 5px solid #337ab7; /* ขีดสีน้ำเงินด้านหน้า */
    padding-left: 15px;
    margin-bottom: 25px;
    margin-top: 0;
    color: #333;
    font-weight: 600;
    font-size: 24px;
}

/* =========================================
   ส่วนที่ 1: ผู้บริหาร (Boss Card)
   ========================================= */
.boss-card {
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #e1e1e1;
    height: 100%; /* ดันให้เต็มความสูงคอลัมน์ */
}

.boss-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.boss-card img {
    width: 100%;
    height: 300px; /* ความสูงรูปผู้บริหาร */
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    margin-bottom: 15px;
}

.boss-name {
    color: #337ab7; /* สีน้ำเงิน */
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.boss-pos {
    font-size: 15px;
    color: #555;
    font-weight: 500;
    margin-bottom: 0;
}

/* =========================================
   ส่วนที่ 2: ครูและบุคลากร (Swiper Slide)
   ========================================= */
.swiper {
    width: 100%;
    padding: 10px 10px 50px 10px; /* เว้นด้านล่างไว้ให้จุด Pagination */
}

/* เทคนิค Flexbox บังคับให้การ์ดสูงเท่ากันเสมอ */
.swiper-wrapper {
    display: flex;
    align-items: stretch; 
}

.swiper-slide {
    width: 240px; /* ความกว้างของการ์ดครูแต่ละใบ */
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border: 1px solid #eee;
    
    /* จัด Layout ภายในเป็นแนวตั้ง เพื่อดันเนื้อหาให้เต็ม */
    height: auto;
    display: flex;
    flex-direction: column;
}

.swiper-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* ส่วนรูปภาพครู */
.teacher-img-wrapper {
    width: 100%;
    height: 260px; /* ความสูงรูปครู */
    overflow: hidden;
    flex-shrink: 0; /* ห้ามหด */
    position: relative;
}

.teacher-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.swiper-slide:hover .teacher-img {
    transform: scale(1.1); /* ซูมรูปเมื่อเอาเมาส์ชี้ */
}

/* ส่วนข้อมูลครู (ข้อความ) */
.teacher-info {
    padding: 15px 10px;
    text-align: center;
    flex-grow: 1; /* ยืดพื้นที่ส่วนนี้ให้เต็มความสูงที่เหลือ */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* เรียงจากบนลงล่าง */
}

.t-name {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.t-pos {
    font-size: 14px;
    color: #d9534f; /* สีแดง (Danger ของ BS3) */
    font-weight: 500;
    margin-bottom: 6px;
}

.t-academic {
    font-size: 13px;
    color: #777; /* สีเทา */
    margin-bottom: 8px;
    font-weight: 300;
}

/* ป้ายกำกับกลุ่มสาระ */
.t-subject {
    font-size: 12px;
    background-color: #d9edf7; /* สีฟ้าอ่อน */
    color: #31708f; /* สีตัวอักษรฟ้าเข้ม */
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin: 0 auto; /* จัดกึ่งกลาง */
    font-weight: 400;
}