@font-face {
  font-family: 'DB Heavent';
  src: url('font/db_heavent_cond_v3.2.1-webfont.woff2') format('woff2'),
    url('font/db_heavent_cond_v3.2.1-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

:root {
  /* KMUTT Corporate Identity Colors */
  --kmutt-orange: #f04e23;
  --kmutt-yellow: #ffc72c;
  --kmutt-dark: #2b2b2b;
  /* Top Bar */
  --kmutt-gray-text: #444444;

  --light-bg: #f9f9f9;
}

body {
  font-family: "Prompt", sans-serif;
  color: var(--kmutt-gray-text);
  background-color: #f8f9fa;
  padding-top: 193px;
  /* Adjusted to match fixed header height */
}

@media (max-width: 1199.98px) {
  body {
    padding-top: 108px;
    /* Mobile header doesn't have the menu row */
  }
}

/* 
   2. SITE HEADER Modern 2-tier (Banner + Menu)
   */

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

/* โ”€โ”€ Topbar โ”€โ”€ */
.site-topbar {
  background-color: var(--kmutt-dark);
  padding: 6px 0;
  text-align: center;
}

.site-topbar .container {
  display: flex;
  justify-content: center;
}

.site-topbar__link {
  color: #ccc;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 1.5px;
  transition: color 0.2s;
}

.site-topbar__link:hover {
  color: #fff;
}

/* เนโ€โฌเนโ€โฌ Banner Row เนโ€โฌเนโ€โฌ */
.header-banner {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

/* เนโ€โฌเนโ€โฌ Brand เนโ€โฌเนโ€โฌ */
.site-logo {
  height: 52px;
  width: auto;
  transition: transform 0.2s;
}

.site-brand:hover .site-logo {
  transform: scale(1.04);
}

.site-brand-text {
  line-height: 1.25;
}

.site-name {
  font-size: 1.4rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--kmutt-orange) 0%, #ff7947 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.site-sub {
  font-size: 0.8rem;
  color: #999;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* เนโ€โฌเนโ€โฌ Header Actions เนโ€โฌเนโ€โฌ */
.header-actions {
  gap: 14px;
}

/* Language pill */
.lang-pill {
  display: inline-flex;
  background: #f1f3f5;
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
}

.lang-pill-btn {
  text-decoration: none;
  padding: 4px 15px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.lang-pill-btn:hover {
  color: var(--kmutt-orange);
}

.lang-pill-btn--active {
  background: #fff;
  color: var(--kmutt-orange);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

/* Login button */
.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--kmutt-orange) 0%, #d13d15 100%);
  color: #fff !important;
  text-decoration: none;
  padding: 8px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(240, 78, 35, 0.22);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(240, 78, 35, 0.35);
  color: #fff !important;
}

.login-btn--full {
  width: 100%;
  justify-content: center;
}

/* User pill (logged in) */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e9ecef;
  border-radius: 50px;
  padding: 4px 14px 4px 5px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--kmutt-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.user-pill:hover {
  border-color: var(--kmutt-orange);
  box-shadow: 0 2px 10px rgba(240, 78, 35, 0.1);
}

.user-chevron {
  font-size: 0.65rem;
  color: #aaa;
  transition: transform 0.2s;
}

.user-pill[aria-expanded="true"] .user-chevron {
  transform: rotate(180deg);
}

/* User avatar circle */
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--kmutt-orange), #ff7947);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar--lg {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

/* User dropdown */
.user-dropdown {
  border-radius: 14px !important;
  min-width: 200px;
  overflow: hidden;
}

.user-dropdown-info {
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

/* Hamburger */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1.5px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--kmutt-dark);
  border-radius: 2px;
  transition: all 0.2s;
}

.hamburger-btn:hover {
  border-color: var(--kmutt-orange);
  background: #fff8f6;
}

.hamburger-btn:hover span {
  background: var(--kmutt-orange);
}

/* เนโ€โฌเนโ€โฌ Menu Row (Desktop) เนโ€โฌเนโ€โฌ */
.header-menu {
  background: var(--kmutt-orange);
}

.site-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 13px 15px;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

/* เมนูภาษาอังกฤษกว้างกว่าไทยมาก (ต้องการ 1309px เทียบกับไทย 1181px ที่ระยะห่างเดิม
   15px) จนล้น container 1320px ของจอกว้างด้วย จึงลดระยะห่างเป็น 8px ทุกจอเดสก์ท็อป */
.site-nav__link {
  padding-left: 8px;
  padding-right: 8px;
}

/* ช่วง 1200-1399px container ถูกจำกัดที่ 1140px ซึ่งแคบเกินกว่าเมนูภาษาอังกฤษมาก
   จึงให้แถบเมนู (ซึ่งเป็นแถบสีเต็มความกว้างอยู่แล้ว) ใช้พื้นที่จอได้เต็ม
   และย่อขนาดตัวอักษรลง เพื่อให้เมนูแสดงครบทั้งภาษาไทยและอังกฤษ */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .header-menu > .container {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-nav__link {
    font-size: 0.875rem;
  }
}

.site-nav__link:hover,
.site-nav__link.active {
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.08);
  border-bottom-color: #ffffff;
}

.site-nav__chevron {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.25s ease;
  margin-left: 2px;
}

.site-nav__item--dropdown:hover .site-nav__chevron {
  transform: rotate(180deg);
  color: #ffffff;
}

/* Dropdown panel */
.site-nav__sub {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 230px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
  z-index: 1000;
}

.site-nav__sub--wide {
  min-width: 280px;
}

.site-nav__item--dropdown:hover .site-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__sub-link {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: #444;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.site-nav__sub-link:hover {
  color: var(--kmutt-orange);
  background: #fff8f5;
  border-left-color: var(--kmutt-orange);
  padding-left: 26px;
}

/* Sub-submenu (3rd level) — flyout on hover */
.site-nav__sub-item--has-sub {
  position: relative;
}
.site-nav__sub-link--has-sub {
  justify-content: space-between;
}
.site-nav__sub-link--has-sub:hover {
  padding-left: 26px;
}
.site-nav__sub-sub {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  position: absolute;
  top: 0;
  left: 100%;
  background: #fff;
  min-width: 250px;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition: all 0.18s ease;
  z-index: 1001;
}
.site-nav__sub-item--has-sub:hover .site-nav__sub-sub {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.site-nav__sub-sub a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: #444;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.site-nav__sub-sub a:hover {
  color: var(--kmutt-orange);
  background: #fff8f5;
  border-left-color: var(--kmutt-orange);
  padding-left: 26px;
}

/* Mobile sub-sub group (nested inside mobile-menu__sub) */
.mobile-menu__sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  color: #555;
  font-size: 0.875rem;
  cursor: pointer;
  text-align: left;
}
.mobile-menu__sub-toggle:hover {
  color: var(--kmutt-orange);
}
.mobile-menu__sub-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f8f9fa;
  border-radius: 6px;
}
.mobile-menu__sub-sub li a {
  display: block;
  padding: 8px 16px 8px 28px;
  font-size: 0.84rem;
  color: #666;
  text-decoration: none;
}
.mobile-menu__sub-sub li a:hover {
  color: var(--kmutt-orange);
}

/* เนโ€โฌเนโ€โฌ Mobile Nav (Offcanvas) เนโ€โฌเนโ€โฌ */
.mobile-nav {
  width: min(380px, 90vw) !important;
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--kmutt-dark) 0%, #3d3d3d 100%);
  border-bottom: 3px solid var(--kmutt-orange);
}

.mobile-nav__close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.mobile-nav__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-nav__body {
  padding: 20px;
  overflow-y: auto;
  height: 100%;
}

/* Mobile auth block */
.mobile-auth {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.mobile-logout-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  background: #fff1f0;
  color: #dc3545;
  border: 1px solid #ffd0cc;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  justify-content: center;
  transition: all 0.2s;
}

.mobile-logout-btn:hover {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

/* Mobile language */
.mobile-lang {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.mobile-lang-btn {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #888;
  background: #f1f3f5;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.mobile-lang-btn--active {
  background: var(--kmutt-orange);
  color: #fff;
  box-shadow: 0 3px 10px rgba(240, 78, 35, 0.3);
}

/* Mobile menu list */
.mobile-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition: all 0.15s;
}

.mobile-menu__link:hover,
.mobile-menu__link.active {
  background: #fff5f2;
  color: var(--kmutt-orange);
}

.mobile-menu__icon {
  width: 18px;
  text-align: center;
  color: var(--kmutt-orange);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.mobile-menu__group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.mobile-menu__group-toggle:hover {
  background: #fff5f2;
  color: var(--kmutt-orange);
}

.mobile-menu__group-toggle[aria-expanded="true"] {
  background: #fff5f2;
  color: var(--kmutt-orange);
}

.mobile-toggle-icon {
  font-size: 0.65rem;
  color: #aaa;
  transition: transform 0.25s;
  flex-shrink: 0;
}

.mobile-menu__group-toggle[aria-expanded="true"] .mobile-toggle-icon {
  transform: rotate(180deg);
  color: var(--kmutt-orange);
}

.mobile-menu__sub {
  list-style: none;
  padding: 4px 0 4px 30px;
  margin: 0;
}

.mobile-menu__sub li {
  margin: 2px 0;
}

.mobile-menu__sub a {
  display: block;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}

.mobile-menu__sub a:hover {
  color: var(--kmutt-orange);
  background: #fff8f5;
  border-left-color: var(--kmutt-orange);
}

/* Bootstrap dropdown override in new design */
.dropdown-toggle::after {
  display: none;
}

/* Responsive */
@media (max-width: 991.98px) {
  .btn-close {
    filter: none;
  }
}

/* --- 5. Content Section Styles --- */
/* Banner */
.carousel-item img {
  width: 100%;
  height: 100vh;
  max-height: 600px;
  object-fit: cover;
  filter: brightness(0.95);
}

/* Search Box */
.search-container {
  margin-top: -30px;
  position: relative;
  z-index: 100;
}

.search-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-top: 4px solid var(--kmutt-orange);
}

.btn-kmutt {
  background-color: var(--kmutt-orange);
  color: white;
  border: none;
  transition: background 0.3s;
}

.btn-kmutt:hover {
  background-color: #d1401b;
  color: white;
}

/* News Section */
.section-title {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 15px;
  font-weight: 600;
  color: #333;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background-color: var(--kmutt-orange);
}

.news-item {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
  transition: background 0.2s;
}

.news-item:hover {
  background-color: #fdfdfd;
}

.date-badge {
  background: #eee;
  color: #555;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  min-width: 80px;
}

/* Footer */
footer {
  background-color: var(--kmutt-dark);
  color: #bbb;
  padding: 60px 0 20px;
  margin-top: 60px;
  font-size: 0.9rem;
}

footer h5 {
  color: white;
  margin-bottom: 20px;
  font-weight: 500;
}

footer a {
  color: #bbb;
  text-decoration: none;
}

footer a:hover {
  color: var(--kmutt-orange);
}

/* Cookie */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 30, 30, 0.95);
  color: white;
  padding: 20px;
  z-index: 9999;
  display: none;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
}

/* --- 6. Organization Tree --- */
.tree {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  overflow-x: auto;
}

.tree ul {
  padding-top: 20px;
  position: relative;
  transition: all 0.5s;
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  display: flex;
  justify-content: center;
}

.tree li {
  float: left;
  text-align: center;
  list-style-type: none;
  position: relative;
  padding: 20px 2px 0 2px;
  transition: all 0.5s;
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
}

/* We will use ::before and ::after to draw the connectors */

.tree li::before,
.tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid #ccc;
  width: 50%;
  height: 20px;
}

.tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid #ccc;
}

/* We need to remove left-right connectors from elements without 
any siblings */
.tree li:only-child::after,
.tree li:only-child::before {
  display: none;
}

/* Remove space from the top of single children */
.tree li:only-child {
  padding-top: 0;
}

/* Remove left connector from first child and 
right connector from last child */
.tree li:first-child::before,
.tree li:last-child::after {
  border: 0 none;
}

/* Adding back the vertical connector to the last nodes */
.tree li:last-child::before {
  border-right: 2px solid #ccc;
  border-radius: 0 5px 0 0;
  -webkit-border-radius: 0 5px 0 0;
  -moz-border-radius: 0 5px 0 0;
}

.tree li:first-child::after {
  border-radius: 5px 0 0 0;
  -webkit-border-radius: 5px 0 0 0;
  -moz-border-radius: 5px 0 0 0;
}

/* Time to add downward connectors from parents */
.tree ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #ccc;
  width: 0;
  height: 20px;
}

.tree li .node-content {
  border: 2px solid #ccc;
  padding: 10px 10px;
  text-decoration: none;
  color: #666;
  font-family: 'Prompt', sans-serif;
  font-size: 0.85rem;
  display: inline-block;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  transition: all 0.5s;
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  min-width: 130px;
  position: relative;
  z-index: 10;
}

/* Hover effect */
.tree li .node-content:hover,
.tree li .node-content:hover+ul li .node-content {
  border: 2px solid var(--kmutt-orange);
  color: var(--kmutt-orange);
  box-shadow: 0 5px 15px rgba(240, 78, 35, 0.1);
}

.tree li .node-content:hover {
  background: #fff5f2;
}

/* Connector styles on hover */
.tree li .node-content:hover+ul li::after,
.tree li .node-content:hover+ul li::before,
.tree li .node-content:hover+ul::before,
.tree li .node-content:hover+ul ul::before {
  border-color: #ffbba5;
}

/* Specific styling for levels */
.tree .level-1 {
  background-color: white;
  color: var(--kmutt-dark) !important;
  border: 2px solid var(--kmutt-dark);
  font-weight: 600;
  font-size: 1rem;
}

.tree .level-2 {
  background-color: white;
  color: var(--kmutt-orange) !important;
  border: 2px solid var(--kmutt-orange);
  font-weight: 600;
}

/* --- 7. Manual Document List --- */
.manual-card {
  transition: all 0.3s ease;
  border: 1px solid #eee;
  background: #fff;
}

.manual-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
  border-color: var(--kmutt-orange);
}

.manual-icon {
  width: 50px;
  height: 50px;
  background-color: #fff5f2;
  color: var(--kmutt-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.manual-card:hover .manual-icon {
  background-color: var(--kmutt-orange);
  color: white;
}

.manual-title {
  font-weight: 500;
  color: #333;
  transition: color 0.3s;
}

.manual-card:hover .manual-title {
  color: var(--kmutt-orange);
}

/* --- 8. Forms List --- */
/* Reusing manual-card styles with a new class for semantic clarity, 
   or we can just group them. */
.form-card {
  transition: all 0.3s ease;
  border: 1px solid #eee;
  background: #fff;
  border-radius: 12px;
}

.form-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border-color: var(--kmutt-orange);
}

.form-link {
  text-decoration: none;
  color: #555;
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s;
}

.form-link:last-child {
  border-bottom: none;
}

.form-link:hover {
  color: var(--kmutt-orange);
  padding-left: 5px;
}

.category-icon {
  font-size: 2rem;
  color: var(--kmutt-orange);
  margin-bottom: 15px;
}


/* --- 9. Timeline Styles --- */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: var(--kmutt-orange);
  top: 0;
  bottom: 0;
  left: 20px;
  /* Mobile first: line on left */
  margin-left: -2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 100%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: auto;
  background-color: var(--kmutt-orange);
  border: 4px solid var(--kmutt-orange);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  left: 10px;
  /* Mobile first */
}

.timeline-content {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--kmutt-orange);
}

.timeline-year {
  color: var(--kmutt-orange);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 5px;
  display: block;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
  .timeline::after {
    left: 50%;
  }

  .timeline-item {
    width: 50%;
  }

  .left {
    left: 0;
  }

  .right {
    left: 50%;
  }

  /* Connector Dots */
  .left::after {
    left: auto;
    right: -10px;
    /* Adjust based on circle size */
  }

  .right::after {
    left: -10px;
  }

  /* Arrows */
  .left .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: -10px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
  }

  .right .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: -10px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }

  /* Fix for border-left on right items being weird with arrow? 
     Let's keep simple box style */
  .timeline-content {
    border-left: none;
    border-top: 4px solid var(--kmutt-orange);
  }

  .left {
    padding-right: 40px;
    padding-left: 0;
  }

  .right {
    padding-left: 40px;
    padding-right: 0;
  }
}

/* --- 10. Enhanced About Sections --- */
.vision-box {
  background: linear-gradient(135deg, #fff5f2 0%, #ffffff 100%);
  border-left: 5px solid var(--kmutt-orange);
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  position: relative;
}

.vision-box i.quote-icon {
  font-size: 3rem;
  color: rgba(240, 78, 35, 0.1);
  position: absolute;
  top: 20px;
  left: 20px;
}

.vision-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: #444;
  line-height: 1.8;
}

.mission-list {
  list-style: none;
  padding: 0;
}

.mission-list li {
  margin-bottom: 20px;
  position: relative;
  padding-left: 50px;
}

.mission-icon-wrapper {
  position: absolute;
  left: 0;
  top: 0;
  width: 35px;
  height: 35px;
  background-color: var(--kmutt-orange);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(240, 78, 35, 0.3);
}


/* --- 11. Staff Card Effects --- */
.staff-card {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.staff-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
  border-bottom: 4px solid var(--kmutt-orange) !important;
}

/* --- 12. Generic Page Header (Extracted from FAQ) --- */
.page-header-bg {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 80px 0 60px 0;
  /* เน€เธ™โ‚ฌเน€เธ˜ยžเน€เธ˜เธ”เน€เธ™ยˆเน€เธ˜เธ เน€เธ˜ยžเน€เธ˜เธ—เน€เธ™ย‰เน€เธ˜ย™เน€เธ˜โ€”เน€เธ˜เธ•เน€เธ™ยˆเน€เธ˜โ€ เน€เธ™ย‰เน€เธ˜เธ’เน€เธ˜ย™เน€เธ˜ยšเน€เธ˜ย™เน€เธ™ยƒเน€เธ˜เธ‹เน€เธ™ย‰เน€เธ˜เธ เน€เธ˜เธ’เน€เธ˜ย เน€เธ˜ย‚เน€เธ˜เธ–เน€เธ™ย‰เน€เธ˜ย™เน€เธ™โ‚ฌเน€เธ˜ยœเน€เธ˜เธ—เน€เธ™ยˆเน€เธ˜เธ  Navbar เน€เธ˜ยšเน€เธ˜เธ‘เน€เธ˜ย‡ เน€เธ™ย เน€เธ˜เธ…เน€เธ˜เธ เน€เธ™โ‚ฌเน€เธ˜ยžเน€เธ˜เธ”เน€เธ™ยˆเน€เธ˜เธ เน€เธ˜โ€ เน€เธ™ย‰เน€เธ˜เธ’เน€เธ˜ย™เน€เธ˜เธ…เน€เธ™ยˆเน€เธ˜เธ’เน€เธ˜ย‡เน€เธ™ยƒเน€เธ˜เธ‹เน€เธ™ย‰เน€เธ˜เธŠเน€เธ˜เธ เน€เธ˜โ€ เน€เธ˜เธ˜เน€เธ˜เธ… */
  color: white;
  margin-bottom: 40px;
}

/* Modern Page Header (without placehold.co dependency) */
.modern-page-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1e1e 0%, #2b2b2b 100%);
  border-bottom: 4px solid var(--kmutt-orange);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 50px 0 30px 0;
  color: white;
  margin-bottom: 40px;
}

.modern-page-header .glow-orange {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(240, 78, 35, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.modern-page-header .glow-yellow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 80%, rgba(255, 199, 44, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.modern-page-header h1 {
  font-family: 'Prompt', sans-serif;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* --- 13. FAQ / Tabs Styles --- */
.nav-tabs .nav-link {
  color: var(--kmutt-gray-text);
  font-weight: 500;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 15px 20px;
  transition: all 0.3s;
}

.nav-tabs .nav-link:hover {
  color: var(--kmutt-orange);
  background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
  color: var(--kmutt-orange);
  border-bottom: 3px solid var(--kmutt-orange);
  background-color: transparent;
  font-weight: 600;
}

.faq-item {
  background-color: white;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: #ffdacc;
  transform: translateY(-2px);
}

.faq-question {
  font-weight: 500;
  color: #333;
  margin-bottom: 0;
  padding-right: 20px;
}

.faq-question i {
  color: var(--kmutt-orange);
  margin-right: 10px;
}

.btn-download-pdf {
  background-color: #fff;
  color: #dc3545;
  border: 1px solid #dc3545;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: all 0.3s;
}

.btn-download-pdf:hover {
  background-color: #dc3545;
  color: white;
}



.staff-card:hover img {
  transform: scale(1.1);
}

/* --- 14. Shortcuts Section --- */
.shortcut-card {
  display: block;
  text-align: center;
  padding: 30px 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  height: 100%;
  border: 2px solid transparent;
}

.shortcut-card:hover {
  background-color: white;
  border-color: var(--kmutt-orange);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transform: translateY(-5px);
}

.shortcut-icon {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.shortcut-card:hover .shortcut-icon {
  color: var(--kmutt-orange);
}

.shortcut-title {
  color: var(--kmutt-orange);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* --- 15. Agency Logos Section --- */
.agency-section-title {
  display: flex;
  align-items: center;
  color: #555;
  font-size: 1rem;
  margin-bottom: 20px;
}

.agency-section-title i {
  font-size: 1.5rem;
  margin-right: 10px;
  color: #333;
}

/* --- 16. Procurement Plan Page --- */
.search-plan-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border-top: 4px solid var(--kmutt-orange);
}

.results-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.results-table thead {
  background-color: var(--kmutt-dark);
  color: white;
}

.results-table thead th {
  font-weight: 600;
  padding: 15px 12px;
  vertical-align: middle;
  white-space: nowrap;
}

.results-table tbody td {
  padding: 12px;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}

.results-table tbody tr:hover {
  background-color: #fff5f2;
}

.badge-publish {
  background-color: #28a745;
  color: white;
}

.badge-change {
  background-color: #ffc107;
  color: #333;
}

.badge-cancel {
  background-color: #dc3545;
  color: white;
}

.btn-download {
  background-color: var(--kmutt-orange);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-size: 0.85rem;
}

.btn-download:hover {
  background-color: #d1401b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(240, 78, 35, 0.3);
}

.results-count {
  background: #f9f9f9;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid var(--kmutt-orange);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

@media (max-width: 991.98px) {
  .table-responsive {
    font-size: 0.85rem;
  }

  .results-table thead th,
  .results-table tbody td {
    padding: 8px 6px;
  }
}

/* --- 17. Procurement Summary Page --- */
.library-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.book-item {
  background: white;
  border-radius: 4px 10px 10px 4px;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-left: 12px solid var(--kmutt-orange);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.book-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 12px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 50px 0 rgba(255, 255, 255, 0.3), 0 100px 0 rgba(255, 255, 255, 0.3);
}

.book-item:hover {
  transform: translateY(-10px) rotateY(-5deg);
  box-shadow: 10px 15px 25px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.book-cover {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-right: 1px solid #eee;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #fff 0%, #fefefe 100%);
}

.book-icon {
  font-size: 3rem;
  color: var(--kmutt-orange);
  margin-bottom: 15px;
  opacity: 0.8;
}

.book-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 5px;
}

.book-subtitle {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 15px;
}

.book-action {
  padding: 15px;
  background-color: #fafafa;
  border-top: 1px solid #eee;
  text-align: center;
}

.btn-view-book {
  font-size: 0.85rem;
  color: var(--kmutt-orange);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-view-book:hover {
  color: #d1401b;
}

.filter-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  border-left: 4px solid var(--kmutt-gray-text);
}

.agency-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  background: white;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 10px;
  transition: all 0.3s ease;
}

.agency-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

.agency-card:hover img {
  filter: grayscale(0%);
}

/* โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
   CGD Banner โ€” Premium Redesign
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
.cgd-banner {
  position: relative;
  background: linear-gradient(135deg, #1a3a6b 0%, #1e4fa0 50%, #1a3a6b 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(26, 58, 107, 0.28), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Animated shimmer accent stripe on the left */
.cgd-banner__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #f04e23 0%, #ffc72c 100%);
  border-radius: 20px 0 0 20px;
}

/* Decorative background pattern */
.cgd-banner::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.cgd-banner::after {
  content: "";
  position: absolute;
  bottom: -60px;
  right: 80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.cgd-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
}

/* Icon Section */
.cgd-banner__icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cgd-banner__icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #ffc72c;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.cgd-banner:hover .cgd-banner__icon-ring {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06) rotate(-5deg);
}

.cgd-banner__badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: #ffc72c;
  background: rgba(255, 199, 44, 0.12);
  border: 1px solid rgba(255, 199, 44, 0.3);
  padding: 2px 10px;
  border-radius: 20px;
}

/* Content Section */
.cgd-banner__content {
  flex: 1;
  min-width: 0;
}

.cgd-banner__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cgd-banner__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.cgd-banner__desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  line-height: 1.7;
}

/* Action Section */
.cgd-banner__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cgd-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.13);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 50px;
  padding: 0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: all 0.25s ease;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.cgd-banner__btn-text {
  padding: 10px 20px;
}

.cgd-banner__btn-icon {
  background: rgba(255, 255, 255, 0.15);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1.5px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s, transform 0.2s;
}

.cgd-banner__btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cgd-banner__btn:hover .cgd-banner__btn-icon {
  background: rgba(255, 255, 255, 0.25);
}

.cgd-banner__btn:hover .cgd-banner__btn-icon i {
  transform: translateX(3px);
}

.cgd-banner__btn-icon i {
  transition: transform 0.2s ease;
}

.cgd-banner__note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cgd-banner__inner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 20px;
  }

  .cgd-banner__icon-wrap {
    flex-direction: row;
    gap: 12px;
    align-items: center;
  }

  .cgd-banner__btn {
    width: 100%;
    justify-content: center;
  }

  .cgd-banner__btn-text {
    flex: 1;
    text-align: center;
  }

  .cgd-banner__note {
    white-space: normal;
  }
}

/* โ”€โ”€ Unified File Size Badge (law.php, manual.php, forms.php) โ”€โ”€ */
.file-size-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  color: #6c757d;
  background: #f1f3f5;
  border: 1px solid #e2e6ea;
  border-radius: 20px;
  padding: 2px 9px;
  line-height: 1.5;
  gap: 2px;
  white-space: nowrap;
}

.file-size-badge i {
  font-size: 0.65rem;
  color: #adb5bd;
}

/* โ”€โ”€ Carousel Caption โ”€โ”€ */
.carousel-caption.custom-caption {
  background: rgba(40, 40, 40, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 22px 32px;
  bottom: 10%;
  left: 15%;
  right: 15%;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .carousel-caption.custom-caption {
    left: 5%;
    right: 5%;
    bottom: 5%;
    padding: 14px 18px;
  }
}

/* โ”€โ”€ Hero Carousel โ€” flush under header โ”€โ”€ */
#heroCarousel {
  margin-top: -32px;
  /* cancel body padding-top */
  position: relative;
  z-index: 0;
}

/* -- News List Page (news_list.php) -- */
.news-list-item {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 12px !important;
}

.news-list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10) !important;
}

.news-list-img-wrapper {
  width: 220px;
  min-height: 160px;
  overflow: hidden;
  border-radius: 12px 0 0 12px;
  background: #f0f0f0;
}

.news-list-img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.news-list-item:hover .news-list-img {
  transform: scale(1.05);
}

/* Mobile: stack vertically */
@media (max-width: 767.98px) {
  .news-list-img-wrapper {
    width: 100%;
    min-height: 200px;
    border-radius: 12px 12px 0 0;
  }

  .news-list-img {
    min-height: 200px;
  }
}

/* Text clamp */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── FAQ Accordion (faq.php) ── */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-accordion-item {
  border: 1px solid #eaecef !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-accordion-item:hover {
  border-color: rgba(240, 78, 35, 0.25) !important;
  box-shadow: 0 4px 16px rgba(240, 78, 35, 0.08);
}

/* Accordion button row */
.faq-accordion-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--kmutt-dark) !important;
  background: #fff !important;
  border: none !important;
  box-shadow: none !important;
}

.faq-accordion-btn:not(.collapsed) {
  background: #fff8f5 !important;
  color: var(--kmutt-orange) !important;
  border-bottom: 1px solid #fde8e2 !important;
}

/* Override Bootstrap chevron color */
.faq-accordion-btn::after {
  filter: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f04e23'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
  margin-left: auto;
  flex-shrink: 0;
}

/* Question number badge */
.faq-q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--kmutt-orange), #ff7043);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(240, 78, 35, 0.3);
  transition: transform 0.2s ease;
}

.faq-accordion-btn:not(.collapsed) .faq-q-num {
  background: linear-gradient(135deg, var(--kmutt-orange), #d1401b);
  transform: scale(1.08);
}

/* Question text */
.faq-q-text {
  flex: 1;
  line-height: 1.5;
}

/* Answer body */
.faq-accordion-body {
  padding: 18px 20px 18px 64px;
  /* indent to align under question text */
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.faq-answer-text {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ── Contact Page (contact.php) ── */
.contact-info-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eaecef;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section block */
.contact-section {
  border-radius: 12px;
  border: 1px solid #f0f2f5;
  overflow: hidden;
}

.contact-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #fdf3ef, #fff);
  border-bottom: 1px solid #fde8e2;
}

.contact-section__icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--kmutt-orange), #ff7043);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(240, 78, 35, 0.25);
}

.contact-section__icon-wrap--green {
  background: linear-gradient(135deg, #28a745, #20c997);
  box-shadow: 0 3px 8px rgba(40, 167, 69, 0.25);
}

.contact-section__icon-wrap--blue {
  background: linear-gradient(135deg, #0d6efd, #4dabf7);
  box-shadow: 0 3px 8px rgba(13, 110, 253, 0.25);
}

.contact-section__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.contact-section__body {
  padding: 16px 20px;
  background: #fff;
}

/* Address text */
.contact-address-text {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.9;
}

/* Phone list */
.contact-phone-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-phone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s;
  gap: 12px;
}

.contact-phone-item:hover {
  background: #f8f9fa;
}

.contact-phone-item+.contact-phone-item {
  border-top: 1px solid #f3f4f6;
}

/* Staff structure list (contact page) — one person per row */
.staff-structure-group__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a2e;
  border-left: 3px solid var(--kmutt-orange, #f04e23);
  padding-left: 10px;
  margin-bottom: 8px;
}

.staff-structure-list {
  display: flex;
  flex-direction: column;
}

.staff-structure-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.staff-structure-item:hover {
  background: #f8f9fa;
}

.staff-structure-item + .staff-structure-item {
  border-top: 1px solid #f3f4f6;
}

.staff-structure-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.staff-structure-detail {
  min-width: 0;
}

.staff-structure-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #212529;
  line-height: 1.4;
}

.staff-structure-position {
  font-size: 0.78rem;
  color: #6c757d;
  line-height: 1.4;
}

.staff-structure-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 3px;
}

.staff-structure-link {
  font-size: 0.78rem;
  color: #6c757d;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* อีเมลยาวกว่าคอลัมน์ — ตัดคำแทนการดันหน้าให้ล้น */
  overflow-wrap: anywhere;
}

.staff-structure-link:hover {
  color: var(--kmutt-orange, #f04e23);
}

.contact-phone-dept {
  font-size: 0.85rem;
  color: #555;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.contact-phone-number {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #28a745;
  text-decoration: none;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 4px 14px;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.contact-phone-number:hover {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
  transform: translateY(-1px);
}

/* --- Mobile Responsiveness Adjustments --- */
@media (max-width: 767.98px) {

  /* Fix banner text overflow */
  .site-name {
    font-size: 1.1rem;
    white-space: normal;
  }

  .site-sub {
    font-size: 0.75rem;
    white-space: normal;
  }

  .site-logo {
    height: 40px;
  }

  /* Constrain carousel height on mobile */
  .carousel-item img {
    height: 350px !important;
  }

  /* Show and adjust carousel caption on mobile */
  .custom-caption {
    bottom: 15%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    margin: 0 10%;
  }

  .custom-caption h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
  }

  .custom-caption p {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
}

@media (max-width: 575.98px) {

  /* Smaller screens */
  .site-name {
    font-size: 0.95rem;
  }

  .site-sub {
    font-size: 0.65rem;
  }

  .site-logo {
    height: 35px;
  }

  .carousel-item img {
    height: 250px !important;
  }
}

/* --- Modern Layout Updates --- */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.news-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.news-card .news-preview-img {
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-preview-img {
  transform: scale(1.05);
}

.shortcut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: #fff;
  border-radius: 16px;
  text-decoration: none;
  color: var(--kmutt-dark);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.shortcut-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(240, 78, 35, 0.15);
  color: var(--kmutt-orange);
  border-color: rgba(240, 78, 35, 0.3);
}

.shortcut-icon {
  font-size: 2.5rem;
  color: var(--kmutt-orange);
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.shortcut-card:hover .shortcut-icon {
  transform: scale(1.15) rotate(5deg);
}

.shortcut-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.agency-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  height: 100px;
  transition: all 0.3s ease;
  filter: grayscale(100%);
  opacity: 0.7;
}

.agency-card:hover {
  filter: grayscale(0%);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #fff;
  transform: translateY(-3px);
}

.agency-card img {
  max-width: 100%;
  max-height: 100%;
  flex-direction: column;
  gap: 0;
}

.contact-phone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s;
  gap: 12px;
}

.contact-phone-item:hover {
  background: #f8f9fa;
}

.contact-phone-item+.contact-phone-item {
  border-top: 1px solid #f3f4f6;
}

.contact-phone-dept {
  font-size: 0.85rem;
  color: #555;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.contact-phone-number {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #28a745;
  text-decoration: none;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 4px 14px;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.contact-phone-number:hover {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
  transform: translateY(-1px);
}

/* --- Mobile Responsiveness Adjustments --- */
@media (max-width: 767.98px) {

  /* Fix banner text overflow */
  .site-name {
    font-size: 1.1rem;
    white-space: normal;
  }

  .site-sub {
    font-size: 0.75rem;
    white-space: normal;
  }

  .site-logo {
    height: 40px;
  }

  /* Constrain carousel height on mobile */
  .carousel-item img {
    height: 350px !important;
  }

  /* Show and adjust carousel caption on mobile */
  .custom-caption {
    bottom: 15%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    margin: 0 10%;
  }

  .custom-caption h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
  }

  .custom-caption p {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
}

@media (max-width: 575.98px) {

  /* Smaller screens */
  .site-name {
    font-size: 0.95rem;
  }

  .site-sub {
    font-size: 0.65rem;
  }

  .site-logo {
    height: 35px;
  }

  .carousel-item img {
    height: 250px !important;
  }
}

/* --- Modern Layout Updates --- */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.news-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.news-card .news-preview-img {
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-preview-img {
  transform: scale(1.05);
}

.shortcut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: #fff;
  border-radius: 16px;
  text-decoration: none;
  color: var(--kmutt-dark);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.shortcut-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(240, 78, 35, 0.15);
  color: var(--kmutt-orange);
  border-color: rgba(240, 78, 35, 0.3);
}

.shortcut-icon {
  font-size: 2.5rem;
  color: var(--kmutt-orange);
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.shortcut-card:hover .shortcut-icon {
  transform: scale(1.15) rotate(5deg);
}

.shortcut-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.agency-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  height: 100px;
  transition: all 0.3s ease;
  filter: grayscale(100%);
  opacity: 0.7;
}

.agency-card:hover {
  filter: grayscale(0%);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #fff;
  transform: translateY(-3px);
}

.agency-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Override bold/700 to 600 globally */
.fw-bold,
b,
strong {
  font-weight: 600 !important;
}

h1,
h2,
.h1,
.h2 {
  font-weight: 600 !important;
}

/* --- 14. Modern Table Styles (Frontend) --- */
.modern-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.modern-table th {
  background-color: #f8f9fa;
  color: #6c757d;
  font-weight: 600 !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid #e9ecef !important;
  border-top: none !important;
}

.modern-table td {
  padding: 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f5 !important;
  background-color: #ffffff;
  transition: background-color 0.2s ease;
}

.modern-table tbody tr:hover td {
  background-color: #fcfcfc;
}

.modern-table tbody tr:last-child td {
  border-bottom: none !important;
}

/* Override DataTables borders */
table.dataTable.no-footer {
  border-bottom: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
}

/* File Button Styling */
.modern-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  color: #495057;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.modern-file-btn:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: var(--kmutt-orange);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #495057;
  text-decoration: none;
  transition: all 0.2s;
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.file-btn:hover {
  background: #e9ecef;
  color: var(--kmutt-orange);
  border-color: #ced4da;
  transform: translateY(-1px);
}

.file-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ==================== PROCUREMENT NEWS — VIEW DETAILS BUTTON ==================== */
.btn-view-proj {
  background-color: var(--kmutt-orange);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 16px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-view-proj:hover,
.btn-view-proj:focus {
  background-color: #d03c16;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(240, 78, 35, 0.3);
}

.btn-view-proj:active {
  transform: translateY(0);
  box-shadow: none;
}

.proj-file-btn {
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 6px;
}

/* ==================== PROCUREMENT NEWS — PROJECT DETAIL MODAL ==================== */
.proj-modal-header {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
  color: white;
}

.proj-detail-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.proj-budget-box {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
  color: white;
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
  display: inline-block;
  min-width: 180px;
}

.proj-budget-label {
  font-size: 0.72rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.proj-budget-amount {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.proj-budget-unit {
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 2px;
}

.proj-info-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  height: 100%;
}

.proj-info-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 5px;
}

.proj-info-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.proj-annc-section-title {
  color: #1a3a5c;
}

.proj-annc-table thead th {
  background-color: #1a3a5c;
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  padding: 10px 12px;
}

.proj-annc-table tbody tr:hover {
  background-color: #f0f7ff;
}

.proj-annc-table tbody td {
  vertical-align: middle;
  border-color: #e9ecef;
  font-size: 0.875rem;
}

@media (max-width: 767.98px) {
  .proj-budget-box {
    min-width: 100%;
    margin-top: 10px;
  }
}
/* ───── Latest procurement announcements (homepage compact cards) ───── */
.latest-ann-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.latest-ann-card:hover {
  border-color: var(--kmutt-orange);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.latest-ann-card .ann-date {
  width: 72px;
  background: #fff4f0;
  border-radius: 8px;
  padding: 0.35rem 0.25rem;
}

.latest-ann-card .ann-day {
  font-size: 1.4rem;
  color: var(--kmutt-orange);
}

.latest-ann-card .ann-date-my {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6c757d;
  margin-top: 2px;
}

.latest-ann-card .ann-title:hover {
  color: var(--kmutt-orange) !important;
}

.latest-ann-card .ann-action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8f9fa;
  text-decoration: none;
  transition: background 0.2s ease;
}

.latest-ann-card .ann-action:hover {
  background: #ffe9e2;
}
