/* ==========================================================
   สำนักงานวิทยาเขตปัตตานี — main stylesheet
   PSU brand colors: Deep Blue #003C71 / Sky Blue #009CDE /
   Ocean Blue #315DAE / Andaman Blue #0085AD / River Blue #59CBE8
   ========================================================== */

:root {
  --primary: #003C71;
  --primary-dark: #00243F;
  --primary-light: #315DAE;
  --accent: #009CDE;
  --accent-dark: #0085AD;
  --river: #59CBE8;
  --sritrang: #B6B8DC;
  --ink: #102132;
  --gray-600: #617080;
  --gray-400: #97a4b0;
  --gray-200: #E2EAF0;
  --gray-100: #F3F8FB;
  --bg: #ffffff;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 8px 20px rgba(0,60,113,.08);
  --shadow: 0 18px 50px rgba(0,60,113,.10);
  --shadow-lg: 0 24px 60px rgba(0,60,113,.18);
  --container: 1240px;
  --header-h: 80px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* overflow-x is intentionally NOT set on html/body: Safari fails to compute
   position:sticky (see #site-header below) when any ancestor of the sticky
   element has overflow set to anything but visible. The horizontal-scroll
   guard instead lives on .page-shell, which wraps everything except the
   header so the header keeps a clean, unclipped ancestor chain. */
body {
  margin: 0;
  font-family: 'IBM Plex Sans Thai', 'Prompt', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; }
p { margin: 0 0 1em; color: var(--gray-600); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Everything except the sticky header lives in here — keeps overflow-x:hidden
   off html/body so Safari's position:sticky bug (see #site-header) never triggers. */
.page-shell { overflow-x: hidden; }

.topline { height: 4px; background: linear-gradient(90deg, var(--primary), var(--primary-light) 48%, var(--accent) 78%, var(--river)); }

/* ---------- Header / Nav ---------- */
#site-header {
  position: sticky; top: 0; z-index: 900;
  height: var(--header-h);
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
}
#site-header .header-inner {
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; font-weight: 700; color: var(--ink); min-width: 0; }
.brand .brand-badge {
  width: 48px; height: 48px; border-radius: 16px; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 8px;
}
.brand .brand-badge img { width: 100%; height: 100%; object-fit: contain; }
.brand .brand-text { line-height: 1.25; font-size: 16px; }
.brand .brand-text small { display: block; font-weight: 400; color: var(--gray-600); font-size: 11px; margin-top: 3px; }

#nav-toggle { display: none; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-menu > li { position: relative; }
.nav-menu > li > a, .nav-menu > li > button {
  display: flex; align-items: center; gap: 4px; position: relative;
  padding: 28px 14px; font-size: 14px; font-weight: 500;
  color: #44576A; background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-menu > li > a:hover, .nav-menu > li > button:hover,
.nav-menu > li > a.active, .nav-menu > li > button.active { color: var(--primary); }
.nav-menu > li > a.active::after, .nav-menu > li > button.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 21px; height: 2px;
  background: var(--primary); border-radius: 10px;
}
.nav-menu .dropdown { position: relative; }
.nav-menu .dropdown-panel {
  position: absolute; top: calc(100% - 8px); left: 0; min-width: 260px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .18s ease;
  /* No overflow/max-height here: the หน่วยงาน flyout (.dropdown-subpanel) is
     positioned absolutely relative to a child of this panel and must be able
     to render outside its box. Clipping it here made the flyout invisible
     even though :hover was toggling it correctly. */
}
.nav-menu .dropdown:hover .dropdown-panel,
.nav-menu .dropdown.open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink); }
.dropdown-panel a:hover { background: var(--gray-100); color: var(--primary); }

/* กอง/ศูนย์ -> หน่วยงาน flyout submenu */
.dropdown-item-wrap { position: relative; display: flex; align-items: stretch; }
.dropdown-item-wrap .dropdown-main-link { flex: 1; }
.dropdown-sub-toggle {
  border: none; background: none; cursor: pointer; color: var(--gray-600);
  padding: 0 10px; display: flex; align-items: center; border-radius: var(--radius-sm);
}
.dropdown-sub-toggle:hover { background: var(--gray-100); color: var(--primary); }
.dropdown-subpanel {
  position: absolute; left: 100%; top: -8px; min-width: 240px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateX(-6px);
  transition: .18s ease; max-height: 60vh; overflow-y: auto; z-index: 1;
}
.dropdown-item-wrap:hover .dropdown-subpanel,
.dropdown-item-wrap.open .dropdown-subpanel { opacity: 1; visibility: visible; transform: translateX(0); }
.dropdown-subpanel a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink); }
.dropdown-subpanel a:hover { background: var(--gray-100); color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions button {
  border: 1px solid var(--gray-200); background: #fff; border-radius: 12px;
  height: 40px; padding: 0 14px; cursor: pointer; color: #3B5368; font-size: 13px; font-family: inherit;
}
.nav-actions .search-btn { width: 40px; padding: 0; display: grid; place-items: center; font-size: 15px; }

.hamburger { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--gray-200); background: #fff; align-items: center; justify-content: center; cursor: pointer; }
.hamburger span, .hamburger span::before, .hamburger span::after {
  content: ''; display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: .2s;
}
.hamburger span::before { position: absolute; top: -6px; }
.hamburger span::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
  /* backdrop-filter on #site-header makes it the containing block for its
     position:fixed descendants (per spec) — that traps .nav-menu's fixed
     overlay inside the header's own 80px-tall box instead of the viewport,
     collapsing it to zero height and making the mobile menu untappable.
     Only needed on mobile since .nav-menu only becomes fixed here. */
  #site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease;
  }
  #nav-toggle:checked ~ .nav-menu { transform: translateX(0); }
  .nav-menu > li > a, .nav-menu > li > button { width: 100%; padding: 13px 12px; border-radius: var(--radius-sm); justify-content: space-between; }
  .nav-menu > li > a.active::after, .nav-menu > li > button.active::after { display: none; }
  .nav-menu .dropdown-panel {
    position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none;
    max-height: 0; overflow: hidden; padding: 0 0 0 12px; transition: max-height .2s ease;
  }
  .nav-menu .dropdown.open .dropdown-panel { max-height: 1000px; padding: 4px 0 8px 12px; }
  .hamburger { display: flex; }

  /* Flyouts can't hover on touch — fall back to a static indented list that
     expands in place when the sub-toggle chevron is tapped. */
  .dropdown-item-wrap { flex-wrap: wrap; }
  .dropdown-subpanel {
    position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none;
    max-height: 0; overflow: hidden; width: 100%; padding: 0 0 0 14px; transition: max-height .2s ease;
  }
  .dropdown-item-wrap.open .dropdown-subpanel { max-height: 600px; padding: 4px 0 6px 14px; }
}

/* ---------- Search overlay ---------- */
.search-panel {
  position: fixed; inset: 0; background: rgba(0,35,66,.56); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  z-index: 1000; display: none; align-items: flex-start; justify-content: center; padding-top: 110px;
}
.search-panel.open { display: flex; }
.search-box { width: min(680px, calc(100% - 30px)); background: #fff; border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lg); }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 13px 15px; font: inherit; outline: none; }
.search-row button { border: 1px solid var(--gray-200); background: #fff; border-radius: var(--radius-sm); padding: 0 18px; cursor: pointer; font: inherit; }

/* ---------- Hero ---------- */
.hero { padding: 0 0 24px; }
.hero-photo {
  position: relative; overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw);
  aspect-ratio: 3 / 1; background: var(--gray-200);
  animation: heroWipe 1.1s cubic-bezier(.22,.61,.36,1) both;
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center bottom;
  animation: heroZoom 1.3s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes heroWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes heroZoom { from { transform: scale(1.12); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 700px) {
  .hero-photo { aspect-ratio: 4 / 3; }
}

/* ---------- Quick-access row ---------- */
.quick { padding: 18px 0 64px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-card { padding: 22px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff; transition: .22s; }
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.quick-card .icon { width: 44px; height: 44px; border-radius: 13px; background: var(--gray-100); color: var(--primary); display: grid; place-items: center; font-size: 19px; margin-bottom: 15px; }
.quick-card strong { display: block; font-size: 15px; margin-bottom: 3px; color: var(--ink); }
.quick-card span { font-size: 12px; color: var(--gray-600); }
@media (max-width: 900px) { .quick-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 500px) { .quick-grid { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--gray-100); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head .eyebrow-label { color: var(--primary); font-weight: 700; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 7px; display: block; }
.section-head h2 { font-size: clamp(26px, 3.8vw, 40px); }
.section-head p { color: var(--gray-600); font-size: 14px; max-width: 460px; margin: 0; }
.section-head .view-all { font-size: 13px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.section-head .view-all:hover { color: var(--accent-dark); }

/* ---------- Slide / banner carousel ---------- */
.slide-section { padding: 28px 0 0; }
.hero-slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.slide-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.slide-track::-webkit-scrollbar { display: none; }
.slide-item { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1080 / 450; background: var(--gray-100); display: block; }
.slide-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9); color: var(--primary); display: grid; place-items: center;
  font-size: 17px; cursor: pointer; box-shadow: var(--shadow-sm); z-index: 2; transition: .2s;
}
.slide-nav:hover { background: #fff; color: var(--accent-dark); }
.slide-nav.prev { left: 16px; }
.slide-nav.next { right: 16px; }
.slide-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 7px; z-index: 2; }
.slide-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; transition: .2s; }
.slide-dots button.active { background: #fff; width: 22px; border-radius: 5px; }
@media (max-width: 700px) {
  .slide-item { aspect-ratio: 16 / 9; }
  .slide-nav { width: 34px; height: 34px; font-size: 15px; }
}

/* ---------- News ---------- */
.news-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.news-featured {
  border: 1px solid var(--gray-200); border-radius: 26px; overflow: hidden; background: #fff;
  min-height: 380px; position: relative; display: flex; flex-direction: column;
}
.news-featured-top {
  height: 220px; background: linear-gradient(135deg, #E8F5FB, #AFCFE3); position: relative; overflow: hidden;
}
.news-featured-top::before {
  content: "NEWS"; position: absolute; right: -10px; bottom: -30px; font-size: 140px; line-height: 1;
  font-weight: 700; color: rgba(255,255,255,.45); letter-spacing: -.06em;
}
.news-featured-body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.news-featured .date { font-size: 11px; color: var(--primary); font-weight: 700; }
.news-featured h3 { font-size: 22px; line-height: 1.3; margin: 9px 0 10px; }
.news-featured p { color: var(--gray-600); font-size: 14px; }

.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item {
  display: grid; grid-template-columns: 68px 1fr; gap: 14px; padding: 16px;
  border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff; transition: .2s;
}
.news-item:hover { border-color: transparent; box-shadow: var(--shadow-sm); transform: translateX(3px); }
.news-date { background: var(--gray-100); border-radius: 14px; display: grid; place-items: center; padding: 8px; text-align: center; height: 62px; color: var(--primary); }
.news-date b { font-size: 19px; line-height: 1; }
.news-date small { font-size: 10px; color: var(--gray-600); }
.news-item h4 { font-size: 14px; line-height: 1.4; margin-bottom: 4px; font-weight: 500; color: var(--ink); }
.news-source { font-size: 11.5px; color: var(--gray-400); margin: 0; }
.news-empty { padding: 24px; text-align: center; color: var(--gray-600); background: var(--gray-100); border-radius: var(--radius); }

@media (max-width: 1050px) { .news-layout { grid-template-columns: 1fr; } }

/* ---------- Cards grid (services / departments) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.service-card {
  min-height: 190px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; justify-content: space-between; transition: .22s; text-align: left;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service-card .arrow { color: var(--primary); font-size: 20px; }
.service-card .icon-wrap {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 14px;
  background: var(--gray-100); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.service-card .icon-wrap img { width: 60%; height: 60%; object-fit: contain; }
.service-card h4 { font-size: 16px; line-height: 1.3; margin: 0 0 7px; color: var(--ink); }
.service-card p { color: var(--gray-600); font-size: 13px; margin: 0; }

.dept-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
.dept-row {
  border-top: 1px solid var(--gray-200); padding: 22px 0; display: flex;
  align-items: flex-start; justify-content: space-between; gap: 14px; transition: .18s;
}
.dept-row:hover { color: var(--primary); }
.dept-row b { font-size: 15.5px; line-height: 1.4; color: var(--ink); }
.dept-row .arrow { color: var(--primary); font-size: 18px; flex-shrink: 0; }
@media (max-width: 900px) { .dept-list { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .dept-list { grid-template-columns: 1fr; } }

/* ---------- About (dark section) ---------- */
.about { background: var(--primary); color: #fff; overflow: hidden; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.about .section-head .eyebrow-label { color: var(--river); }
.about h2 { color: #fff; }
.about p { color: #CFE1EA; font-weight: 300; max-width: 540px; margin: 18px 0 0; }
.about .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.about .stat { border-left: 1px solid rgba(89,203,232,.3); padding-left: 14px; display: flex; align-items: center; min-height: 40px; }
.about .stat span { display: block; color: #fff; font-size: 14.5px; font-weight: 500; }
.about-art {
  height: 380px; border-radius: var(--radius-lg);
  background: radial-gradient(circle at 65% 35%, rgba(89,203,232,.22), transparent 35%), linear-gradient(140deg, #0A4D78, #003C71);
  border: 1px solid rgba(255,255,255,.08); position: relative; overflow: hidden;
}
.about-art::before { content: "PSU"; position: absolute; font-size: 150px; font-weight: 700; letter-spacing: -.06em; color: rgba(255,255,255,.05); right: -10px; bottom: -14px; }
.about-art::after { content: "PATTANI CAMPUS"; position: absolute; left: 24px; bottom: 24px; color: #DDF4FF; font-size: 11px; letter-spacing: .14em; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .about-art { height: 260px; } }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 32px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px;
}
.contact-card h3 { font-size: 24px; line-height: 1.25; margin-bottom: 10px; }
.contact-card p { font-size: 13.5px; color: var(--gray-600); }
.contact-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-item { padding: 15px 16px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--gray-200); }
.contact-item small { display: block; color: var(--gray-600); font-size: 10.5px; margin-bottom: 3px; }
.contact-item b { font-size: 13px; font-weight: 500; }
.contact-map { margin-top: 18px; border-radius: var(--radius-lg); overflow: hidden; }
.contact-map iframe { width: 100%; height: 320px; border: 0; display: block; }
@media (max-width: 900px) { .contact-card { grid-template-columns: 1fr; } .contact-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .contact-list { grid-template-columns: 1fr; } .contact-map iframe { height: 240px; } }

/* ---------- Footer ---------- */
#site-footer { background: var(--primary-dark); color: rgba(255,255,255,.82); padding: 48px 0 0; margin-top: 40px; }
#site-footer h3, #site-footer h4 { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-grid p { color: rgba(255,255,255,.7); font-size: 14px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--river); }
.social-links { display: flex; gap: 10px; margin-top: 14px; }
.social-links a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.social-links a:hover { background: var(--river); color: var(--primary-dark); }
.footer-bottom { padding: 16px 0; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.5); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- Utilities ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px;
  border-radius: 14px; font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: #fff; color: var(--primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.16); }
.btn-ghost { border-color: rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost:hover { background: rgba(255,255,255,.15); }

/* ==========================================================
   Detail pages (dept-details / sect-details) — these still
   reuse Bootstrap's grid/utility classes (row, col-lg-*, d-flex)
   for layout; the rules below only reskin components, they
   don't replace the grid.
   ========================================================== */

#breadcrumbs { padding: 28px 0 8px; }
#breadcrumbs h2, #breadcrumbs h3 { font-size: clamp(20px, 3vw, 28px); margin: 0; }
#breadcrumbs ol { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; list-style: none; padding: 0; }
#breadcrumbs ol li { font-size: 13px; color: var(--gray-600); display: flex; align-items: center; gap: 8px; }
#breadcrumbs ol li:not(:last-child)::after { content: '/'; color: var(--gray-400); }
#breadcrumbs ol li a { color: var(--primary); font-weight: 500; }
#breadcrumbs ol li a:hover { color: var(--accent-dark); text-decoration: underline; }

#blog { padding: 8px 0 64px; }
#blog > .row > div { max-width: var(--container); margin: 0 auto; padding: 0 20px; float: none; width: 100%; }
.entry > center img { border-radius: var(--radius); margin-bottom: 8px; }

.section-title { text-align: left; margin: 40px 0 24px; }
.section-title h2 {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 4px;
}
.section-title p { font-size: clamp(20px, 3vw, 26px); font-weight: 600; color: var(--ink); margin: 0; }

.entry-content {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 28px; line-height: 1.8;
}
.entry-content img { border-radius: var(--radius-sm); }
.entry-meta { margin-top: 14px; }
.entry-meta ul { display: flex; gap: 20px; flex-wrap: wrap; }
.entry-meta li { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--gray-600); }
.entry-title { color: var(--primary); font-size: clamp(22px, 3vw, 30px); margin-bottom: 16px; }

/* ---- sidebar (news-detail) ---- */
.sidebar { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 22px; }
.sidebar-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-200); }
.sidebar-item { margin-bottom: 20px; }
.sidebar-item:last-child { margin-bottom: 0; }
.sidebar-item.categories ul li { margin-bottom: 8px; }
.sidebar-item.categories ul li a { font-size: 13.5px; color: var(--gray-600); }
.sidebar-item.categories ul li a:hover { color: var(--primary); }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; outline: none; }
.search-form button { border: none; background: var(--primary); color: #fff; border-radius: var(--radius-sm); width: 42px; cursor: pointer; }
.search-form button:hover { background: var(--primary-dark); }

/* ---- contact page ---- */
.contact .info { display: flex; flex-direction: column; gap: 16px; }
.contact .info > div { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 22px; }
.contact .info i { font-size: 22px; color: var(--primary); margin-bottom: 10px; display: block; }
.contact .info h4 { font-size: 15px; margin-bottom: 4px; font-weight: 600; }
.contact iframe { border-radius: var(--radius-lg); }

/* ---- 404 ---- */
.wrapper_404 { padding: 100px 0 120px; text-align: center; }
.wrapper_404 h1 { font-size: clamp(64px, 11vw, 130px); color: var(--primary); font-weight: 700; margin-bottom: 0; line-height: 1; }
.wrapper_404 h2 { font-size: 20px; color: var(--ink); margin: 14px 0 8px; }
.wrapper_404 p { color: var(--gray-600); margin-bottom: 26px; }
.btn-home { background: var(--primary); color: #fff; }
.btn-home:hover { background: var(--primary-dark); }

/* ---- staff / team cards ---- */
.team { padding: 8px 0; }
.team .row { row-gap: 24px; }
.member {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 30px 22px; gap: 6px; height: 100%; transition: .2s;
  flex-direction: column !important; align-items: center !important; text-align: center;
}
.member:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-3px); }
.member .pic { flex-shrink: 0; margin-bottom: 8px; }
.member .pic img {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--gray-100);
}
.member-info { width: 100%; }
.member-info h4 { font-size: 18px; line-height: 1.35; margin-bottom: 4px; color: var(--ink); font-weight: 600; }
.member-info span { font-size: 15px; color: var(--primary); font-weight: 500; display: block; margin-bottom: 12px; }
.member-info p {
  font-size: 14.5px; margin-bottom: 6px; display: flex; align-items: center;
  justify-content: center; gap: 7px; color: var(--gray-600); word-break: break-word;
}
.member-info h4 b { font-weight: 600; }

/* ---- services inside a department/section page ---- */
.services .icon-box {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 20px; text-align: center; height: 200px !important; overflow: hidden !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; transition: .18s;
}
.services .icon-box:hover { box-shadow: var(--shadow); border-color: transparent; }
.services .icon-box img { max-height: 60px; width: auto !important; object-fit: contain; margin-bottom: 10px; }
.services .icon-box h4 { font-size: 15px; margin-bottom: 6px; }
.services .icon-box p { font-size: 13px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- documents accordion ---- */
.accordion-button { font-weight: 500; }
.accordion-button:not(.collapsed) { color: var(--primary); background: var(--gray-100); }
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(0,60,113,.15); }
.accordion-item { border-color: var(--gray-200); border-radius: var(--radius-sm) !important; overflow: hidden; margin-bottom: 8px; }
.accordion-body a { display: block; padding: 6px 0; color: var(--ink); }
.accordion-body a:hover { color: var(--primary); }
