@charset "utf-8";

body {
    font-family: "Noto Sans Thai", serif;
  }

h1 {
    font-size: 28px; /* Adjust heading size */
    color: #e400e4; /* Adjust heading color */
    margin-bottom: 20px; /* Add space below heading */
}

h2 {
    font-size: 20px; /* Adjust heading size */
    color: #e400e4; /* Adjust heading color */
    margin-bottom: 20px; /* Add space below heading */
}

/* Style for the table container specifically with class .research-table-section */
    .research-table-section table {
      width: 100%;
      border-collapse: collapse;
      text-align: center; /* Centers text in the entire table */
    }

    /* Style for table cells and headers within .research-table-section */
    .research-table-section th, 
    .research-table-section td {
      border: 1px solid black;
      padding: 8px;
    }

    /* Set column widths within .research-table-section */
    .research-table-section th:nth-child(1), 
    .research-table-section td:nth-child(1) {
      width: 25%;
    }

    .research-table-section th:nth-child(2), 
    .research-table-section td:nth-child(2) {
      width: 50%;
    }

    .research-table-section th:nth-child(3), 
    .research-table-section td:nth-child(3) {
      width: 25%;
    }

.interest-table table {
	 width: 100%;
      border-collapse: collapse;
       /* Centers text in the entire table */
}
.interest-table th,.interest-table td {
	border: 1px solid black;
      padding: 8px;
}
.interest-table th:nth-child(1),
.interest-table td:nth-child(1){
	width:30% ; text-align: center;
}
.interest-table th:nth-child(2)
.interest-table td:nth-child(2){
	width:50% ; text-align: center;
}
.interest-table th:nth-child(3),
.interest-table td:nth-child(3){
	width:10%; text-align: center;
}
.interest-table th:nth-child(4),
.interest-table td:nth-child(4){
	width:10%; text-align: center;
}

.his {
      width: 100%;
      border-collapse: collapse;
      text-align: center; /* Centers text in the entire table */
    }

.his td, .his th {
	padding: 0px 40px;
}

.apa-ref {
	padding-left: 36px;
	text-indent: -36px;
}
.header-logo {
    float: left;
}


/* Base styles */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

header .logo img{
    height: 100px;
    width: auto;
}


.navbar-nav {
  display: flex;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: #000; /* Adjust as per your design */
}

/* Navigation Styling */
.navbar-nav .nav-link {
    font-weight: bold;
    color: #003f7d;
    font-size: medium;
}

.navbar-nav .nav-link:hover,
.dropdown-menu .dropdown-item:hover {
    color: #e400e4;
    /* Light pink color on hover */
}

.yello-page .navbar-nav .nav-link:hover,
.yello-page .dropdown-menu .dropdown-item:hover {
    color: #FAC530;
    /* Light pink color on hover */
}

/*Side menu*/
/* Styling the links to add vertical gaps */
.side-menu .nav-link {
    border: 2px solid #e400e4;
	/* Pink border */
    color: #003f7d;
    /* Dark text */
    border-radius: 50px;
    /* Rounded corners */
    padding: 10px 20px;
    /* Padding inside each link */
    margin-bottom: 15px;
    /* Vertical space between the links */
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    display: block;
    /* Makes the link take up full width */
    text-decoration: none;
    /* Remove underline */
    margin-top: 0;

}

.rad-program .side-menu .nav-link { 
    border: 2px solid #FAC530; /* Yellow border */
    color: #003f7d; /* Keep dark text */
}
.side-menu .nav-link:hover {
    background-color: #e400e4;
    /* Light pink background on hover */
}

.rad-program .side-menu .nav-link:hover {
    background-color: #FAC530;
    /* Light pink background on hover */
}

.rad-program h1 {
    font-size: 28px; /* Adjust heading size */
    color: #003F7D; /* Adjust heading color */
    margin-bottom: 20px; /* Add space below heading */
}

.main-container {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      justify-content: space-between;
    }

    .main-column {
      flex: 1 1 calc(33.333% - 20px); /* Adjust for 3 columns with gaps */
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      min-width: 200px; /* Ensure responsive behavior */
    }

    .main-text {
      margin-bottom: 10px;
    }

    .main-button {
      margin-top: auto; /* Push button to the bottom */
	  margin-bottom: 15px;
      padding: 10px 20px;
      background-color: #002855;
      color: white;
      border: none;
      border-radius: 25px;
      cursor: pointer;
		
	  
    }

    .main-button:hover {
      background-color: #0056b3;
    }
    
    .news-image-container img {
    height: 200px;
    /* Sets a fixed height */
    object-fit: cover;
    /* Ensures the image covers the container and is cropped appropriately */
    }



    .fb-page {
    max-width: 100%; /* Make sure it doesn’t exceed column width */
    width: 100%; /* Take full width of the column */
    height: auto; /* Maintain aspect ratio */
}

.external-image-href {
    display: flex; /* Use flexbox to align items without gaps */
    flex-direction: column; /* Align images in a column */
}


.external-image-href img {
    width: 100%; /* Makes the image responsive */
    height: auto; /* Maintains aspect ratio for smaller screens */
}


footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}
footer .footer-contact {
  color:  #003f7d;
  font-size: 16px;
  line-height: 1.35;
}

footer .footer-contact strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

footer .footer-contact address {
  margin-top: 5px;
  font-style: normal;
}

footer .footer-contact a {
  color: inherit;
  text-decoration: none;
}

footer .footer-contact a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  footer {
    align-items: flex-start;
    padding: 10px;
  }

  footer .footer-contact {
    font-size: 14px;
  }

  footer .footer-contact strong {
    font-size: 18px;
  }
}
footer .footer-social-icon a {
    text-decoration: none;
}




.social-icons {
  display: flex;
  gap: 10px; /* Adjust spacing between icons */
  align-items: center; /* Aligns icons vertically */
}

.icon {
  width: 60px; /* Adjust size of the icons */
  height: 60px;
}
.container {
    max-width: 1200px;
}
.banner img {
    width: 100%;
    margin-top: 20px;
	margin-bottom: 20px;
}

/* About us page*/
.aboutus-section {
    max-width: 900px; /* Adjust the size as needed */
	margin-bottom: 20px; /* Add space below heading */
}
.history-section{
    max-width: 800px; /* Adjust the size as needed */
	margin-bottom: 20px; /* Add space below heading */
}
/* About us page*/
.research-table-section {
    max-width: 900px; /* Adjust the size as needed */
	margin-bottom: 20px; /* Add space below heading */
}

/* Staffs page*/
    .staff-table-container table {
            width: 100%;
            border-collapse: collapse;
        }
        .staff-table-container th, 
        .staff-table-container td {
            padding: 2px;
            text-align: left;
            vertical-align: top;
        }
        .staff-table-container th {
            background-color: #f4f4f4;
        }
        .staff-table-container img {
            width: 100px;
            height: auto;
            border-radius: 5px;
        }
        .staff-table-container .column-staff-image {
            width: 13%;
        }
        .staff-table-container .column-bold-text {
            width: 40%;
        }
        .staff-table-container .column-bullet-points {
            width: 30%;
        }
        .staff-table-container .column-normal-text {
            width: 15%;
        }
        .staff-table-container .column-cv-link {
            width: 2%;
        }
        .staff-table-container .bold-lines {
            font-weight: bold;
        }
        .staff-table-container .regular-text {
            margin-top: 5px;
            display: block;
        }



@media (max-width:768px){
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  header .logo {
    margin-bottom: 10px;
  }

  .navbar-nav {
    flex-direction: column;
    gap: 10px;
  }
	
	
  footer {
    flex-direction: column;
    align-items: flex-start;
  }

 .main-column {
        flex: 1 1 100%; /* Stack columns on smaller screens */
      }
	
}


/* Course document tables */
.course-documents {
    margin-top: 30px;
    max-width: 900px;
}

.course-documents-block {
    margin-bottom: 34px;
}

.course-documents-title {
    background-color: rgb(226, 239, 217);
    color: #000000 !important;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    padding: 6px 10px;
    margin: 18px 0 14px;
}

.semester-title {
    color: #000000 !important;
    font-size: 18px;
    font-weight: 400;
    margin: 22px 0 8px;
}

.course-documents-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.course-documents-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 15px;
    margin-bottom: 24px;
    border: 1px solid #000000;
}

.course-documents-table th,
.course-documents-table td {
    border: 1px solid #000000;
    padding: 8px 12px;
    text-align: center;
    vertical-align: middle;
    line-height: 1.4;
}

.course-documents-table th {
    font-weight: 700;
    color: #000000;
}

.course-documents-table .text-start {
    text-align: left;
}

.course-documents-table-programs th:nth-child(1),
.course-documents-table-programs td:nth-child(1) {
    width: 10%;
}

.course-documents-table-programs th:nth-child(2),
.course-documents-table-programs td:nth-child(2) {
    width: 15%;
}

.course-documents-table-programs th:nth-child(3),
.course-documents-table-programs td:nth-child(3) {
    width: 49%;
}

.course-documents-table-programs th:nth-child(4),
.course-documents-table-programs td:nth-child(4),
.course-documents-table-programs th:nth-child(5),
.course-documents-table-programs td:nth-child(5) {
    width: 13%;
}

.course-documents-table-courses th:nth-child(1),
.course-documents-table-courses td:nth-child(1) {
    width: 9%;
}

.course-documents-table-courses th:nth-child(2),
.course-documents-table-courses td:nth-child(2) {
    width: 15%;
}

.course-documents-table-courses th:nth-child(3),
.course-documents-table-courses td:nth-child(3) {
    width: 56%;
}

.course-documents-table-courses th:nth-child(4),
.course-documents-table-courses td:nth-child(4),
.course-documents-table-courses th:nth-child(5),
.course-documents-table-courses td:nth-child(5) {
    width: 10%;
}

.course-documents-table-report th:nth-child(1),
.course-documents-table-report td:nth-child(1) {
    width: 10%;
}

.course-documents-table-report th:nth-child(2),
.course-documents-table-report td:nth-child(2) {
    width: 76%;
}

.course-documents-table-report th:nth-child(3),
.course-documents-table-report td:nth-child(3) {
    width: 14%;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pdf-link img {
    width: 22px;
    height: auto;
    display: block;
}

.pdf-link:hover img {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .course-documents-table {
        min-width: 680px;
        font-size: 14px;
    }

    .course-documents-title {
        font-size: 18px;
    }
}


/* Course document tables: desktop + mobile friendly cards */
.course-documents {
    margin-top: 32px;
}

.course-documents-block {
    margin: 28px 0;
}

.course-documents-title {
    background-color: rgb(226, 239, 217);
    color: #000;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding: 8px 12px;
    margin: 24px 0 16px;
}

.semester-title {
    color: #000;
    font-size: 18px;
    font-weight: 500;
    margin: 24px 0 10px;
}

.course-documents-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.course-documents-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #000;
    margin-bottom: 18px;
    font-size: 15px;
}

.course-documents-table th,
.course-documents-table td {
    border: 1px solid #000;
    padding: 8px 12px;
    vertical-align: middle;
    text-align: center;
}

.course-documents-table th {
    font-weight: 700;
    background-color: #fff;
}

.course-documents-table .text-start {
    text-align: left;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdf-link img {
    width: 22px;
    height: auto;
    display: block;
}

/* Optional desktop widths */
.course-documents-table-programs th:nth-child(1),
.course-documents-table-programs td:nth-child(1) { width: 10%; }
.course-documents-table-programs th:nth-child(2),
.course-documents-table-programs td:nth-child(2) { width: 14%; }
.course-documents-table-programs th:nth-child(3),
.course-documents-table-programs td:nth-child(3) { width: 54%; }
.course-documents-table-programs th:nth-child(4),
.course-documents-table-programs td:nth-child(4),
.course-documents-table-programs th:nth-child(5),
.course-documents-table-programs td:nth-child(5) { width: 11%; }

.course-documents-table-courses th:nth-child(1),
.course-documents-table-courses td:nth-child(1) { width: 10%; }
.course-documents-table-courses th:nth-child(2),
.course-documents-table-courses td:nth-child(2) { width: 16%; }
.course-documents-table-courses th:nth-child(3),
.course-documents-table-courses td:nth-child(3) { width: 56%; }
.course-documents-table-courses th:nth-child(4),
.course-documents-table-courses td:nth-child(4),
.course-documents-table-courses th:nth-child(5),
.course-documents-table-courses td:nth-child(5) { width: 9%; }

.course-documents-table-report th:nth-child(1),
.course-documents-table-report td:nth-child(1) { width: 10%; }
.course-documents-table-report th:nth-child(2),
.course-documents-table-report td:nth-child(2) { width: 75%; }
.course-documents-table-report th:nth-child(3),
.course-documents-table-report td:nth-child(3) { width: 15%; }

/* Mobile card layout: applies to every course document table, including มม.7 */
@media (max-width: 768px) {
    .course-documents-title {
        font-size: 17px;
        line-height: 1.5;
        padding: 10px 8px;
    }

    .semester-title {
        font-size: 16px;
        margin-top: 22px;
    }

    .course-documents-table-wrap {
        overflow-x: visible;
    }

    .course-documents-table,
    .course-documents-table thead,
    .course-documents-table tbody,
    .course-documents-table th,
    .course-documents-table td,
    .course-documents-table tr {
        display: block;
        width: 100% !important;
    }

    .course-documents-table {
        border: none;
        font-size: 15px;
    }

    .course-documents-table thead {
        display: none;
    }

    .course-documents-table tr {
        border: 1px solid #000;
        margin-bottom: 14px;
        background-color: #fff;
    }

    .course-documents-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border: none;
        border-bottom: 1px solid #ddd;
        padding: 10px 12px;
        text-align: right;
    }

    .course-documents-table td:last-child {
        border-bottom: none;
    }

    .course-documents-table td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        max-width: 38%;
        font-weight: 700;
        text-align: left;
        color: #000;
    }

    .course-documents-table td.text-start {
        text-align: right;
    }

    .course-documents-table td.text-start::after {
        content: "";
    }

    .course-documents-table td[data-label="หลักสูตร"],
    .course-documents-table td[data-label="ชื่อวิชา"] {
        align-items: flex-start;
    }

    .course-documents-table td[data-label="หลักสูตร"] {
        line-height: 1.5;
    }

    .pdf-link img {
        width: 28px;
    }
}

@media (max-width: 480px) {
    .course-documents-table td {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .course-documents-table td::before {
        flex: none;
        max-width: 100%;
        margin-bottom: 4px;
    }

    .course-documents-table td.text-start {
        text-align: left;
    }
}

/* Force course document mobile cards to fit screen */
@media (max-width: 768px) {

  .course-documents {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .course-documents-block {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .course-documents-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .course-documents-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
  }

  .course-documents-table,
  .course-documents-table thead,
  .course-documents-table tbody,
  .course-documents-table th,
  .course-documents-table td,
  .course-documents-table tr {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .course-documents-table thead {
    display: none;
  }

  .course-documents-table tr {
    margin-bottom: 16px;
    border: 1px solid #000;
    background-color: #fff;
  }

  .course-documents-table td {
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .course-documents-table td:last-child {
    border-bottom: none;
  }

  .course-documents-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    color: #003f7d;
  }

  .course-documents-table .pdf-link {
    display: inline-block;
  }

  .course-documents-table .pdf-link img {
    width: 24px;
    height: auto;
  }
}