/* Breadcrumb */

.breadcrumb-area {
  padding: 0;
  height: 550px;
  background-size: cover;

  background-position: center;

  color: #fff;

  text-align: center;

  text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);

  display: flex;

  justify-content: center;

  align-items: center;

  flex-direction: column;
}

.breadcrumb-content h4 {
  font-size: 50px;

  font-weight: 600;

  margin-top: -200px;

  text-transform: uppercase;

  letter-spacing: 2px;
}

.breadcrumb-content h5 {
  font-size: 24px;

  font-weight: 400;

  margin-top: 10px;

  color: #f0f0f0;

  letter-spacing: 1px;
}

.breadcrumb-content p {
  font-size: 16px;

  margin-top: 5px;

  color: #ffffff;
}

.breadcrumb-content p a {
  color: #ffffff;

  text-decoration: none;
}

.breadcrumb-content p a:hover {
  text-decoration: underline;
}

.breadcrumb-content p i {
  margin: 0 5px;

  color: #d8d3d3d3;

  font-size: 12px;
}

body {
  font-family: "Kanit", sans-serif !important;

  margin: 0;

  padding: 0;

  box-sizing: border-box;

  background: linear-gradient(135deg, #f5f7fa 0%, #fafafa 100%);

  min-height: 100vh;
}

.org-chart-container {
  position: relative;
  /* สำคัญมาก สำหรับการวางตำแหน่งลูกๆ */

  width: 100%;

  max-width: 1200px;
  /* กำหนดความกว้างสูงสุดให้เท่ากับภาพ */

  margin: auto;

  min-height: 600px;

  height: 2000px;

  overflow: visible;

  padding: 40px 20px;

}

.org-chart {
  position: relative;

  padding: 50px 20px;

  min-height: 1200px;

  max-width: 1400px;

  margin: 0 auto;
}

.person-card {
  position: absolute;
  /* ทำให้การ์ดลอยตัวเพื่อไปแปะที่ไหนก็ได้ */

  width: auto;
  /* เปลี่ยนจาก 20% เป็น auto เพื่อให้ปรับตามเนื้อหา */

  min-width: 300px;
  /* กำหนดความกว้างขั้นต่ำ */

  max-width: 500px;
  /* กำหนดความกว้างสูงสุด */

  /* เพิ่มการจัดการพื้นที่ */

  padding: 10px;

  box-sizing: border-box;
}

.person-image {
  position: absolute;

  top: 0;

  left: 0;

  max-width: 700px;

  height: auto;

  object-fit: cover;

  margin: 0 auto 20px;
}

.person-image-3 {
  position: absolute;

  top: 0;

  left: 0;

  max-width: 600px;

  height: auto;

  object-fit: cover;

  margin: 0 auto 20px;
}


.person-name {
  position: absolute;

  top: 190px;
  /* อยู่ต่ำกว่า .person-position */

  left: 250px;

  font-size: 1.6rem;

  color: #2c3e50;

  text-align: center;

  line-height: 1.3;

  align-items: center;

  justify-content: center;

  white-space: nowrap;
}

.person-position {
  position: absolute;

  top: 100px;

  left: 250px;

  font-size: 1.9rem;

  color: #2c3e50;

  text-align: center;

  font-weight: 500;

  line-height: 1.4;

  align-items: center;

  justify-content: center;

  text-align: center;

  white-space: nowrap;
}

.contact-info {
  max-height: 0;

  overflow: hidden;

  transition: all 0.3s ease;

  border-top: 1px solid #eee;

  margin-top: 15px;

  padding-top: 0;

  width: 100%;
}

.president {
  top: 0%;

  left: 24%;
}

.president .person-position {
  top: 120px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.president .person-name {
  top: 200px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.vice-president {
  top: 15%;

  left: 24%;
}

.vice-president .person-position {
  top: 120px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.vice-president .person-name {
  top: 200px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.assistant {
  top: 28%;

  left: 75%;
}

.assistant .person-position {
  top: 100px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.assistant .person-name {
  top: 170px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}


.director {
  top: 38%;

  left: 24%;
}

.director .person-position {
  top: 120px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.director .person-name {
  top: 200px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.admin-head {
  top: 54%;

  left: 0%;
}

.admin-head .person-position {
  top: 120px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.admin-head .person-name {
  top: 200px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.promotion-head {
  top: 54%;

  left: 60%;
}

.promotion-head .person-position {
  top: 120px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

.promotion-head .person-name {
  top: 200px;
  /* << ปรับแก้ตัวเลขตรงนี้ให้พอดีกับตำแหน่งของรองฯ */
}

/* --- สไตล์พื้นฐานสำหรับเส้นทุกเส้น --- */

.connector {
  position: absolute;

  background-color: #9e452a;

  z-index: -1;
  /* **สำคัญ:** ทำให้เส้นอยู่หลังการ์ดเสมอ */
}

/* --- กำหนดตำแหน่งและขนาดของเส้นแต่ละเส้นด้วย ID --- */

#line-pres-to-vice {
  /* ตำแหน่งของเส้น */

  top: 200px;
  /* << ปรับค่า: ให้ขอบบนของเส้นเริ่มที่ไหน */

  left: 35%;
  /* << ปรับค่า: ให้เส้นอยู่แนวกึ่งกลาง */

  transform: translateX(-50%);

  /* ขนาดของเส้น */

  width: 5px;
  /* << ความหนาของเส้นแนวตั้ง */

  height: 300px;
  /* << ความยาวของเส้น */
}

#line-to-assistant-dashed {
    top: 36%;  /* << ปรับตำแหน่งแนวตั้งให้อยู่ตรงกลางผู้ช่วย */
    left: 35%; /* << ปรับตำแหน่งแนวนอนให้เริ่มก่อนหน้าผู้ช่วย */

    width: 45%; /* << ความยาวของเส้นประ */
    height: 0;  /* << สูง 0 สำหรับเส้นแนวนอน */

    /* สร้างเส้นประด้วย border-top */
    border-top: 4px dashed #9e452a; 
    
    /* ไม่ต้องใช้ background-color */
    background-color: transparent;
}

#line-from-vice-solid {
    top: 25%;   /* << ปรับตำแหน่งแนวตั้งให้เริ่มจากใต้รองอธิการบดี */
    left: 35%;  /* << ปรับตำแหน่งแนวนอนให้อยู่กึ่งกลางรองอธิการบดี */
    transform: translateX(-50%);

    width: 4px;     /* << ความหนาของเส้น */
    height: 20%;    /* << ความยาวของเส้น */
    background-color: #9e452a; /* ใช้ background-color สำหรับเส้นทึบ */
}

#line-from-vice-solid-2 {
    top: 35%;   /* << ปรับตำแหน่งแนวตั้งให้เริ่มจากใต้รองอธิการบดี */
    left: 35%;  /* << ปรับตำแหน่งแนวนอนให้อยู่กึ่งกลางรองอธิการบดี */
    transform: translateX(-50%);

    width: 4px;     /* << ความหนาของเส้น */
    height: 20%;    /* << ความยาวของเส้น */
    background-color: #9e452a; /* ใช้ background-color สำหรับเส้นทึบ */
}

/* สไตล์พื้นฐานสำหรับหัวลูกศร */
.arrow {
    position: absolute;
    width: 0;
    height: 0;
}

/* หัวลูกศรชี้ลง (Pointing Down) */
#arrow-pointing-down {
    /* กำหนดตำแหน่งให้ไปต่อท้ายเส้น #line-from-vice-solid */
    top: 55%;  /* << ปรับค่า top ให้ตรงกับปลายเส้น */
    left: 35%; /* << ปรับค่า left ให้ตรงกับแนวกึ่งกลางของเส้น */
    transform: translateX(-50%);

    /* --- เทคนิคสร้างสามเหลี่ยม --- */
    border-left: 10px solid transparent;  /* ขอบซ้าย-ขวา โปร่งใส */
    border-right: 10px solid transparent;
    border-top: 20px solid #9e452a;       /* ขอบบนมีสี (จะกลายเป็นสามเหลี่ยมชี้ลง) */
}

/* === ส่วนของภารกิจ (Missions Section) === */

/* สไตล์พื้นฐานของกล่องภารกิจ */
.mission-card {
    position: absolute; /* **สำคัญ:** เปลี่ยนเป็น absolute */
    width: 30%; /* กำหนดความกว้างของแต่ละกล่อง (ปรับได้) */
    padding: 15px;
}

/* --- กำหนดตำแหน่งของแต่ละภารกิจ --- */

/* ภารกิจงานธุรการ (เชื่อมกับหัวหน้างานธุรการ) */
.admin-mission {
    top: 70%;  /* << ปรับแนวตั้งให้อยู่ใต้ "หัวหน้างานธุรการ" */
    left: 0%;   /* << ปรับแนวนอนให้อยู่ตรงกับ "หัวหน้างานธุรการ" */
}

/* ภารกิจงานส่งเสริม (เชื่อมกับหัวหน้างานส่งเสริมฯ) */
.promotion-mission {
    top: 70%;  /* << ปรับแนวตั้งให้อยู่ใต้ "หัวหน้างานส่งเสริมฯ" */
    left: 40%;  /* << ปรับแนวนอนให้อยู่ตรงกับ "หัวหน้างานส่งเสริมฯ" */
}

/* ภารกิจผู้อำนวยการ (เชื่อมกับผู้อำนวยการ) */
.director-mission {
    top: 70%;  /* << ปรับแนวตั้งให้อยู่ใต้ "ผู้อำนวยการ" */
    left: 85%;  /* << ปรับแนวนอน (ตัวอย่าง) */
}


/* สไตล์ข้างใน mission-card (ใช้โค้ดเดิมได้เลย) */
.mission-card h4 {
    font-size: 1.5rem;
    font-weight: 450;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.mission-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mission-line {
    width: 100%;
    height: 10px;
    background-color: #db8181;
    margin-bottom: 15px;
}

.mission-card ul li {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.mission-card ul li::before {
    content: '-';
    position: absolute;
    left: 0;
    top: 0;
    color: #d35400;
    font-weight: bold;
}

