:root {
  --proc-green: #c2004f;
  --proc-green-deep: #8a0038;
  --proc-green-mid: #d52b70;
  --proc-green-soft: #fff0f5;
  --proc-gold: #b18a3c;
  --proc-gold-soft: #f7f1e4;
  --proc-ink: #2b1520;
  --proc-muted: #6d5962;
  --proc-line: #f2cedd;
  --proc-white: #fff;
  --proc-shadow: 0 16px 45px rgba(138, 0, 56, 0.09);
}

body.homepage {
  color: var(--proc-ink);
  background: #fbfdfc;
  font-family: "Noto Sans Thai", "Tahoma", sans-serif;
  font-size: 1.15rem;
}

body.homepage .container { max-width: 1180px; }
body.homepage a:focus-visible,
body.homepage button:focus-visible,
body.homepage input:focus-visible,
body.homepage select:focus-visible {
  outline: 3px solid var(--proc-gold);
  outline-offset: 3px;
}

body.homepage .a11y-toolbar { background: var(--proc-green-deep); color: #f8ddea; }
body.homepage .a11y-toolbar-inner {
  max-width: 1180px;
  min-height: 34px;
  justify-content: space-between;
  padding-block: 5px;
  font-size: 0.72rem;
}
body.homepage .utility-links,
body.homepage .accessibility-actions { display: flex; align-items: center; gap: 9px; }
body.homepage .a11y-toolbar a { color: inherit; text-decoration: none; }
body.homepage .a11y-toolbar a:hover { color: #fff; }
body.homepage .a11y-toolbar button { padding: 1px 7px; font-size: 0.7rem; }
body.homepage .staff-login { margin-left: 8px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.3); }

body.homepage .site-header { background: #fff; border-bottom: 1px solid var(--proc-line); }
body.homepage .site-header-inner {
  max-width: 1180px;
  min-height: 82px;
  gap: 34px;
  padding-block: 10px;
}
body.homepage .brand-logo { height: 62px; }
body.homepage .brand-th { color: var(--proc-green-deep); font-size: 1.55rem; line-height: 1.25; }
body.homepage .brand-sub { color: #6f334b; font-size: .85rem; }
body.homepage .main-nav { margin-left: auto; background: transparent; }
body.homepage .main-nav > ul { padding: 0; gap: 5px; }
body.homepage .main-nav > ul > li > a,
body.homepage .main-nav .dropdown-toggle {
  position: relative;
  color: #482131;
  background: transparent;
  padding: 20px 10px;
  font-size: 1rem;
  font-weight: 500;
}
body.homepage .main-nav > ul > li > a:hover,
body.homepage .main-nav > ul > li > a:focus-visible,
body.homepage .main-nav .dropdown-toggle:hover,
body.homepage .main-nav .dropdown-toggle:focus-visible { color: var(--proc-green); background: transparent; }
body.homepage .main-nav > ul > li > a[href="/"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  height: 2px;
  background: var(--proc-gold);
}
body.homepage .dropdown-menu {
  top: calc(100% - 8px);
  border-color: var(--proc-line);
  box-shadow: var(--proc-shadow);
}
body.homepage .dropdown-menu a { color: var(--proc-ink); }
body.homepage .dropdown-menu a:hover { background: var(--proc-green-soft); color: var(--proc-green-deep); }
body.homepage .nav-toggle { border-color: var(--proc-line); color: var(--proc-green-deep); }

.procurement-hero {
  position: relative;
  min-height: 345px;
  display: flex;
  align-items: center;
  overflow: visible;
  background:
    radial-gradient(circle at 78% 24%, rgba(255,255,255,.62), transparent 27%),
    linear-gradient(110deg, #fff0f5 0%, #fff8fb 55%, #f8d9e6 100%);
}
.procurement-hero-slides { position: absolute; inset: 0; }
.procurement-hero-slides a { position: absolute; inset: 0; display: block; }
.procurement-hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.procurement-hero-image.is-active { opacity: 1; }
.procurement-hero-dots {
  position: absolute;
  right: 24px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.procurement-hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1.5px solid rgba(138,0,56,.5);
  border-radius: 50%;
  background: rgba(255,255,255,.65);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.procurement-hero-dot:hover { transform: scale(1.15); }
.procurement-hero-dot.is-active { background: #a00042; border-color: #a00042; }
.procurement-hero-content { position: relative; z-index: 1; padding-top: 45px; padding-bottom: 56px; padding-left: clamp(130px, 20vw, 280px); }
body.homepage .procurement-hero-content { max-width: none; margin-left: 0; }
.home-eyebrow {
  margin: 0 0 7px;
  color: var(--proc-green-mid);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.procurement-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--proc-green-deep);
  font-size: clamp(2.25rem, 4.4vw, 4.15rem);
  line-height: 1.2;
  letter-spacing: -.045em;
}
.procurement-hero h1 span { color: #a00042; }
.procurement-hero-content > p:last-of-type { margin: 12px 0 0; color: #6d3b50; font-size: 1.2rem; }

.procurement-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 40px;
  margin-bottom: 34px;
}
.procurement-shortcuts > a {
  min-width: 0;
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 98px;
  padding: 16px;
  border: 1px solid var(--proc-line);
  border-radius: 8px;
  color: var(--proc-ink);
  background: #fff;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.procurement-shortcuts > a:hover { transform: translateY(-3px); border-color: var(--proc-gold); box-shadow: var(--proc-shadow); }
.shortcut-icon { color: var(--proc-green); font-size: 2rem; font-weight: 400; }
.procurement-shortcuts strong { display: block; font-size: 1.05rem; }
.procurement-shortcuts small { display: block; margin-top: 3px; color: var(--proc-muted); font-size: .8rem; line-height: 1.5; }
.procurement-shortcuts b { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--proc-line); border-radius: 50%; font-size: .8rem; }

.procurement-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; padding-top: 5px; }
.home-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.home-section-heading h2 { margin: 0; color: var(--proc-green-deep); font-size: 2.05rem; line-height: 1.25; }
.home-section-heading > a { color: var(--proc-green); font-size: .98rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.procurement-filters { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--proc-line); }
.procurement-filters a { padding: 10px 16px; border-radius: 5px; color: #60404d; background: #f0f3f1; font-size: .98rem; text-decoration: none; }
.procurement-filters a:hover { background: #f8dce7; }
.procurement-filters a.is-active { color: #fff; background: var(--proc-green); }

.procurement-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--proc-line);
}
.procurement-item time { display: grid; place-items: center; padding: 7px 3px; border-radius: 5px; background: var(--proc-green-soft); font-variant-numeric: tabular-nums; }
.procurement-item time b { font-size: 1.25rem; line-height: 1.1; }
.procurement-item time span { margin-top: 4px; color: #725161; font-size: .7rem; white-space: nowrap; }
.procurement-badge { display: inline-block; padding: 3px 9px; border-radius: 4px; color: #9c174d; background: #f8dce7; font-size: .75rem; }
.procurement-badge.badge-plan,
.procurement-badge.badge-price { color: #72551d; background: #f1e4bf; }
.procurement-item h3 { margin: 5px 0 0; font-size: 1.08rem; line-height: 1.5; }
.procurement-item h3 a { color: var(--proc-ink); text-decoration: none; }
.procurement-item h3 a:hover { color: var(--proc-green); text-decoration: underline; text-underline-offset: 3px; }
.procurement-item-copy p { margin: 4px 0 0; color: var(--proc-muted); font-size: .84rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.procurement-document { color: var(--proc-green); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.procurement-empty { padding: 42px 20px; text-align: center; color: var(--proc-muted); background: var(--proc-green-soft); border-radius: 8px; }
.procurement-empty h3 { margin: 0; color: var(--proc-green-deep); font-size: 1.3rem; }
.procurement-empty p { margin: 7px 0 15px; font-size: 1.05rem; }
.procurement-empty a { font-size: 1rem; }

.online-services { padding: 22px; border-radius: 8px; background: var(--proc-green-soft); }
.online-services h2 { margin: 0; color: var(--proc-green-deep); font-size: 1.45rem; }
.online-services .gold-rule { display: block; width: 38px; height: 2px; margin: 12px 0 16px; background: var(--proc-gold); }
.online-services > a { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 11px; margin-top: 8px; padding: 14px 12px; border: 1px solid #e3ebe7; border-radius: 6px; color: var(--proc-ink); background: #fff; text-decoration: none; }
.online-services > a:hover { border-color: var(--proc-gold); }
.service-symbol { color: var(--proc-green); font-size: 1.55rem; }
.online-services strong { display: block; font-size: .92rem; line-height: 1.4; }
.online-services small { display: block; margin-top: 3px; color: var(--proc-muted); font-size: .75rem; line-height: 1.45; }
.online-services b { color: var(--proc-green); }
.procurement-news { padding-top: 38px; padding-bottom: 18px; }
.university-feed-widget { min-width: 0; }
.university-news-tabs { display: flex; align-items: flex-end; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid #d9d9d9; }
.university-news-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 50px; padding: 12px 19px; border: 1px solid transparent; border-bottom: 0; border-radius: 5px 5px 0 0; color: var(--proc-ink); background: transparent; font: inherit; font-size: 1.02rem; cursor: pointer; }
.university-news-tab:hover { color: var(--proc-green); background: var(--proc-green-soft); }
.university-news-tab.is-active { position: relative; bottom: -1px; color: var(--proc-green-deep); background: #fff; border-color: #d9d9d9; font-weight: 600; }
.university-news-tab span { color: var(--proc-green-deep); font-weight: 700; }
.university-news-panel { display: none; }
.university-news-panel.is-active { display: block; }
.university-news-panel[hidden] { display: none; }
.university-news-empty { grid-column: 1 / -1; }
.university-feed-rss-link { flex: 0 0 auto; margin-left: auto; padding: 13px 16px; color: var(--proc-ink); font-size: 1.3rem; text-decoration: none; }
.university-feed-list { margin: 0; padding: 0; list-style: none; }
.university-feed-list li { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); align-items: baseline; gap: 6px; padding: 7px 2px; border-bottom: 1px dashed #e3b53d; font-size: 1rem; line-height: 1.35; }
.university-feed-list time { color: #6d5962; white-space: nowrap; font-size: .92rem; }
.university-feed-list a { color: var(--proc-ink); text-decoration: none; }
.university-feed-list a:hover { color: var(--proc-green); text-decoration: underline; text-underline-offset: 3px; }
.university-feed-folder { color: #e3aa00; font-size: .9rem; }
.university-feed-empty { display: block !important; padding: 28px 16px !important; text-align: center; color: var(--proc-muted); background: var(--proc-green-soft); border: 0 !important; }
.university-feed-actions { display: flex; justify-content: center; gap: 4px; padding-top: 13px; }
.university-feed-actions a { padding: 5px 9px; border-radius: 3px; color: #fff; font-size: .78rem; font-weight: 600; text-decoration: none; }
.feed-action-rss { background: #d9a247; }
.feed-action-history { background: #3979ab; }
.procurement-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.procurement-news-card { overflow: hidden; border: 1px solid var(--proc-line); border-radius: 8px; background: #fff; }
.procurement-news-card > img,
.news-placeholder { width: 100%; height: 140px; object-fit: cover; }
.news-placeholder { display: grid; place-items: center; color: rgba(194,0,79,.55); background: linear-gradient(135deg, #f5dce7, #fff7fa); font-size: 2rem; font-weight: 700; letter-spacing: .12em; }
.news-placeholder-2 { color: #826c3e; background: linear-gradient(135deg, #eee6d4, #faf7ef); }
.news-placeholder-3 { color: #dcebe6; background: linear-gradient(135deg, #a00042, #650029); }
.procurement-news-card > div:last-child { position: relative; min-height: 112px; padding: 13px 44px 14px 14px; }
.procurement-news-card time,
.news-category { margin: 0; color: var(--proc-muted); font-size: .78rem; }
.procurement-news-card h3 { margin: 6px 0 0; font-size: 1.08rem; line-height: 1.5; }
.procurement-news-card h3 a { color: var(--proc-ink); text-decoration: none; }
.procurement-news-card h3 a:hover { color: var(--proc-green); }
.news-arrow { position: absolute; right: 13px; bottom: 14px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--proc-line); border-radius: 50%; color: var(--proc-green); text-decoration: none; }

.pc-modules-section { margin-bottom: 40px; }
.pc-modules { grid-template-columns: repeat(3, 1fr); margin-top: 0; margin-bottom: 0; }

.pr-news { margin-top: 6px; margin-bottom: 40px; }
.pr-news-slider { position: relative; display: flex; align-items: stretch; gap: 10px; }
.pr-news-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 15px) / 4);
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.pr-news-track::-webkit-scrollbar { display: none; }
.pr-news-card { scroll-snap-align: start; }
.pr-news-arrow {
  flex: 0 0 auto;
  align-self: center;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--proc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--proc-green-deep);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.pr-news-arrow:hover { background: var(--proc-green-deep); color: #fff; }

body.homepage .related-links { background: #fbfdfc; }
body.homepage .site-footer { margin-top: 0; border-top: 0; background: var(--proc-green-deep); color: #e5efeb; }
body.homepage .site-footer-inner { max-width: 1180px; padding: 32px 20px 24px; grid-template-columns: 1.2fr .8fr .8fr; }
body.homepage .footer-logo { background: #fff; }
body.homepage .footer-col h2 { color: #fff; }
body.homepage .footer-col h2::after { background: var(--proc-gold); }
body.homepage .footer-brand p,
body.homepage .footer-meta,
body.homepage .footer-meta a,
body.homepage .footer-col a { color: #efd2df; }
body.homepage .site-footer-bottom { max-width: 1180px; color: #d6a9bb; }

@media (max-width: 1050px) {
  body.homepage .site-header-inner { flex-wrap: wrap; gap: 5px 22px; }
  body.homepage .main-nav { order: 3; flex-basis: 100%; }
  body.homepage .main-nav > ul { justify-content: center; }
  .procurement-shortcuts { grid-template-columns: repeat(2, 1fr); }
  .procurement-main-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .pr-news-track { grid-auto-columns: calc((100% - 2 * 15px) / 3); }
}

@media (max-width: 760px) {
  body.homepage .utility-links span,
  body.homepage .a11y-label { display: none; }
  body.homepage .staff-login { margin-left: 2px; padding-left: 8px; }
  body.homepage .site-header-inner { min-height: 74px; flex-wrap: nowrap; }
  body.homepage .brand-logo { height: 52px; }
  body.homepage .brand-th { font-size: 1.25rem; }
  body.homepage .nav-toggle { display: flex; align-items: center; gap: 7px; margin-left: auto; }
  body.homepage .main-nav { display: none; order: initial; flex-basis: auto; }
  body.homepage .main-nav.open { display: block; position: absolute; z-index: 80; top: 108px; left: 0; right: 0; padding: 8px 20px 14px; background: var(--proc-green-deep); box-shadow: var(--proc-shadow); }
  body.homepage .main-nav > ul { flex-direction: column; align-items: stretch; }
  body.homepage .main-nav > ul > li > a,
  body.homepage .main-nav .dropdown-toggle { width: 100%; padding: 11px 12px; color: #fff; }
  body.homepage .main-nav > ul > li > a[href="/"]::after { display: none; }
  body.homepage .dropdown-menu { position: static; background: rgba(255,255,255,.07); border: 0; box-shadow: none; }
  body.homepage .dropdown-menu a { color: #fff; }
  .procurement-hero { min-height: 395px; }
  .procurement-hero-content { padding-top: 38px; padding-bottom: 46px; }
  .procurement-hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .procurement-shortcuts { margin-top: 40px; }
  .procurement-main-grid { grid-template-columns: 1fr; }
  .procurement-news-grid { grid-template-columns: 1fr 1fr; }
  .pr-news-track { grid-auto-columns: calc((100% - 15px) / 2); }
  .pr-news-arrow { width: 32px; height: 32px; font-size: 1.1rem; }
}

@media (max-width: 540px) {
  body.homepage .a11y-toolbar-inner { padding-inline: 14px; }
  body.homepage .accessibility-actions button { display: none; }
  body.homepage .site-header-inner { padding-inline: 16px; }
  body.homepage .brand-logo { height: 45px; }
  body.homepage .brand-th { font-size: 1.12rem; }
  body.homepage .brand-sub { font-size: .62rem; }
  body.homepage .nav-toggle { padding: 7px 9px; font-size: .85rem; }
  body.homepage .main-nav.open { top: 95px; }
  .procurement-hero { min-height: 405px; }
  .procurement-hero-content { padding-inline: 16px; }
  .procurement-hero-content > p:last-of-type { font-size: .9rem; }
  .procurement-shortcuts { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 40px; padding-inline: 16px; }
  .pc-modules { margin-top: 0; padding-inline: 0; }
  .procurement-shortcuts > a { grid-template-columns: 29px 1fr; min-height: 90px; padding: 12px 10px; }
  .procurement-shortcuts b { display: none; }
  .shortcut-icon { font-size: 1.45rem; }
  .procurement-shortcuts strong { font-size: .75rem; }
  .procurement-shortcuts small { font-size: .59rem; }
  .procurement-main-grid,
  .procurement-news,
  .pr-news,
  .pc-modules-section { padding-inline: 16px; }
  .pr-news-track { grid-auto-columns: 82%; }
  .home-section-heading h2 { font-size: 1.55rem; }
  .procurement-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; }
  .procurement-filters a { flex: 0 0 auto; }
  .procurement-item { grid-template-columns: 52px minmax(0, 1fr); gap: 11px; }
  .procurement-document { display: none; }
  .procurement-item h3 { font-size: 1rem; }
  .procurement-news-grid { grid-template-columns: 1fr; }
  .university-news-tabs { margin-inline: -16px; padding-inline: 16px; }
  .university-news-tab { min-height: 46px; padding: 10px 14px; font-size: .94rem; }
  .university-feed-list li { grid-template-columns: 16px minmax(0, 1fr); gap: 5px; font-size: .94rem; }
  .university-feed-list time { grid-column: 2; font-size: .82rem; }
  body.homepage .site-footer-inner { grid-template-columns: 1fr; padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .procurement-shortcuts > a { transition: none; }
}

body.high-contrast.homepage {
  --proc-green: #ffdd00;
  --proc-green-deep: #000;
  --proc-green-mid: #ffdd00;
  --proc-green-soft: #111;
  --proc-gold: #ffdd00;
  --proc-gold-soft: #111;
  --proc-ink: #fff;
  --proc-muted: #eee;
  --proc-line: #fff;
  background: #000;
}
body.high-contrast.homepage .procurement-hero-shade { background: rgba(0,0,0,.88); }
body.high-contrast.homepage .procurement-shortcuts > a,
body.high-contrast.homepage .online-services > a,
body.high-contrast.homepage .procurement-news-card { background: #000; }

/* Two-column home: news on the left, service banners on the right */
.procurement-main-col { min-width: 0; display: grid; gap: 34px; align-content: start; }
.procurement-main-col .pr-news { margin: 0; }
.procurement-main-col .pr-news-track { grid-auto-columns: calc((100% - 2 * 15px) / 3); }
.procurement-sidebar { display: grid; gap: 28px; align-content: start; }
.procurement-sidebar .pc-modules-section { margin: 0; }
.procurement-sidebar .pc-modules { grid-template-columns: 1fr; gap: 8px; }
.procurement-sidebar .procurement-shortcuts > a { min-height: 0; padding: 12px; grid-template-columns: 34px 1fr auto; }
.procurement-sidebar .shortcut-icon { font-size: 1.5rem; }
.procurement-sidebar .procurement-shortcuts strong { font-size: .95rem; }
@media (max-width: 760px) {
  .procurement-main-col .pr-news-track { grid-auto-columns: 82%; }
}
.procurement-main-grid { padding-top: 48px; }
@media (max-width: 760px) { .procurement-main-grid { padding-top: 32px; } }

/* Side link banners (back-office managed groups) */
.side-link-group h2 { margin: 0 0 12px; color: var(--proc-green-deep); font-size: 1.2rem; text-align: center; }
.side-link-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.side-link-group a { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border: 1px solid var(--proc-line); border-radius: 8px; color: var(--proc-ink); background: #fff; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.side-link-group a:hover { border-color: var(--proc-gold); box-shadow: var(--proc-shadow); }
.side-link-group img { flex: 0 0 auto; width: 52px; height: 40px; object-fit: contain; }
.side-link-group strong { display: block; font-size: .95rem; line-height: 1.45; }
.side-link-group small { display: block; margin-top: 2px; color: var(--proc-muted); font-size: .78rem; line-height: 1.4; }

/* Online services now sit under the news column */
.procurement-main-col .online-services { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 12px; align-items: stretch; }
.procurement-main-col .online-services > p,
.procurement-main-col .online-services > h2,
.procurement-main-col .online-services > .gold-rule { grid-column: 1 / -1; }
.procurement-main-col .online-services > a { margin-top: 0; }
@media (max-width: 760px) { .procurement-main-col .online-services { grid-template-columns: 1fr; row-gap: 8px; } }
