/* Home page first screen (2026-11-08, redesign pilot): the department directory board, the slider and the notice desk;
   below it the Important Links band and the Video / Map section. Prefix kfr-. Colours: css/site-chrome.css tokens.
   Markup: jsp/index.jsp. The slider keeps its own css/home-slider.css; only its height is set here. */

.kfr, .kfr-strip, .kfr-links, .kvm {
  --f-navy: var(--kc-navy, #0d2847);
  --f-navy-2: var(--kc-navy-2, #12325a);
  --f-blue: var(--kc-blue, #285690);
  --f-gold: var(--kc-gold, #e0a526);
  --f-ink: var(--kc-ink, #1b2a3d);
  --f-muted: var(--kc-muted, #5d6b80);
  --f-line: var(--kc-line, #e3e8f0);
  --f-soft: var(--kc-soft, #f3f6fb);
  --f-ease: var(--kc-ease, cubic-bezier(.2, .7, .2, 1));
  --f-serif: 'Lora', Georgia, 'Times New Roman', serif;
  /* left edge of the header's content (max 1320px wide, 24px padding), so the board lines up with the logo */
  --f-edge: max(24px, calc((100vw - 1320px) / 2 + 24px));
  font-family: var(--kc-font, 'Inter', 'Open Sans', system-ui, sans-serif);
  color: var(--f-ink);
  -webkit-font-smoothing: antialiased;
}
.kfr *, .kfr-strip *, .kfr-links *, .kvm * { box-sizing: border-box; }
.kfr a, .kfr-strip a, .kfr-links a, .kvm a { text-decoration: none; }
.kfr ::selection, .kfr-links ::selection, .kvm ::selection { background: var(--f-gold); color: var(--f-navy); }

/* ---------- scrolling links strip (page text home/marquee + scrolling notices) ---------- */
.kfr-strip { display: flex; align-items: center; gap: 8px; min-height: 40px; padding-right: max(8px, calc((100vw - 1320px) / 2 + 16px));
  background: #fff; border-bottom: 1px solid var(--f-line); }
/* a horizontal ticker (js/home-front.js): the track holds the links twice and moves left in a loop; without the script
   or with reduced motion it scrolls by hand */
.kfr-strip-view { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.kfr-strip-view::-webkit-scrollbar { display: none; }
.kfr-strip-track { display: flex; align-items: center; gap: 40px; width: max-content; padding: 0 16px; }
.kfr-strip-track > div { gap: 36px !important; white-space: nowrap; }
.kfr-strip-view.is-moving { overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%); }
.kfr-strip-view.is-moving .kfr-strip-track { animation: kfr-left var(--kfr-dur, 40s) linear infinite; }
@keyframes kfr-left { to { transform: translateX(var(--kfr-shift, -50%)); } }
.kfr-strip .flex { gap: 8px; font-size: 14px; }
.kfr-strip img { width: 26px !important; height: auto; }
.kfr-strip a { color: var(--f-navy) !important; font-weight: 500; }
.kfr-strip a:hover { color: var(--f-blue) !important; text-decoration: underline; text-underline-offset: 3px; }
.kfr-strip .fa-asterisk { color: var(--f-gold); font-size: 10px; }
.kfr-strip button { border: 0; background: none; font-size: 12px; }

/* ---------- first screen: board | slider + desk ---------- */
.kfr { display: grid; grid-template-columns: minmax(430px, 40fr) 60fr; background: var(--f-navy); }
.kfr-main { display: flex; flex-direction: column; min-width: 0; background: #fff; }

/* the directory board */
.kfr-board { position: relative; padding: 34px 40px 28px var(--f-edge); color: #fff;
  background: linear-gradient(180deg, var(--f-navy) 0%, #0b2340 100%); }
.kfr-title { margin: 0; font-family: var(--f-serif) !important; font-size: clamp(28px, 2.4vw, 36px); font-weight: 600;
  line-height: 1.15; letter-spacing: -.01em; color: #fff; text-wrap: balance; }
.kfr-lead { margin: 8px 0 18px; max-width: 46ch; font-size: 15px; line-height: 1.5; color: #b9c7dc; text-wrap: pretty; }
.kfr-depts { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.kfr-dept { position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center;
  min-height: 41px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
/* signature: the row's bottom rule draws itself in gold from the left */
.kfr-dept::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--f-gold);
  transform: scaleX(0); transform-origin: left center; transition: transform .45s var(--f-ease); pointer-events: none; }
.kfr-dept:hover::after, .kfr-dept:focus-within::after { transform: scaleX(1); }
.kfr abbr.kfr-tag { text-decoration: none; border-bottom: 0; }
.kfr-tag { justify-self: start; cursor: help; padding: 3px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--f-gold); box-shadow: inset 0 0 0 1px rgba(224, 165, 38, .45);
  transition: background-color .25s var(--f-ease), color .25s var(--f-ease); }
.kfr-name { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px 9px 0;
  font-size: 15px; font-weight: 500; line-height: 1.3; color: #fff !important; }
.kfr-name::after { content: "\f061"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 12px; color: rgba(255, 255, 255, .35);
  transition: transform .3s var(--f-ease), color .25s; }
/* the whole row is the department link; the Notices link sits above it */
.kfr-name::before { content: ""; position: absolute; inset: 0; z-index: 0; }
.kfr-sub { position: relative; z-index: 1; padding: 4px 0 4px 12px; border-left: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px; color: #9fb2cf !important; }
.kfr-name:hover { text-decoration: none !important; }
.kfr-sub:hover { color: #fff !important; text-decoration: underline !important; text-underline-offset: 3px; }
.kfr-dept:hover, .kfr-dept:focus-within { background: rgba(255, 255, 255, .045); }
.kfr-dept:hover .kfr-tag, .kfr-dept:focus-within .kfr-tag { background: var(--f-gold); color: var(--f-navy); }
.kfr-dept:hover .kfr-name::after, .kfr-dept:focus-within .kfr-name::after { transform: translateX(5px); color: var(--f-gold); }
.kfr-board :focus-visible { outline: 2px solid var(--f-gold); outline-offset: 2px; border-radius: 3px; }
.kfr-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 600;
  color: #b9c7dc !important; }
.kfr-all:hover { color: #fff !important; text-decoration: underline !important; text-underline-offset: 4px; }
.kfr-all i { transition: transform .3s var(--f-ease); }
.kfr-all:hover i { transform: translateX(4px); }

@media (min-width: 1101px) and (min-height: 860px) { .kfr-dept { min-height: 46px; } }
/* wide screens: the right column (tall slider + notice desk) is taller than the list, so the list stays in view while
   the visitor scrolls past them (2026-11-08) instead of leaving an empty navy block below it */
@media (min-width: 1101px) {
  .kfr-board-in { position: sticky; top: calc(28px + var(--kc-nav-offset, 0px)); }
}

/* rows enter once, top to bottom (visible by default; js adds .kfr-anim only when motion is allowed) */
.kfr-anim .kfr-dept { animation: kfr-in .6s var(--f-ease) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
@keyframes kfr-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* the slider inside the right column: a fixed share of the screen so the desk stays in view */
/* 1.75 x the first version's height (user request 2026-11-08) */
.kfr .ksl { --ksl-h: clamp(420px, calc((100vh - 610px) * 1.75), 770px); }
.kfr .ksl-bar { min-height: 0; padding-top: 6px; padding-bottom: 6px; }
.kfr .ksl-count b { font-size: 22px; }

/* the notice desk */
.kfr-desk { background: #fff; display: grid; grid-template-columns: 1fr 1fr; flex: 1; min-height: 0; border-top: 4px solid var(--f-gold); }
.kfr-col { display: flex; flex-direction: column; min-width: 0; padding: 14px 26px 18px; }
.kfr-col + .kfr-col { border-left: 1px solid var(--f-line); }
.kfr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.kfr-head h2 { margin: 0; font-family: var(--f-serif) !important; font-size: 21px; font-weight: 600; color: var(--f-navy); }
.kfr-count { font-size: 12.5px; color: var(--f-muted); font-variant-numeric: tabular-nums; }
.kfr-list { list-style: none; margin: 0; padding: 0 4px 0 0; }
/* the newest 10 scroll upwards like the old marquee (user request 2026-11-08, js/home-front.js): a fixed window with soft
   top/bottom edges; the script appends an inert, hidden copy for a seamless loop and pauses it under the mouse and on
   keyboard focus. Without the script or with reduced motion: the window scrolls by hand. */
.kfr-ticker { position: relative; flex: none; height: 340px; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c3cfe0 transparent; }
.kfr-ticker.is-moving { overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
.kfr-ticker.is-moving .kfr-list { animation: kfr-up var(--kfr-dur, 30s) linear infinite; }
.kfr-ticker.is-moving:hover .kfr-list, .kfr-ticker.is-moving:focus-within .kfr-list, .kfr-ticker.is-paused .kfr-list, .kfr-ticker.is-held .kfr-list,
.kfr-strip-view:hover .kfr-strip-track, .kfr-strip-view:focus-within .kfr-strip-track, .kfr-strip-view.is-paused .kfr-strip-track, .kfr-strip-view.is-held .kfr-strip-track { animation-play-state: paused; }
/* pause buttons of the moving lists (WCAG 2.2.2; touch has no hover): shown by the script only while a list moves */
.kfr-hold { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--f-line); border-radius: 50%; background: #fff; color: var(--f-navy); font-size: 11px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s; }
.kfr-hold:hover { border-color: var(--f-navy); background: var(--f-navy); color: #fff; }
.kfr-hold[hidden] { display: none; }
.kfr-head .kfr-hold { align-self: center; }
/* the page h1, for screen readers only */
.kfr-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes kfr-up { to { transform: translateY(var(--kfr-shift, -50%)); } }
.kfr-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--f-line); }
.kfr-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 48px; border-radius: 6px;
  background: var(--f-soft); color: var(--f-navy); line-height: 1; font-variant-numeric: tabular-nums; }
.kfr-date b { font-size: 18px; font-weight: 700; }
.kfr-date span { margin-top: 3px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--f-muted); }
.kfr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 11.5px; }
.kfr-type { padding: 1px 7px; border-radius: 4px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: #e1ecfa; color: #1d4f91; }
.kfr-type--news { background: #fdf1d6; color: #7a4f00; }
.kfr-new { font-weight: 700; color: #a3121a; }
#tenders .kfr-item { align-items: center; }
.kfr-item a.kfr-link { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14.5px; font-weight: 500; line-height: 1.4; color: var(--f-ink); cursor: pointer; }
.kfr-item a.kfr-link:hover { color: var(--f-blue); text-decoration: underline; text-underline-offset: 3px; }
.kfr-empty { padding: 14px 0; font-size: 14.5px; color: var(--f-muted); }
.kfr-del, .kfr-col .tender-delete button { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 0;
  border-radius: 999px; background: #b42318; color: #fff !important; font-size: 11.5px; font-weight: 600; line-height: 1.6; cursor: pointer; }
.kfr-del:hover, .kfr-col .tender-delete button:hover { background: #8f1c13; }
.kfr-col .tender-delete { display: inline; margin: 0; }
.kfr-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; margin-top: 12px;
  padding: 0 16px; border: 1px solid var(--f-navy); border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--f-navy) !important; transition: background-color .2s, color .2s; }
.kfr-more:hover { background: var(--f-navy); color: #fff !important; }
.kfr-main :focus-visible, .kfr-links :focus-visible, .kvm :focus-visible { outline: 2px solid var(--f-gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Important Links band ---------- */
.kfr-links { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 24px;
  padding: 26px var(--f-edge); background: #fff; border-bottom: 1px solid var(--f-line); }
.kfr-links h2 { margin: 0; font-family: var(--f-serif) !important; font-size: 22px; font-weight: 600; color: var(--f-navy); }
.kfr-links h2 small { display: block; margin-top: 4px; font-family: var(--kc-font, 'Inter', sans-serif); font-size: 13px; font-weight: 400; color: var(--f-muted); }
.kfr-linkset { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: 0; } /* hides the » before each link */
.kfr-linkset .link { margin: 0; font-size: 0; }
.kfr-linkset .link a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--f-line);
  border-radius: 999px; background: var(--f-soft); font-size: 14px; font-weight: 500; color: var(--f-navy);
  transition: border-color .2s, background-color .2s, color .2s; }
.kfr-linkset .link a::after { content: "\f35d"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 10px; color: var(--f-muted); }
.kfr-linkset .link a:hover { border-color: var(--f-blue); background: #fff; color: var(--f-blue); }

/* ---------- Video gallery + map ---------- */
.kvm { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px;
  padding: 56px max(24px, calc((100vw - 1280px) / 2 + 24px)) 64px; /* same width as Gallery / Achievements */ background: var(--kc-canvas, #f4f6fa); }
.kvm-panel { display: flex; flex-direction: column; min-width: 0; }
.kvm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.kvm-head h2 { margin: 0; font-family: var(--f-serif) !important; font-size: clamp(24px, 2vw, 30px); font-weight: 600; color: var(--f-navy); }
.kvm-head a { font-size: 14px; font-weight: 600; color: var(--f-blue); }
.kvm-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.kvm-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--f-navy);
  box-shadow: 0 10px 30px rgba(13, 40, 71, .12); }
.kvm-frame ul, .kvm-frame li { margin: 0 !important; padding: 0 !important; list-style: none; height: 100%; }
.kvm-frame li > div { padding: 0 !important; height: 100%; }
.kvm-frame .relative { position: static; height: 100%; }
.kvm-frame iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.kvm-frame--map { background: #dfe6ef; }
/* Find us (2026-11-09): the map is as tall as the video; the address card sits on it, with the notice desk's gold top rule */
.kvm-where { position: relative; flex: 1; display: flex; min-height: 0; }
.kvm-where .kvm-frame--map { flex: 1; aspect-ratio: auto; min-height: 300px; }
.kvm-card { position: absolute; z-index: 2; left: 14px; bottom: 14px; width: min(372px, calc(100% - 28px)); padding: 12px 14px 12px 50px; border-top: 4px solid var(--f-gold);
  background: #fff; box-shadow: 0 18px 40px rgba(13, 40, 71, .18); }
.kvm-card address { margin: 0; font-style: normal; font-size: 14px; line-height: 1.45; color: var(--f-muted); }
.kvm-card strong { display: block; margin-bottom: 2px; font-family: var(--f-serif); font-size: 17px; font-weight: 600; line-height: 1.25; color: var(--f-navy); }
.kvm-pin { position: absolute; left: 14px; top: 16px; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--f-navy); color: var(--f-gold); font-size: 12px; }
.kvm-pin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--f-gold); opacity: 0; }
/* the pin calls out three times when the card arrives, then rests */
.kvm-card.is-in .kvm-pin::after { animation: kvm-ping 1.5s var(--f-ease) .9s 3; }
@keyframes kvm-ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.3); opacity: 0; } }
.kvm-card-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; }
.kvm-card .kvm-go { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--f-blue); color: #fff; font-size: 13.5px; font-weight: 600; transition: background-color .2s; }
.kvm-card .kvm-go:hover { background: var(--kc-blue-dark, #1e4475); }
.kvm-go i { font-size: 11px; transition: transform .3s var(--f-ease); }
.kvm-go:hover i { transform: translateX(4px); }
.kvm-card .kvm-tel { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--f-navy); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kvm-tel i { font-size: 11px; color: var(--f-muted); }
.kvm-tel:hover { text-decoration: underline; text-underline-offset: 3px; }
/* entrance: both frames open like an aperture, then the card rises onto the map */
.kmx-js .kvm-frame.kmx-reveal { opacity: 1; transform: none; clip-path: inset(14% 14% round 8px); }
.kmx-js .kvm-frame.kmx-reveal.is-in { clip-path: inset(-40px); transition: clip-path 1s var(--f-ease) var(--d, 0s); }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .kfr { grid-template-columns: minmax(340px, 40fr) 60fr; }
  .kfr-board { padding: 30px 24px 28px; }
  .kfr-links { grid-template-columns: 1fr; gap: 14px; padding: 24px; }
  .kvm { grid-template-columns: minmax(0, 1fr); padding: 40px 24px 48px; }
  .kvm-where .kvm-frame--map { aspect-ratio: 16 / 9; }
}
/* tablets: slider, board, desk in one column (phones: slider, desk, board) */
@media (max-width: 900px) {
  .kfr { display: flex; flex-direction: column; }
  .kfr-main { display: contents; }
  .kfr .ksl { order: 1; }
  .kfr-board { order: 2; }
  .kfr-desk { order: 3; }
  .kfr-depts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; border-top: 0; }
  .kfr .ksl { --ksl-h: clamp(385px, calc(100vw / var(--ksl-ratio, 2.8) * 1.75), 805px); }
}
@media (max-width: 767.98px) {
  .kfr-board { order: 4; }
  .kfr .ksl { --ksl-h: clamp(385px, min(calc(100vw / var(--ksl-mratio, .8) * 1.75), 77vh), 735px); }
  .kfr-ticker { height: 300px; }
  .kfr-desk { grid-template-columns: 1fr; }
  .kfr-col { padding: 18px 16px; }
  .kfr-col + .kfr-col { border-left: 0; border-top: 1px solid var(--f-line); }
  .kfr-board { padding: 28px 16px 26px; }
  .kfr-depts { grid-template-columns: 1fr; border-top: 1px solid rgba(255, 255, 255, .14); }
  .kfr-dept { grid-template-columns: 46px minmax(0, 1fr) auto; min-height: 48px; }
  .kfr-links { padding: 22px 16px; }
  .kvm { padding: 32px 16px 40px; gap: 32px; }
  .kvm-where { flex-direction: column; }
  .kvm-where .kvm-frame--map { flex: none; border-radius: 8px 8px 0 0; aspect-ratio: 4 / 3; min-height: 0; }
  .kvm-card { width: auto; position: relative; left: 0; bottom: 0; box-shadow: none; border-radius: 0 0 8px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .kfr-ticker.is-moving .kfr-list, .kfr-strip-view.is-moving .kfr-strip-track { animation: none; }
  .kfr-anim .kfr-dept { animation: none; }
  .kmx-js .kvm-frame.kmx-reveal, .kmx-js .kvm-frame.kmx-reveal.is-in { clip-path: none; transition: none; }
  .kvm-card.is-in .kvm-pin::after { animation: none; }
  .kvm-go i { transition: none; }
  .kfr-tag, .kfr-name::after, .kfr-all i, .kfr-dept::after { transition: none; }
}
.kfr-meta:not(:has(*)) { display: none; }
