*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family: 'Pathway Extreme', sans-serif;
    background:#dcdcdc;
}

/* =========================================
   PAGE BACKGROUND (เฉพาะหน้านี้)
   ========================================= */
body {
    background: #dcdcdc; /* สีเทาตามต้นฉบับเพื่อให้การ์ดสีขาวเด่นขึ้น */
}

/* =========================================
   TOP BANNER (หัวข้อหน้า)
   ========================================= */
.top-banner {
    background: #e7ad63;
    text-align: center;
    padding: 50px;
    /* เว้นระยะลงมา 100px เพราะ Navbar เป็นแบบ Fixed */
    margin-top: 100px; 
}

.top-banner h1 {
    color: white;
    font-size: 40px;
    font-weight: 700;
}

/* =========================================
   RESEARCHER PROFILE (ส่วนหัวหน้าทีม)
   ========================================= */
.researcher-section {
    text-align: center;
    padding: 70px 20px 120px;
}

.section-title {
    font-size: 34px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 40px;
    position: relative; /* เพิ่มเพื่อให้ ::after อ้างอิงได้ถูกต้อง */
}

.section-title::after {
    content: "";
    display: block;
    height: 8px;
    width: 70%;
    background: #f7931e;
    margin-top: 12px;
    margin-left: auto;  /* จัดกึ่งกลางเส้นขีด */
    margin-right: auto; /* จัดกึ่งกลางเส้นขีด */
}

.profile-container {
    margin-top: 60px;
}

.profile-image img {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff; /* เพิ่มขอบขาวเล็กน้อยให้รูปเด่นขึ้น (Optional) */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Name Card (กล่องชื่อหัวหน้าทีม) */
.name-card {
    background: #24384a;
    color: white;
    width: 100%;       /* ปรับเป็น 100% แล้วใช้ max-width คุม */
    max-width: 520px;
    margin: 70px auto 0;
    padding: 30px 20px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.name-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.name-card p {
    font-size: 20px;
    font-weight: 600;
}

/* สามเหลี่ยมมุมขวาล่าง */
.name-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    border-left: 50px solid transparent;
    border-bottom: 50px solid #f7931e;
}

/* =========================================
   TEAM GRID (ส่วนแสดงรายชื่อทีมงาน)
   ========================================= */
.team-section {
    padding: 0 20px 120px; /* ลด padding-top ลงหน่อยเพราะต่อจากข้างบน */
    text-align: center;
}

.team-grid {
    margin-top: 70px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 90px 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Member Card Styles */
.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.member-card img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 20px;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 4px solid #fff;
}

.card-content {
    background: #24384a;
    color: white;
    width: 100%;
    max-width: 360px;
    margin-top: -45px; /* ดันกล่องขึ้นไปทับรูป */
    padding: 45px 20px 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 16px;
}

.card-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    border-left: 45px solid transparent;
    border-bottom: 45px solid #f7931e;
}

/* การ์ดตรงกลาง (สำหรับการจัดวางแบบ Grid) */
.center-card {
    grid-column: 2 / 3;
}

/* =========================================
   RESPONSIVE (TEAM SECTION)
   ========================================= */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .center-card {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .member-card img {
        width: 180px;
        height: 180px;
    }

    .card-content {
        padding: 35px 15px 25px;
    }
    
    .name-card {
        width: 90%; /* ให้ยืดหยุ่นในมือถือ */
    }
}