/* ════════════════════════════════════════════════════════════════
   BritishITSociety.org — Shared Stylesheet v2
   Palette: blue #1a6cff · red #dd2910 · green #2da80a · amber #e8a000
   Navy: #060920 → #0d1545 · Page bg: #f0f4fa
   Max content width: 1200px centred
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f0f4fa; color: #2a3a5a; font-size: 14px; line-height: 1.6;
}
a { color: #1a6cff; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
:focus-visible { outline: 2px solid #1a6cff; outline-offset: 2px; }

/* CSS Variables */
:root {
  --blue: #1a6cff; --red: #dd2910; --green: #2da80a; --amber: #e8a000;
  --navy: #060920; --navy2: #0d1545;
  --bg: #f0f4fa; --bg-info: #e8f0ff; --bg-success: #eafbe6;
  --bg-danger: #fef0ee; --bg-warn: #fff8e2; --bg-purple: #f3eeff;
  --text: #080c28; --text2: #4a5a7a; --text3: #8a9ab8;
  --border: #dde8f8; --radius: 8px; --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,.06);
  --shadow-hover: 0 6px 20px rgba(26,108,255,.12);
  --max-w: 1200px;
}

/* Animations */
@keyframes shimmer { 0%{background-position:-200% center}100%{background-position:200% center} }
@keyframes ticker  { 0%{transform:translateX(0)}100%{transform:translateX(-50%)} }
@keyframes blink   { 0%,100%{opacity:1}50%{opacity:.3} }
@keyframes float   { 0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)} }

.gradient-text {
  background: linear-gradient(90deg,#5aaeff,#a07aff 50%,#5aaeff);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── Centred content wrapper ─────────────────────────────────── */
.inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: #fff; border-bottom: 3px solid var(--blue);
  box-shadow: 0 2px 10px rgba(26,108,255,.07);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; height: 54px; gap: 16px;
}
.nav-logo { font-size: 12.5px; font-weight: 800; color: var(--blue); white-space: nowrap; flex-shrink: 0; }
.navlinks { display: flex; flex: 1; }
.navlinks li { list-style: none; margin: 0; display: flex; }
.navlinks a {
  font-size: 12px; color: var(--text2); font-weight: 600;
  padding: 0 13px; line-height: 54px; border-bottom: 3px solid transparent;
  white-space: nowrap; transition: color .15s, border-color .15s;
  position: relative;
}
.navlinks a.on,
.navlinks a:hover,
.navlinks li.current-menu-item > a,
.navlinks li.current_page_item > a,
.navlinks li.current-menu-ancestor > a {
  color: var(--blue); border-bottom-color: var(--blue); text-decoration: none;
}
/* Soft glowing underline on the active page link — a gentle, non-distracting
   cue so visitors always know which section they're in. Respects
   prefers-reduced-motion for accessibility. */
.navlinks li.current-menu-item > a::after,
.navlinks li.current_page_item > a::after,
.navlinks li.current-menu-ancestor > a::after {
  content: '';
  position: absolute;
  left: 13px; right: 13px; bottom: -3px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(26,108,255,.55);
  animation: bits-nav-glow 2.2s ease-in-out infinite;
}
@keyframes bits-nav-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(26,108,255,.4); }
  50%      { box-shadow: 0 0 12px rgba(26,108,255,.75); }
}
@media (prefers-reduced-motion: reduce) {
  .navlinks li.current-menu-item > a::after,
  .navlinks li.current_page_item > a::after,
  .navlinks li.current-menu-ancestor > a::after {
    animation: none;
  }
}
.nav-cta {
  background: var(--blue); color: #fff; border: none; padding: 7px 14px;
  border-radius: var(--radius); font-size: 11.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; text-decoration: none; white-space: nowrap;
  transition: background .15s; flex-shrink: 0;
}
.nav-cta:hover { background: #0d5ae0; text-decoration: none; color: #fff; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--blue); border-radius: 2px; transition: transform .2s, opacity .2s; }
.hamburger[aria-expanded=true] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded=true] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded=true] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PAGE BANNER ─────────────────────────────────────────────── */
.page-banner {
  background: linear-gradient(160deg,#060920,#0d1545 60%,#090d28);
  padding: 36px 20px;
}
.page-banner .inner { max-width: 700px; }
.pb-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(26,108,255,.18); border: 1px solid rgba(77,159,255,.28);
  color: #4d9fff; padding: 3px 11px; border-radius: 20px;
  font-size: 11px; font-weight: 600; margin-bottom: 10px;
}
.page-banner h1 { font-size: 2.5rem; font-weight: 900; color: #fff; line-height: 1.18; margin-bottom: 10px; letter-spacing: -0.01em; }
.page-banner p { font-size: 12px; color: rgba(255,255,255,.62); line-height: 1.65; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: .85rem; font-weight: 700; cursor: pointer;
  border: none; font-family: inherit; text-decoration: none; transition: all .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #0d5ae0; color: #fff; }
.btn-white { background: #fff; color: var(--text); box-shadow: 0 2px 10px rgba(255,255,255,.2); }
.btn-white:hover { background: #c8e0ff; color: var(--text); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: .78rem; }

/* ── TAGS ────────────────────────────────────────────────────── */
.tag { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.tag-blue { background: var(--bg-info); color: var(--blue); }
.tag-green { background: var(--bg-success); color: var(--green); }
.tag-red { background: var(--bg-danger); color: var(--red); }
.tag-amber { background: var(--bg-warn); color: #c87800; }
.tag-purple { background: var(--bg-purple); color: #7c3aed; }
.tag-new { background: var(--blue); color: #fff; }

/* ── FILTER TABS ─────────────────────────────────────────────── */
.tabs-bar {
  background: #fff; border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tabs-bar .inner-tabs { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; display: flex; }
.tab-btn {
  font-size: 12px; font-weight: 600; color: var(--text2); padding: 11px 13px;
  border: none; border-bottom: 3px solid transparent; background: transparent;
  cursor: pointer; white-space: nowrap; font-family: inherit; transition: color .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab-btn i.ti, .cat-header i.ti, .sec-title i.ti, .nav-cta i.ti, .btn i.ti { font-size: 1.05em; }
.tab-btn.on, .tab-btn:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* ── LINK LIST (training/downloads list view) ────────────────── */
.link-list { display: flex; flex-direction: column; gap: 4px; }
.link-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); transition: all .15s; text-decoration: none;
}
.link-item:hover { border-color: var(--blue); background: var(--bg-info); transform: translateX(3px); text-decoration: none; }
.link-item .li-icon { font-size: 16px; width: 28px; text-align: center; flex-shrink: 0; }
.link-item .li-body { flex: 1; min-width: 0; }
.link-item .li-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.link-item .li-meta { font-size: 11px; color: var(--text3); margin-top: 1px; }
.link-item .li-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; flex-shrink: 0; }
.link-item .ext { font-size: 11px; font-weight: 700; color: var(--blue); flex-shrink: 0; white-space: nowrap; }

/* ── SECTION HEADING ─────────────────────────────────────────── */
.sec-title {
  font-size: 13px; font-weight: 800; color: var(--text); margin: 20px 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.sec-title .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sec-title .line { flex: 1; height: 1px; background: var(--border); }

/* ── JOB CARDS ───────────────────────────────────────────────── */
.job-card {
  display: flex; gap: 10px; background: #fff; border-radius: var(--radius-lg);
  padding: 12px 14px; border: 1.5px solid var(--border); text-decoration: none;
  transition: all .15s;
}
.job-card:hover { border-color: var(--blue); transform: translateX(3px); box-shadow: var(--shadow-hover); text-decoration: none; }
.jlogo { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.jbody { flex: 1; min-width: 0; }
.jtop { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 2px; flex-wrap: wrap; }
.jtitle { font-size: 13px; font-weight: 700; color: var(--text); }
.jsal { font-size: 11px; font-weight: 700; color: var(--green); white-space: nowrap; }
.jmeta { font-size: 11px; color: var(--text2); margin-bottom: 5px; }
.jtags { display: flex; gap: 4px; flex-wrap: wrap; }
.jtag { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 20px; background: var(--bg); color: var(--text2); }
.jtag-b { background: var(--bg-info); color: var(--blue); }
.jtag-g { background: var(--bg-success); color: var(--green); }
.jnew { background: var(--blue); color: #fff; font-size: 8px; font-weight: 800; padding: 2px 5px; border-radius: 5px; }
.jcta { font-size: 10px; font-weight: 700; color: var(--blue); margin-top: 4px; }

/* ── SLIDER JOBS ─────────────────────────────────────────────── */
.job-slider { overflow: hidden; position: relative; }
.job-slider .js-track { display: flex; gap: 10px; animation: ticker 30s linear infinite; width: max-content; }
.job-slider .js-track:hover { animation-play-state: paused; }
.js-card {
  width: 200px; flex-shrink: 0; background: #fff; border-radius: var(--radius-lg);
  padding: 12px; border: 1.5px solid var(--border); cursor: pointer;
  transition: all .15s; text-decoration: none; display: block;
}
.js-card:hover { border-color: var(--blue); box-shadow: var(--shadow-hover); text-decoration: none; }
.js-card .ji { font-size: 22px; margin-bottom: 6px; }
.js-card .jt { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.js-card .jss { font-size: 11px; color: var(--green); font-weight: 600; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.social-strip {
  padding: 12px 20px; background: #0a0f24;
  border-top: 1px solid rgba(26,108,255,.2);
  display: flex; align-items: center; gap: 10px;
}
.social-strip .lbl { font-size: 11.5px; color: rgba(255,255,255,.7); flex: 1; font-weight: 500; }
.sicon {
  width: 30px; height: 30px; border-radius: 7px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.8); font-size: 14px; text-decoration: none; transition: all .15s;
}
.sicon:hover { background: var(--blue); color: #fff; border-color: var(--blue); text-decoration: none; }

.foot { background: #06080f; padding: 16px 20px; }
.fnav {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 10px;
}
.fnav a { font-size: 11.5px; color: rgba(255,255,255,.65); text-decoration: none; font-weight: 500; transition: color .15s; }
.fnav a:hover { color: #fff; }
.fnav .rcv { color: var(--amber); border: 1px solid rgba(232,160,0,.4); padding: 3px 10px; border-radius: 5px; font-weight: 700; }
.fnav .rcv:hover { background: rgba(232,160,0,.15); color: var(--amber); }
.fbot { text-align: center; }
.fbot p { font-size: 10.5px; color: rgba(255,255,255,.45); line-height: 1.7; }

/* ── CYBER TICKER ────────────────────────────────────────────── */
.cyber-ticker { background: #09091a; border-top: 1px solid rgba(221,41,16,.18); overflow: hidden; display: flex; }
.ct-label { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .07em; padding: 0 12px; display: flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; }
.ct-outer { overflow: hidden; flex: 1; position: relative; }
.ct-track { display: flex; animation: ticker 36s linear infinite; width: max-content; }
.ct-track:hover { animation-play-state: paused; }
.ct-item { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-right: 1px solid rgba(221,41,16,.1); white-space: nowrap; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.65); }
.ct-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--red); }
.ct-tag { font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 6px; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 768px) {
  .navlinks {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--border); border-bottom: 3px solid var(--blue);
    flex-direction: column; padding: 6px 0; z-index: 200; box-shadow: 0 8px 20px rgba(0,0,0,.1);
  }
  .navlinks.is-open { display: flex; }
  .navlinks a { line-height: 1; padding: 11px 18px; border-bottom: none; font-size: .85rem; }
  .navlinks a:hover { background: var(--bg); }
  .nav-inner { position: relative; }
  .hamburger { display: flex; }
  .page-banner h1 { font-size: 2rem; }
  .page-banner { padding: 24px 16px; }
}
@media (max-width: 540px) {
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: 1fr !important; }
  .page-banner h1 { font-size: 1.7rem; }
}
@media print { .nav,.foot,.social-strip,.cyber-ticker { display: none; } }

/* ── SIDEBAR LAYOUT ──────────────────────────────────────────── */
.page-body { display: flex; align-items: flex-start; gap: 0; max-width: var(--max-w); margin: 0 auto; }
.sidebar {
  width: 192px; flex-shrink: 0; padding: 14px 0 14px 14px;
  position: sticky; top: 54px; max-height: calc(100vh - 54px); overflow-y: auto;
}
.sidebar-inner { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.sb-heading {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text2); padding: 9px 11px 5px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 5px;
}
.sb-section { padding: 7px 11px; border-bottom: 1px solid var(--border); }
.sb-section:last-child { border-bottom: none; }
.sb-section-title { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 5px; }
.sb-item {
  display: flex; align-items: center; gap: 6px; padding: 3px 5px; cursor: pointer;
  font-size: 11px; color: var(--text2); font-weight: 500; border-radius: 5px;
  transition: all .12s; user-select: none; margin: 1px 0;
}
.sb-item:hover { color: var(--blue); background: var(--bg-info); }
.sb-item:has(input:checked) { color: var(--blue); font-weight: 700; background: var(--bg-info); }
.sb-item input[type=checkbox] { accent-color: var(--blue); width: 12px; height: 12px; cursor: pointer; flex-shrink: 0; }
.sb-count { font-size: 9px; margin-left: auto; background: var(--bg); color: var(--text3); padding: 1px 5px; border-radius: 10px; font-weight: 600; }
.sb-all { font-size: 10.5px; font-weight: 700; color: var(--blue); text-decoration: none; display: block; padding: 6px 11px; border-top: 1px solid var(--border); text-align: center; cursor: pointer; }
.sb-all:hover { background: var(--bg-info); }
.page-main { flex: 1; min-width: 0; padding: 14px; }

@media (max-width: 860px) {
  .page-body { flex-direction: column; }
  .sidebar { width: 100%; position: static; max-height: none; padding: 10px 12px 0; }
  .sidebar-inner { display: flex; flex-wrap: wrap; gap: 6px; background: none; border: none; }
  .sb-heading { display: none; }
  .sb-section { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 5px 9px; }
  .sb-section-title { margin-bottom: 3px; }
  .page-main { padding: 10px 12px; }
}
