/* Front-end visual refresh: keeps the existing orange/white identity. */
:root {
  --op-orange: #f77100;
  --op-orange-dark: #d65f00;
  --op-ink: #1b1a1a;
  --op-muted: #6f6f6f;
  --op-line: #e9e9e9;
  --op-soft: #fff8f2;
  --op-radius: 14px;
  --op-shadow: 0 10px 30px rgba(37, 37, 37, .08);
}

html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  color: var(--op-ink);
  font-family: 'Kanit', 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  background: #fff;
}

/* Keep the footer at the bottom when a page has little content.
   Longer pages still grow naturally and remain scrollable. */
.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrapper > .footer { margin-top: auto; }

h1, h2, h3, h4, h5, h6, button, .nav__item-link { font-family: 'Kanit', 'Roboto', sans-serif; }

.op-navbar {
  height: 82px;
  max-height: 82px;
  border-bottom: 1px solid var(--op-line);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}
.op-navbar > .container { height: 82px; }
.op-brand-wrap {
  flex: 0 0 190px;
  max-width: 190px;
  background: var(--op-orange);
}
.op-navbar .logo-header { max-height: 68px; width: auto; }
.op-navbar .navbar-brand { line-height: 82px; }
.op-navbar .nav__item { margin-right: 20px; }
.op-navbar .nav__item .nav__item-link {
  line-height: 82px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}
.op-navbar .nav__item .nav__item-link:before {
  height: 3px;
  background: var(--op-orange);
}
.op-navbar .dropdown-menu {
  border: 1px solid var(--op-line);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--op-shadow);
}

.op-home-hero {
  position: relative;
  min-height: 620px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #3c2d25;
}
.op-home-hero > .bg-img { position: absolute; inset: 0; }
.op-home-hero > .bg-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: .88;
}
.op-home-hero:after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(23, 19, 17, .72), rgba(23, 19, 17, .22));
}
.op-home-hero > .container { position: relative; z-index: 1; padding: 96px 15px; }
.op-hero-intro {
  max-width: 920px;
  padding: 38px 42px;
  color: #fff;
  background: rgba(255,255,255,.12);
  border-left: 4px solid var(--op-orange);
  border-radius: 0 var(--op-radius) var(--op-radius) 0;
  backdrop-filter: blur(3px);
}
.op-hero-intro .pagetitle__heading { margin: 0 0 4px; color: #fff; font-size: clamp(28px, 4vw, 48px); line-height: 1.25; }
.op-hero-intro h4:nth-child(2) {
  margin: 0;
  color: rgba(255,255,255,.92);
  font-size: clamp(17px, 2.3vw, 30px);
  white-space: nowrap;
}
.op-hero-content { margin-top: 34px; max-width: 680px; }
.op-hero-content .contact-panel {
  padding: 28px 32px;
  color: var(--op-ink);
  background: rgba(255,255,255,.96);
  border-radius: var(--op-radius);
  box-shadow: var(--op-shadow);
}
.op-hero-content .contact-panel__title { color: var(--op-orange-dark); font-size: 22px; line-height: 1.55; }
.op-hero-content .contact-panel__desc { color: var(--op-muted); margin-bottom: 0; }

.op-quick-links {
  padding: 68px 0 76px !important;
  background: var(--op-soft);
}
.op-quick-links .row { row-gap: 24px; }
.op-quick-link {
  display: block; height: 100%; padding: 26px 18px 22px;
  color: var(--op-ink); background: #fff;
  border: 1px solid var(--op-line); border-radius: var(--op-radius);
  box-shadow: 0 4px 16px rgba(37,37,37,.03);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.op-quick-link:hover { color: var(--op-orange-dark); border-color: rgba(247,113,0,.35); box-shadow: var(--op-shadow); transform: translateY(-5px); }
.op-quick-link .fancybox__icon { width: 66px !important; height: 66px !important; margin: 0 auto 14px !important; line-height: 66px !important; box-shadow: none !important; }
.op-quick-link .fancybox__title { margin: 0; font-size: 18px; }
.op-quick-link i { color: var(--op-orange) !important; font-size: 30px; }
.op-quick-link:hover i { color: #fff !important; }
.op-quick-link:hover .fancybox__icon { background: var(--op-orange); }

.footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 104px;
  background: #242424 !important;
  color: rgba(255,255,255,.8) !important;
}
.footer .footer-bottom {
  display: block !important;
  min-height: 104px;
  padding: 28px 0 !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
}
.footer .footer__copyright,
.footer .footer__copyright p {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: rgba(255,255,255,.82) !important;
}
.footer .footer__copyright p { line-height: 1.7; }
.footer .footer__copyright-subtitle { color: rgba(255,255,255,.52) !important; font-size: 13px; }
.footer a:hover { color: var(--op-orange); }

/* Keep the original scroll-to-top behavior and appearance. */
#scrollTopBtn {
  position: fixed;
  right: 10px;
  bottom: 30px;
  width: 45px;
  height: 45px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: var(--op-orange);
  overflow: hidden;
  cursor: pointer;
  transition: all .3s ease-in-out;
}
#scrollTopBtn:hover { background: #000; }
#scrollTopBtn.actived { right: 30px; opacity: 1; visibility: visible; }
@media (max-width: 575px) {
  #scrollTopBtn { bottom: 20px; width: 30px; height: 30px; font-size: 14px; }
  #scrollTopBtn.actived { right: 20px; }
}

.page-title .row { border-radius: var(--op-radius); overflow: hidden; }
.page-title .pagetitle__heading { font-size: clamp(28px, 4vw, 44px); }
.breadcrumb { font-size: 14px; }

/* Shared breadcrumb banner: keeps every inner page consistent with organization.php. */
.page-title.page-title-layout1 {
  position: relative;
  min-height: 330px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 70px 0;
  background: #3c2d25;
}
.page-title.page-title-layout1::before {
  z-index: 1;
  background: linear-gradient(90deg, rgba(31,24,20,.78), rgba(31,24,20,.28)) !important;
}
.page-title.page-title-layout1 > .bg-img,
.page-title.page-title-layout1 > .bg-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.page-title.page-title-layout1 > .bg-img { z-index: 0; }
.page-title.page-title-layout1 > .bg-img img { object-fit: cover; object-position: center; }
.page-title.page-title-layout1 > .container { position: relative; z-index: 2; }
.page-title.page-title-layout1 > .container > .row {
  width: calc(100% - 30px);
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  padding: 30px 34px 25px;
  border-left: 4px solid var(--op-orange);
  border-radius: 0 16px 16px 0;
  background: rgba(255,255,255,.12) !important;
  box-shadow: 0 16px 35px rgba(0,0,0,.12);
  backdrop-filter: blur(4px);
}
.page-title.page-title-layout1 > .container > .row > [class*="col-"] {
  flex: 0 0 100%;
  max-width: 100%;
  margin-left: 0;
}
.page-title.page-title-layout1 .pagetitle__heading {
  margin-bottom: 10px;
  color: #fff;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.page-title.page-title-layout1 .breadcrumb {
  display: flex;
  width: 100%;
  margin: 0;
  padding-left: 0;
  white-space: normal;
  font-size: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.page-title.page-title-layout1 .breadcrumb-item {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}
.page-title.page-title-layout1 .col-sm-12 {
  text-align: center;
}
.page-title.page-title-layout1 .breadcrumb-item,
.page-title.page-title-layout1 .breadcrumb-item::before,
.page-title.page-title-layout1 .breadcrumb-item a,
.page-title.page-title-layout1 .breadcrumb-item.active {
  color: rgba(255,255,255,.86) !important;
}
.page-title.page-title-layout1 .breadcrumb-item a:hover { color: #fff !important; }

/* Keep the current page visible in the breadcrumb on every inner page. */
.page-title .breadcrumb-item.active {
  color: var(--op-orange, #F77100) !important;
}
.page-title.page-title-layout1 .breadcrumb-item.active {
  color: var(--op-orange, #F77100) !important;
}

@media (max-width: 575px) {
  .page-title.page-title-layout1 { min-height: 280px; padding: 48px 0; }
  .page-title.page-title-layout1 > .container > .row { padding: 24px 20px 18px; }
  .page-title.page-title-layout1 .pagetitle__heading { white-space: normal; font-size: clamp(26px, 8vw, 34px); }
  .page-title.page-title-layout1 .breadcrumb { white-space: normal; font-size: 16px; }
}

/* Director page: scoped replacement for the legacy float-based tab styles. */
.director-page .tab {
  float: none;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 0;
  border: 0;
  background: transparent;
}
.director-page .tablinks {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--op-line);
  border-radius: 9px;
  background: #fff;
  color: var(--op-muted);
  font-family: 'Kanit', 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.director-page .tablinks:hover,
.director-page .tablinks.active {
  color: #fff;
  background: var(--op-orange);
  border-color: var(--op-orange);
}
.director-page .tabcontent {
  float: none;
  width: 100%;
  padding: 0;
  border: 0;
  font-family: 'Kanit', 'Roboto', sans-serif;
}
.director-page .tabcontent > h5 {
  margin: 0 0 24px;
  color: var(--op-ink);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.35;
}
.director-page .tabcontent .row { row-gap: 24px; }
.director-page .member {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--op-line) !important;
  border-radius: var(--op-radius);
  background: #fff;
  box-shadow: 0 4px 16px rgba(37,37,37,.04);
  transition: transform .25s ease, box-shadow .25s ease;
}
.director-page .member:hover { transform: translateY(-4px); box-shadow: var(--op-shadow); }
.director-page .member__img {
  min-height: 260px;
  aspect-ratio: 3 / 4;
  background: #fafafa;
}
.director-page .member__img img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}
.director-page .member__info { padding: 18px 18px 20px; }
.director-page .member__name { margin: 0 0 6px; color: var(--op-ink); font-size: 20px; font-weight: 600; }
.director-page .member__desc { margin: 0; color: var(--op-muted); font-size: 15px; line-height: 1.6; }
.director-page .member__detail { color: var(--op-muted); font-size: 14px; line-height: 1.7; }

/* Keep the director tabs visually consistent with the role page. */
.director-page {
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
}
.director-page > .container { max-width: 1120px; }
.director-page .tab {
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(47, 35, 28, .08);
}
.director-page .tablinks {
  min-height: 58px;
  border: 0;
  border-radius: 11px;
  color: var(--op-ink);
  font-size: 16px;
  font-weight: 500;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.director-page .tablinks:hover,
.director-page .tablinks:focus-visible {
  color: var(--op-orange-dark);
  background: #fff1e5;
}
.director-page .tablinks.active {
  color: #fff;
  background: linear-gradient(135deg, var(--op-orange), #ff9a45);
  box-shadow: 0 6px 14px rgba(244, 119, 33, .25);
}
.director-page .tabcontent {
  padding: 28px clamp(16px, 3vw, 38px) 34px;
  border: 1px solid #f0dfd1;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 32px rgba(47, 35, 28, .06);
}
.director-page .tabcontent > h5 {
  margin: 0 0 24px;
  padding: 10px 16px;
  border-left: 4px solid var(--op-orange);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, #fff3e8, transparent);
}
.director-page .director-row { justify-content: center; }
.director-page .director-row--featured .director-card-col {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}
.director-page .member {
  border-color: #f0dfd1 !important;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(47, 35, 28, .06);
}
.director-page .member:hover {
  border-color: #f5b685 !important;
  box-shadow: 0 12px 28px rgba(244, 119, 33, .14);
}
.director-page .member__info { padding: 18px 20px 22px; }
.director-page .member__name { color: var(--op-ink); }
.director-page .member__desc { color: var(--op-muted); }

@media (max-width: 575px) {
  .director-page .tab { gap: 6px; }
  .director-page .tablinks { flex-basis: 100%; min-height: 44px; padding: 9px 12px; font-size: 15px; }
  .director-page .member__img { min-height: 220px; }
}

@media (max-width: 767px) {
  .director-page .director-row--featured .director-card-col {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Keep all director category tabs on one horizontal line. */
.director-page .tab {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.director-page .tablinks {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 575px) {
  .director-page .tablinks {
    flex: 0 0 auto;
    min-width: 210px;
  }
}

@media (max-width: 1199px) {
  .op-navbar .nav__item { margin-right: 12px; }
  .op-navbar .nav__item .nav__item-link { font-size: 14px; }
  .op-brand-wrap { flex-basis: 160px; max-width: 160px; }
}
@media (max-width: 991px) {
  .op-navbar, .op-navbar > .container { height: 72px; max-height: 72px; }
  .op-navbar .navbar-brand { line-height: 72px; }
  .op-navbar .logo-header { max-height: 54px; }
  .op-brand-wrap { flex-basis: 145px; max-width: 145px; }
  .op-home-hero { min-height: 560px; }
  .op-home-hero > .container { padding: 74px 15px; }
  .op-navbar .navbar-collapse { top: 72px; border-top: 3px solid var(--op-orange); }
  .op-navbar .nav__item .nav__item-link { line-height: 42px; }
}
@media (max-width: 575px) {
  .op-brand-wrap { flex-basis: 120px; max-width: 120px; }
  .op-navbar .logo-header { max-width: 105px; max-height: 48px; }
  .op-home-hero { min-height: 680px; }
  .op-home-hero:after { background: linear-gradient(90deg, rgba(23,19,17,.78), rgba(23,19,17,.4)); }
  .op-home-hero > .container { padding: 52px 15px; }
  .op-hero-intro { padding: 26px 22px; }
  .op-hero-intro h4:nth-child(2) { white-space: normal; }
  .op-hero-content .contact-panel { padding: 23px 20px; }
  .op-hero-content .contact-panel__title { font-size: 18px; }
  .op-hero-content .contact-panel__desc { font-size: 14px; }
  .op-quick-links { padding: 48px 0 52px !important; }
}
