.news_open_in {
    font-family: 'THSarabun', sans-serif;
}
.news_open_in .ql-size-normal {
    font-size: 1.25em;
    line-height: 1; 
}
.news_open_in .ql-size-small {
    font-size: 0.75em;
    line-height: 1; 
}
.news_open_in .ql-size-large {
    font-size: 1.75em;
    line-height: 1; 
}
.news_open_in .ql-size-huge {
    font-size: 2.75em;
    line-height: 1; 
}

.ql-editor {
    font-family: 'THSarabun', sans-serif;
}
.ql-editor .ql-size-normal {
    font-size: 1.25em;
    line-height: 1; 
}
.ql-editor .ql-size-small {
    font-size: 0.75em;
    line-height: 1; 
}
.ql-editor .ql-size-large {
    font-size: 1.75em;
    line-height: 1; 
}
.ql-editor .ql-size-huge {
    font-size: 2.75em;
    line-height: 1; 
}

.p-font-small {
    font-size: 0.75em;
    line-height: 1; 
}
.p-font-normal {
    font-size: 1.25em;
    line-height: 1; 
}
.p-font-large {
    font-size: 1.75em;
    line-height: 1; 
}
.p-font-huge {
    font-size: 2.75em;
    line-height: 1; 
}
.fb {
    font-weight:bold;
}
.fn {
    font-weight:normal;
}
@font-face {
font-family: 'THSarabun'; 
src: url('../font/THSarabun.ttf') format('truetype'); 
}
.th {
	font-family: 'THSarabun', sans-serif;
}
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;   
  -ms-user-select: none;     
  user-select: none;         
}
.containerboard {
  width: 1024px;
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.image-container {
  margin: 0.4vw%; 
  width: 23.5%; 
  height: auto;
  overflow: hidden;
  border: 1px solid #ccc;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease-in-out;
  display: inline-block; 
  cursor: pointer;
}

.image-container img {
  width: 100%;
  object-fit: cover; 
}
.image-container:hover  {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
Tbody{ 
	font-family: Kanit;
	font-size: 16px; 
	}
Wmenu{
}
Wcarousel{
}

/* Style for the news subject container to ensure its height fits the content */
#news-subject-container { 
	height: auto !important; 
	min-height: 0 !important; 
	padding: 0 !important; 
	margin-bottom: 10px; 
}
#news-subject-container p,
#news-subject-container h1, 
#news-subject-container h2,
#news-subject-container h3,
#news-subject-container h4,
#news-subject-container h5,
#news-subject-container h6 {
	margin: 0 !important; 
	padding: 0 !important;
}

/* Responsive images and videos in news content */
#main_news img {
	max-width: 100%;
	height: auto;
	display: block; 
	margin-top: 10px; 
	margin-bottom: 10px; 
}
#main_news iframe[src*="youtube.com"], 
#main_news iframe[src*="vimeo.com"] {
	max-width: 100%;
	min-height: 300px; 
	aspect-ratio: 16 / 9; 
}
/* เมนูบน usisnav.php: ใช้ Bootstrap 4 navbar/dropdown ปรับแค่สีตอน active/hover ให้เข้าธีมเดิม */
.usis-navbar {
	font-size: 1.3em;
	font-weight: bold;
}
.usis-navbar .nav-link {
	cursor: pointer;
}
.usis-navbar .dropdown-header {
	font-weight: bold;
}
.usis-navbar .dropdown-item {
	font-weight: normal;
}
.usis-navbar .nav-item.active > .nav-link {
	background-color: #ffa500;
	color: #000;
}
.usis-navbar .nav-link:hover,
.usis-navbar .nav-link:focus,
.usis-navbar .nav-item .dropdown-menu .dropdown-item:hover,
.usis-navbar .nav-item .dropdown-menu .dropdown-item:focus {
	background-color: #fff3c4;
	color: inherit;
}
.pagination-container {
	display: flex; 
	justify-content: center; 
	align-items: center; 
	padding: 20px 0; 
	gap: 8px; 
	flex-wrap: wrap; 
}

.pagination-container a.pagination-link {
	display: inline-flex; 
	align-items: center;
	justify-content: center;
	padding: 8px 15px; 
	min-width: 36px; 
	box-sizing: border-box; 
	border: 1px solid #ddd;
	color: #007bff; 
	text-decoration: none;
	border-radius: 4px; 
	font-size: 1em; 
	line-height: 1.5;
	background-color: #fff;
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.pagination-container a.pagination-link:hover {
	background-color: #e9ecef; 
	color: #0056b3;
	border-color: #adb5bd;
}

.pagination-container a.pagination-link.current-page {
	background-color: #007bff; 
	color: white; 
	border-color: #007bff;
	font-weight: bold;
	cursor: default; 
}

.pagination-container a.pagination-link.current-page:hover {
	background-color: #0056b3; 
	border-color: #0056b3;
}

.pagination-container a.pagination-link.pagination-ellipsis {
	border: none; 
	color: #6c757d;
	padding: 8px 5px;
	background-color: transparent;
}
.pagination-container a.pagination-link.pagination-ellipsis:hover {
	background-color: transparent; 
	color: #343a40;
}

.pagination-container a.pagination-link.pagination-text {
}

.pagination-container a.pagination-link.disabled {
	color: #6c757d;
	pointer-events: none; 
	background-color: #f8f9fa;
	border-color: #ddd;
}
a:hover {
	color: blue;
}
.mesfia_div_clickfield{
	z-index: 998; margin-left: -50%; position: fixed; 	width: 200%; height: 100%; display: none;
}
/* ===== [WRAP & URL BREAK — สำหรับข่าวฉบับเต็ม / เนื้อหาข่าว] ===== */
#main_news,
#main_news .news_open_in,
#main_news .news_open_in * {
  overflow-wrap: anywhere;   /* แนะนำ: ตัดได้ทุกจุดเมื่อจำเป็น */
  word-wrap: break-word;     /* fallback เก่า */
  word-break: break-word;    /* กันบางเบราว์เซอร์ไม่ตัด */
  hyphens: auto;             /* ช่วยตัดคำ (ถ้าระบบรองรับ) */
}

/* URL/ลิงก์ยาวมาก ๆ ให้หักบรรทัดแทบทุกตัวอักษร */
#main_news a,
#main_news [href],
#main_news [data-url] {
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* โค้ด/พรีฟอร์แมตอย่าให้ล้นจอ */
#main_news pre,
#main_news code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ตารางในข่าวให้พอดีจอ และตัดคำในช่องตาราง */
#main_news table {
  width: 100%;
  table-layout: fixed;
}
#main_news th,
#main_news td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ===== [WRAP — สำหรับรายการข่าวทั้งหมด/มินิบอร์ด] ===== */
/* ป้องกัน flex child ล้นจอ: ต้องมี min-width:0 */
.news-all-item-content,
.news-mini-item-title {
  min-width: 0;
}

/* ข้อความหัวข้อ/รายละเอียดในลิสต์ข่าว ให้ตัดคำ/URL ได้ */
.news-all-item-title,
.news-all-item-info,
.news-all-item-date,
.news-all-item-event-date,
.news-mini-item-title-text {
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* ลิงก์ในรายการข่าว หาก URL ยาวมาก ให้หักบรรทัด */
.news-all-item-content a,
.news-mini-item-title a {
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* ===== [WRAP — กรณีเนื้อหามาจาก Quill (.ql-editor)] ===== */
.ql-editor,
.ql-editor * {
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
