/*
 * PES University News Portal — Custom Theme
 * Bootstrap 5.3 base + PES-specific overrides
 * No inline styles in HTML; everything lives here.
 */

/* ================================================================
   1. BRAND VARIABLES  (research.pes.edu design system)
================================================================ */
:root {
  /* Bootstrap overrides */
  --bs-primary:          #00377B;
  --bs-primary-rgb:      0, 55, 123;
  --bs-link-color:       #00377B;
  --bs-link-hover-color: #002055;

  /* Research.pes.edu tokens */
  --brand-navy:       #00377B;
  --brand-orange:     #FF6C00;
  --brand-blue-light: #61B9F0;
  --brand-pale-blue:  #F2F8FD;
  --brand-soft-blue:  #E4F3FD;
  --primary-gradient: linear-gradient(135deg,#00377B 0%,#0055B3 100%);
  --accent-gradient:  linear-gradient(135deg,#FF6C00 0%,#FF9240 100%);

  --bg-primary:    #ffffff;
  --bg-secondary:  #F0F0ED;
  --bg-tertiary:   #F2F8FD;
  --text-primary:  #22304a;
  --text-secondary:#2E4A6B;
  --text-tertiary: #7B9BBF;
  --border-color:  #D3E4F2;

  --shadow-sm: 0 2px 8px  rgba(0,55,123,.06);
  --shadow-md: 0 8px 24px rgba(0,55,123,.10);
  --shadow-lg: 0 16px 48px rgba(0,55,123,.14);
  --shadow-xl: 0 24px 64px rgba(0,55,123,.18);

  --font-title: "Merriweather", serif;
  --font-body:  "Noto Sans", sans-serif;
  --header-h:   72px;
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  20px;
  --transition: all .3s ease;

  /* Legacy aliases used in the rest of this stylesheet */
  --pes-navy:      #00377B;
  --pes-dark:      #002055;
  --pes-gold:      #FF6C00;
  --pes-gold-dark: #e05c00;

  --sidebar-w: 250px;
}

/* ================================================================
   2. BASE
================================================================ */
body          { font-family: var(--font-body), sans-serif; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-title), serif; }
a             { text-decoration: none; }
a:hover       { text-decoration: none; }
img           { max-width: 100%; }

/* ================================================================
   3. TOPBAR  (research.pes.edu — always dark navy)
================================================================ */
.site-topbar {
  background: var(--brand-navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .76rem;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
}
.site-topbar.tb-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}
/* Header slides up by topbar height + its own height */
.light-header.tb-hidden {
  transform: translateY(calc(-100% - var(--tb-offset, 0px)));
  pointer-events: none;
}
.site-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: .42rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  white-space: nowrap;
}
.topbar-back {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-weight: 500;
  transition: color .2s;
  flex-shrink: 0;
}
.topbar-back:hover { color: #fff; }
.topbar-links {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-shrink: 0;
}
.topbar-links a {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-weight: 500;
  transition: color .2s;
}
.topbar-links a:hover { color: #fff; }
.topbar-sep {
  width: 1px; height: 13px;
  background: rgba(255,255,255,.22);
  display: inline-block;
  flex-shrink: 0;
}
.topbar-cta {
  background: var(--brand-orange);
  color: #fff !important;
  padding: .22rem .75rem;
  border-radius: 20px;
  font-weight: 700 !important;
  font-size: .73rem;
  transition: background .2s !important;
  flex-shrink: 0;
}
.topbar-cta:hover { background: var(--pes-gold-dark) !important; color: #fff !important; }

.tb-back-short { display: none; }

/* Mobile topbar — icon-only links, tighter padding */
@media (max-width: 600px) {
  .site-topbar-inner { padding: .38rem .9rem; gap: .4rem; }
  .tb-back-full { display: none; }
  .tb-back-short { display: inline; }
  .tb-lbl { display: none; }
  .topbar-sep { display: none; }
  .topbar-links { gap: .55rem; }
  .topbar-cta { padding: .18rem .55rem; font-size: .67rem; }
}

/* ================================================================
   4. MAIN HEADER
================================================================ */
.light-header {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 0 var(--border-color), var(--shadow-sm);
  transition: box-shadow .3s, top .35s cubic-bezier(.4,0,.2,1), transform .35s cubic-bezier(.4,0,.2,1);
}
.light-header.scrolled { box-shadow: var(--shadow-md); }

/* Orange scroll-progress bar at bottom of header */
.light-header::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: var(--scroll-pct, 0%);
  height: 3px;
  background: var(--accent-gradient);
  transition: width .08s linear;
}

.header-inner {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* ── Logo ── */
.logo-theme-wrapper { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.portal-logo img    { height: 44px; width: auto; transition: transform .3s; display: block; }
.portal-logo img:hover { transform: scale(1.04); }
.portal-logo .nav-logo-dark  { display: none; }
[data-bs-theme="dark"] .portal-logo .nav-logo-light { display: none; }
[data-bs-theme="dark"] .portal-logo .nav-logo-dark  { display: block; }

/* ── Theme toggle button ── */
.theme-toggle-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
}
.theme-toggle-btn:hover .theme-icon { color: #fff; transform: rotate(20deg); }
.theme-icon { font-size: 1rem; color: var(--text-secondary); transition: var(--transition); }

/* ── Desktop nav ── */
.top-menu {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex: 1;
  justify-content: center;
  height: 100%;
}

.menu-link {
  position: relative;
  padding: .45rem 1rem;
  height: auto;
  color: var(--text-secondary) !important;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .875rem;
  letter-spacing: .01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: none;
  background: none;
  transition: color .2s, background .2s;
}
/* underline indicator */
.menu-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transition: transform .25s ease;
}
.menu-link:hover { color: var(--brand-navy) !important; }
.menu-link:hover::after { transform: scaleX(1); }
/* active fill is handled in header.css — only keep font-weight here */
.menu-link.active { font-weight: 600; }

/* caret */
.menu-caret {
  font-size: .6rem;
  opacity: .55;
  transition: transform .25s;
}
.menu-has-dropdown.open > .menu-link { color: var(--brand-navy) !important; }
.menu-has-dropdown.open > .menu-link::after { transform: scaleX(1); }
.menu-has-dropdown.open .menu-caret { transform: rotate(180deg); opacity: 1; }

/* ── Auth row ── */
.auth-buttons { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }

/* Search */
.nav-search-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.nav-search-btn:hover {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #fff;
  transform: scale(1.05);
}

/* Profile trigger */
.profile-dropdown-container { position: relative; }
.profile-dropdown-trigger {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: .3rem .8rem .3rem .3rem;
  cursor: pointer;
  transition: var(--transition);
}
.profile-dropdown-trigger:hover {
  border-color: var(--brand-navy);
  background: var(--brand-pale-blue);
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .82rem; color: #fff;
  flex-shrink: 0;
}
.dropdown-arrow {
  color: var(--text-tertiary);
  font-size: .72rem;
  transition: transform .3s;
}
.profile-dropdown-trigger:hover .dropdown-arrow,
.profile-dropdown-trigger.open .dropdown-arrow { transform: rotate(180deg); color: var(--brand-navy); }

/* Profile panel */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 290px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.97);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 1010;
  overflow: hidden;
}
.profile-dropdown-menu.show {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
}
/* gradient header in profile panel */
.dropdown-header {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1.1rem;
  background: var(--primary-gradient);
  position: relative; overflow: hidden;
}
.dropdown-header::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='30'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.user-avatar-large {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem; color: #fff;
  flex-shrink: 0; position: relative; z-index: 1;
}
.user-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.user-name {
  font-family: var(--font-title);
  font-size: .88rem; font-weight: 700; color: #fff;
  margin: 0 0 .15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-email {
  font-size: .73rem; color: rgba(255,255,255,.72);
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dropdown-divider { height: 1px; background: var(--border-color); margin: 0; }
.dropdown-items { padding: .5rem; }
.dropdown-item {
  display: flex !important; align-items: center; gap: .75rem;
  padding: .7rem .85rem !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm) !important;
  font-size: .875rem; text-decoration: none;
  transition: background .15s, color .15s;
}
.dropdown-item i {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--brand-navy);
  flex-shrink: 0; transition: background .15s;
}
.dropdown-item:hover {
  background: var(--brand-pale-blue);
  color: var(--brand-navy) !important;
}
.dropdown-item:hover i { background: var(--brand-navy); color: #fff; }
.dropdown-item.active {
  background: rgba(255,108,0,.09);
  color: var(--brand-orange) !important;
  font-weight: 600;
  border-radius: 8px;
}
.dropdown-item.active i {
  background: rgba(255,108,0,.15);
  color: var(--brand-orange);
}
.logout-item i     { color: #ef4444; background: rgba(239,68,68,.08); }
.logout-item:hover { background: rgba(239,68,68,.06) !important; color: #ef4444 !important; }
.logout-item:hover i { background: #ef4444; color: #fff; }

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.3rem;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.mobile-menu-toggle:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MEGA DROPDOWN  (split panel design)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.menu-has-dropdown { position: static; display: flex; align-items: stretch; }

.mega-wrap {
  position: fixed;
  overflow: hidden;
  top: var(--mega-top, 73px);
  left: 0; right: 0;
  width: 100%;
  background: var(--bg-primary);
  border-top: 3px solid var(--brand-orange);
  box-shadow: 0 24px 64px rgba(0,55,123,.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 999;
  transform: translateY(-6px);
}
.menu-has-dropdown.open .mega-wrap {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

/* Extend mega-left colour to the left viewport edge via box-shadow */
#campusMenuWrap .mega-left,
#deptMenuWrap   .mega-left { background: #00377B; box-shadow: -9999px 0 0 9999px #00377B; }
#tagsMenuWrap   .mega-left { background: #FF6C00; box-shadow: -9999px 0 0 9999px #FF6C00; }

/* Inner wrapper: max-width centred */
.mega-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* ── Left accent panel ── */
.mega-left {
  width: 260px;
  flex-shrink: 0;
  background: var(--primary-gradient);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.mega-left::before {
  content: '';
  position: absolute; bottom: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.mega-left::after {
  content: '';
  position: absolute; top: -20px; left: 20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.mega-left-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  margin-bottom: 1rem;
  position: relative; z-index: 1;
}
.mega-left-title {
  font-family: var(--font-title);
  font-size: 1.15rem; font-weight: 700; color: #fff;
  margin-bottom: .4rem;
  position: relative; z-index: 1;
}
.mega-left-sub {
  font-size: .8rem; color: rgba(255,255,255,.7);
  line-height: 1.55;
  position: relative; z-index: 1;
  margin-bottom: 1.5rem;
}
.mega-left-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  color: #fff; font-size: .82rem; font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  position: relative; z-index: 1;
  align-self: flex-start;
}
.mega-left-link:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ── Right content area ── */
.mega-right {
  flex: 1;
  padding: 1.75rem 2rem 1.5rem;
  overflow: hidden;
}
.mega-label {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand-orange);
  margin-bottom: .85rem;
  display: block;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .55rem;
}

/* ── Mega item cards ── */
.mega-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  transition: background .18s, border-color .18s, box-shadow .18s, transform .18s;
  position: relative;
  overflow: hidden;
}
.mega-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary-gradient);
  border-radius: 2px 0 0 2px;
  opacity: 0;
  transition: opacity .18s;
}
.mega-item:hover {
  background: #00377B;
  border-color: #00377B;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,55,123,.25);
}
.mega-item:hover::before { opacity: 0; }

/* Icon circle */
.mega-item-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(0,55,123,.1);
  border: 1.5px solid rgba(0,55,123,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  color: #00377B;
  flex-shrink: 0;
  transition: background .18s, color .18s, border-color .18s;
}
.mega-item:hover .mega-item-icon {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.25);
  color: #fff;
}

/* Text block */
.mega-item-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.mega-item-name {
  font-size: .845rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .18s;
}
.mega-item-hint {
  font-size: .72rem;
  color: var(--text-tertiary);
  transition: color .18s;
}
.mega-item:hover .mega-item-name { color: #fff; }
.mega-item:hover .mega-item-hint { color: rgba(255,255,255,.6); }

.mega-item-arrow {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s, transform .18s, color .18s;
}
.mega-item:hover .mega-item-arrow { opacity: 1; transform: translateX(0); color: rgba(255,255,255,.7); }

/* ── Tag cloud variant ── */
.mega-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .25rem 0;
}
.mega-tag-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .4rem .9rem;
  border-radius: 50px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  font-size: .8rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.mega-tag-pill:hover {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #fff;
  transform: translateY(-2px);
}
.mega-tag-pill i { font-size: .7rem; color: var(--brand-orange); transition: color .15s; }
.mega-tag-pill:hover i { color: rgba(255,255,255,.8); }

/* ── Mega footer bar ── */
.mega-footer {
  border-top: 1px solid var(--border-color);
  padding: .65rem 2rem .65rem calc(260px + 2rem);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-secondary);
}
.mega-footer-tip {
  font-size: .75rem; color: var(--text-tertiary);
  display: flex; align-items: center; gap: .4rem;
}
.mega-footer-link {
  font-size: .8rem; font-weight: 600;
  color: var(--brand-navy);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: .3rem;
  transition: color .15s;
}
.mega-footer-link:hover { color: var(--brand-orange); }

/* Responsive */
@media (max-width: 1023px) {
  .top-menu, .auth-buttons .profile-dropdown-container { display: none; }
  .mobile-menu-toggle { display: flex !important; }
}
@media (max-width: 576px) {
  .mega-grid { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   5. OFFCANVAS MOBILE NAV
================================================================ */

/* ── Offcanvas shell ── */
#mobileNav {
  width: min(340px, 92vw) !important;
  border-right: none;
  box-shadow: 4px 0 32px rgba(0,0,0,.18);
}

/* ── Offcanvas header — white/clean (no gradient) ── */
.mob-header {
  background: var(--bg-primary);
  padding: .9rem 1.1rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.mob-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.mob-logo {
  height: 34px;
}
.mob-close-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.mob-close-btn:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ── Authenticated user block ── */
.mob-user-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.mob-user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.mob-user-details { flex: 1; min-width: 0; }
.mob-user-name {
  font-size: .85rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mob-user-email {
  font-size: .72rem; color: var(--text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mob-role-badge {
  font-size: .65rem; font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex; align-items: center; gap: .3rem;
  white-space: nowrap;
}
.mob-role-badge.mob-role-admin   { background: rgba(255,200,0,.12); border-color: rgba(255,200,0,.3); color: #b45309; }
.mob-role-badge.mob-role-manager { background: rgba(0,55,123,.08);  border-color: rgba(0,55,123,.2);  color: var(--brand-navy); }

/* ── Guest block ── */
.mob-guest-info {
  display: flex; align-items: center; gap: .6rem;
  color: var(--text-secondary); font-size: .85rem;
}
.mob-guest-icon { font-size: 1.5rem; color: var(--text-tertiary); }

/* ── Body scrollable area ── */
#mobileNav .offcanvas-body {
  background: var(--bg-secondary);
  overflow-y: auto;
  padding: .75rem .75rem 2rem;
}

/* ── Home link — card style ── */
.mob-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  text-decoration: none;
  margin-bottom: .5rem;
  transition: background .15s, border-color .15s;
}
.mob-nav-link:hover { background: var(--brand-pale-blue); border-color: var(--brand-navy); color: var(--brand-navy); }
.mob-nav-arrow {
  margin-left: auto;
  font-size: .72rem;
  color: var(--text-tertiary);
  transition: transform .15s;
}
.mob-nav-link:hover .mob-nav-arrow { transform: translateX(3px); color: var(--brand-navy); }
.mob-nav-label { font-size: .9rem; font-weight: 600; }

/* ── Icon box shared ── */
.mob-nav-icon-box {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(0,55,123,.09);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: var(--brand-navy);
  flex-shrink: 0;
  transition: transform .15s, background .15s, color .15s;
}
.mob-nav-link:hover .mob-nav-icon-box { transform: scale(1.08); }
.mob-icon-blue   { background: rgba(0,55,123,.1);    color: var(--brand-navy); }
.mob-icon-orange { background: rgba(255,108,0,.1);   color: var(--brand-orange); }

/* ── Accordion — card style ── */
.mob-accordion { border-top: none; }
.mob-accordion .accordion-item {
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  background: var(--bg-primary);
  margin-bottom: .5rem;
  overflow: hidden;
}
.mob-acc-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  background: transparent !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}
.mob-acc-btn:not(.collapsed) .mob-nav-icon-box { transform: scale(1.08); }
.mob-acc-btn::after {
  margin-left: auto;
  background-size: 12px;
  flex-shrink: 0;
}
.mob-acc-body { padding: 0; }
.mob-sub-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1.1rem .65rem 1.4rem;
  font-size: .855rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: color .15s, background .15s;
}
.mob-sub-link:hover {
  color: var(--brand-navy);
  background: var(--bg-secondary);
}
.mob-sub-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-navy);
  opacity: .35;
  flex-shrink: 0;
  transition: opacity .15s;
}
.mob-sub-link:hover .mob-sub-dot { opacity: .85; }
.mob-empty-msg { font-size: .8rem; color: var(--text-tertiary); padding: .6rem 0; margin: 0; }

/* ── Tags section ── */
.mob-tags-section {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
}
.mob-tags-label {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand-orange);
  margin-bottom: .7rem;
  display: flex; align-items: center; gap: .35rem;
}
.mob-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.mob-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .3rem .65rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.mob-tag-pill:hover {
  background: rgba(0,55,123,.08);
  border-color: var(--brand-navy);
  color: var(--brand-navy);
}
.mob-tag-pill i { font-size: .75rem; opacity: .6; }

/* ── Action buttons ── */
.mob-nav-actions {
  padding: 1.1rem 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.mob-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: opacity .15s, transform .1s;
}
.mob-action-btn:active { transform: scale(.97); }
.mob-action-navy   { background: var(--brand-navy);   color: #fff; }
.mob-action-navy:hover { opacity: .9; color: #fff; }
.mob-action-orange { background: var(--brand-orange); color: #fff; }
.mob-action-orange:hover { opacity: .9; color: #fff; }
.mob-action-logout {
  background: transparent;
  border-color: rgba(220,53,69,.45);
  color: #dc3545;
}
.mob-action-logout:hover { background: rgba(220,53,69,.07); color: #dc3545; }
.mob-action-signin { background: var(--primary-gradient); color: #fff; }
.mob-action-signin:hover { opacity: .9; color: #fff; }

/* ================================================================
   6. SEARCH OVERLAY
================================================================ */
.srch-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding-top: 8vh;
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.srch-overlay.srch-open { opacity: 1; visibility: visible; }
.srch-overlay.srch-open .srch-panel {
  transform: translateY(0) scale(1); opacity: 1;
}

/* Backdrop */
.srch-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,8,24,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Panel */
.srch-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 660px;
  padding: 0 20px 40px;
  transform: translateY(-18px) scale(.97);
  opacity: 0;
  transition: transform .32s cubic-bezier(.34,1.56,.64,1), opacity .22s;
}

/* Header */
.srch-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.srch-brand {
  font-size: .72rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
  display: flex; align-items: center; gap: .45rem;
}
.srch-brand i { color: var(--brand-orange); font-size: .85rem; }
.srch-close-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.6);
  border-radius: 9px; padding: .4rem .85rem;
  cursor: pointer; font-size: .78rem; font-weight: 600;
  transition: background .15s, color .15s;
}
.srch-close-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.srch-close-btn i { font-size: .95rem; }
.srch-close-btn kbd {
  font-size: .6rem; font-family: inherit; font-weight: 700;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 4px; padding: 1px 5px;
}

/* Input */
.srch-form { margin-bottom: 22px; }
.srch-input-wrap {
  display: flex; align-items: center;
  background: #fff;
  border-radius: 18px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.2);
}
.srch-ico { color: #9ca3af; font-size: 1.1rem; flex-shrink: 0; }
.srch-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 1.15rem; padding: 10px 14px;
  color: var(--text-primary); font-family: var(--font-body);
}
.srch-input::placeholder { color: #9ca3af; }
.srch-go-btn {
  width: 50px; height: 50px; border-radius: 13px; flex-shrink: 0;
  background: var(--brand-navy); border: none; color: #fff;
  font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
}
.srch-go-btn:hover { background: var(--brand-orange); transform: scale(1.06); }

/* Sections */
.srch-section { margin-bottom: 18px; }
.srch-section-label {
  display: flex; align-items: center; gap: .4rem;
  font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  margin-bottom: 10px;
}
.srch-section-label i { color: var(--brand-orange); font-size: .7rem; }

/* Chips */
.srch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.srch-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .36rem .88rem; border-radius: 50px;
  font-size: .775rem; font-weight: 600;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: background .15s, color .15s, transform .15s, border-color .15s;
}
.srch-chip:hover { background: rgba(255,255,255,.18); color: #fff; transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.srch-chip-red    { background: rgba(220,38,38,.2);  border-color: rgba(220,38,38,.3);  color: #fca5a5; }
.srch-chip-red:hover    { background: rgba(220,38,38,.4); color: #fff; }
.srch-chip-orange { background: rgba(255,108,0,.2);  border-color: rgba(255,108,0,.3);  color: #fdba74; }
.srch-chip-orange:hover { background: rgba(255,108,0,.4); color: #fff; }
.srch-chip-navy   { background: rgba(97,185,240,.15); border-color: rgba(97,185,240,.28); color: #93c5fd; }
.srch-chip-navy:hover   { background: rgba(97,185,240,.3); color: #fff; }
.srch-chip-tag { font-size: .72rem; color: rgba(255,255,255,.5); }
.srch-chip-tag:hover { color: #fff; }

/* Hint */
.srch-hint {
  text-align: center; font-size: .7rem;
  color: rgba(255,255,255,.2); margin: 0;
}
.srch-hint kbd {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px; padding: 1px 6px;
  font-size: .65rem; font-family: inherit;
  color: rgba(255,255,255,.4);
}

@media (max-width: 480px) {
  .srch-overlay { padding-top: 5vh; }
  .srch-input { font-size: 1rem; padding: 8px 10px; }
  .srch-go-btn { width: 44px; height: 44px; }
  .srch-hint { display: none; }
}

/* ================================================================
   7. HERO CAROUSEL  (3-card slider, news.pes.edu style)
================================================================ */
.news-hero {
  background: #000e28;
  overflow: hidden;
  position: relative;
}

/* ── Slider wrapper ── */
.hero-slider-wrap {
  position: relative;
  overflow: hidden;
}

/* ── Track: flex row that slides ── */
.hero-slider-track {
  display: flex;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ── Each card ── */
.hero-slide-item {
  flex: 0 0 calc(100% / 3);
  min-width: 0;
  position: relative;
  height: clamp(300px, 38vw, 480px);
  overflow: hidden;
  display: block;
  text-decoration: none;
  cursor: pointer;
}
.hero-slide-item img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  transition: transform .6s ease;
}
.hero-slide-item:hover img { transform: scale(1.05); }

/* gradient overlay per card */
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,5,25,.93)  0%,
    rgba(0,5,25,.6)   38%,
    rgba(0,5,25,.15)  65%,
    transparent       100%
  );
  pointer-events: none;
}

/* caption per card */
.hero-slide-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0 20px 22px;
  z-index: 2;
}
.hero-slide-caption h2 {
  font-family: var(--font-title);
  font-size: clamp(.9rem, 1.5vw, 1.2rem);
  font-weight: 700; line-height: 1.35; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
  margin: 6px 0 6px;
}
.hero-slide-caption p {
  font-size: 12.5px; color: rgba(255,255,255,.75);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.hero-slide-meta {
  font-size: 11px; color: rgba(255,255,255,.55);
  display: block;
}
.hero-slide-meta i { font-size: .7rem; }

/* thin separator between cards */
.hero-slide-item + .hero-slide-item { border-left: 2px solid rgba(255,255,255,.06); }

/* ribbon badges */
.hero-ribbon {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 50px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}
.hero-ribbon-hot      { background: var(--brand-orange); color: #fff; }
.hero-ribbon-featured { background: #2563eb; color: #fff; }
.hero-ribbon-press    { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.3); }

/* read btn (kept for potential use) */
.hero-read-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 7px;
  background: var(--brand-orange); color: #fff;
  font-size: 12px; font-weight: 600; text-decoration: none;
  transition: background .2s;
}
.hero-read-btn:hover { background: #e05a00; color: #fff; }

/* ── Arrow buttons ── */
.hero-sl-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.12); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.2);
  color: #fff; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  transition: background .2s, border-color .2s;
}
.hero-sl-prev { left: 12px; }
.hero-sl-next { right: 12px; }
.hero-sl-btn:hover { background: var(--brand-orange); border-color: var(--brand-orange); }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .hero-slide-item { flex: 0 0 50%; height: clamp(260px, 45vw, 380px); }
}
@media (max-width: 639px) {
  .hero-slide-item { flex: 0 0 100%; height: 60vw; min-height: 220px; }
  .hero-slide-caption h2 { font-size: clamp(.85rem, 4vw, 1.1rem); }
  .hero-slide-caption p  { display: none; }
}

/* ================================================================
   8. TAGS BAR
================================================================ */
.tags-bar {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  padding: 12px 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.tags-bar::-webkit-scrollbar { height: 3px; }
.tags-bar::-webkit-scrollbar-thumb { background: var(--brand-navy); border-radius: 2px; }
.tags-bar .container { display: flex; align-items: center; gap: 8px; }
.tags-bar-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: .6px; flex-shrink: 0;
}
.tag-pill {
  display: inline-block;
  padding: 5px 14px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  font-size: 12.5px;
  color: var(--brand-navy);
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.tag-pill:hover {
  background: var(--brand-navy);
  color: #fff;
  border-color: var(--brand-navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ================================================================
   9. NEWS CARD GRID
================================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 991px) { .news-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 575px) { .news-grid { grid-template-columns: 1fr; gap: 14px; } }

.news-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-color);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue-light);
}

.news-card-img {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--pes-dark);
  aspect-ratio: 16/9;
}
.news-card-img img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; transition: transform .45s ease; }
.news-card:hover .news-card-img img { transform: scale(1.04); }

.news-card-no-img {
  width: 100%; aspect-ratio: 16/9;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.news-card-no-img span {
  color: rgba(255,255,255,.75);
  font-size: 13px; text-align: center;
  font-family: var(--font-title);
  font-weight: 600; line-height: 1.5;
}

/* Ribbon badges */
.news-ribbon {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 11px; border-radius: 50px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}
.ribbon-hot { background: rgba(220,38,38,.9); color: #fff; }
.ribbon-featured { background: rgba(255,108,0,.9); color: #fff; }
.ribbon-press { background: rgba(0,55,123,.9); color: #fff; }

.news-card-meta-overlay {
  position: absolute; bottom: 10px; right: 10px;
  display: flex; gap: 5px; z-index: 2;
}
.news-card-meta-overlay span {
  background: rgba(0,0,0,.5); color: #fff;
  padding: 3px 8px; border-radius: 50px;
  font-size: 11px; backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 4px;
}

.news-card-body { padding: 12px 14px 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.news-card-bottom {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px; margin-top: auto; padding-top: 6px;
}
.news-card-date {
  font-size: 11px; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
  font-weight: 500;
}
.news-card-date i { color: var(--brand-blue-light); }
.news-card-title {
  font-family: var(--font-title);
  font-size: 13.5px; font-weight: 700;
  line-height: 1.4; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-title a { color: var(--text-primary); transition: color .2s; }
.news-card-title a:hover { color: var(--brand-navy); }
.news-card-excerpt {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border-color); margin-top: auto;
  font-size: 11.5px; color: var(--text-tertiary);
}
.news-card-readmore {
  font-size: 12.5px; font-weight: 700; color: var(--brand-navy);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: 50px;
  border: 1.5px solid var(--border-color);
  transition: var(--transition);
}
.news-card-readmore:hover {
  background: var(--brand-navy);
  color: #fff;
  border-color: var(--brand-navy);
}

/* ================================================================
   10. PAGINATION
================================================================ */
.pagination-wrap {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 48px; flex-wrap: wrap;
}
.pagination-wrap a,
.pagination-wrap span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  border: 2px solid var(--border-color);
  color: var(--brand-navy);
  background: var(--bg-primary);
  transition: var(--transition);
}
.pagination-wrap a:hover {
  background: var(--brand-navy);
  color: #fff;
  border-color: var(--brand-navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.pagination-wrap .current-pg {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.pagination-wrap .ellipsis { border: none; background: none; color: var(--text-tertiary); }

/* Dark mode pagination */
[data-bs-theme="dark"] .pagination-wrap a,
[data-bs-theme="dark"] .pagination-wrap span {
  background: #1a2d45;
  border-color: rgba(97,185,240,.25);
  color: #c5d8ec !important;
}
[data-bs-theme="dark"] .pagination-wrap a:hover {
  background: #1e4a7a;
  border-color: #61B9F0;
  color: #fff;
}
[data-bs-theme="dark"] .pagination-wrap .current-pg {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
}
[data-bs-theme="dark"] .pagination-wrap .ellipsis {
  background: none;
  border-color: transparent;
  color: #4a6a8a;
}

/* ================================================================
   BROWSE-BY-PAGE — featured first article + grid
================================================================ */

/* Featured card (page 1, item 0) */
.bbp-featured { margin-bottom: 40px; }

.bbp-feat-card {
  display: flex; border-radius: var(--radius-lg); overflow: hidden;
  border: 2px solid var(--border-color); background: var(--bg-primary);
  box-shadow: var(--shadow-md); text-decoration: none;
  min-height: 340px; transition: transform .28s, box-shadow .28s;
}
.bbp-feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.bbp-feat-img {
  flex: 0 0 52%; position: relative; overflow: hidden;
}
.bbp-feat-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.bbp-feat-card:hover .bbp-feat-img img { transform: scale(1.04); }
.bbp-feat-no-img {
  width: 100%; height: 100%; background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: rgba(255,255,255,.25);
}
/* Ribbon on featured */
.bbp-feat-ribbon {
  position: absolute; top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 5px 13px; border-radius: 50px; backdrop-filter: blur(4px);
}
.bbp-feat-ribbon.hot      { background: rgba(220,38,38,.9);  color: #fff; }
.bbp-feat-ribbon.featured { background: rgba(255,108,0,.9);  color: #fff; }
.bbp-feat-ribbon.press    { background: rgba(0,55,123,.9);   color: #fff; }

/* Featured badge (top-right of image) */
.bbp-feat-badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--accent-gradient); color: #fff;
  font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px;
  padding: 4px 12px; border-radius: 50px;
  box-shadow: 0 3px 10px rgba(255,108,0,.4);
}

.bbp-feat-body {
  flex: 1; padding: 32px 32px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.bbp-feat-meta-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.bbp-feat-campus {
  font-size: 11px; font-weight: 700; color: var(--brand-navy);
  background: var(--bg-tertiary); border: 1.5px solid var(--border-color);
  padding: 3px 10px; border-radius: 50px;
}
.bbp-feat-date {
  font-size: 12px; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 4px;
}
.bbp-feat-date i { color: var(--brand-blue-light); }
.bbp-feat-title {
  font-family: var(--font-title); font-size: 22px; font-weight: 800;
  line-height: 1.35; color: var(--text-primary); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bbp-feat-excerpt {
  font-size: 14px; color: var(--text-secondary); line-height: 1.72; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.bbp-feat-footer {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto; padding-top: 14px;
  border-top: 1.5px solid var(--border-color);
}
.bbp-feat-stats {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-tertiary);
}
.bbp-feat-readmore {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--bg-primary);
  background: var(--primary-gradient);
  padding: 9px 22px; border-radius: 50px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.bbp-feat-readmore:hover { box-shadow: var(--shadow-md); opacity: .9; }


/* Mobile */
@media (max-width: 767px) {
  .bbp-feat-card { flex-direction: column; min-height: auto; }
  .bbp-feat-img { flex: 0 0 220px; height: 220px; }
  .bbp-feat-body { padding: 20px; gap: 10px; }
  .bbp-feat-title { font-size: 18px; }
  .bbp-feat-excerpt { -webkit-line-clamp: 3; }
}

/* ── BBP Section divider ─────────────────────────────────────────── */
.bbp-divider {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.bbp-divider-label {
  font-family: var(--font-title); font-size: 15px; font-weight: 800;
  color: var(--text-primary); white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
}
.bbp-divider-label i { color: var(--brand-orange); }
.bbp-divider-line { flex: 1; height: 2px; background: var(--border-color); border-radius: 2px; }
.bbp-divider-count {
  font-size: 11.5px; font-weight: 700; color: var(--text-tertiary);
  background: var(--bg-secondary); border: 1.5px solid var(--border-color);
  padding: 3px 10px; border-radius: 50px; white-space: nowrap;
}

/* ── BBP Hub: 2-col layout (lead poster | 2×2 quad grid) ─────────── */
.bbp-hub {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
  align-items: stretch;
}

/* ── Col 1: Big lead poster ── */
.bbp-hub-lead {
  position: relative; display: block;
  border-radius: 18px; overflow: hidden;
  min-height: 400px;
  background: linear-gradient(145deg, #00337a 0%, #1a6abf 100%);
  text-decoration: none; transition: transform .28s ease;
}
.bbp-hub-lead:hover { transform: translateY(-4px); }
.bbp-hub-lead > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.bbp-hub-lead:hover > img { transform: scale(1.04); }
.bbp-hub-lead-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.22) 50%, transparent 100%);
}
.bbp-hub-lead-body {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  padding: 24px 26px; display: flex; flex-direction: column; gap: 9px;
}
.bbp-hub-lead-campus-row { display: flex; gap: 6px; flex-wrap: wrap; }
.bbp-hub-lead-campus {
  font-size: 10.5px; font-weight: 700;
  background: rgba(255,255,255,.18); color: #fff;
  padding: 2px 9px; border-radius: 50px; backdrop-filter: blur(4px);
}
.bbp-hub-lead-title {
  font-family: var(--font-title); font-size: 1.25rem; font-weight: 800;
  color: #fff; line-height: 1.3; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.bbp-hub-lead-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: rgba(255,255,255,.72);
}
.bbp-hub-lead-cta {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.18); padding: 5px 14px;
  border-radius: 50px; backdrop-filter: blur(4px); transition: background .2s;
}
.bbp-hub-lead:hover .bbp-hub-lead-cta { background: rgba(255,255,255,.3); }

/* ── Col 2+3 combined: 2×2 quad grid ── */
.bbp-hub-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.bbp-quad-card {
  display: flex; flex-direction: column;
  background: var(--bg-primary); border: 1px solid var(--border-color);
  border-radius: 14px; overflow: hidden; text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, border-color .2s;
}
.bbp-quad-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); border-color: var(--brand-blue-light); }

.bbp-quad-img {
  position: relative; overflow: hidden; aspect-ratio: 16/9; flex-shrink: 0;
}
.bbp-quad-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.bbp-quad-card:hover .bbp-quad-img img { transform: scale(1.05); }
.bbp-quad-noimg {
  width: 100%; height: 100%; min-height: 90px;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: rgba(255,255,255,.3);
}

.bbp-quad-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.bbp-quad-title {
  font-family: var(--font-title); font-size: 12.5px; font-weight: 700;
  color: var(--text-primary); line-height: 1.38; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.bbp-quad-card:hover .bbp-quad-title { color: var(--brand-navy); }
.bbp-quad-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--text-tertiary); margin-top: auto;
}
.bbp-quad-meta i { font-size: 10px; }

/* ── Shared ribbon badge (used inside hub stories) ── */
.bbp-m-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 50px; align-self: flex-start;
}
.bbp-m-badge.hot   { background: rgba(220,38,38,.1);  color: #dc2626; }
.bbp-m-badge.feat  { background: rgba(255,108,0,.1);  color: var(--brand-orange); }
.bbp-m-badge.press { background: rgba(0,55,123,.08);  color: var(--brand-navy); }

/* ── 4-col grid below hub ── */
.bbp-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 1100px) { .bbp-hub-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 991px) {
  .bbp-hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .bbp-hub { grid-template-columns: 1fr; }
  .bbp-hub-lead { min-height: 260px; }
  .bbp-hub-quad { grid-template-columns: 1fr 1fr; }
  .bbp-hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .bbp-hub-quad { grid-template-columns: 1fr; }
  .bbp-hub-grid { grid-template-columns: 1fr; }
}

/* ── Dark mode ── */
[data-bs-theme="dark"] .bbp-quad-card { background: #0f1c2e; border-color: #1a2f4a; }
[data-bs-theme="dark"] .bbp-quad-card:hover { border-color: rgba(97,185,240,.45); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
[data-bs-theme="dark"] .bbp-quad-title { color: #dde8f5; }
[data-bs-theme="dark"] .bbp-quad-card:hover .bbp-quad-title { color: #61B9F0; }
[data-bs-theme="dark"] .bbp-m-badge.hot   { background: rgba(220,38,38,.18); }
[data-bs-theme="dark"] .bbp-m-badge.feat  { background: rgba(255,108,0,.15); }
[data-bs-theme="dark"] .bbp-m-badge.press { background: rgba(97,185,240,.1); color: #61B9F0; }
[data-bs-theme="dark"] .bbp-feat-campus { color: #c5d8ec; background: rgba(97,185,240,.1); border-color: rgba(97,185,240,.2); }

@media (max-width: 575px) {
  .bbp-feat-img { flex: 0 0 190px; height: 190px; }
  .bbp-feat-body { padding: 14px 16px 16px; }
  .bbp-feat-title { font-size: 16px; }
  .bbp-featured { margin-bottom: 28px; }
}

/* ================================================================
   11. PAGE / SECTION HELPERS
================================================================ */
.page-section { padding: 56px 0; background: var(--bg-secondary); }

/* ── Unified section header — used on every section across all pages ── */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.sec-head-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.sec-head-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  box-shadow: 0 5px 16px rgba(255,108,0,.28);
}
.sec-head-icon.sec-icon-navy {
  background: var(--primary-gradient);
  box-shadow: 0 5px 16px rgba(0,55,123,.22);
}
.sec-head-title {
  font-family: var(--font-title); font-size: 20px; font-weight: 800;
  color: var(--text-primary); margin: 0 0 3px; line-height: 1.2;
}
.sec-head-sub { font-size: 13px; color: var(--text-tertiary); margin: 0; }
.sec-head-count {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--brand-navy);
  background: var(--bg-tertiary); border: 1.5px solid var(--border-color);
  padding: 4px 12px; border-radius: 50px; margin-top: 4px;
}
.sec-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* CTA link on right side */
.sec-head-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--brand-navy);
  text-decoration: none; white-space: nowrap;
  padding: 7px 18px; border: 2px solid var(--brand-navy);
  border-radius: 50px; transition: var(--transition);
}
.sec-head-cta:hover { background: var(--brand-navy); color: #fff; }
.sec-head-cta.orange { border-color: var(--brand-orange); color: var(--brand-orange); }
.sec-head-cta.orange:hover { background: var(--brand-orange); color: #fff; }

/* Mobile adjustments */
@media (max-width: 575px) {
  .sec-head-icon { width: 38px; height: 38px; font-size: 1.1rem; border-radius: 10px; }
  .sec-head-title { font-size: 17px; }
  .sec-head-sub { font-size: 12px; }
}

/* Legacy aliases — keep working for older templates */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.section-title {
  font-family: var(--font-title);
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  position: relative; padding-left: 16px;
}
.section-title::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 4px; background: var(--accent-gradient); border-radius: 2px;
}

/* ================================================================
   11b. INDEX PAGE  (ix- prefix)
================================================================ */

/* ── Hero caption meta (date + campus) ── */
.hero-caption-meta {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 12px;
}
.hero-caption-meta span {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.1);
  padding: 3px 10px; border-radius: 50px;
  backdrop-filter: blur(4px);
}

/* ── Tags strip ── */
.ix-tags-strip {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  padding: 11px 0;
  position: relative;
}
/* Fade edges */
.ix-tags-strip::before,
.ix-tags-strip::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2;
  pointer-events: none;
}
.ix-tags-strip::before { left: 0; background: linear-gradient(to right, var(--bg-primary), transparent); }
.ix-tags-strip::after  { right: 0; background: linear-gradient(to left, var(--bg-primary), transparent); }
.ix-tags-inner {
  display: flex; align-items: center; gap: .5rem;
  overflow-x: auto; padding: 0 24px;
  scrollbar-width: none;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.ix-tags-inner::-webkit-scrollbar { display: none; }
.ix-tags-label {
  font-size: .82rem; color: var(--brand-orange);
  flex-shrink: 0; font-weight: 700;
}

/* ── Section wrapper ── */
.ix-section { padding: 52px 0 72px; background: var(--bg-primary); }

/* ── Section header ── */
.ix-section-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 32px;
}
.ix-head-left { display: flex; align-items: center; gap: 14px; }
.ix-head-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,55,123,.25);
}
.ix-head-title {
  font-family: var(--font-title);
  font-size: 1.35rem; font-weight: 800;
  color: var(--text-primary); margin: 0;
  line-height: 1.2;
}
.ix-head-count {
  font-size: .75rem; color: var(--text-tertiary);
  font-weight: 500; display: block;
}

/* ── Campus filter pills ── */
.ix-campus-filters {
  display: flex; align-items: center; gap: .4rem;
  flex-wrap: wrap;
}
.ix-filter-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .85rem;
  border-radius: 50px;
  font-size: .78rem; font-weight: 600;
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-primary);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.ix-filter-pill:hover,
.ix-filter-pill.active {
  background: var(--brand-navy);
  color: #fff; border-color: var(--brand-navy);
}
.ix-filter-all i { font-size: .72rem; }

/* ── Page 1 masonry — no separate grid override needed ── */

/* ── Department dot in card date ── */
.ix-dept-dot {
  display: inline-flex; align-items: center;
  padding: 1px 8px;
  background: rgba(255,108,0,.08);
  border: 1px solid rgba(255,108,0,.2);
  border-radius: 50px;
  font-size: .68rem; font-weight: 600; color: var(--brand-orange);
  margin-left: 4px;
}

/* ── Campus pills in card footer ── */
.ix-campus-pills { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ix-campus-pills .pill-blue { font-size: .7rem; padding: 2px 8px; text-decoration: none; }

/* ── Pagination arrows ── */
.pg-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  color: var(--brand-navy);
  background: var(--bg-primary);
  transition: var(--transition);
  font-size: .9rem;
}
.pg-arrow:hover {
  background: var(--brand-navy); color: #fff; border-color: var(--brand-navy);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}

/* ── Empty state ── */
.ix-empty-state {
  text-align: center; padding: 80px 20px;
}
.ix-empty-icon {
  font-size: 3.5rem; color: var(--border-color);
  margin-bottom: 20px; display: block;
}
.ix-empty-title {
  font-family: var(--font-title);
  font-size: 1.4rem; color: var(--text-secondary);
  margin-bottom: 8px;
}
.ix-empty-sub { color: var(--text-tertiary); font-size: .9rem; margin: 0; }

/* ── Dark mode for ix- classes ── */
[data-bs-theme="dark"] .ix-tags-strip { background: #22304a; border-bottom-color: rgba(97,185,240,.1); }
[data-bs-theme="dark"] .ix-tags-strip::before { background: linear-gradient(to right, #22304a, transparent); }
[data-bs-theme="dark"] .ix-tags-strip::after  { background: linear-gradient(to left, #22304a, transparent); }
[data-bs-theme="dark"] .ix-section { background: var(--bg-primary); }
[data-bs-theme="dark"] .ix-filter-pill { background: #2a3a52; border-color: rgba(97,185,240,.18); color: #A8C8E8; }
[data-bs-theme="dark"] .ix-filter-pill:hover,
[data-bs-theme="dark"] .ix-filter-pill.active { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
[data-bs-theme="dark"] .pg-arrow { background: #1a2d45; border-color: rgba(97,185,240,.25); color: #c5d8ec !important; }
[data-bs-theme="dark"] .pg-arrow:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

/* ================================================================
   12. BROWSE HERO
================================================================ */
.browse-hero {
  background: #00377B;
  color: #fff;
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--brand-orange);
}

/* Decorative circles */
.bh-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.bh-deco-1 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,108,0,.18) 0%, transparent 70%);
  top: -80px; right: 10%;
}
.bh-deco-2 {
  width: 200px; height: 200px;
  background: rgba(255,255,255,.04);
  bottom: -60px; left: 5%;
  border: 1px solid rgba(255,255,255,.08);
}
.bh-deco-3 {
  width: 100px; height: 100px;
  background: rgba(255,255,255,.04);
  top: 20px; left: 30%;
  border: 1px solid rgba(255,255,255,.06);
}

/* Inner layout */
.bh-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 1;
}

/* Icon badge */
.bh-badge {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.bh-badge i {
  font-size: 2rem;
  color: #fff;
}

/* Text block */
.bh-content { flex: 1; min-width: 0; }
.bh-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: 6px;
}
.bh-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
}
.bh-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bh-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,108,0,.2);
  border: 1px solid rgba(255,108,0,.4);
  color: #FFB370;
  font-size: .82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
}
.bh-dot { color: rgba(255,255,255,.3); font-size: 1.1rem; }
.bh-sub { color: rgba(255,255,255,.55); font-size: .85rem; }

/* Watermark icon */
.bh-watermark-icon {
  font-size: 9rem;
  color: rgba(255,255,255,.05);
  position: absolute;
  right: -10px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  line-height: 1;
}

@media (max-width: 576px) {
  .bh-badge { width: 56px; height: 56px; border-radius: 16px; }
  .bh-badge i { font-size: 1.5rem; }
  .bh-watermark-icon { font-size: 6rem; opacity: .04; }
}

/* ================================================================
   13. NEWS DETAIL
================================================================ */
/* ================================================================
   13. NEWS DETAIL PAGE  (nd- prefix = news-detail)
================================================================ */

/* ── Hero v2 — navy bg + decorative boxes + two-column ── */
.nd-hero-v2 {
  background: linear-gradient(135deg, #00377B 0%, #004fa3 50%, #0062cc 100%);
  position: relative;
  overflow: hidden;
  padding: 52px 0 48px;
  color: #fff;
}
/* Subtle radial glow overlay */
.nd-hero-v2::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(97,185,240,.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(0,100,200,.18) 0%, transparent 60%);
  z-index: 0;
}

/* Decorative floating boxes */
.nd-deco {
  position: absolute;
  border-radius: 20px;
  pointer-events: none;
}
.nd-deco-1 {
  width: 420px; height: 420px; top: -150px; right: -110px;
  transform: rotate(22deg);
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.12);
}
.nd-deco-2 {
  width: 260px; height: 260px; bottom: -90px; right: 220px;
  transform: rotate(-14deg);
  background: rgba(97,185,240,.08);
  border: 1px solid rgba(97,185,240,.18);
}
.nd-deco-3 {
  width: 170px; height: 170px; top: 16px; right: 380px;
  transform: rotate(10deg);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
}
.nd-deco-4 {
  width: 110px; height: 110px; bottom: 20px; left: 32px;
  transform: rotate(30deg);
  background: rgba(0,198,255,.07);
  border: 1px solid rgba(0,198,255,.15);
}
/* Extra accent boxes */
.nd-deco-5 {
  width: 70px; height: 70px; top: 60px; left: 180px;
  transform: rotate(-18deg);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
}
.nd-deco-6 {
  width: 48px; height: 48px; bottom: 40px; right: 520px;
  transform: rotate(40deg);
  background: rgba(97,185,240,.1);
  border: 1px solid rgba(97,185,240,.2);
  border-radius: 10px;
}

/* ── Hero stack: breadcrumb → badges → title → chips → gallery ── */
.nd-hero-stack {
  display: flex; flex-direction: column; gap: 16px;
  position: relative; z-index: 1;
}

/* Stats chips row */
.nd-meta-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 4px;
}
.nd-mchip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: 5px 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50px;
  font-size: .78rem; color: rgba(255,255,255,.88);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.nd-mchip-tag {
  text-decoration: none;
  background: rgba(255,255,255,.07);
  transition: background .15s;
}
.nd-mchip-tag:hover { background: rgba(255,255,255,.2); color: #fff; }
.nd-likes-chip { background: rgba(220,53,69,.2); border-color: rgba(220,53,69,.3); }
.nd-likes-chip i { color: #ff6b6b; }

/* Gallery */
.nd-hg-wrap { display: flex; flex-direction: column; gap: 10px; }
.nd-hg-main {
  position: relative;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 56px rgba(0,0,0,.55);
  aspect-ratio: 16 / 9;
  background: #0a1828;
}
.detail-slide { display: none; }
.detail-slide.active { display: block; height: 100%; }
.detail-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.nd-gal-hint { display: none; }

/* Fullscreen button on gallery */
.nd-fullscreen-btn {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: background .18s, transform .15s;
}
.nd-fullscreen-btn:hover { background: rgba(0,0,0,.82); transform: scale(1.08); }
.slider-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
}
.slider-btn {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.18); border: none; color: #fff; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background .2s;
}
.slider-btn:hover { background: rgba(255,255,255,.38); }
.slider-count { color: rgba(255,255,255,.9); font-size: 12.5px; font-weight: 600; }

/* Thumbnails */
.nd-thumbs-v2 {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px;
  scrollbar-width: none;
}
.nd-thumbs-v2::-webkit-scrollbar { display: none; }
.nd-thumb-v2 {
  flex-shrink: 0; width: 80px; height: 56px;
  border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; opacity: .5;
  transition: opacity .2s, border-color .2s, transform .15s;
  background: none; padding: 0;
  position: relative;
}
.nd-thumb-v2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nd-thumb-v2:hover  { opacity: 1; transform: translateY(-2px); border-color: rgba(255,255,255,.55); }
.nd-thumb-v2.active { opacity: 1; border-color: var(--brand-orange); transform: translateY(-2px); }

/* View Album thumbnail */
.nd-thumb-album {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(255,108,0,.15) !important;
  border-color: var(--brand-orange) !important;
  opacity: 1 !important;
  color: var(--brand-orange);
  text-decoration: none;
  width: 80px; height: 56px;
}
.nd-thumb-album i { font-size: 1.2rem; line-height: 1; }
.nd-thumb-album span { font-size: 9px; font-weight: 700; text-align: center; line-height: 1.2; text-transform: uppercase; letter-spacing: .3px; }
.nd-thumb-album:hover { background: var(--brand-orange) !important; color: #fff !important; border-color: var(--brand-orange) !important; transform: translateY(-2px); }

/* Mobile */
@media (max-width: 600px) {
  .nd-hero-stack { gap: 12px; }
  .nd-hero-v2 { padding: 28px 0 22px; }
  .nd-hg-main { aspect-ratio: 4 / 3; }
}

/* Breadcrumb */
.nd-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
  font-size: .75rem; color: rgba(255,255,255,.55);
  margin-bottom: 1.25rem;
}
.nd-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .15s; }
.nd-breadcrumb a:hover { color: #fff; }
.nd-breadcrumb span { color: rgba(255,255,255,.4); }
.nd-bc-sep { font-size: .6rem; opacity: .4; }

/* Badge row */
.nd-badge-row {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.nd-campus-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .8rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50px;
  font-size: .72rem; font-weight: 600; color: #fff;
  backdrop-filter: blur(6px);
  text-decoration: none;
  transition: background .15s;
}
.nd-campus-badge:hover { background: rgba(255,255,255,.28); color: #fff; }
.ribbon-archived { background: rgba(220,38,38,.85); color: #fff; border: 1px solid rgba(255,255,255,.2); }
/* In detail page badge row, ribbons must be inline (not absolutely positioned) */
.nd-badge-row .news-ribbon { position: static; }

/* Title */
.nd-title {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3.5vw, 2.55rem);
  font-weight: 800; line-height: 1.25;
  color: #fff; margin-bottom: 1.35rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

/* Meta row */
.nd-meta-row {
  display: flex; flex-wrap: wrap; gap: .55rem;
}
.nd-meta-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .85rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50px;
  font-size: .78rem; color: rgba(255,255,255,.88);
  backdrop-filter: blur(4px);
}
.nd-likes-chip { background: rgba(220,53,69,.2); border-color: rgba(220,53,69,.3); }
.nd-likes-chip i { color: #ff6b6b; }

/* ── Sticky toolbar ── */
.nd-toolbar {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  padding: .6rem 0;
  position: sticky; top: 0; z-index: 90;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.nd-toolbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
.nd-toolbar-tags { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.nd-tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .28rem .75rem;
  font-size: .75rem; font-weight: 600; color: var(--brand-navy);
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.nd-tag-chip:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.nd-toolbar-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.nd-action-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .38rem .85rem;
  border-radius: 8px;
  font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.nd-action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nd-action-btn:active { transform: scale(.96); }
.nd-btn-like { color: #dc3545; border-color: rgba(220,53,69,.3); }
.nd-btn-like:hover { background: rgba(220,53,69,.08); color: #dc3545; border-color: rgba(220,53,69,.5); }
.nd-btn-like.liked { background: rgba(220,53,69,.12); color: #dc3545; border-color: rgba(220,53,69,.4); }
.nd-btn-like.liked i { animation: nd-heartbeat .35s ease; }
.nd-btn-edit  { color: var(--brand-navy); border-color: rgba(0,55,123,.3); }
.nd-btn-edit:hover { background: rgba(0,55,123,.08); color: var(--brand-navy); }
.nd-btn-danger { color: #dc3545; border-color: rgba(220,53,69,.3); }
.nd-btn-danger:hover { background: rgba(220,53,69,.08); color: #dc3545; }
.nd-btn-success { color: #198754; border-color: rgba(25,135,84,.3); }
.nd-btn-success:hover { background: rgba(25,135,84,.08); color: #198754; }
.nd-btn-label { display: inline; }
@media (max-width: 500px) { .nd-btn-label { display: none; } }

/* ── Back to top ── */
#nd-back-top {
  position: fixed; bottom: 28px; right: 24px; z-index: 500;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-navy); color: #fff;
  border: none; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,55,123,.35);
  opacity: 0; transform: translateY(12px);
  transition: opacity .25s, transform .25s, background .2s;
  pointer-events: none;
}
#nd-back-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#nd-back-top:hover { background: var(--brand-orange); }

/* ── Main wrapper ── */
.nd-wrapper { padding: 48px 0 80px; background: var(--bg-secondary); }
.nd-layout {
  display: grid;
  grid-template-columns: 1fr 308px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 991px) { .nd-layout { grid-template-columns: 1fr; } }


/* (gallery/slider/thumb rules are defined above in the hero section) */

/* ── Lightbox ── */
.nd-lb {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.93);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.nd-lb[hidden] { display: none; }

.nd-lb-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  width: 100%; max-height: calc(100vh - 80px);
  overflow: hidden;
  padding: 16px 70px;
  box-sizing: border-box;
}
.nd-lb-image {
  max-width: 100%; max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 6px;
  transition: transform .3s ease;
  user-select: none;
  display: block;
}

.nd-lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; z-index: 10001;
  backdrop-filter: blur(6px);
}
.nd-lb-close:hover { background: rgba(255,255,255,.28); }

.nd-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 1.25rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; z-index: 10001;
  backdrop-filter: blur(6px);
}
.nd-lb-nav:hover { background: rgba(255,255,255,.28); }
.nd-lb-prev { left: 12px; }
.nd-lb-next { right: 12px; }

.nd-lb-bar {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 10px 16px;
  position: absolute; bottom: 0; left: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.nd-lb-counter { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; }
.nd-lb-tool {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.nd-lb-tool:hover { background: rgba(255,255,255,.28); }
.nd-lb-tool:disabled { opacity: .35; cursor: default; }
.nd-lb-tool:disabled:hover { background: rgba(255,255,255,.12); }
.nd-lb-zoom-group {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.35); border-radius: 40px; padding: 4px 10px;
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12);
}
.nd-lb-zoom-level {
  color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700;
  min-width: 38px; text-align: center;
}

@media (max-width: 640px) {
  .nd-lb-stage { padding: 12px 48px; }
  .nd-lb-nav { width: 38px; height: 38px; font-size: 1rem; }
  .nd-lb-prev { left: 4px; }
  .nd-lb-next { right: 4px; }
}

/* ── External link banner ── */
.nd-ext-link {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  background: var(--accent-gradient);
  color: #fff; border-radius: var(--radius-md);
  font-weight: 700; font-size: .9rem;
  text-decoration: none;
  margin-bottom: 22px;
  transition: opacity .2s, transform .2s;
  box-shadow: var(--shadow-sm);
}
.nd-ext-link:hover { opacity: .9; color: #fff; transform: translateY(-2px); }
.nd-ext-icon { font-size: 1.25rem; flex-shrink: 0; }
.nd-ext-text { flex: 1; }
.nd-ext-arrow { margin-left: auto; transition: transform .2s; }
.nd-ext-link:hover .nd-ext-arrow { transform: translateX(4px); }

/* ── View Album card variant ── */
.nd-album-card { border-left-color: var(--brand-orange); }
.nd-album-card .nd-extcard-icon { background: rgba(255,108,0,.1); color: var(--brand-orange); }
.nd-album-card .nd-extcard-btn { background: var(--brand-orange); }
.nd-album-card .nd-extcard-btn:hover { background: #c05000; }

/* ── External link card (after article body) ── */
.nd-extcard {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin: 0 0 20px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-left: 5px solid #0f6fdb;
  border-radius: 12px;
  flex-wrap: wrap;
}
.nd-extcard-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(15,111,219,.1);
  color: #0f6fdb;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.nd-extcard-body { flex: 1; min-width: 0; }
.nd-extcard-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-tertiary);
  margin-bottom: 3px;
}
.nd-extcard-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nd-extcard-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: #0f6fdb;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.nd-extcard-btn:hover { background: #0a56b0; color: #fff; transform: translateY(-1px); }

[data-bs-theme="dark"] .nd-extcard { background: #0a1628; border-color: #253650; border-left-color: #61B9F0; }
[data-bs-theme="dark"] .nd-extcard-icon { background: rgba(97,185,240,.12); color: #61B9F0; }
[data-bs-theme="dark"] .nd-extcard-title { color: #dde1e7; }
[data-bs-theme="dark"] .nd-extcard-btn { background: #1a4f8a; }
[data-bs-theme="dark"] .nd-extcard-btn:hover { background: #61B9F0; color: #0a1628; }

/* ── Article (no card) ── */
.nd-article {
  margin-bottom: 24px;
}
.nd-article-head {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}
.nd-article-title {
  font-family: var(--font-title);
  font-size: 1.4rem; font-weight: 800;
  color: var(--text-primary); line-height: 1.3;
  margin-bottom: .9rem;
}
.nd-article-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .25rem; }
.pill-dept {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .7rem;
  background: rgba(255,108,0,.08);
  border: 1.5px solid rgba(255,108,0,.25);
  color: var(--brand-orange);
  border-radius: 50px;
  font-size: .75rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.pill-dept:hover { background: var(--brand-orange); color: #fff; border-color: var(--brand-orange); }
/* ════════════════════════════════════════════════
   ARTICLE BODY — CKEditor rich-text stylesheet
════════════════════════════════════════════════ */
.nd-article-body {
  padding: 28px 0 28px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  color: #2c3e50;        /* near-black, not blue */
  width: 100%;
  word-break: break-word;
}

/* Paragraphs */
.nd-article-body p {
  margin: 0 0 1em;
}
.nd-article-body p:last-child { margin-bottom: 0; }

/* Headings */
.nd-article-body h1,
.nd-article-body h2,
.nd-article-body h3,
.nd-article-body h4,
.nd-article-body h5,
.nd-article-body h6 {
  font-family: var(--font-title);
  color: #1a2332;
  font-weight: 800;
  line-height: 1.3;
  margin: 2em 0 .6em;
}

/* H1 — big title with full orange underline bar */
.nd-article-body h1 {
  font-size: 1.8rem;
  position: relative;
  padding-bottom: .5em;
}
.nd-article-body h1::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 60px; height: 4px;
  background: var(--brand-orange);
  border-radius: 2px;
}

/* H2 — section divider with left accent + full border */
.nd-article-body h2 {
  font-size: 1.38rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .55em .9em;
  background: rgba(0,55,123,.05);
  border-left: 5px solid var(--brand-navy, #00337a);
  border-radius: 0 8px 8px 0;
}

/* H3 — clean with small orange left bar */
.nd-article-body h3 {
  font-size: 1.18rem;
  padding-left: 14px;
  border-left: 3px solid var(--brand-orange);
}

/* H4 — subtle underline dots */
.nd-article-body h4 {
  font-size: 1.02rem;
  padding-bottom: .3em;
  border-bottom: 2px dashed var(--border-color);
  color: #243952;
}

/* H5 — small caps label style */
.nd-article-body h5 {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--brand-orange);
}

/* H6 — muted inline label */
.nd-article-body h6 {
  font-size: .85rem;
  color: #5a7a99;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Inline formatting */
.nd-article-body b,
.nd-article-body strong { font-weight: 700; color: #1a2332; }
.nd-article-body i,
.nd-article-body em { font-style: italic; }
.nd-article-body u { text-decoration: underline; text-underline-offset: 3px; }
.nd-article-body s,
.nd-article-body strike { text-decoration: line-through; opacity: .6; }
.nd-article-body mark { background: rgba(255,200,0,.3); color: inherit; padding: 0 3px; border-radius: 3px; }
.nd-article-body sub { font-size: .75em; vertical-align: sub; }
.nd-article-body sup { font-size: .75em; vertical-align: super; }

/* Links — inline style */
.nd-article-body a {
  color: var(--brand-orange);
  font-weight: 600;
  text-decoration: none;
  background-image: linear-gradient(var(--brand-orange), var(--brand-orange));
  background-size: 100% 1.5px;
  background-repeat: no-repeat;
  background-position: left 100%;
  padding-bottom: 1px;
  transition: color .2s, background-color .2s, background-size .25s ease;
}
.nd-article-body a:hover {
  color: #c05000;
  background-size: 100% 2.5px;
  background-color: rgba(255,108,0,.07);
}

/* Standalone button link — when the <a> is the only child of its <p> */
.nd-article-body p:has(> a:only-child),
.nd-article-body p:has(> strong > a:only-child) {
  margin-top: 18px;
}
.nd-article-body p > a:only-child,
.nd-article-body p > strong > a:only-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--brand-orange);
  color: #fff !important;
  font-weight: 700;
  font-size: .93rem;
  letter-spacing: .3px;
  border-radius: 8px;
  background-image: none !important;
  background-size: unset !important;
  background-position: unset !important;
  box-shadow: 0 3px 14px rgba(255,108,0,.32);
  transition: background .2s, box-shadow .2s, transform .15s;
}
.nd-article-body p > a:only-child:hover,
.nd-article-body p > strong > a:only-child:hover {
  background: #c05000 !important;
  background-color: #c05000 !important;
  color: #fff !important;
  box-shadow: 0 5px 20px rgba(255,108,0,.45);
  transform: translateY(-2px);
}
.nd-article-body p > a:only-child::after,
.nd-article-body p > strong > a:only-child::after {
  content: '\F135';
  font-family: 'bootstrap-icons';
  font-size: .85em;
}
.nd-article-body p > a[target="_blank"]:only-child::after,
.nd-article-body p > strong > a[target="_blank"]:only-child::after {
  content: '\F1C5';
}

/* Lists — use disc/decimal, no custom ::before to avoid square issue */
.nd-article-body ul,
.nd-article-body ol {
  padding-left: 1.2em;
  margin: 0 0 1em;
}
.nd-article-body ul { list-style: disc; }
.nd-article-body ul li { margin-bottom: .4em; }
.nd-article-body ul li::marker { color: var(--brand-orange); font-size: .9em; }
.nd-article-body ol { list-style: decimal; }
.nd-article-body ol li { margin-bottom: .4em; }
.nd-article-body ol li::marker { color: var(--brand-orange); font-weight: 700; }
.nd-article-body li > ul,
.nd-article-body li > ol { margin-top: .35em; margin-bottom: .35em; }

/* Blockquote */
.nd-article-body blockquote {
  border-left: 4px solid var(--brand-orange);
  margin: 1.6em 0;
  padding: .85em 1.4em;
  background: rgba(255,108,0,.05);
  border-radius: 0 8px 8px 0;
  color: #4a6380;
  font-style: italic;
  font-size: 1.02em;
}

/* Code */
.nd-article-body code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: .85em;
  background: #f0f4f8;
  border: 1px solid #d3e4f2;
  border-radius: 4px;
  padding: 1px 6px;
  color: #c0392b;
}
.nd-article-body pre {
  background: #1a2332;
  color: #abb2bf;
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: .87em;
  line-height: 1.65;
  margin: 1.4em 0;
}
.nd-article-body pre code {
  background: none; border: none; padding: 0; color: inherit;
}

/* Images */
.nd-article-body img {
  max-width: 100%; height: auto;
  border-radius: 10px;
  margin: 20px auto;
  display: block;
  border: 1px solid var(--border-color);
}

/* Tables */
.nd-article-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.4em 0; font-size: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px; overflow: hidden;
}
.nd-article-body th {
  background: rgba(0,55,123,.07);
  color: #1a2332; font-weight: 700;
  padding: 9px 14px; text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px;
}
.nd-article-body td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-color);
  color: #2c3e50; vertical-align: top;
}
.nd-article-body tr:last-child td { border-bottom: none; }
.nd-article-body tr:nth-child(even) td { background: #f7fbff; }

/* HR */
.nd-article-body hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.8em 0;
}

/* Text alignment */
.nd-article-body .text-align-left,   .nd-article-body [style*="text-align: left"]    { text-align: left; }
.nd-article-body .text-align-center, .nd-article-body [style*="text-align: center"]  { text-align: center; }
.nd-article-body .text-align-right,  .nd-article-body [style*="text-align: right"]   { text-align: right; }
.nd-article-body .text-align-justify,.nd-article-body [style*="text-align: justify"] { text-align: justify; }

/* Dark mode */
[data-bs-theme="dark"] .nd-article-body { color: #c8d4e0; }
[data-bs-theme="dark"] .nd-article-body h1,
[data-bs-theme="dark"] .nd-article-body h2,
[data-bs-theme="dark"] .nd-article-body h3,
[data-bs-theme="dark"] .nd-article-body h4 { color: #e2e8f0; }
[data-bs-theme="dark"] .nd-article-body h2 { background: rgba(97,185,240,.07); border-left-color: #61B9F0; }
[data-bs-theme="dark"] .nd-article-body h4 { border-bottom-color: #253650; color: #c5d8ec; }
[data-bs-theme="dark"] .nd-article-body b,
[data-bs-theme="dark"] .nd-article-body strong { color: #e8edf3; }
[data-bs-theme="dark"] .nd-article-body a { color: #ffaa55; background-image: linear-gradient(#ffaa55, #ffaa55); }
[data-bs-theme="dark"] .nd-article-body a:hover { color: #ffd090; background-color: rgba(255,170,85,.1); }
[data-bs-theme="dark"] .nd-article-body p > a:only-child,
[data-bs-theme="dark"] .nd-article-body p > strong > a:only-child { background: #d06010 !important; box-shadow: 0 3px 14px rgba(208,96,16,.4); }
[data-bs-theme="dark"] .nd-article-body p > a:only-child:hover,
[data-bs-theme="dark"] .nd-article-body p > strong > a:only-child:hover { background: #b04c00 !important; background-color: #b04c00 !important; }
[data-bs-theme="dark"] .nd-article-body blockquote { background: rgba(255,108,0,.07); color: #8aacca; }
[data-bs-theme="dark"] .nd-article-body code { background: #1e2d42; color: #f97583; border-color: #253650; }
[data-bs-theme="dark"] .nd-article-body th { background: rgba(97,185,240,.08); color: #c5d8ec; border-bottom-color: #253650; }
[data-bs-theme="dark"] .nd-article-body td { border-bottom-color: #253650; color: #a8bbd0; }
[data-bs-theme="dark"] .nd-article-body tr:nth-child(even) td { background: #0d1e33; }
[data-bs-theme="dark"] .nd-article-body table { border-color: #253650; }
[data-bs-theme="dark"] .nd-article-body img { border-color: #253650; }

/* Featured video inside article */
.nd-video {
  margin: 0 0 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-color);
}
.nd-video-label {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color);
  font-size: .82rem; font-weight: 700;
  color: var(--brand-navy);
  display: flex; align-items: center; gap: .5rem;
}
.nd-video-label i { color: var(--brand-orange); }

/* Article footer */
.nd-article-foot {
  padding: 14px 0;
  border-top: 2px solid var(--border-color);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}
.nd-foot-tags { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.nd-foot-icon { color: var(--text-tertiary); font-size: .85rem; }
.nd-foot-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .76rem; font-weight: 600;
  color: var(--brand-navy);
  padding: .2rem .6rem;
  background: rgba(0,55,123,.07);
  border-radius: 50px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nd-foot-tag:hover { background: var(--brand-navy); color: #fff; }
.nd-foot-stats {
  display: flex; align-items: center; gap: 14px;
  font-size: .76rem; color: var(--text-tertiary);
}
.nd-foot-stats span { display: flex; align-items: center; gap: .35rem; }

@media (max-width: 768px) {
  .nd-article-head { padding: 0 0 14px; }
  .nd-article-body { padding: 16px 0; font-size: 15px; }
  .nd-video        { margin: 0 0 20px; }
  .nd-article-foot { padding: 12px 0; }
}

/* ── Big Like section ── */
/* ── Like section ── */
.nd-like-section {
  background: linear-gradient(135deg, rgba(0,55,123,.04) 0%, rgba(255,108,0,.04) 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.nd-like-section::before {
  content: '\f415';
  font-family: 'bootstrap-icons';
  position: absolute;
  font-size: 9rem;
  color: rgba(220,53,69,.04);
  right: -16px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  line-height: 1;
}
.nd-like-content { display: flex; flex-direction: column; align-items: center; gap: .8rem; position: relative; }
.nd-like-count-display { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.nd-big-count {
  font-family: var(--font-title);
  font-size: 3.5rem; font-weight: 900;
  color: var(--brand-navy); line-height: 1;
  letter-spacing: -2px;
}
.nd-big-count-label { font-size: .78rem; color: var(--text-tertiary); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.nd-big-like-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .75rem 2.2rem;
  border-radius: 50px;
  background: #fff;
  border: 2px solid rgba(220,53,69,.3);
  color: #c0392b;
  font-size: .92rem; font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 12px rgba(220,53,69,.1);
}
.nd-big-like-btn:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220,53,69,.3);
}
.nd-big-like-btn.liked {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.nd-big-heart { font-size: 1.1rem; transition: transform .2s; }
.nd-big-like-btn:hover .nd-big-heart,
.nd-big-like-btn.liked .nd-big-heart { transform: scale(1.25); }
.nd-like-hint { font-size: .74rem; color: var(--text-tertiary); margin: 0; }

@keyframes nd-heartbeat {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.5); }
  60%  { transform: scale(.88); }
  100% { transform: scale(1); }
}
.nd-like-pulse { animation: nd-heartbeat .4s ease; }

/* ── Prev/Next ── */
.nd-prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 8px; margin-bottom: 8px;
}
.nd-pn-card:only-child { grid-column: 1 / -1; }
@media (max-width: 560px) { .nd-prevnext { grid-template-columns: 1fr; } }

.nd-pn-card {
  display: flex; flex-direction: row; align-items: stretch;
  border-radius: 16px; overflow: hidden;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  min-height: 90px;
}
.nd-pn-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.09); }
.nd-pn-prev:hover { border-color: var(--brand-navy); }
.nd-pn-next:hover { border-color: var(--brand-orange); }

/* Thumbnail — left/right side image */
.nd-pn-img { width: 100px; flex-shrink: 0; overflow: hidden; }
.nd-pn-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.nd-pn-card:hover .nd-pn-img img { transform: scale(1.07); }
.nd-pn-next .nd-pn-img { order: 2; }

/* Accent bar */
.nd-pn-prev .nd-pn-img { border-right: 3px solid var(--brand-navy); }
.nd-pn-next .nd-pn-img { border-left: 3px solid var(--brand-orange); }

/* Body */
.nd-pn-body {
  padding: 14px 14px;
  display: flex; flex-direction: column; gap: 5px;
  flex: 1; min-width: 0; justify-content: center;
}
.nd-pn-body-r { align-items: flex-end; text-align: right; }

.nd-pn-dir {
  font-size: .63rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--brand-navy);
  display: flex; align-items: center; gap: .3rem;
}
.nd-pn-dir-r { justify-content: flex-end; }
.nd-pn-next .nd-pn-dir { color: var(--brand-orange); }

.nd-pn-title {
  font-size: .83rem; font-weight: 700; line-height: 1.45;
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nd-pn-prev:hover .nd-pn-title { color: var(--brand-navy); }
.nd-pn-next:hover .nd-pn-title { color: var(--brand-orange); }

.nd-pn-date {
  font-size: .67rem; color: var(--text-tertiary);
  display: flex; align-items: center; gap: .3rem;
}
.nd-pn-date-r { justify-content: flex-end; }

/* ── Sidebar ── */
.nd-sidebar {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 70px;
  align-self: start;
}
@media (max-width: 991px) { .nd-sidebar { position: static; } }
.nd-side-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.nd-side-card-head {
  padding: 13px 18px;
  font-size: .82rem; font-weight: 700;
  color: var(--brand-navy);
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-tertiary);
  display: flex; align-items: center; gap: .5rem;
}
.nd-side-card-head i { color: var(--brand-orange); }
.nd-side-card-body { padding: 0; }

/* Info rows */
.nd-info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: .8rem;
}
.nd-info-row-last { border-bottom: none; }
.nd-info-label {
  color: var(--text-tertiary); font-weight: 500;
  display: flex; align-items: center; gap: .4rem;
}
.nd-info-label i { font-size: .75rem; }
.nd-info-val { color: var(--text-primary); font-weight: 600; }
.nd-info-num { font-family: var(--font-title); color: var(--brand-navy); font-size: .9rem; }
.nd-info-section-label {
  padding: 8px 18px 4px;
  font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--brand-orange);
}
.nd-info-pills { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 18px 12px; }
.nd-info-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 50px; font-size: .75rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nd-pill-blue  { background: rgba(0,55,123,.08);  border: 1.5px solid rgba(0,55,123,.2);  color: var(--brand-navy); }
.nd-pill-blue:hover  { background: var(--brand-navy);  color: #fff; }
.nd-pill-orange { background: rgba(255,108,0,.08); border: 1.5px solid rgba(255,108,0,.2); color: var(--brand-orange); }
.nd-pill-orange:hover { background: var(--brand-orange); color: #fff; }
.nd-pill-gray  { background: var(--bg-tertiary); border: 1.5px solid var(--border-color); color: var(--text-secondary); }
.nd-pill-gray:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

/* Recent news – card style */
.nd-recent-section { margin-bottom: 12px; }
.nd-recent-section-title {
  font-size: .9rem; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: .4rem;
  padding: 4px 0 12px;
  border-bottom: 2px solid var(--brand-navy);
  margin-bottom: 16px;
}
.nd-recent-section-title i { color: var(--brand-navy); }
.nd-recent-list { display: flex; flex-direction: column; gap: 14px; }
.nd-rc {
  display: block; text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.nd-rc:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.nd-rc-active { border-color: var(--brand-navy); box-shadow: 0 0 0 2px rgba(0,55,123,.15); }

.nd-rc-img {
  position: relative; width: 100%; height: 150px;
  overflow: hidden;
}
.nd-rc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.nd-rc:hover .nd-rc-img img { transform: scale(1.04); }
.nd-rc-no-img {
  width: 100%; height: 100%;
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: 2rem;
}

.nd-rc-ribbon {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase;
}
.nd-rc-ribbon-hot   { background: #dc2626; color: #fff; }
.nd-rc-ribbon-feat  { background: var(--brand-orange); color: #fff; }
.nd-rc-ribbon-press { background: var(--brand-navy); color: #fff; }

.nd-rc-body { padding: 12px 14px 14px; }
.nd-rc-date {
  font-size: .68rem; color: var(--text-tertiary);
  display: flex; align-items: center; gap: .3rem;
  margin-bottom: 6px;
}
.nd-rc-title {
  font-size: .82rem; font-weight: 700; line-height: 1.45;
  color: var(--text-primary); margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nd-rc:hover .nd-rc-title { color: var(--brand-navy); }
.nd-rc-excerpt {
  font-size: .72rem; color: var(--text-secondary); line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nd-rc-footer {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px; justify-content: space-between;
}
.nd-rc-campus {
  font-size: .65rem; color: var(--brand-navy);
  background: rgba(0,55,123,.07);
  border-radius: 20px; padding: 2px 8px;
  display: inline-flex; align-items: center; gap: .25rem;
}
.nd-rc-read {
  font-size: .68rem; font-weight: 700;
  color: var(--brand-orange);
  display: inline-flex; align-items: center; gap: .25rem;
  white-space: nowrap;
}

/* Tags cloud in sidebar */
.nd-tags-cloud { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: .4rem; }
.nd-tag-pill {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .28rem .65rem;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: .75rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.nd-tag-pill:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.nd-tag-pill i { font-size: .7rem; opacity: .6; }

/* ── Ext link card (keep for backward compat) ── */
.ext-link-card {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  background: var(--accent-gradient);
  color: #fff; border-radius: var(--radius-md);
  font-weight: 700; font-size: 14px;
  transition: opacity .2s, transform .2s;
  box-shadow: var(--shadow-sm);
}
.ext-link-card:hover { opacity: .9; color: #fff; transform: translateY(-2px); }

/* ================================================================
   13b. FEATURED TAG NEWS ROWS
================================================================ */
.tag-news-section {
  padding: 56px 0;
  background: var(--bg-primary);
  border-top: 2px solid var(--border-color);
}
.tag-news-section-alt { background: var(--bg-secondary); }

/* Section header */
.tag-news-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.tag-news-head-left { display: flex; align-items: center; gap: 14px; }
.tag-news-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 14px;
  background: var(--brand-navy); color: #fff;
  border-radius: 50px; font-size: 13px; font-weight: 700;
  text-decoration: none; flex-shrink: 0;
}
.tag-news-badge i { font-size: .75rem; opacity: .75; }
.tag-news-title {
  font-family: var(--font-title);
  font-size: 20px; font-weight: 800;
  color: var(--text-primary); margin: 0;
}
.tag-news-view-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--brand-navy);
  text-decoration: none; white-space: nowrap;
  padding: 7px 16px; border: 2px solid var(--brand-navy);
  border-radius: 50px; transition: var(--transition);
}
.tag-news-view-all:hover { background: var(--brand-navy); color: #fff; }

/* Horizontal scrollable card grid */
.tag-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 991px) { .tag-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px)  { .tag-news-grid { grid-template-columns: 1fr; } }

/* Card */
.tag-news-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.tag-news-section-alt .tag-news-card { background: var(--bg-primary); }
.tag-news-card:hover {
  border-color: var(--brand-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.tag-news-card-img {
  display: block; position: relative;
  height: 180px; overflow: hidden; flex-shrink: 0;
}
.tag-news-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.tag-news-card:hover .tag-news-card-img img { transform: scale(1.05); }
.tag-news-card-no-img {
  width: 100%; height: 100%;
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--border-color);
}
.tag-news-ribbon {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 800; padding: 3px 10px;
  border-radius: 50px; text-transform: uppercase; letter-spacing: .4px;
}
.tag-news-card-body {
  padding: 16px; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.tag-news-card-meta {
  font-size: 11.5px; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 5px;
}
.tag-news-card-title {
  font-family: var(--font-title);
  font-size: 14px; font-weight: 700; line-height: 1.4;
  margin: 0;
}
.tag-news-card-title a {
  color: var(--text-primary); text-decoration: none;
  transition: color .15s;
}
.tag-news-card-title a:hover { color: var(--brand-navy); }
.tag-news-card-excerpt {
  font-size: 12.5px; color: var(--text-secondary);
  line-height: 1.55; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.tag-news-card-read {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--brand-navy);
  text-decoration: none; margin-top: auto;
  transition: gap .2s;
}
.tag-news-card-read:hover { gap: 8px; color: var(--brand-navy); }

/* Dark mode */
[data-bs-theme="dark"] .tag-news-section { background: #0a1628; border-top-color: #384f6a; }
[data-bs-theme="dark"] .tag-news-section-alt { background: #070f1c; }
[data-bs-theme="dark"] .tag-news-card { background: #22304a; border-color: #384f6a; }
[data-bs-theme="dark"] .tag-news-card-title a { color: #c5d8ec; }
[data-bs-theme="dark"] .tag-news-card-excerpt { color: #7a9ab5; }
[data-bs-theme="dark"] .tag-news-card-no-img { background: #2a3a52; }
[data-bs-theme="dark"] .tag-news-title { color: #e2eaf5; }
[data-bs-theme="dark"] .tag-news-view-all { border-color: #4d9ef5; color: #4d9ef5; }
[data-bs-theme="dark"] .tag-news-view-all:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ================================================================
   13c. EXPLORE BY TOPIC SECTION
================================================================ */
/* ═══════════════════════════════════════════════════════════════
   EXPLORE BY TOPIC — auto-sliding poster carousel
   Portrait cards (image-dominant, all text overlaid)
   Visually distinct from the news-card sections below.
════════════════════════════════════════════════════════════════ */
.etopic-section {
  background: var(--bg-primary);
  padding: 48px 0 44px;
  position: relative;
  overflow-x: clip; /* clip horizontal bleed, allow vertical for hover lift */
}
.etopic-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--accent-gradient);
}

/* ── Header row ── */
.etopic-head {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 28px;
}
.etopic-head-left { display: flex; align-items: center; gap: 16px; }
.etopic-head-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; box-shadow: 0 6px 20px rgba(255,108,0,.3);
}
.etopic-head-title {
  font-family: var(--font-title); font-size: 22px; font-weight: 800;
  color: var(--text-primary); margin: 0 0 3px;
}
.etopic-head-sub { font-size: 13px; color: var(--text-tertiary); margin: 0; }

/* ── Nav buttons ── */
.etopic-nav { display: flex; align-items: center; gap: 10px; }
.etopic-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--border-color); background: var(--bg-primary);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: var(--transition);
  flex-shrink: 0;
}
.etopic-btn:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

@keyframes etopicPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.7); }
}

/* ── Scroll track — full viewport width, bleeds edge-to-edge ── */
.etopic-scroll {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-top: 16px; padding-bottom: 4px;
  margin-top: 4px;
  scrollbar-width: none;
  /* no padding-left — use ::before spacer for reliable first-card alignment */
}
.etopic-scroll::-webkit-scrollbar { display: none; }
.etopic-scroll::before,
.etopic-scroll::after {
  content: '';
  flex: none;
  width: max(16px, calc((100vw - 1320px) / 2 + 12px));
}

/* ── Poster cards ── */
.etopic-poster {
  flex: 0 0 224px; height: 320px;
  scroll-snap-align: start;
  border-radius: var(--radius-md); overflow: hidden;
  position: relative; display: block; text-decoration: none;
  /* box-shadow: var(--shadow-md); */
  transition: transform .3s ease;
  flex-shrink: 0;
}
.etopic-poster:hover { transform: translateY(-7px) scale(1.025); }

/* Image fills entire poster */
.etopic-poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.etopic-poster:hover img { transform: scale(1.08); }

/* Colored placeholder when no image */
.etopic-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem; color: rgba(255,255,255,.35);
}
.etopic-ph-1,.etopic-ph-7  { background: linear-gradient(160deg,#00377B,#0055b3); }
.etopic-ph-2,.etopic-ph-8  { background: linear-gradient(160deg,#7c3aed,#9f67f2); }
.etopic-ph-3,.etopic-ph-9  { background: linear-gradient(160deg,#059669,#10b981); }
.etopic-ph-4,.etopic-ph-10 { background: linear-gradient(160deg,#FF6C00,#ff9240); }
.etopic-ph-5,.etopic-ph-11 { background: linear-gradient(160deg,#0284c7,#38bdf8); }
.etopic-ph-6,.etopic-ph-12 { background: linear-gradient(160deg,#dc2626,#f87171); }

/* Gradient overlay — heavy at bottom for text legibility */
.etopic-poster-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,5,30,.04)  0%,
    rgba(0,5,30,.18) 40%,
    rgba(0,5,30,.72) 72%,
    rgba(0,5,30,.92) 100%
  );
}

/* Bottom content overlay */
.etopic-poster-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0 16px 18px;
}
/* Large tag name */
.etopic-poster-tagname {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-title);
  font-size: 18px; font-weight: 900; line-height: 1.25;
  color: #fff; margin: 0 0 12px; letter-spacing: -.3px;
}
.etopic-poster-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.etopic-poster-count {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.14); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.18);
  padding: 3px 10px; border-radius: 50px;
}
.etopic-poster-cta {
  font-size: 11.5px; font-weight: 800; color: rgba(255,255,255,.7);
  display: flex; align-items: center; gap: 3px;
  transition: color .2s, gap .2s;
}
.etopic-poster:hover .etopic-poster-cta { color: #fff; gap: 6px; }

/* Progress bar under the track */
.etopic-progress-bar {
  height: 3px; background: var(--border-color);
  border-radius: 3px; margin-top: 16px; overflow: hidden;
}
.etopic-progress-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: var(--accent-gradient);
  transition: width linear;
}

/* ── Mobile — tablet (≤ 767px) ── */
@media (max-width: 767px) {
  .etopic-section { padding: 32px 0 28px; }

  /* Compact header */
  .etopic-head {
    margin-bottom: 16px;
    align-items: center; flex-wrap: nowrap; gap: 8px;
  }
  .etopic-head-left { gap: 10px; flex: 1; min-width: 0; }
  .etopic-head-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    font-size: 1rem; border-radius: 10px;
  }
  .etopic-head-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Hide subtitle on mobile — saves ~3 lines of vertical space */
  .etopic-head-sub { display: none; }

  /* Compact nav */
  .etopic-nav { gap: 6px; flex-shrink: 0; }
  .etopic-btn { width: 32px; height: 32px; font-size: .85rem; }
  .etopic-auto-badge { padding: 4px 10px; font-size: 10.5px; gap: 5px; }
  .etopic-auto-badge .etopic-dot { width: 6px; height: 6px; }

  /* Smaller cards — show ~1.6 at once to hint scrollability */
  .etopic-poster { flex: 0 0 175px; height: 260px; }
  .etopic-poster-tagname { font-size: 15px; margin-bottom: 8px; }
  .etopic-poster-body { padding: 0 12px 14px; }
  .etopic-poster-count { font-size: 10px; padding: 2px 8px; }
  .etopic-poster-cta { font-size: 10.5px; }

  /* Tighter scroll gap on mobile — spacer ::before/::after handles edge alignment */
  .etopic-scroll { gap: 10px; }
  .etopic-scroll::before, .etopic-scroll::after { flex: none; width: 16px; }
  .etopic-progress-bar { margin-top: 12px; }
}

/* Row 2 — all tags pill strip */
.explore-pills-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.explore-pills-label {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  color: var(--brand-orange);
  display: flex; align-items: center; gap: 5px;
  margin-right: 6px; flex-shrink: 0;
}
.explore-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; transition: var(--transition);
}
.explore-pill i { font-size: .7rem; color: var(--brand-orange); }
.explore-pill:hover {
  background: var(--brand-navy); border-color: var(--brand-navy); color: #fff;
}
.explore-pill:hover i { color: rgba(255,255,255,.75); }

/* Dark mode */
/* explore-section has its own dark bg — no dark override needed */
[data-bs-theme="dark"] .explore-pills-row { background: #22304a; border-color: #384f6a; }
[data-bs-theme="dark"] .explore-pill { background: #2a3a52; border-color: rgba(97,185,240,.18); color: #A8C8E8; }
[data-bs-theme="dark"] .explore-pill:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

/* ================================================================
   14. FOOTER
================================================================ */
/* ── Footer shell ── */
.pes-footer {
  background: linear-gradient(160deg, #001230 0%, #002060 55%, #001840 100%);
  color: rgba(255,255,255,.72);
  padding: 0;
  position: relative;
  overflow: hidden;
}
/* Orange accent line at the very top */
.pes-footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 1;
}

/* Decorative blobs */
.ft-blob {
  position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0;
}
.ft-blob-1 {
  width: 460px; height: 460px;
  top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(97,185,240,.07) 0%, transparent 70%);
}
.ft-blob-2 {
  width: 320px; height: 320px;
  bottom: 60px; left: -80px;
  background: radial-gradient(circle, rgba(255,108,0,.06) 0%, transparent 70%);
}

/* ── Main columns ── */
.ft-main {
  position: relative; z-index: 1;
  padding-top: 64px;
  padding-bottom: 48px;
}

/* Brand column */
.ft-logo-link { display: inline-block; margin-bottom: 14px; }
.ft-logo {
  height: 44px; width: auto;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.ft-tagline {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--brand-orange);
  margin-bottom: 14px;
}
.ft-address {
  font-size: .83rem; line-height: 1.8;
  color: rgba(255,255,255,.48);
  margin-bottom: 0;
  display: flex; gap: .5rem;
}
.ft-address i { color: var(--brand-orange); flex-shrink: 0; margin-top: .2rem; font-size: .8rem; }

/* Social icons */
.ft-social { display: flex; gap: .5rem; margin-top: 20px; flex-wrap: wrap; }
.ft-social-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.ft-social-btn:hover { transform: translateY(-3px); color: #fff; }
.ft-fb:hover  { background: #1877f2; border-color: #1877f2; }
.ft-tw:hover  { background: #000;    border-color: #333; }
.ft-ig:hover  { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); border-color: transparent; }
.ft-li:hover  { background: #0a66c2; border-color: #0a66c2; }
.ft-yt:hover  { background: #ff0000; border-color: #ff0000; }
.ft-rss:hover { background: var(--brand-orange); border-color: var(--brand-orange); }

/* Column headings */
.ft-col-head {
  display: flex; align-items: center; gap: .55rem;
  font-size: .65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.45);
  margin-bottom: 18px;
}
.ft-col-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-blue-light);
  flex-shrink: 0;
}
.ft-col-dot-orange { background: var(--brand-orange); }
.ft-col-dot-blue   { background: var(--brand-blue-light); }

/* Link lists */
.ft-links { list-style: none; padding: 0; margin: 0; }
.ft-links li { margin-bottom: 8px; }
.ft-links a {
  display: flex; align-items: center; gap: .55rem;
  font-size: .84rem; color: rgba(255,255,255,.52);
  text-decoration: none;
  transition: color .18s, padding-left .18s;
}
.ft-links a i { font-size: .75rem; color: rgba(97,185,240,.6); flex-shrink: 0; }
.ft-links a:hover { color: #fff; padding-left: 4px; }
.ft-links a:hover i { color: var(--brand-blue-light); }

/* Contact list */
.ft-contact-list { display: flex; flex-direction: column; gap: .55rem; }
.ft-contact-item {
  display: flex; align-items: center; gap: .7rem;
  font-size: .84rem; color: rgba(255,255,255,.52);
  text-decoration: none;
  transition: color .18s;
}
.ft-contact-item:hover { color: #fff; }
.ft-contact-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: var(--brand-orange);
  flex-shrink: 0;
  transition: background .18s;
}
.ft-contact-item:hover .ft-contact-icon { background: rgba(255,108,0,.2); }

/* Ribbon type badges */
.ft-ribbon-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 6px; }
.ft-ribbon {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .85rem; border-radius: 50px;
  font-size: .76rem; font-weight: 700;
  text-decoration: none; transition: transform .15s, opacity .15s;
}
.ft-ribbon:hover { transform: translateY(-2px); opacity: .88; }
.ft-ribbon-press    { background: rgba(97,185,240,.15);  color: var(--brand-blue-light); border: 1px solid rgba(97,185,240,.22); }
.ft-ribbon-featured { background: rgba(255,108,0,.15);   color: #ff9240;               border: 1px solid rgba(255,108,0,.22); }
.ft-ribbon-hot      { background: rgba(220,38,38,.15);   color: #f87171;               border: 1px solid rgba(220,38,38,.22); }

/* ── Tags cloud row ── */
.ft-tags-row {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 18px 0;
}
.ft-tags-inner {
  display: flex; align-items: center; gap: .45rem;
  flex-wrap: wrap;
}
.ft-tags-label {
  font-size: .65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.3);
  display: flex; align-items: center; gap: .35rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.ft-tags-label i { color: var(--brand-orange); }
.ft-tag-pill {
  display: inline-flex; align-items: center;
  padding: .22rem .65rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50px;
  font-size: .75rem; font-weight: 600;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.ft-tag-pill:hover {
  background: rgba(255,108,0,.18);
  border-color: rgba(255,108,0,.35);
  color: #ff9240;
}

/* ── Bottom bar ── */
.ft-bottom {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 18px 0;
  background: rgba(0,0,0,.18);
}
.ft-bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.ft-copyright { font-size: .78rem; color: rgba(255,255,255,.3); }
.ft-bottom-links {
  display: flex; align-items: center; gap: 1.25rem;
  font-size: .78rem; color: rgba(255,255,255,.3);
}
.ft-bottom-links a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: .3rem;
  transition: color .18s;
}
.ft-bottom-links a:hover { color: var(--brand-orange); }
.ft-bottom-links i { font-size: .72rem; }

/* ================================================================
   15. BACK TO TOP
================================================================ */
.to-top-btn {
  position: fixed; bottom: 28px; right: 24px;
  width: 46px; height: 46px;
  background: var(--primary-gradient);
  color: #fff;
  border: none; border-radius: 50%; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 18px rgba(0,55,123,.35);
  transition: transform .2s, box-shadow .2s;
}
.to-top-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,55,123,.45); }
.to-top-btn.visible { display: flex; }

/* ================================================================
   16. MESSAGES (fixed top-right stack)
================================================================ */
/* ── Toast notifications ── */
.pes-toast-wrap {
  position: fixed; top: 82px; right: 20px;
  z-index: 1060;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px; width: calc(100vw - 40px);
  pointer-events: none;
}
.pes-toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-primary);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  border-left: 4px solid currentColor;
  padding: 14px 14px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  position: relative; overflow: hidden;
  pointer-events: auto;
  animation: pes-toast-in .35s cubic-bezier(.34,1.56,.64,1) both;
}
.pes-toast-out { animation: pes-toast-out .32s ease forwards !important; }

/* Colour themes */
.pes-toast-success { color: #16a34a; }
.pes-toast-error,
.pes-toast-danger  { color: #dc2626; }
.pes-toast-warning { color: #d97706; }
.pes-toast-info,
.pes-toast-debug   { color: var(--brand-navy); }

/* Icon badge */
.pes-toast-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: currentColor; opacity: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pes-toast-icon i { color: #fff; font-size: 1rem; }

/* Body */
.pes-toast-body { flex: 1; min-width: 0; padding-top: 1px; }
.pes-toast-title {
  font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  color: currentColor; margin-bottom: 3px;
}
.pes-toast-text {
  font-size: .875rem; line-height: 1.5;
  color: var(--text-secondary);
  word-break: break-word;
}

/* Close button */
.pes-toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary); font-size: 1.1rem;
  padding: 0; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.pes-toast-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* Auto-dismiss progress bar */
.pes-toast-bar {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 100%;
  background: currentColor; opacity: .3;
  transform-origin: left;
  animation: pes-toast-bar 4.8s linear forwards;
}

@keyframes pes-toast-in {
  from { opacity: 0; transform: translateX(28px) scale(.95); }
  to   { opacity: 1; transform: none; }
}
@keyframes pes-toast-out {
  to { opacity: 0; transform: translateX(28px) scale(.95); max-height: 0; padding: 0; margin: 0; border: none; }
}
@keyframes pes-toast-bar {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@media (max-width: 480px) {
  .pes-toast-wrap { top: 76px; right: 12px; left: 12px; width: auto; max-width: none; }
}

/* ================================================================
   17. ADMIN SIDEBAR & LAYOUT
================================================================ */
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: var(--sidebar-w) !important;
  background: linear-gradient(180deg, #001845 0%, #002055 100%) !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
  display: flex; flex-direction: column;
}
/* Desktop: always show as fixed panel, override Bootstrap offcanvas */
@media (min-width: 769px) {
  .admin-sidebar {
    position: fixed !important;
    top: var(--header-h) !important;
    left: 0 !important;
    height: calc(100vh - var(--header-h)) !important;
    overflow-y: auto !important;
    z-index: 150 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }
}
/* Mobile: Bootstrap controls the offcanvas drawer */
@media (max-width: 768px) {
  .admin-sidebar {
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 1055 !important;
  }
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }

.sidebar-brand {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
}
.sidebar-user-row {
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-navy);
  border: 2px solid rgba(255,255,255,.2);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
  font-size: 13px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}

.sidebar-nav { flex: 1; padding: 14px 10px; }
.sidebar-lbl {
  font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 1.2px; color: rgba(255,255,255,.28);
  font-weight: 800; padding: 18px 12px 7px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65);
  font-size: 13.5px; font-weight: 500;
  transition: var(--transition); margin-bottom: 3px;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  transform: translateX(2px);
}
.sidebar-link.active {
  background: rgba(255,108,0,.18);
  color: #fff; font-weight: 600;
  border-left: 3px solid var(--brand-orange);
  padding-left: 10px;
}
.sidebar-link.active i { opacity: 1; color: var(--brand-orange); }
.sidebar-link i { width: 17px; font-size: 15px; opacity: .85; flex-shrink: 0; }
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.1);
}

/* Role badge in sidebar */
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 50px;
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
}
.role-admin { background: rgba(220,38,38,.2); color: #fca5a5; border: 1px solid rgba(220,38,38,.3); }
.role-manager { background: rgba(255,108,0,.2); color: #fdba74; border: 1px solid rgba(255,108,0,.3); }
.role-owner { background: rgba(16,185,129,.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }

/* ── Role picker (save-user form) ── */
.um-role-pick { display: flex; flex-direction: column; gap: 10px; }
.um-role-opt {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.um-role-opt:has(input:checked) {
  border-color: var(--brand-navy);
  background: var(--brand-pale-blue);
}
.um-role-opt input[type="radio"] { margin-top: 3px; flex-shrink: 0; }
.um-role-opt-body p { font-size: 12px; color: var(--text-tertiary); margin: 5px 0 0; }

/* Main content */
.admin-main {
  margin-left: var(--sidebar-w); flex: 1;
  min-height: 100vh;
  background: var(--bg-secondary);
}
.admin-topbar {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  padding: 0 28px;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  position: sticky; top: var(--header-h); z-index: 100;
  box-shadow: 0 1px 0 var(--border-color), 0 4px 20px rgba(0,0,0,.04);
}
.admin-topbar-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  margin-left: auto;
}

/* Page title inside admin-content */
.admin-page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}
.admin-page-title {
  font-family: var(--font-title);
  font-size: 22px; font-weight: 800;
  color: var(--text-primary); margin: 0;
  display: flex; align-items: center; gap: 12px;
  line-height: 1.2;
}
.admin-page-title i { color: var(--brand-navy); font-size: 1.3rem; flex-shrink: 0; }
.admin-page-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 2px solid var(--border-color); border-radius: 50px;
  font-size: 13px; font-weight: 700; padding: 2px 12px;
  font-family: var(--font-body);
}
@media (max-width: 600px) {
  .admin-page-title { font-size: 18px; }
  .admin-page-head { margin-bottom: 20px; padding-bottom: 16px; }
}
.admin-user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.admin-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.admin-content {
  padding: 28px 32px;
  min-width: 0;
}
/* Mobile hamburger button */
.admin-mob-menu-btn {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.admin-mob-menu-btn:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* Sidebar close button (mobile only) */
.admin-sidebar-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; cursor: pointer;
}
.admin-sidebar-close:hover { background: rgba(255,255,255,.25); }

@media (max-width: 768px) {
  .admin-wrapper { overflow-x: hidden; max-width: 100vw; }
  .admin-main { margin-left: 0; max-width: 100vw; overflow-x: hidden; }
  .admin-content { padding: 12px; }
  .admin-topbar { padding: 0 12px; height: 54px; gap: 8px; }
  .admin-topbar .role-badge { display: none; }
  .admin-topbar-right { gap: 6px; }
  .admin-user-chip span { display: none; }
  .admin-user-chip { padding: 4px; gap: 0; }
  .admin-topbar .btn-sm-pes .d-none { display: none !important; }
}

/* Stat cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px; margin-bottom: 28px;
}
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 10px;
  border: 2px solid var(--border-color);
  transition: var(--transition);
  text-decoration: none; color: inherit;
}
.stat-card:hover {
  border-color: var(--brand-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: inherit;
}
@media (max-width: 600px) {
  .stat-card {
    padding: 14px 8px;
    gap: 6px;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-sm);
    min-width: 0;
  }
}
.stat-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
/* Stat icon colour variants — light mode */
.si-blue   { background: rgba(0,55,123,.1);   color: var(--brand-navy); }
.si-purple { background: rgba(124,58,237,.12); color: #7c3aed; }
.si-green  { background: rgba(16,185,129,.12); color: #059669; }
.si-sky    { background: rgba(14,165,233,.12); color: #0284c7; }
.si-orange { background: rgba(255,108,0,.12);  color: var(--brand-orange); }
.si-red    { background: rgba(220,38,38,.12);  color: #dc2626; }
/* Dark mode — brighter icon backgrounds so icons are clearly visible */
[data-bs-theme="dark"] .si-blue   { background: rgba(97,185,240,.18);  color: #61B9F0; }
[data-bs-theme="dark"] .si-purple { background: rgba(167,139,250,.18); color: #a78bfa; }
[data-bs-theme="dark"] .si-green  { background: rgba(52,211,153,.18);  color: #34d399; }
[data-bs-theme="dark"] .si-sky    { background: rgba(56,189,248,.18);  color: #38bdf8; }
[data-bs-theme="dark"] .si-orange { background: rgba(251,146,60,.18);  color: #fb923c; }
[data-bs-theme="dark"] .si-red    { background: rgba(248,113,113,.18); color: #f87171; }
@media (max-width: 600px) {
  .stat-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 8px; }
}
.stat-label {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-primary); margin: 0;
}
@media (max-width: 600px) {
  .stat-label { font-size: 11px; line-height: 1.3; word-break: break-word; }
}
.stat-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
@media (max-width: 600px) { .stat-sub { display: none; } }

/* Admin panel */
.admin-panel {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  overflow: hidden; margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.admin-panel-header {
  padding: 16px 24px;
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
@media (max-width: 600px) {
  .admin-panel-header { padding: 12px 14px; }
  .admin-panel-header h3 { font-size: 13px; }
}
.admin-panel-header h3 {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary); margin: 0;
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-title);
}
.admin-panel-body { overflow-x: auto; }

/* Drag-and-drop reorder */
.dnd-handle {
  cursor: grab; color: var(--text-tertiary); font-size: 1rem;
  padding: 13px 8px 13px 16px !important;
  user-select: none;
}
.dnd-handle:active { cursor: grabbing; }
.dnd-ghost td { background: var(--brand-pale-blue) !important; opacity: .7; }
.dnd-hint {
  margin-left: auto; font-size: 11.5px;
  color: var(--text-tertiary); font-weight: 400;
  display: flex; align-items: center; gap: 4px;
}
.dnd-save-bar {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border-bottom: 1px solid #bbf7d0;
  color: #15803d; font-size: 13px; font-weight: 600;
  padding: 10px 18px;
}
[data-bs-theme="dark"] .dnd-save-bar {
  background: #052e16; border-color: #166534; color: #4ade80;
}

/* Table */
.admin-tbl { width: 100%; font-size: 13.5px; }
.admin-tbl thead th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px;
  padding: 13px 18px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}
.admin-tbl tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-primary);
}
.admin-tbl tbody tr:hover td { background: var(--bg-tertiary); }
.admin-tbl tbody tr:last-child td { border-bottom: none; }
.admin-tbl .thumb {
  width: 64px; height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
}
.admin-tbl .col-title a { color: var(--brand-navy); font-weight: 600; }
.admin-tbl .col-title a:hover { text-decoration: underline; }

/* Admin search bar */
.admin-search-bar { margin-bottom: 16px; }
.admin-search-inner {
  display: flex; align-items: center;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 0 16px 0 14px;
  gap: 10px;
  transition: border-color .2s;
}
.admin-search-inner:focus-within { border-color: var(--brand-blue-light); }
.admin-search-icon { color: var(--text-tertiary); font-size: 15px; flex-shrink: 0; }
.admin-search-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text-primary); padding: 13px 0;
}
.admin-search-input::placeholder { color: var(--text-tertiary); }
.admin-search-clear {
  color: var(--text-tertiary); font-size: 13px; flex-shrink: 0;
  display: flex; align-items: center; padding: 4px;
  border-radius: 50%; transition: background .15s, color .15s;
  text-decoration: none;
}
.admin-search-clear:hover { background: rgba(220,38,38,.1); color: #dc2626; }
.admin-search-btn {
  flex-shrink: 0; padding: 7px 18px; border-radius: 8px;
  background: var(--brand-navy); color: #fff;
  border: none; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.admin-search-btn:hover { background: var(--brand-blue-light); }
.admin-search-result-info {
  margin-top: 10px; font-size: 13px; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 6px;
}
.admin-search-result-info i { color: var(--brand-blue-light); }

/* Recent News card list */
.rn-list { display: flex; flex-direction: column; }
.rn-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  transition: background .15s;
}
.rn-item:last-child { border-bottom: none; }
.rn-item:hover { background: var(--bg-tertiary); }
.rn-thumb {
  flex-shrink: 0; width: 72px; height: 54px;
  border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--border-color);
  background: var(--bg-secondary);
}
.rn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rn-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: 1.3rem;
}
.rn-body { flex: 1; min-width: 0; }
.rn-title {
  display: block; font-size: 13.5px; font-weight: 700;
  color: var(--text-primary); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.rn-title:hover { color: var(--brand-blue-light); }
.rn-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-tertiary);
}
.rn-meta i { font-size: 11px; }
.rn-actions { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
@media (max-width: 575px) {
  .rn-item { flex-wrap: wrap; gap: 10px; }
  .rn-thumb { width: 56px; height: 44px; }
  .rn-body { min-width: calc(100% - 70px); }
  .rn-actions { width: 100%; padding-left: 66px; }
  .rn-meta { gap: 8px; }
}

/* Action buttons */
.action-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.act-edit { background: var(--bg-tertiary); color: var(--brand-navy); border: 1.5px solid var(--border-color); }
.act-edit:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.act-delete { background: rgba(220,38,38,.06); color: #dc2626; border: 1.5px solid rgba(220,38,38,.2); }
.act-delete:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.act-publish { background: rgba(16,185,129,.06); color: #059669; border: 1.5px solid rgba(16,185,129,.2); }
.act-publish:hover { background: #059669; color: #fff; border-color: #059669; }
.act-archive { background: rgba(107,114,128,.06); color: #6b7280; border: 1.5px solid rgba(107,114,128,.2); }
.act-archive:hover { background: #6b7280; color: #fff; border-color: #6b7280; }

/* Form grid */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 991px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* Form panel */
.form-panel {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  overflow: hidden; margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.form-panel-head {
  padding: 15px 22px;
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color);
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-title);
}
.form-panel-head i { color: var(--brand-navy); }
.form-panel-body { padding: 22px; }
.field-group { margin-bottom: 20px; }
.field-label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 7px;
}
.field-input {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-primary);
  background: var(--bg-primary);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: var(--font-body);
}
.field-input:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(0,55,123,.08);
}
.field-hint { font-size: 11.5px; color: var(--text-tertiary); margin-top: 5px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-opt {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 13.5px; padding: 7px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm); transition: var(--transition);
  background: var(--bg-primary);
}
.radio-opt:has(input:checked) {
  background: var(--bg-tertiary);
  border-color: var(--brand-navy);
  color: var(--brand-navy); font-weight: 600;
}
.checkbox-scroll {
  max-height: 200px; overflow-y: auto;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 8px;
}
.checkbox-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; cursor: pointer;
  font-size: 13.5px; border-radius: var(--radius-sm);
  transition: background .15s;
}
.checkbox-opt:hover { background: var(--bg-tertiary); }

/* Upload area */
.upload-area {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 28px 18px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--bg-tertiary);
}
.upload-area:hover {
  border-color: var(--brand-navy);
  background: var(--brand-pale-blue);
}
.upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-area i { font-size: 34px; color: var(--brand-navy); opacity: .45; display: block; margin-bottom: 10px; }
.upload-area p { font-size: 13px; color: var(--text-tertiary); margin: 0 0 4px; }
.upload-area small { font-size: 11.5px; color: var(--text-tertiary); opacity: .7; }
.existing-img { margin-top: 14px; }
.existing-img-lbl { font-size: 12px; color: var(--text-tertiary); margin-bottom: 8px; font-weight: 600; }
.existing-img img { max-height: 120px; border-radius: var(--radius-sm); border: 2px solid var(--border-color); }

/* Submit row */
.submit-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-submit {
  padding: 11px 28px;
  background: var(--primary-gradient);
  color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-submit:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-cancel {
  padding: 11px 22px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: var(--transition);
}
.btn-cancel:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--brand-navy);
}

/* Toolbar sm buttons */
.btn-sm-pes {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.btn-sm-pes:hover { border-color: var(--brand-navy); color: var(--brand-navy); background: var(--bg-tertiary); }
.btn-sm-pes.liked { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-sm-pes-primary { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.btn-sm-pes-primary:hover { background: var(--pes-dark); color: #fff; }
.btn-sm-pes-edit { color: var(--brand-navy); border-color: var(--border-color); background: var(--bg-tertiary); }
.btn-sm-pes-edit:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.btn-sm-pes-danger { color: #dc2626; border-color: rgba(220,38,38,.25); background: rgba(220,38,38,.05); }
.btn-sm-pes-danger:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-sm-pes-success { color: #059669; border-color: rgba(5,150,105,.25); background: rgba(5,150,105,.05); }
.btn-sm-pes-success:hover { background: #059669; color: #fff; border-color: #059669; }

/* ================================================================
   18. LOGIN
================================================================ */
/* ── Auth pages (login, change-password) ── */
.auth-page {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* Right brand panel */
.auth-brand {
  flex: 1;
  background: linear-gradient(155deg, #001230 0%, #002575 55%, #001840 100%);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center;
  padding: 56px 10% 56px 14%;
  flex-shrink: 0;
}
@media (max-width: 767px) { .auth-brand { display: none; } }

.auth-brand-inner { position: relative; z-index: 1; width: 100%; }

.auth-logo-link { display: inline-block; margin-bottom: 36px; }
.auth-logo {
  height: 46px; width: auto;
  filter: brightness(0) invert(1); opacity: .92;
}

.auth-brand-text {
  width: max-content; /* matches title's natural single-line width */
  max-width: 100%;
  margin-bottom: 36px;
}
.auth-brand-title {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 900; color: #fff;
  line-height: 1.15; margin-bottom: 14px;
  white-space: nowrap;
}
.auth-brand-sub {
  font-size: .88rem; color: rgba(255,255,255,.55);
  line-height: 1.7; margin: 0;
  width: 100%; /* constrained by parent = title width */
  white-space: normal;
}

/* Stat pills on login panel — horizontal row */
.auth-brand-stats { display: flex; flex-direction: row; flex-wrap: wrap; gap: .55rem; margin-bottom: 40px; }
.auth-stat {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50px;
  font-size: .8rem; color: rgba(255,255,255,.8);
  white-space: nowrap;
}
.auth-stat i { color: var(--brand-orange); font-size: .82rem; }

/* Tips on change-password panel */
.auth-tips { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 40px; }
.auth-tip {
  display: flex; align-items: center; gap: .65rem;
  font-size: .84rem; color: rgba(255,255,255,.65);
}
.auth-tip i { color: #4ade80; font-size: .82rem; flex-shrink: 0; }

.auth-brand-link {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .18s;
}
.auth-brand-link:hover { color: #fff; }

/* Decorative blobs */
.auth-blob {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.auth-blob-1 {
  width: 380px; height: 380px;
  top: -120px; right: -120px;
  background: radial-gradient(circle, rgba(97,185,240,.1) 0%, transparent 70%);
}
.auth-blob-2 {
  width: 260px; height: 260px;
  bottom: -60px; left: -60px;
  background: radial-gradient(circle, rgba(255,108,0,.08) 0%, transparent 70%);
}

/* Left form panel */
.auth-panel {
  width: 42%;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 40px 32px;
}
@media (max-width: 767px) { .auth-panel { width: 100%; } }
.auth-form-wrap {
  width: min(400px, 100%);
  position: relative;
  z-index: 1;
}

/* ── Auth panel background ── */
.auth-panel {
  background: linear-gradient(145deg, #f0f4ff 0%, #e8f0fe 50%, #f5f0ff 100%) !important;
}

/* Dot-grid overlay */
.auth-panel-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,55,123,.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Decorative floating boxes */
.auth-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
/* Large navy square — top-right */
.auth-deco-1 {
  width: 240px; height: 240px;
  top: -80px; right: -60px;
  background: linear-gradient(135deg, rgba(0,55,123,.14) 0%, rgba(0,85,179,.08) 100%);
  border: 2px solid rgba(0, 55, 123, .18);
  border-radius: 28px;
  transform: rotate(22deg);
  backdrop-filter: blur(2px);
}
/* Medium orange square — bottom-left */
.auth-deco-2 {
  width: 160px; height: 160px;
  bottom: -55px; left: -40px;
  background: linear-gradient(135deg, rgba(255,108,0,.12) 0%, rgba(255,146,64,.06) 100%);
  border: 2px solid rgba(255, 108, 0, .18);
  border-radius: 22px;
  transform: rotate(-20deg);
}
/* Small blue square — top-left */
.auth-deco-3 {
  width: 90px; height: 90px;
  top: 28px; left: 24px;
  background: linear-gradient(135deg, rgba(97,185,240,.18) 0%, rgba(97,185,240,.06) 100%);
  border: 2px solid rgba(97, 185, 240, .28);
  border-radius: 16px;
  transform: rotate(14deg);
}
/* Tiny navy — bottom-right */
.auth-deco-4 {
  width: 56px; height: 56px;
  bottom: 44px; right: 32px;
  background: linear-gradient(135deg, rgba(0,55,123,.12) 0%, rgba(0,55,123,.05) 100%);
  border: 2px solid rgba(0, 55, 123, .15);
  border-radius: 12px;
  transform: rotate(38deg);
}
/* Medium navy — mid-right */
.auth-deco-5 {
  width: 110px; height: 110px;
  top: 45%; right: -30px;
  background: linear-gradient(135deg, rgba(0,55,123,.08) 0%, rgba(97,185,240,.06) 100%);
  border: 2px solid rgba(97,185,240,.2);
  border-radius: 20px;
  transform: rotate(-10deg);
}
/* Tiny orange accent — mid-left */
.auth-deco-6 {
  width: 44px; height: 44px;
  top: 40%; left: 20px;
  background: linear-gradient(135deg, rgba(255,108,0,.14) 0%, rgba(255,146,64,.06) 100%);
  border: 2px solid rgba(255, 108, 0, .20);
  border-radius: 10px;
  transform: rotate(25deg);
}

/* Dark mode overrides */
[data-bs-theme="dark"] .auth-panel {
  background: linear-gradient(145deg, #0f1d35 0%, #152540 50%, #111e33 100%) !important;
}
[data-bs-theme="dark"] .auth-panel-grid {
  background-image: radial-gradient(circle, rgba(97,185,240,.12) 1px, transparent 1px);
}
[data-bs-theme="dark"] .auth-deco-1 {
  background: linear-gradient(135deg, rgba(97,185,240,.10) 0%, rgba(0,55,123,.14) 100%);
  border-color: rgba(97, 185, 240, .18);
}
[data-bs-theme="dark"] .auth-deco-2 {
  background: linear-gradient(135deg, rgba(255,108,0,.10) 0%, rgba(255,108,0,.04) 100%);
  border-color: rgba(255, 108, 0, .18);
}
[data-bs-theme="dark"] .auth-deco-3 {
  background: linear-gradient(135deg, rgba(97,185,240,.12) 0%, rgba(97,185,240,.04) 100%);
  border-color: rgba(97, 185, 240, .22);
}
[data-bs-theme="dark"] .auth-deco-4 {
  background: linear-gradient(135deg, rgba(97,185,240,.10) 0%, rgba(0,55,123,.08) 100%);
  border-color: rgba(97, 185, 240, .15);
}
[data-bs-theme="dark"] .auth-deco-5 {
  background: linear-gradient(135deg, rgba(97,185,240,.08) 0%, rgba(0,55,123,.06) 100%);
  border-color: rgba(97, 185, 240, .16);
}
[data-bs-theme="dark"] .auth-deco-6 {
  background: linear-gradient(135deg, rgba(255,108,0,.10) 0%, rgba(255,108,0,.04) 100%);
  border-color: rgba(255, 108, 0, .16);
}

/* Mobile logo */
.auth-mob-logo {
  display: none; text-align: center; margin-bottom: 28px;
}
.auth-mob-logo img { height: 44px; }
@media (max-width: 767px) { .auth-mob-logo { display: block; } }

/* Form head */
.auth-form-head { margin-bottom: 32px; }
.auth-form-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(0,55,123,.25);
}
.auth-form-title {
  font-family: var(--font-title);
  font-size: 1.55rem; font-weight: 800;
  color: var(--text-primary); margin-bottom: 6px; line-height: 1.2;
}
.auth-form-sub { font-size: .85rem; color: var(--text-tertiary); margin: 0; }

/* Fields */
.auth-field { margin-bottom: 20px; }
.auth-label {
  display: block; font-size: .8rem; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: .04em;
}
.auth-input-wrap {
  position: relative; display: flex; align-items: center;
}
.auth-input-icon {
  position: absolute; left: 14px;
  color: var(--text-tertiary); font-size: .95rem;
  pointer-events: none; z-index: 1;
}
.auth-input,
.auth-input-wrap input[type="password"],
.auth-input-wrap input[type="text"] {
  width: 100%;
  padding: 11px 42px 11px 40px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--text-primary);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
  font-family: var(--font-body);
}
.auth-input:focus,
.auth-input-wrap input[type="password"]:focus,
.auth-input-wrap input[type="text"]:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(0,55,123,.1);
}
.auth-pwd-toggle {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary); font-size: .95rem; padding: 4px;
  transition: color .15s;
}
.auth-pwd-toggle:hover { color: var(--brand-navy); }
.auth-field-error {
  font-size: .78rem; color: #dc3545; margin: 6px 0 0; display: flex; align-items: center; gap: .3rem;
}
.auth-field-error::before { content: '\F330'; font-family: 'bootstrap-icons'; }

/* Remember me — toggle switch */
.auth-row { margin-bottom: 22px; }
.auth-toggle-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .84rem; color: var(--text-secondary); cursor: pointer;
  user-select: none;
}
.auth-toggle-input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.auth-toggle-track {
  position: relative;
  width: 42px; height: 24px;
  background: #cbd5e1;
  border-radius: 50px;
  transition: background .25s;
  flex-shrink: 0;
}
.auth-toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .25s;
}
.auth-toggle-input:checked + .auth-toggle-track { background: var(--brand-navy); }
.auth-toggle-input:checked + .auth-toggle-track .auth-toggle-thumb { transform: translateX(18px); }
/* legacy — keep accent-color for any other checkboxes */
.auth-check {
  width: 16px; height: 16px;
  accent-color: var(--brand-navy);
  cursor: pointer; flex-shrink: 0;
}

/* Submit button */
.auth-submit-btn {
  width: 100%; padding: 13px;
  background: var(--primary-gradient);
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 18px rgba(0,55,123,.3);
  margin-top: 4px; margin-bottom: 20px;
}
.auth-submit-btn:hover { opacity: .92; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,55,123,.38); }
.auth-submit-btn:active { transform: scale(.98); }

/* Help text */
.auth-help {
  text-align: center; font-size: .8rem; color: var(--text-tertiary); margin: 0;
}
.auth-help a { color: var(--brand-navy); font-weight: 600; }
.auth-help a:hover { color: var(--brand-orange); }
[data-bs-theme="dark"] .auth-help a { color: #61B9F0; }
[data-bs-theme="dark"] .auth-help a:hover { color: var(--brand-orange); }

/* Dark mode */
[data-bs-theme="dark"] .auth-panel { background: #22304a; }
[data-bs-theme="dark"] .auth-form-title { color: #e8edf3; }
[data-bs-theme="dark"] .auth-input,
[data-bs-theme="dark"] .auth-input-wrap input[type="password"],
[data-bs-theme="dark"] .auth-input-wrap input[type="text"] {
  background: #2a3a52; border-color: rgba(97,185,240,.2); color: #dde1e7;
}
[data-bs-theme="dark"] .auth-input:focus,
[data-bs-theme="dark"] .auth-input-wrap input:focus {
  border-color: #61B9F0; box-shadow: 0 0 0 3px rgba(97,185,240,.12);
}

/* Keep old .btn-login for any other references */
.btn-login {
  width: 100%; padding: 13px;
  background: var(--primary-gradient); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition); margin-top: 6px; box-shadow: var(--shadow-sm);
}
.btn-login:hover { opacity: .9; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ================================================================
   19. ERROR PAGE
================================================================ */
.error-page {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px;
  background: var(--bg-secondary);
}
.error-code {
  font-family: var(--font-title);
  font-size: clamp(80px,15vw,140px);
  font-weight: 900; color: var(--brand-navy);
  line-height: 1; margin-bottom: 4px; opacity: .1;
}
.error-page h2 {
  font-family: var(--font-title);
  font-size: 28px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 12px;
}
.error-page p { font-size: 15px; color: var(--text-tertiary); max-width: 480px; margin: 0 auto 30px; }
.btn-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-back:hover { opacity: .9; transform: translateY(-1px); color: #fff; box-shadow: var(--shadow-md); }

/* ================================================================
   20. DARK THEME
================================================================ */
[data-bs-theme="dark"] {
  /* Bootstrap overrides */
  --bs-body-bg:      #0f1620;
  --bs-body-color:   #c8d8ea;

  /* App text scale */
  --text-primary:    #c8d8ea;
  --text-secondary:  #7ea3be;
  --text-tertiary:   #4d7090;

  /* Backgrounds — consistent dark navy palette */
  --bg-primary:      #1a2536;   /* cards, panels, topbar */
  --bg-secondary:    #0f1620;   /* page background */
  --bg-tertiary:     #243042;   /* table headers, hover states */
  --bg-card:         #1a2536;

  /* Borders & shadows */
  --border-color:    #2d3f55;
  --brand-pale-blue: rgba(97,185,240,.06);
  --shadow-sm:       0 2px 8px  rgba(0,0,0,.3);
  --shadow-md:       0 8px 24px rgba(0,0,0,.45);
  --shadow-lg:       0 16px 48px rgba(0,0,0,.55);
}

/* ── Admin shell ── */
[data-bs-theme="dark"] .admin-main       { background: var(--bg-secondary); }
[data-bs-theme="dark"] .admin-topbar     { background: var(--bg-primary); border-bottom-color: var(--border-color); }
[data-bs-theme="dark"] .admin-topbar *   { color: var(--text-primary); }

/* ── Admin panels, form panels, stat cards ── */
[data-bs-theme="dark"] .admin-panel,
[data-bs-theme="dark"] .form-panel       { background: var(--bg-primary); border-color: var(--border-color); }
[data-bs-theme="dark"] .admin-panel-header,
[data-bs-theme="dark"] .form-panel-head  { background: var(--bg-tertiary); border-bottom-color: var(--border-color); color: var(--text-primary); }
[data-bs-theme="dark"] .stat-card        { background: var(--bg-primary); border-color: var(--border-color); color: var(--text-primary); }
[data-bs-theme="dark"] .stat-card:hover  { border-color: rgba(97,185,240,.5); box-shadow: 0 6px 24px rgba(0,0,0,.45); }
[data-bs-theme="dark"] .stat-label       { color: var(--text-primary) !important; }
[data-bs-theme="dark"] .stat-sub         { color: var(--text-tertiary) !important; }

/* ── Table ── */
[data-bs-theme="dark"] .admin-tbl thead th           { background: var(--bg-tertiary); color: var(--text-secondary); border-bottom-color: var(--border-color); }
[data-bs-theme="dark"] .admin-tbl tbody td           { border-bottom-color: var(--border-color); color: var(--text-primary); }
[data-bs-theme="dark"] .admin-tbl tbody tr:hover td  { background: var(--bg-tertiary); }

/* ── Forms ── */
[data-bs-theme="dark"] .field-input     { background: var(--bg-secondary); border-color: var(--border-color); color: var(--text-primary); }
[data-bs-theme="dark"] .field-input:focus { border-color: #61B9F0; box-shadow: 0 0 0 3px rgba(97,185,240,.12); }
[data-bs-theme="dark"] .field-label     { color: var(--text-secondary); }
[data-bs-theme="dark"] .field-hint      { color: var(--text-tertiary); }
[data-bs-theme="dark"] .radio-opt       { background: var(--bg-primary); border-color: var(--border-color); color: var(--text-primary); }
[data-bs-theme="dark"] .radio-opt:has(input:checked) { background: var(--bg-tertiary); border-color: #61B9F0; color: #61B9F0; }
[data-bs-theme="dark"] .checkbox-opt:hover { background: var(--bg-tertiary); }
[data-bs-theme="dark"] .checkbox-scroll { border-color: var(--border-color); }
[data-bs-theme="dark"] .upload-area     { background: var(--bg-tertiary); border-color: var(--border-color); }
[data-bs-theme="dark"] .upload-area:hover { background: rgba(97,185,240,.06); border-color: #61B9F0; }
[data-bs-theme="dark"] .upload-area i   { color: #61B9F0; }
[data-bs-theme="dark"] .existing-img img { border-color: var(--border-color); }

/* ── Action buttons (dark) ── */
[data-bs-theme="dark"] .act-edit   { background: var(--bg-tertiary); border-color: var(--border-color); color: #61B9F0; }
[data-bs-theme="dark"] .act-edit:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
[data-bs-theme="dark"] .btn-cancel { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-secondary); }
[data-bs-theme="dark"] .btn-cancel:hover { background: var(--bg-primary); color: #61B9F0; border-color: #61B9F0; }
[data-bs-theme="dark"] .btn-sm-pes { background: var(--bg-primary); border-color: var(--border-color); color: var(--text-secondary); }
[data-bs-theme="dark"] .btn-sm-pes:hover { border-color: #61B9F0; color: #61B9F0; background: var(--bg-tertiary); }

/* ── Drag-and-drop ── */
[data-bs-theme="dark"] .dnd-ghost td { background: rgba(97,185,240,.08) !important; }

/* ── Panel header icons — theme-aware ── */
.panel-icon-blue   { color: var(--brand-navy); }
.panel-icon-purple { color: #7c3aed; }
[data-bs-theme="dark"] .panel-icon-blue   { color: #61B9F0; }
[data-bs-theme="dark"] .panel-icon-purple { color: #a78bfa; }

/* ── API code block ── */
.api-code-block {
  display: block;
  background: var(--bg-tertiary);
  color: var(--brand-navy);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
}
[data-bs-theme="dark"] .api-code-block {
  background: #0f1620 !important;
  color: #61B9F0 !important;
  border-color: var(--border-color) !important;
}

/* ── Admin page title / breadcrumb ── */
[data-bs-theme="dark"] .admin-page-title   { color: var(--text-primary); }
[data-bs-theme="dark"] .admin-page-title i { color: #61B9F0; }
[data-bs-theme="dark"] .admin-page-count   { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-secondary); }
[data-bs-theme="dark"] .admin-page-head    { border-bottom-color: var(--border-color); }

/* ── Mobile hamburger ── */
[data-bs-theme="dark"] .admin-mob-menu-btn { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-primary); }

/* ── User chip in topbar ── */
[data-bs-theme="dark"] .admin-user-chip { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-secondary); }

/* ── Dashboard quick-action cards ── */
[data-bs-theme="dark"] .dash-card        { background: var(--bg-primary); border-color: var(--border-color); }
[data-bs-theme="dark"] .dash-card:hover  { border-color: rgba(97,185,240,.45); box-shadow: 0 8px 28px rgba(0,0,0,.45); }
[data-bs-theme="dark"] .dash-card-label  { color: var(--text-primary); }
[data-bs-theme="dark"] .dash-card-sub    { color: var(--text-tertiary); }

/* ── REST API / info panels ── */
[data-bs-theme="dark"] .api-panel        { background: var(--bg-primary); border-color: var(--border-color); }
[data-bs-theme="dark"] .api-url-box      { background: var(--bg-secondary); border-color: var(--border-color); color: #61B9F0; }

/* ── Pill badges (admin) ── */
[data-bs-theme="dark"] .pill             { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-secondary); }
[data-bs-theme="dark"] .pill-gray        { background: var(--bg-tertiary); color: var(--text-tertiary); border-color: var(--border-color); }
[data-bs-theme="dark"] .pill-green       { background: rgba(16,185,129,.15); color: #34d399; border-color: rgba(16,185,129,.3); }
[data-bs-theme="dark"] .pill-orange      { background: rgba(255,108,0,.15); color: #fb923c; border-color: rgba(255,108,0,.3); }
[data-bs-theme="dark"] .pill-blue        { background: rgba(97,185,240,.1); border-color: rgba(97,185,240,.2); color: #61B9F0; }

/* ── Admin inline action btn colours (view=blue, archive=purple) ── */
[data-bs-theme="dark"] .action-btn[style*="#0284c7"] { background: rgba(97,185,240,.12) !important; color: #61B9F0 !important; }
[data-bs-theme="dark"] .action-btn[style*="#7c3aed"] { background: rgba(139,92,246,.12) !important; color: #a78bfa !important; }

/* ── Dashboard API code block ── */
[data-bs-theme="dark"] code             { background: var(--bg-secondary) !important; border-color: var(--border-color) !important; color: #61B9F0 !important; }

/* ── btn-outline dark ── */
[data-bs-theme="dark"] .btn-outline     { border-color: rgba(97,185,240,.35); color: #61B9F0; }
[data-bs-theme="dark"] .btn-outline:hover { background: rgba(97,185,240,.1); border-color: #61B9F0; color: #61B9F0; }

/* (news-card dark mode consolidated below) */
[data-bs-theme="dark"] .article-card,
[data-bs-theme="dark"] .sidebar-card,
[data-bs-theme="dark"] .nav-article    { background: var(--bg-primary); border-color: var(--border-color); }
[data-bs-theme="dark"] .tags-bar       { background: var(--bg-primary); border-color: var(--border-color); }
[data-bs-theme="dark"] .detail-toolbar { background: var(--bg-primary); border-color: var(--border-color); }
/* ── Header & nav — dark mode ── */
[data-bs-theme="dark"] .site-topbar    { background: #001a3d; }
[data-bs-theme="dark"] .light-header   {
  background: rgba(13,27,42,.96) !important;
  border-bottom-color: rgba(97,185,240,.12);
  box-shadow: 0 1px 0 rgba(97,185,240,.1), 0 4px 20px rgba(0,0,0,.4);
}
[data-bs-theme="dark"] .theme-toggle-btn {
  background: #2e4260; border-color: rgba(97,185,240,.2);
}
[data-bs-theme="dark"] .theme-icon { color: #A8C8E8; }
[data-bs-theme="dark"] .menu-link  { color: #A8C8E8 !important; }
[data-bs-theme="dark"] .menu-link:hover { color: #fff !important; }
/* active/panel-open fill is handled in header.css */
[data-bs-theme="dark"] .menu-link::after { background: #61B9F0; }
[data-bs-theme="dark"] .nav-search-btn {
  background: #2e4260; border-color: rgba(97,185,240,.2); color: #A8C8E8;
}
[data-bs-theme="dark"] .nav-search-btn:hover { background: var(--brand-navy); color: #fff; }
[data-bs-theme="dark"] .profile-dropdown-trigger {
  background: #2e4260; border-color: rgba(97,185,240,.2);
}
[data-bs-theme="dark"] .profile-dropdown-trigger span { color: #A8C8E8 !important; }
[data-bs-theme="dark"] .profile-dropdown-trigger:hover { background: #1e3d66; }
[data-bs-theme="dark"] .profile-dropdown-menu {
  background: #22304a; border-color: rgba(97,185,240,.15);
}
[data-bs-theme="dark"] .dropdown-divider { background: rgba(97,185,240,.12); }
[data-bs-theme="dark"] .dropdown-item { color: #dde1e7 !important; }
[data-bs-theme="dark"] .dropdown-item i { background: #2e4260; color: #61B9F0; }
[data-bs-theme="dark"] .dropdown-item:hover { background: #2a3a52; color: #fff !important; }
[data-bs-theme="dark"] .dropdown-item:hover i { background: var(--brand-navy); color: #fff; }
[data-bs-theme="dark"] .mobile-menu-toggle {
  background: #2e4260; border-color: rgba(97,185,240,.2); color: #A8C8E8;
}
/* Mobile nav dark */
[data-bs-theme="dark"] #mobileNav .offcanvas-body { background: #131e30; }
[data-bs-theme="dark"] .mob-header { background: #1a2742; border-bottom-color: rgba(97,185,240,.12); }
[data-bs-theme="dark"] .mob-close-btn { background: #2e4260; border-color: rgba(97,185,240,.2); color: #A8C8E8; }
[data-bs-theme="dark"] .mob-user-name { color: #dde1e7; }
[data-bs-theme="dark"] .mob-user-email { color: #7B9BBF; }
[data-bs-theme="dark"] .mob-guest-info { color: #A8C8E8; }
[data-bs-theme="dark"] .mob-guest-icon { color: #7B9BBF; }
[data-bs-theme="dark"] .mob-nav-link { background: #1a2742; border-color: rgba(97,185,240,.15); color: #dde1e7; }
[data-bs-theme="dark"] .mob-nav-link:hover { background: #2e4260; border-color: #61B9F0; color: #61B9F0; }
[data-bs-theme="dark"] .mob-nav-icon-box { background: rgba(97,185,240,.1); color: #61B9F0; }
[data-bs-theme="dark"] .mob-icon-orange { background: rgba(255,108,0,.15); color: var(--brand-orange); }
[data-bs-theme="dark"] .mob-accordion .accordion-item { background: #1a2742; border-color: rgba(97,185,240,.15) !important; }
[data-bs-theme="dark"] .mob-acc-btn { color: #dde1e7 !important; }
[data-bs-theme="dark"] .mob-sub-link { color: #A8C8E8; border-bottom-color: rgba(97,185,240,.08); }
[data-bs-theme="dark"] .mob-sub-link:hover { background: #2a3a52; color: #61B9F0; }
[data-bs-theme="dark"] .mob-tags-section { border-bottom-color: rgba(97,185,240,.1); }
[data-bs-theme="dark"] .mob-tag-pill { background: #2a3a52; border-color: rgba(97,185,240,.2); color: #A8C8E8; }
[data-bs-theme="dark"] .mob-tag-pill:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
[data-bs-theme="dark"] .mob-nav-actions { border-top-color: rgba(97,185,240,.1); }
[data-bs-theme="dark"] .mob-action-logout { border-color: rgba(220,53,69,.4); color: #f08080; }
[data-bs-theme="dark"] .mob-action-logout:hover { background: rgba(220,53,69,.12); color: #f08080; }
/* Mega dark */
[data-bs-theme="dark"] .mega-wrap {
  background: #22304a;
  border-top-color: var(--brand-orange);
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
}
[data-bs-theme="dark"] .mega-right   { background: #22304a; }
[data-bs-theme="dark"] .mega-item    { background: #1e2d45; border-color: rgba(97,185,240,.12); }
[data-bs-theme="dark"] .mega-item:hover { background: #00377B; border-color: #00377B; }
[data-bs-theme="dark"] .mega-item-icon { background: rgba(97,185,240,.1); border-color: rgba(97,185,240,.2); color: #61B9F0; }
[data-bs-theme="dark"] .mega-item-name { color: #dde1e7; }
[data-bs-theme="dark"] .mega-item-hint { color: #6b8ab0; }
[data-bs-theme="dark"] .mega-item-name { color: #dde1e7; }
[data-bs-theme="dark"] .mega-item:hover .mega-item-name { color: #61B9F0; }
[data-bs-theme="dark"] .mega-footer  { background: #070f1c; border-top-color: rgba(97,185,240,.1); }
[data-bs-theme="dark"] .mega-footer-tip { color: rgba(97,185,240,.5); }
[data-bs-theme="dark"] .mega-footer-link { color: #61B9F0; }
[data-bs-theme="dark"] .mega-tag-pill {
  background: #2a3a52; border-color: rgba(97,185,240,.2); color: #A8C8E8;
}
[data-bs-theme="dark"] .mega-tag-pill:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

/* News detail dark */
[data-bs-theme="dark"] .nd-toolbar { background: #22304a; border-bottom-color: rgba(97,185,240,.1); }
[data-bs-theme="dark"] .nd-tag-chip { background: #2a3a52; border-color: rgba(97,185,240,.2); color: #A8C8E8; }
[data-bs-theme="dark"] .nd-tag-chip:hover { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
[data-bs-theme="dark"] .nd-action-btn { background: #2a3a52; border-color: rgba(97,185,240,.18); color: #A8C8E8; }
[data-bs-theme="dark"] .nd-action-btn:hover { background: #2e4260; }
[data-bs-theme="dark"] .nd-wrapper { background: #070f1c; }
[data-bs-theme="dark"] .pes-toast { background: #22304a; border-color: rgba(97,185,240,.1); }
[data-bs-theme="dark"] .pes-toast-text { color: #c5cfd9; }
[data-bs-theme="dark"] .nd-side-card,
[data-bs-theme="dark"] .nd-pn-title { color: #dde1e7; }
[data-bs-theme="dark"] .nd-pn-prev:hover .nd-pn-title { color: #61B9F0; }
[data-bs-theme="dark"] .nd-side-card-head { background: #2a3a52; border-bottom-color: rgba(97,185,240,.12); color: #61B9F0; }
[data-bs-theme="dark"] .nd-article-foot { border-top-color: rgba(97,185,240,.12); }
[data-bs-theme="dark"] .nd-article-body { color: #c5cfd9; }
[data-bs-theme="dark"] .nd-article-body blockquote { background: #2a3a52; }
[data-bs-theme="dark"] .nd-article-title { color: #e8edf3; }
[data-bs-theme="dark"] .nd-article-chips .pill-blue { background: rgba(97,185,240,.1); border-color: rgba(97,185,240,.2); color: #61B9F0; }
[data-bs-theme="dark"] .nd-info-row { border-bottom-color: rgba(97,185,240,.08); }
[data-bs-theme="dark"] .nd-info-label { color: rgba(97,185,240,.5); }
[data-bs-theme="dark"] .nd-info-val { color: #dde1e7; }
[data-bs-theme="dark"] .nd-pill-gray { background: #2a3a52; border-color: rgba(97,185,240,.15); color: #A8C8E8; }
[data-bs-theme="dark"] .nd-pill-blue { background: rgba(97,185,240,.1); border-color: rgba(97,185,240,.2); color: #61B9F0; }
[data-bs-theme="dark"] .nd-recent-section-title { color: #dde1e7; border-bottom-color: #61B9F0; }
[data-bs-theme="dark"] .nd-recent-section-title i { color: #61B9F0; }
[data-bs-theme="dark"] .nd-rc { background: #22304a; border-color: rgba(97,185,240,.12); }
[data-bs-theme="dark"] .nd-rc:hover { box-shadow: 0 6px 20px rgba(0,0,0,.4); }
[data-bs-theme="dark"] .nd-rc-active { border-color: #61B9F0; box-shadow: 0 0 0 2px rgba(97,185,240,.2); }
[data-bs-theme="dark"] .nd-rc-title { color: #dde1e7; }
[data-bs-theme="dark"] .nd-rc-excerpt { color: #8fa8c0; }
[data-bs-theme="dark"] .nd-rc-campus { background: rgba(97,185,240,.1); color: #61B9F0; }
[data-bs-theme="dark"] .nd-rc-no-img { background: #2a3a52; }
[data-bs-theme="dark"] .nd-tags-cloud .nd-tag-pill { background: #2a3a52; border-color: rgba(97,185,240,.2); color: #A8C8E8; }
[data-bs-theme="dark"] .nd-big-like-btn { background: #2a3a52; border-color: rgba(220,53,69,.4); }
[data-bs-theme="dark"] .nd-big-like-btn:hover,
[data-bs-theme="dark"] .nd-big-like-btn.liked { background: #dc3545; border-color: #dc3545; color: #fff; }
[data-bs-theme="dark"] .nd-big-count { color: #61B9F0; }
[data-bs-theme="dark"] .nd-like-section { border-color: rgba(97,185,240,.12); background: linear-gradient(135deg,rgba(97,185,240,.04),rgba(255,108,0,.03)); }
[data-bs-theme="dark"] .nd-pn-card { background: #22304a; border-color: rgba(97,185,240,.12); }
[data-bs-theme="dark"] .nd-pn-card:hover { background: #2a3a52; }
[data-bs-theme="dark"] .nd-foot-tag { background: rgba(97,185,240,.1); color: #61B9F0; }
[data-bs-theme="dark"] .nd-video { border-color: rgba(97,185,240,.15); }
[data-bs-theme="dark"] .nd-video-label { background: #2a3a52; border-bottom-color: rgba(97,185,240,.12); }
[data-bs-theme="dark"] .nd-thumb { border-color: transparent; }
[data-bs-theme="dark"] .nd-thumb.active { border-color: var(--brand-orange); }
[data-bs-theme="dark"] .nd-gallery-main { border-color: rgba(97,185,240,.15); }
[data-bs-theme="dark"] #nd-back-top { background: #2e4260; }
[data-bs-theme="dark"] #nd-back-top:hover { background: var(--brand-orange); }
[data-bs-theme="dark"] .nd-article-head { border-bottom-color: rgba(97,185,240,.1); }

/* ================================================================
   21. ANIMATIONS
================================================================ */
[data-animate] { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s ease; }
[data-animate].animated { opacity: 1; transform: none; }

/* ================================================================
   22. SHARED UTILITY CLASSES
================================================================ */
/* Container override for consistent max-width */
.container { max-width: 1400px; }

/* Page hero (index / browse) */
.page-hero {
  background: var(--primary-gradient);
  color: #fff;
  padding: 64px 0 52px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 0%, rgba(97,185,240,.15) 0%, transparent 55%);
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 14px;
}
.page-hero-sub { font-size: 16px; opacity: .78; max-width: 520px; line-height: 1.65; }
.page-hero-stats {
  display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--font-title);
  font-size: 2.2rem; font-weight: 700;
  line-height: 1;
}
.hero-stat-lbl { font-size: 12px; opacity: .68; text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; }

/* Pill helpers (shared) */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  border: 1.5px solid transparent;
}
.pill-blue { background: var(--bg-tertiary); color: var(--brand-navy); border-color: var(--border-color); }
.pill-orange { background: rgba(255,108,0,.1); color: var(--brand-orange); border-color: rgba(255,108,0,.25); }
.pill-green { background: rgba(16,185,129,.1); color: #059669; border-color: rgba(16,185,129,.25); }
.pill-gray { background: var(--bg-secondary); color: var(--text-tertiary); border-color: var(--border-color); }

/* Gradient buttons */
.btn-primary-solid {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 24px;
  background: var(--primary-gradient);
  color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.btn-primary-solid:hover { opacity: .9; transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 22px;
  background: transparent;
  color: var(--brand-navy);
  border: 2px solid var(--brand-navy);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  text-decoration: none;
}
.btn-outline:hover { background: var(--brand-navy); color: #fff; }

/* Section head (sd style) */
.sd-section-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.sd-section-icon {
  width: 44px; height: 44px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}

/* Page card (shared white card) */
.page-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Dark theme compatibility for new classes */
[data-bs-theme="dark"] .news-card { background: #0f1c2e; border-color: #1a2f4a; }
[data-bs-theme="dark"] .news-card:hover { border-color: rgba(97,185,240,.45); box-shadow: 0 8px 28px rgba(0,0,0,.4); }
[data-bs-theme="dark"] .news-card-title a { color: #dde8f5; }
[data-bs-theme="dark"] .news-card-title a:hover { color: #61B9F0; }

/* ================================================================
   NEWS CARD — new editorial design (.nc-*)
================================================================ */
.nc {
  background: var(--bg-primary);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  box-shadow: 0 2px 10px rgba(0,55,123,.08);
  border: 1px solid var(--border-color);
}
.nc:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,55,123,.15);
  border-color: rgba(0,55,123,.25);
}

/* Image wrapper */
.nc-img-wrap {
  position: relative; display: block;
  overflow: hidden; text-decoration: none;
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.nc-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.nc:hover .nc-img-wrap img { transform: scale(1.05); }
.nc-no-img {
  width: 100%; height: 100%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: rgba(255,255,255,.35);
}

/* Gradient at bottom of image */
.nc-img-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,4,20,.7) 0%, transparent 55%);
  pointer-events: none;
}

/* Top badges */
.nc-img-top {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 5px; z-index: 2;
}
.nc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 50px;
  font-size: 10px; font-weight: 800; letter-spacing: .3px;
  backdrop-filter: blur(6px);
}
.nc-badge-hot   { background: rgba(220,38,38,.88); color: #fff; }
.nc-badge-feat  { background: rgba(255,108,0,.88); color: #fff; }
.nc-badge-press { background: rgba(0,55,123,.88);  color: #fff; }
.nc-badge-video { background: rgba(0,0,0,.55);     color: #fff; }

/* Bottom-left: campus */
.nc-img-cat {
  position: absolute; bottom: 10px; left: 10px; z-index: 2;
  display: flex; gap: 5px;
}
.nc-img-cat span {
  font-size: 10px; font-weight: 700; letter-spacing: .35px;
  text-transform: uppercase; color: rgba(255,255,255,.9);
  background: rgba(0,55,123,.72); backdrop-filter: blur(6px);
  padding: 3px 9px; border-radius: 50px;
}

/* Bottom-right: stats */
.nc-img-stats {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  display: flex; gap: 5px;
}
.nc-img-stats span {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
  padding: 3px 8px; border-radius: 50px;
}

/* Card body */
.nc-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.nc-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.nc-date {
  font-size: 11px; color: var(--text-tertiary);
  font-weight: 500;
}
.nc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700;
  color: var(--brand-navy);
  background: rgba(0,55,123,.07);
  border: 1px solid rgba(0,55,123,.14);
  padding: 2px 8px; border-radius: 50px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nc-tag i { font-size: 12px; line-height: 1; }
.nc-tag:hover { background: var(--brand-navy); color: #fff; }
.nc-title {
  font-family: var(--font-title);
  font-size: 14px; font-weight: 800;
  line-height: 1.4; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.nc-title a { color: var(--text-primary); text-decoration: none; transition: color .18s; }
.nc-title a:hover { color: var(--brand-navy); }
.nc-kicker {
  font-size: 11px; color: var(--brand-orange);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: .35px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}
.nc-ext-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--brand-orange);
  text-decoration: none; margin-top: 2px;
  transition: gap .15s;
}
.nc-ext-link:hover { gap: 8px; }

/* Featured first card */
.nc-feat { grid-column: 1 / -1; }
.nc-feat .nc-img-wrap { aspect-ratio: 21/9; }
.nc-feat .nc-title { font-size: 1.25rem; -webkit-line-clamp: 2; }

/* Dark mode */
[data-bs-theme="dark"] .nc { background: #0f1c2e; box-shadow: none; border-color: rgba(97,185,240,.1); }
[data-bs-theme="dark"] .nc:hover { box-shadow: 0 10px 32px rgba(0,0,0,.4); border-color: rgba(97,185,240,.25); }
[data-bs-theme="dark"] .nc-title a { color: #dde8f5; }
[data-bs-theme="dark"] .nc-title a:hover { color: #61B9F0; }
[data-bs-theme="dark"] .nc-tag { background: rgba(97,185,240,.08); border-color: rgba(97,185,240,.18); color: #61B9F0; }
[data-bs-theme="dark"] .nc-tag:hover { background: var(--brand-navy); color: #fff; }
[data-bs-theme="dark"] .news-card-excerpt { color: #7a9ab5; }
[data-bs-theme="dark"] .news-card-date { color: rgba(138,180,210,.55); }
[data-bs-theme="dark"] .news-card-date i { color: #61B9F0; }
[data-bs-theme="dark"] .news-card-footer { border-top-color: #1a2f4a; }

/* campus pills inside cards */
[data-bs-theme="dark"] .ix-campus-pills .pill-blue,
[data-bs-theme="dark"] .pill-blue {
  background: rgba(97,185,240,.08);
  border-color: rgba(97,185,240,.2);
  color: #61B9F0;
}
[data-bs-theme="dark"] .ix-campus-pills .pill-blue:hover,
[data-bs-theme="dark"] .pill-blue:hover {
  background: rgba(97,185,240,.2);
  color: #fff;
}

/* read more button */
[data-bs-theme="dark"] .news-card-readmore {
  background: rgba(97,185,240,.08);
  border-color: rgba(97,185,240,.2);
  color: #61B9F0;
}
[data-bs-theme="dark"] .news-card-readmore:hover {
  background: #61B9F0;
  border-color: #61B9F0;
  color: #001230;
}

/* dept dot badge */
[data-bs-theme="dark"] .ix-dept-dot {
  background: rgba(255,108,0,.12);
  border-color: rgba(255,108,0,.28);
  color: #fdba74;
}
[data-bs-theme="dark"] .tags-bar { background: #22304a; border-bottom-color: #384f6a; }
[data-bs-theme="dark"] .tag-pill { background: #2a3a52; border-color: #384f6a; color: var(--brand-blue-light); }
[data-bs-theme="dark"] .detail-toolbar { background: #22304a; border-bottom-color: #384f6a; }
[data-bs-theme="dark"] .detail-wrapper { background: #0a1628; }
[data-bs-theme="dark"] .page-section { background: #0a1628; }
[data-bs-theme="dark"] .article-card,
[data-bs-theme="dark"] .sidebar-card,
[data-bs-theme="dark"] .nav-article,
[data-bs-theme="dark"] .page-card { background: #2a3a52; border-color: #384f6a; }
[data-bs-theme="dark"] .article-header h2,
[data-bs-theme="dark"] .sidebar-card-title { color: #e2eaf5; }
[data-bs-theme="dark"] .article-body { color: #b8cfe8; }
[data-bs-theme="dark"] .article-footer { background: #2a3a52; border-top-color: #384f6a; }
[data-bs-theme="dark"] .admin-panel,
[data-bs-theme="dark"] .form-panel,
[data-bs-theme="dark"] .stat-card { background: #2a3a52; border-color: #384f6a; }
[data-bs-theme="dark"] .admin-panel-header,
[data-bs-theme="dark"] .form-panel-head { background: #2a3a52; border-bottom-color: #384f6a; }
[data-bs-theme="dark"] .admin-topbar { background: #2a3a52; border-bottom-color: #384f6a; }
[data-bs-theme="dark"] .admin-page-title { color: #e2eaf5; }
[data-bs-theme="dark"] .admin-main { background: #22304a; }
[data-bs-theme="dark"] .admin-tbl thead th { background: #2a3a52; color: #7ba3c8; }
[data-bs-theme="dark"] .admin-tbl tbody td { border-bottom-color: #384f6a; color: #c5d8ec; }
[data-bs-theme="dark"] .admin-tbl tbody tr:hover td { background: #142240; }
[data-bs-theme="dark"] .field-input { background: #2a3a52; border-color: #384f6a; color: #e2eaf5; }
[data-bs-theme="dark"] .upload-area { background: #2a3a52; border-color: #384f6a; }
[data-bs-theme="dark"] .checkbox-scroll { border-color: #384f6a; }
[data-bs-theme="dark"] .checkbox-opt:hover { background: #142240; }
[data-bs-theme="dark"] .btn-cancel { background: #2a3a52; border-color: #384f6a; color: #b8cfe8; }
[data-bs-theme="dark"] .btn-cancel:hover { background: #2a3a52; color: #e2eaf5; }
[data-bs-theme="dark"] .btn-sm-pes { background: #2a3a52; border-color: #384f6a; color: #b8cfe8; }
[data-bs-theme="dark"] .radio-opt { background: #2a3a52; border-color: #384f6a; color: #b8cfe8; }
[data-bs-theme="dark"] .stat-label { color: #e2eaf5; }
[data-bs-theme="dark"] .section-title { color: #e2eaf5; }
[data-bs-theme="dark"] .login-card { background: #2a3a52; border-color: #384f6a; }
[data-bs-theme="dark"] .login-card h2 { color: #e2eaf5; }
[data-bs-theme="dark"] .login-sub { color: var(--text-tertiary); }
[data-bs-theme="dark"] .error-page { background: #22304a; }
[data-bs-theme="dark"] .error-page h2 { color: #e2eaf5; }

/* ================================================================
   DARK MODE — ADMIN COMPREHENSIVE FIX
   Covers: profile dropdown, topbar text, table links, action btns,
   stat-card text/icons, form panel heads, section headers, checkboxes
================================================================ */

/* ── Profile dropdown panel ── */
[data-bs-theme="dark"] .profile-dropdown-menu {
  background: var(--bg-primary);
  border-color: var(--border-color);
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
[data-bs-theme="dark"] .dropdown-divider { background: var(--border-color); }
[data-bs-theme="dark"] .dropdown-item {
  color: var(--text-primary) !important;
}
[data-bs-theme="dark"] .dropdown-item i {
  background: var(--bg-tertiary);
  color: #61B9F0;
}
[data-bs-theme="dark"] .dropdown-item:hover {
  background: var(--bg-tertiary) !important;
  color: #61B9F0 !important;
}
[data-bs-theme="dark"] .dropdown-item:hover i { background: #61B9F0; color: #0f1620; }
[data-bs-theme="dark"] .dropdown-item.active { background: rgba(255,140,40,.12); color: #ffaa55 !important; }
[data-bs-theme="dark"] .dropdown-item.active i { background: rgba(255,140,40,.18); color: #ffaa55; }
[data-bs-theme="dark"] .logout-item i { color: #f87171; background: rgba(239,68,68,.12); }
[data-bs-theme="dark"] .logout-item:hover { background: rgba(239,68,68,.1) !important; color: #f87171 !important; }
[data-bs-theme="dark"] .user-name { color: var(--text-primary); }
[data-bs-theme="dark"] .user-email { color: var(--text-tertiary); }
[data-bs-theme="dark"] .dropdown-settings { background: var(--bg-tertiary); }
[data-bs-theme="dark"] .setting-label { color: var(--text-secondary); }
[data-bs-theme="dark"] .setting-select {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* ── Topbar: all text visible ── */
[data-bs-theme="dark"] .admin-topbar { color: var(--text-primary); }
[data-bs-theme="dark"] .admin-topbar .profile-dropdown-trigger { color: var(--text-primary); }
[data-bs-theme="dark"] .admin-topbar .dropdown-arrow { color: var(--text-tertiary); }
[data-bs-theme="dark"] .theme-toggle-btn { color: var(--text-secondary); }
[data-bs-theme="dark"] .theme-toggle-btn:hover { color: var(--text-primary); }

/* ── Stat card labels always visible ── */
[data-bs-theme="dark"] .stat-label { color: var(--text-primary) !important; }
[data-bs-theme="dark"] .stat-sub   { color: var(--text-tertiary) !important; }
[data-bs-theme="dark"] .stat-card .stat-icon { opacity: .85; }

/* ── Table links ── */
[data-bs-theme="dark"] .admin-tbl .col-title a { color: #61B9F0; }
[data-bs-theme="dark"] .admin-tbl .col-title a:hover { color: #90d0ff; }
[data-bs-theme="dark"] .admin-tbl td .pill-gray { background: var(--bg-tertiary); color: var(--text-tertiary); border-color: var(--border-color); }

/* ── Action buttons (edit) ── */
[data-bs-theme="dark"] .action-btn.act-edit { background: rgba(16,185,129,.12); color: #34d399; }
[data-bs-theme="dark"] .action-btn.act-edit:hover { background: rgba(16,185,129,.25); }

/* ── Section / page headings ── */
[data-bs-theme="dark"] .sec-head-title  { color: var(--text-primary); }
[data-bs-theme="dark"] .sec-head-sub    { color: var(--text-tertiary); }
[data-bs-theme="dark"] .sec-head-icon   { background: var(--bg-tertiary); color: #61B9F0; border-color: var(--border-color); }
[data-bs-theme="dark"] .sec-head-cta    { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-secondary); }
[data-bs-theme="dark"] .sec-head-cta:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ── Form panel headings and bodies ── */
[data-bs-theme="dark"] .form-panel-head { color: var(--text-primary); }
[data-bs-theme="dark"] .form-panel-head i { color: #61B9F0; }
[data-bs-theme="dark"] .form-panel-body { color: var(--text-primary); }
[data-bs-theme="dark"] .field-label { color: var(--text-secondary); }
[data-bs-theme="dark"] .field-hint  { color: var(--text-tertiary); }

/* ── Checkboxes / multi-select in forms ── */
[data-bs-theme="dark"] .checkbox-opt { background: var(--bg-primary); border-color: var(--border-color); color: var(--text-primary); }
[data-bs-theme="dark"] .checkbox-opt:hover { background: var(--bg-tertiary); }
[data-bs-theme="dark"] .checkbox-opt label { color: var(--text-primary); }

/* ── Page title icon ── */
[data-bs-theme="dark"] .admin-page-title { color: var(--text-primary); }
[data-bs-theme="dark"] .admin-page-title i { color: #61B9F0; }

/* ── Code blocks in dashboard ── */
[data-bs-theme="dark"] code {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: #61B9F0 !important;
}

/* ── btn-outline in admin ── */
[data-bs-theme="dark"] .btn-outline {
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: transparent;
}
[data-bs-theme="dark"] .btn-outline:hover { background: var(--bg-tertiary); color: var(--text-primary); }


/* ================================================================
   EDITORIAL HERO  (nhero — full-width slider)
================================================================ */
.nhero {
  position: relative;
  height: clamp(420px, 54vw, 620px);
  background: #000812;
  overflow: hidden;
}

/* ── Slide track ── */
.nhero-track {
  display: flex;
  height: 100%;
  gap: 4px;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ── Each slide ── */
.nhero-slide {
  flex: 0 0 auto;          /* width driven by image natural ratio */
  min-width: 220px;        /* never collapse on broken images */
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  border-radius: 0;
}
.nhero-slide > img {
  height: 100%;
  width: auto;             /* natural aspect-ratio at fixed height */
  max-width: 85vw;         /* cap very-wide images */
  display: block;
  object-fit: unset;
  transition: transform .8s cubic-bezier(.25,0,.15,1);
}
.nhero-slide:hover > img { transform: scale(1.04); }

.nhero-main-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,4,20,.97)  0%,
    rgba(0,4,20,.72)  32%,
    rgba(0,4,20,.22)  60%,
    rgba(0,4,20,.06)  80%,
    transparent       100%
  );
  pointer-events: none;
}

.nhero-main-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 20px 54px; /* 54px = clear the dots row */
  z-index: 2;
}

.nhero-tag-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  margin-bottom: 7px;
}
.nhero-cat {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 13px; border-radius: 50px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase;
  color: #61B9F0;
  background: rgba(97,185,240,.15);
  border: 1px solid rgba(97,185,240,.3);
}
.nhero-cat i { font-size: 12px; line-height: 1; }
.nhero-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 50px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px;
}
.nhero-badge-hot   { background: rgba(220,38,38,.92);  color: #fff; }
.nhero-badge-feat  { background: rgba(255,108,0,.92);  color: #fff; }
.nhero-badge-press { background: rgba(0,55,123,.92);   color: #fff; }

.nhero-main-title {
  font-family: var(--font-title);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 700; color: #fff;
  line-height: 1.25; margin: 0 0 8px;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
  /* max-width: 560px; */
}
.nhero-main-excerpt {
  font-size: 14.5px; color: rgba(255,255,255,.7);
  line-height: 1.65; margin: 0 0 22px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  max-width: 660px;
}
.nhero-main-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.nhero-main-meta {
  font-size: 12.5px; color: rgba(255,255,255,.48);
  display: flex; align-items: center; gap: 6px;
}
.nhero-main-meta i { font-size: .72rem; color: rgba(97,185,240,.7); }
.nhero-read-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 50px;
  background: rgba(255,255,255,.13);
  border: 1.5px solid rgba(255,255,255,.28);
  color: #fff; font-size: 13px; font-weight: 700;
  backdrop-filter: blur(12px);
  transition: background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}
.nhero-slide:hover .nhero-read-btn {
  background: #fff; border-color: #fff;
  color: var(--brand-navy);
}

/* ── Prev / Next buttons ── */
.nhero-sl-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.38);
  color: #fff; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, transform .2s;
}
.nhero-sl-btn:hover {
  background: var(--brand-navy); border-color: var(--brand-navy);
  transform: translateY(-50%) scale(1.1);
}
.nhero-sl-prev { left: 20px; }
.nhero-sl-next { right: 20px; }

/* ── Dot indicators ── */
.nhero-dots {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 10;
  display: flex; gap: 8px; align-items: center;
}
.nhero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.35);
  transition: background .25s, transform .25s, width .25s;
}
.nhero-dot.active {
  background: #fff; width: 24px; border-radius: 4px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .nhero { height: clamp(300px, 55vw, 440px); }
  .nhero-slide > img { max-width: 90vw; }
  .nhero-sl-btn { width: 38px; height: 38px; font-size: .95rem; }
}
@media (max-width: 575px) {
  .nhero { height: clamp(260px, 70vw, 380px); }
  /* On mobile: full-width slides (filmstrip doesn't work on tiny screens) */
  .nhero-slide { min-width: 0; width: 100vw; }
  .nhero-slide > img { width: 100%; height: 100%; object-fit: cover; max-width: 100vw; }
  .nhero-main-excerpt { display: none; }
  .nhero-main-body { padding: 20px 22px; }
  .nhero-main-title { font-size: 1.15rem; }
  .nhero-sl-btn { width: 34px; height: 34px; font-size: .85rem; }
  .nhero-sl-prev { left: 10px; }
  .nhero-sl-next { right: 10px; }
}

/* ================================================================
   FEATURED FIRST CARD  (index page, page 1)
================================================================ */
.ix-featured-card {
  grid-column: 1 / -1;
  flex-direction: row !important;
}
.ix-featured-card .news-card-img {
  aspect-ratio: unset !important;
  width: 50%; flex-shrink: 0;
  min-height: 280px;
}
.ix-featured-card .news-card-img img { height: 100%; }
.ix-featured-card .news-card-body { padding: 28px 32px; }
.ix-featured-card .news-card-title {
  font-size: 1.25rem; line-height: 1.3; font-weight: 800;
}
.ix-featured-card .news-card-excerpt { -webkit-line-clamp: 4; font-size: 14px; }
.ix-feat-read-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px;
  padding: 9px 22px; border-radius: 50px;
  background: var(--primary-gradient);
  color: #fff; font-size: 13px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,55,123,.3);
  transition: opacity .2s, transform .2s;
  width: fit-content;
}
.ix-feat-read-btn:hover { opacity: .88; transform: translateX(3px); color: #fff; }

@media (max-width: 767px) {
  .ix-featured-card { flex-direction: column !important; }
  .ix-featured-card .news-card-img {
    width: 100%; aspect-ratio: 16/9 !important; min-height: unset;
  }
  .ix-featured-card .news-card-body { padding: 18px; }
}

[data-bs-theme="dark"] .nhero-side { background: #060e1c; }
[data-bs-theme="dark"] .nhero-side:hover { background: #0a1830; }

/* ================================================================
   BREAKING NEWS TICKER  (nticker)
================================================================ */
.nticker {
  background: var(--brand-navy);
  display: flex; align-items: center;
  height: 44px; overflow: hidden;
  border-bottom: 2px solid rgba(255,255,255,.06);
}
.nticker-badge {
  flex-shrink: 0; height: 100%;
  padding: 0 26px 0 18px;
  display: flex; align-items: center; gap: 6px;
  background: var(--brand-orange);
  font-size: 10.5px; font-weight: 900; letter-spacing: .7px;
  text-transform: uppercase; color: #fff; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}
.nticker-track {
  display: flex; align-items: center; flex: 1;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nticker-track::-webkit-scrollbar { display: none; }
.nticker-item {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 9px;
  padding: 0 22px; height: 44px;
  font-size: 12.5px; color: rgba(255,255,255,.8);
  text-decoration: none; font-weight: 500; white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.08);
  transition: color .15s, background .15s;
}
.nticker-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nticker-date { font-size: 10px; font-weight: 800; color: rgba(97,185,240,.95); flex-shrink: 0; }

/* ================================================================
   MAIN LAYOUT  2-col grid + sticky sidebar
================================================================ */
.ix-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px; align-items: start;
}
.ix-sidebar {
  position: sticky;
  top: calc(var(--header-h, 72px) + 20px);
  display: flex; flex-direction: column; gap: 20px;
}
@media (max-width: 1100px) { .ix-layout { grid-template-columns: 1fr 270px; gap: 28px; } }
@media (max-width: 991px) {
  .ix-layout { grid-template-columns: 1fr; gap: 32px; }
  .ix-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
  }
}
@media (max-width: 575px) { .ix-sidebar { grid-template-columns: 1fr; } }

.news-grid-2col { grid-template-columns: repeat(2, 1fr) !important; }
@media (max-width: 700px) { .news-grid-2col { grid-template-columns: 1fr !important; } }

/* ================================================================
   SIDEBAR WIDGETS  (ixsb-)
================================================================ */

/* ── Sidebar card widget ── */
.sb-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sb-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-bottom: 1.5px solid var(--border-color);
}
.sb-card-head-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .85rem; flex-shrink: 0;
}
.sb-card-head-title {
  font-family: var(--font-title);
  font-size: .82rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary);
}
.sb-stories { padding: 0 18px; }
.sb-tags { padding: 16px 18px; }

/* Legacy aliases */
.sb-section {
  padding-bottom: 28px;
  border-bottom: 1.5px solid var(--border-color);
}
.sb-section:last-child { border-bottom: none; padding-bottom: 0; }
.sb-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-title);
  font-size: .82rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary); margin-bottom: 18px;
}
.sb-head-bar {
  display: inline-block; width: 3px; height: 14px;
  background: var(--accent-gradient); border-radius: 2px; flex-shrink: 0;
}

/* Top stories — numbered list */
.sb-stories { display: flex; flex-direction: column; }
.sb-story {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
  text-decoration: none;
  transition: opacity .18s;
}
.sb-story:last-child { border-bottom: none; }
.sb-story:hover { opacity: .75; }
.sb-story-num {
  flex-shrink: 0;
  font-family: var(--font-title);
  font-size: 1.5rem; font-weight: 900;
  color: var(--border-color);
  line-height: 1; min-width: 28px;
  transition: color .18s;
}
.sb-story:hover .sb-story-num { color: var(--brand-orange); }
.sb-story-body { display: flex; flex-direction: column; gap: 3px; }
.sb-story-date {
  font-size: 10.5px; color: var(--text-tertiary);
  font-weight: 600; letter-spacing: .02em;
}
.sb-story-title {
  font-family: var(--font-title);
  font-size: 13.5px; font-weight: 700;
  color: var(--text-primary); line-height: 1.45; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.sb-story:hover .sb-story-title { color: var(--brand-navy); }

/* Tags */
.sb-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.sb-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: 50px;
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  text-decoration: none;
  transition: background .18s, color .18s, border-color .18s;
}
.sb-tag:hover {
  background: var(--brand-navy); color: #fff;
  border-color: var(--brand-navy);
}

/* Departments */
.sb-dept-list { display: flex; flex-direction: column; gap: 2px; }
.sb-dept {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-primary);
  transition: color .18s;
}
.sb-dept:last-child { border-bottom: none; }
.sb-dept i { font-size: .7rem; color: var(--text-tertiary); transition: transform .18s, color .18s; }
.sb-dept:hover { color: var(--brand-navy); }
.sb-dept:hover i { transform: translateX(3px); color: var(--brand-navy); }

/* Dark mode */
[data-bs-theme="dark"] .sb-card { background: #111e30; border-color: #253650; }
[data-bs-theme="dark"] .sb-card-head { background: #0d1828; border-bottom-color: #253650; }
[data-bs-theme="dark"] .sb-card-head-title { color: #a8c8e8; }
[data-bs-theme="dark"] .sb-section { border-bottom-color: #253650; }
[data-bs-theme="dark"] .sb-story { border-bottom-color: #253650; }
[data-bs-theme="dark"] .sb-story-title { color: #c5d8ec; }
[data-bs-theme="dark"] .sb-story:hover .sb-story-title { color: #61B9F0; }
[data-bs-theme="dark"] .sb-tag { background: #162035; border-color: #384f6a; color: #7a9ab5; }
[data-bs-theme="dark"] .sb-tag:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
[data-bs-theme="dark"] .sb-dept { color: #c5d8ec; border-bottom-color: #253650; }
[data-bs-theme="dark"] .sb-dept:hover { color: #61B9F0; }

/* ================================================================
   DEPARTMENTS SECTION
================================================================ */
.dept-section {
  padding: 48px 0 44px;
  background: var(--bg-primary);
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  overflow-x: clip;
}

/* Scroll track — full viewport width */
.dept-scroll {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-top: 16px; padding-bottom: 10px;
  scrollbar-width: none;
}
.dept-scroll::-webkit-scrollbar { display: none; }
.dept-scroll::before,
.dept-scroll::after {
  content: '';
  flex: none;
  width: max(16px, calc((100vw - 1320px) / 2 + 12px));
}

/* ── Dept card — full-bleed poster (scoped to homepage scroll track only) ── */
.dept-scroll .dept-card {
  flex: 0 0 220px; height: 200px;
  scroll-snap-align: start;
  border-radius: 20px;
  overflow: hidden; text-decoration: none;
  background: var(--dc-bg, var(--primary-gradient));
  /* box-shadow: 0 6px 20px rgba(0,0,0,.18); */
  position: relative;
  transition: transform .28s ease, box-shadow .28s ease;
  flex-shrink: 0;
  /* reset any header.css overrides */
  display: block; padding: 0; border: none; align-items: unset; gap: unset;
}
.dept-scroll .dept-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.dept-scroll .dept-card:hover img { transform: scale(1.06); }
.dept-scroll .dept-card-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(160deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.72) 100%);
  pointer-events: none;
}
.dept-scroll .dept-card:not(:has(img)) .dept-card-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.48) 100%);
}
.dept-scroll .dept-card:hover { transform: translateY(-8px) scale(1.03); }

/* Inner layout */
.dept-scroll .dept-card-inner {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}
.dept-scroll .dept-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
}
.dept-scroll .dept-card-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: rgba(255,255,255,.25);
  border: 1.5px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .25s, transform .25s;
  margin-top: 0;
}
.dept-scroll .dept-card:hover .dept-card-icon {
  background: rgba(255,255,255,.36);
  transform: scale(1.1);
}
.dept-scroll .dept-card-arrow-ico {
  font-size: 1.1rem; color: rgba(255,255,255,.6);
  transition: color .22s, transform .22s;
}
.dept-scroll .dept-card:hover .dept-card-arrow-ico {
  color: #fff; transform: translate(3px,-3px);
}
.dept-scroll .dept-card-footer { display: flex; flex-direction: column; gap: 6px; }
.dept-scroll .dept-card-name {
  font-family: var(--font-title);
  font-size: 15px; font-weight: 800; line-height: 1.3;
  color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dept-scroll .dept-card-count {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  padding: 3px 10px; border-radius: 50px;
  align-self: flex-start; margin-top: 0;
}

/* 6-color gradients */
.dept-scroll .dept-color-1 { --dc-bg: linear-gradient(145deg,#00337a 0%,#1a6abf 100%); }
.dept-scroll .dept-color-2 { --dc-bg: linear-gradient(145deg,#5b21b6 0%,#9f67f2 100%); }
.dept-scroll .dept-color-3 { --dc-bg: linear-gradient(145deg,#065f46 0%,#10b981 100%); }
.dept-scroll .dept-color-4 { --dc-bg: linear-gradient(145deg,#9a3412 0%,#f97316 100%); }
.dept-scroll .dept-color-5 { --dc-bg: linear-gradient(145deg,#075985 0%,#38bdf8 100%); }
.dept-scroll .dept-color-6 { --dc-bg: linear-gradient(145deg,#991b1b 0%,#f87171 100%); }

/* Dark mode — section bg only */
[data-bs-theme="dark"] .dept-section { background: #0a1628; border-color: #253650; }

.ixsb-widget {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.ixsb-widget-head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px;
  font-size: 11.5px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
}
.ixsb-widget-head i { color: var(--brand-orange); font-size: .8rem; }

/* Top Stories */
.ixsb-stories { display: flex; flex-direction: column; }
.ixsb-story {
  display: grid; grid-template-columns: 72px 1fr;
  gap: 12px; padding: 12px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: background .15s;
}
.ixsb-story:last-child { border-bottom: none; }
.ixsb-story:hover { background: var(--bg-secondary); }
.ixsb-story-thumb {
  width: 72px; height: 52px; border-radius: 8px;
  overflow: hidden; background: var(--bg-tertiary);
}
.ixsb-story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ixsb-thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--border-color);
}
.ixsb-story-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ixsb-story-date { font-size: 10.5px; color: var(--brand-orange); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.ixsb-story-date i { font-size: .65rem; }
.ixsb-story-title {
  font-family: var(--font-title);
  font-size: 13px; font-weight: 700;
  color: var(--text-primary); line-height: 1.4; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ixsb-story:hover .ixsb-story-title { color: var(--brand-navy); }

/* Campus links */
.ixsb-campus-list { display: flex; flex-direction: column; }
.ixsb-campus-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  text-decoration: none; border-bottom: 1px solid var(--border-color); transition: background .15s;
}
.ixsb-campus-link:last-child { border-bottom: none; }
.ixsb-campus-link:hover { background: var(--bg-secondary); }
.ixsb-campus-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .85rem;
}
.ixsb-campus-text { flex: 1; min-width: 0; }
.ixsb-campus-name { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixsb-campus-sub  { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixsb-chev { margin-left: auto; font-size: .65rem; color: var(--text-tertiary); transition: color .15s, transform .15s; }
.ixsb-campus-link:hover .ixsb-chev,
.ixsb-dept-link:hover .ixsb-chev { color: var(--brand-navy); transform: translateX(2px); }

/* Tags cloud */
.ixsb-tags-cloud { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px; }
.ixsb-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 12px; border-radius: 50px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-secondary); border: 1.5px solid var(--border-color);
  color: var(--text-secondary); text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.ixsb-tag i { font-size: .68rem; color: var(--brand-orange); }
.ixsb-tag:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.ixsb-tag:hover i { color: rgba(255,255,255,.7); }

/* Departments */
.ixsb-dept-list { display: flex; flex-direction: column; }
.ixsb-dept-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; border-bottom: 1px solid var(--border-color); transition: background .15s, color .15s;
}
.ixsb-dept-link:last-child { border-bottom: none; }
.ixsb-dept-link:hover { background: var(--bg-secondary); color: var(--brand-navy); }
.ixsb-dept-link > .bi-mortarboard { font-size: .85rem; color: var(--brand-orange); }
.ixsb-dept-link > span { flex: 1; }
.ixsb-empty { padding: 16px; color: var(--text-tertiary); font-size: 12.5px; font-style: italic; margin: 0; }

/* ================================================================
   TAG NEWS  editorial first card
================================================================ */
.tng-editorial { grid-template-columns: repeat(3, 1fr); }
.tng-editorial .tng-feat { grid-column: 1 / -1; flex-direction: row !important; }
.tng-editorial .tng-feat .tag-news-card-img { width: 48%; flex-shrink: 0; height: auto; min-height: 240px; }
.tng-editorial .tng-feat .tag-news-card-img img { height: 100%; }
.tng-editorial .tng-feat .tag-news-card-body { padding: 24px 28px; }
.tng-editorial .tng-feat .tag-news-card-title { font-size: 1.05rem; }
.tng-editorial .tng-feat .tag-news-card-excerpt { -webkit-line-clamp: 4; }
.tng-campus {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--brand-orange); text-transform: uppercase; letter-spacing: .3px; margin-right: 6px;
}
@media (max-width: 991px) { .tng-editorial { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) {
  .tng-editorial .tng-feat { flex-direction: column !important; }
  .tng-editorial .tng-feat .tag-news-card-img { width: 100%; min-height: unset; }
  .tng-editorial .tng-feat .tag-news-card-body { padding: 16px; }
}
@media (max-width: 575px) { .tng-editorial { grid-template-columns: 1fr; } }

/* Dark mode */
[data-bs-theme="dark"] .nticker { background: #0a1420; }
[data-bs-theme="dark"] .ixsb-widget { background: #0a1628; border-color: #384f6a; }
[data-bs-theme="dark"] .ixsb-widget-head { background: #162035; border-bottom-color: #384f6a; color: #c5d8ec; }
[data-bs-theme="dark"] .ixsb-story { border-bottom-color: #253650; }
[data-bs-theme="dark"] .ixsb-story:hover { background: #162035; }
[data-bs-theme="dark"] .ixsb-story-title { color: #c5d8ec; }
[data-bs-theme="dark"] .ixsb-campus-link,
[data-bs-theme="dark"] .ixsb-dept-link { border-bottom-color: #253650; }
[data-bs-theme="dark"] .ixsb-campus-link:hover,
[data-bs-theme="dark"] .ixsb-dept-link:hover { background: #162035; }
[data-bs-theme="dark"] .ixsb-campus-name { color: #c5d8ec; }
[data-bs-theme="dark"] .ixsb-tag { background: #162035; border-color: #384f6a; color: #7a9ab5; }
[data-bs-theme="dark"] .ixsb-tag:hover { background: var(--brand-navy); color: #fff; }

/* ================================================================
   EDITION BAR  (ix-edition-bar)
================================================================ */
.ix-edition-bar {
  background: var(--brand-navy);
  border-bottom: 2px solid rgba(255,108,0,.45);
  padding: 7px 0;
}
.ix-edition-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.ix-edition-left { display: flex; align-items: center; gap: 10px; }
.ix-edition-brand {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
  color: #fff;
  display: flex; align-items: center; gap: 6px;
}
.ix-edition-brand i { color: var(--brand-orange); }
.ix-edition-sep { color: rgba(255,255,255,.25); font-size: 14px; }
.ix-live-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(220,38,38,.18);
  border: 1px solid rgba(220,38,38,.35);
  border-radius: 50px; padding: 2px 10px;
  font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
  color: #ff6b6b;
}
.ix-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ef4444;
  animation: ix-pulse 1.8s ease-in-out infinite;
}
@keyframes ix-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .45; transform: scale(.65); }
}
.ix-edition-date {
  font-size: 11.5px; color: rgba(255,255,255,.45); font-weight: 500;
}

/* ================================================================
   STATS STRIP  (ix-stats-strip)
================================================================ */
.ix-stats-strip {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  padding: 12px 0;
}
.ix-stats-inner {
  display: flex; align-items: center;
  justify-content: center;
  flex-wrap: wrap; gap: 0;
}
.ix-stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 36px;
}
.ix-stat-num {
  font-family: var(--font-title);
  font-size: 1.65rem; font-weight: 900;
  color: var(--brand-navy); line-height: 1;
}
.ix-stat-label {
  font-size: 10.5px; color: var(--text-tertiary);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: .45px; margin-top: 3px;
}
.ix-stat-divider {
  width: 1px; height: 38px;
  background: var(--border-color);
  align-self: center;
}
@media (max-width: 575px) {
  .ix-stat-item { padding: 6px 18px; }
  .ix-stat-num  { font-size: 1.3rem; }
}
[data-bs-theme="dark"] .ix-stats-strip  { background: #0a1628; border-bottom-color: #253650; }
[data-bs-theme="dark"] .ix-stat-num     { color: #61B9F0; }
[data-bs-theme="dark"] .ix-stat-divider { background: #253650; }

/* ================================================================
   TRENDING NOW  (ix-trending-section)
================================================================ */
.ix-trending-section {
  padding: 34px 0 38px;
  background: rgba(0,55,123,.04);
  border-top: 3px solid var(--border-color);
  border-bottom: 3px solid var(--border-color);
  overflow: hidden;
}
[data-bs-theme="dark"] .ix-trending-section {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}
.ix-trending-head {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.ix-trending-label-group {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ix-trending-label {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 18px;
  background: var(--accent-gradient);
  border-radius: 50px;
  font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,108,0,.3);
}
.ix-trending-label i { font-size: .85rem; }
.ix-trending-sub { font-size: 13px; color: var(--text-tertiary); font-weight: 500; }
.ix-trending-nav { display: flex; gap: 6px; }
.ix-trend-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-primary); color: var(--brand-navy);
  font-size: .85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, color .18s, border-color .18s;
}
.ix-trend-nav-btn:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* Scroll row — full viewport width, bleeds edge-to-edge */
.ix-trending-scroll {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-top: 8px; padding-bottom: 8px;
  scrollbar-width: none;
}
.ix-trending-scroll::-webkit-scrollbar { display: none; }
.ix-trending-scroll::before,
.ix-trending-scroll::after {
  content: '';
  flex: none;
  width: max(16px, calc((100vw - 1320px) / 2 + 12px));
}

/* Trend card — fixed width for reliable step calculation */
.ix-trend-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: transform .22s, border-color .22s;
}
.ix-trend-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand-navy);
}
.ix-trend-card-top { position: relative; }
.ix-trend-card-img { position: relative; height: 160px; overflow: hidden; background: var(--pes-dark); }
.ix-trend-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center top; display: block;
  transition: transform .45s ease;
}
.ix-trend-card:hover .ix-trend-card-img img { transform: scale(1.06); }
.ix-trend-no-img {
  width: 100%; height: 100%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: rgba(255,255,255,.18);
}
.ix-trend-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,4,20,.72) 0%, transparent 55%);
  pointer-events: none;
}
.ix-trend-num {
  position: absolute; bottom: 10px; left: 12px;
  font-family: var(--font-title);
  font-size: 2.2rem; font-weight: 900;
  color: rgba(255,255,255,.16); line-height: 1;
  z-index: 2; pointer-events: none; letter-spacing: -1px;
}
.ix-trend-video-tag {
  position: absolute; top: 10px; right: 10px;
  background: var(--brand-orange); color: #fff;
  border-radius: 50px; padding: 3px 9px;
  font-size: 10px; font-weight: 700; z-index: 3;
  display: flex; align-items: center; gap: 3px;
}
.ix-trend-body {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.ix-trend-meta-row {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.ix-trend-campus {
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--brand-navy);
  background: rgba(0,55,123,.07);
  border: 1px solid rgba(0,55,123,.12);
  border-radius: 50px; padding: 1px 8px;
}
.ix-trend-ribbon {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9.5px; border-radius: 50px;
  padding: 1px 8px; font-weight: 700;
}
.ix-trend-hot   { background: rgba(220,38,38,.1);  color: #dc2626; }
.ix-trend-feat  { background: rgba(255,108,0,.1);  color: var(--brand-orange); }
.ix-trend-press { background: rgba(0,55,123,.1);   color: var(--brand-navy); }
.ix-trend-title {
  font-family: var(--font-title);
  font-size: 13.5px; font-weight: 700;
  color: var(--text-primary); line-height: 1.4; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.ix-trend-card:hover .ix-trend-title { color: var(--brand-navy); }
.ix-trend-kicker {
  font-size: 11.5px; color: var(--brand-orange);
  font-weight: 600; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ix-trend-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--border-color);
  gap: 8px; flex-wrap: wrap;
}
.ix-trend-date {
  font-size: 10.5px; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 4px;
}
.ix-trend-date i { font-size: .65rem; }
.ix-trend-stats { font-size: 10.5px; color: var(--text-tertiary); display: flex; align-items: center; gap: 5px; }

/* Dark */
[data-bs-theme="dark"] .ix-trending-section   { background: #070f1c; border-bottom-color: #253650; }
[data-bs-theme="dark"] .ix-trending-sub        { color: #4d6a8a; }
[data-bs-theme="dark"] .ix-trend-nav-btn       { background: #162035; border-color: #253650; color: #61B9F0; }
[data-bs-theme="dark"] .ix-trend-nav-btn:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
[data-bs-theme="dark"] .ix-trend-card          { background: #0a1628; border-color: #253650; }
[data-bs-theme="dark"] .ix-trend-card:hover    { border-color: #4d9ef5; }
[data-bs-theme="dark"] .ix-trend-title         { color: #c5d8ec; }
[data-bs-theme="dark"] .ix-trend-card:hover .ix-trend-title { color: #61B9F0; }
[data-bs-theme="dark"] .ix-trend-footer        { border-top-color: #253650; }
[data-bs-theme="dark"] .ix-trend-campus        { background: rgba(97,185,240,.08); border-color: rgba(97,185,240,.15); color: #61B9F0; }

/* ================================================================
   HERO extras  (nhero additions)
================================================================ */
.nhero-video-badge {
  position: absolute; top: 18px; right: 18px;
  background: rgba(0,0,0,.52); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.2); color: #fff;
  border-radius: 50px; padding: 4px 14px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 5px; z-index: 5;
}
.nhero-video-badge i { color: var(--brand-orange); }
.nhero-kicker {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .55px;
  color: var(--brand-orange);
  margin-bottom: 8px;
}
.nhero-cat-tag {
  color: rgba(255,255,255,.6) !important;
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.18) !important;
}
.nhero-main-meta-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.nhero-dept-chip {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 50px;
  background: rgba(255,108,0,.18);
  border: 1px solid rgba(255,108,0,.3);
  color: #FF9240; font-size: 10.5px; font-weight: 700;
}
.nhero-side-footer {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.nhero-side-ribbon {
  font-size: 9px; font-weight: 800;
  padding: 1px 7px; border-radius: 50px;
  text-transform: uppercase;
}
.nhero-side-hot   { background: rgba(220,38,38,.2); color: #ff6b6b; }
.nhero-side-feat  { background: rgba(255,108,0,.2); color: var(--brand-orange); }
.nhero-side-press { background: rgba(97,185,240,.15); color: #61B9F0; }

/* ================================================================
   NEWS CARD extras
================================================================ */
.news-video-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--brand-orange); color: #fff;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; z-index: 3;
  box-shadow: 0 2px 8px rgba(255,108,0,.45);
}
.news-card-kicker {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--brand-orange); margin-bottom: 2px;
}
.news-card-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px;
}
.news-card-tag-chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 50px;
  font-size: 10.5px; font-weight: 600;
  background: rgba(0,55,123,.05);
  border: 1px solid rgba(0,55,123,.12);
  color: var(--brand-navy); text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.news-card-tag-chip:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.news-card-ext-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; font-size: 11.5px; font-weight: 700;
  color: var(--brand-orange); text-decoration: none;
  transition: gap .18s;
}
.news-card-ext-link:hover { gap: 9px; color: #e05c00; }
[data-bs-theme="dark"] .news-card-tag-chip { background: rgba(97,185,240,.07); border-color: rgba(97,185,240,.15); color: #61B9F0; }
[data-bs-theme="dark"] .news-card-tag-chip:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* Sidebar story kicker */
.ixsb-story-kicker {
  font-size: 10.5px; color: var(--brand-orange); font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ================================================================
   CAMPUS SHOWCASE SECTION
================================================================ */
.campus-showcase {
  padding: 48px 0 44px;
  background: rgba(0,55,123,.04);
  border-top: 3px solid var(--border-color);
  border-bottom: 3px solid var(--border-color);
  overflow-x: clip;
}
.cs-head {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
}
.cs-head-text { flex: 1; }
.cs-title {
  font-family: var(--font-title);
  font-size: 1.45rem; font-weight: 800;
  color: var(--text-primary); margin: 0 0 5px;
  position: relative; padding-left: 18px;
}
.cs-title::before {
  content: ''; position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px; background: var(--accent-gradient); border-radius: 2px;
}
.cs-sub {
  font-size: 13.5px; color: var(--text-tertiary);
  margin: 0; padding-left: 18px;
}
.cs-nav {
  display: flex; gap: 6px; flex-shrink: 0; align-items: center;
}
.cs-head-deco {
  font-size: 3.5rem; color: var(--border-color);
  line-height: 1; flex-shrink: 0;
}
.cs-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-top: 16px; padding-bottom: 12px;
}
.cs-grid::-webkit-scrollbar { display: none; }
.cs-grid::before,
.cs-grid::after {
  content: '';
  flex: none;
  width: max(16px, calc((100vw - 1320px) / 2 + 12px));
}
/* ── Campus card — full-bleed poster with image or gradient fallback ── */
.cs-grid .cs-card {
  flex: 0 0 260px; height: 190px;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.cs-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(145deg,#00337a 0%,#1a6abf 100%);
  transition: transform .28s ease;
  border: none; padding: 0; display: block; min-height: unset;
}
/* Background image (direct child of cs-card) */
.cs-card > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.cs-card:hover > img { transform: scale(1.06); }
.cs-card-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(160deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,.72) 100%);
  pointer-events: none;
}
.cs-card:not(:has(img)) .cs-card-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.52) 100%);
}
.cs-card:hover { transform: translateY(-8px) scale(1.03); }
.cs-card-inner {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 16px;
}
.cs-card-top-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 0;
}
.cs-card-icon {
  width: 44px; height: 44px; border-radius: 13px;
  background: rgba(255,255,255,.22);
  border: 1.5px solid rgba(255,255,255,.32);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .25s, transform .25s;
  flex-shrink: 0; box-shadow: none;
}
.cs-card-icon img {
  width: 100%; height: 100%;
  object-fit: contain; padding: 6px;
  position: static; inset: unset; transition: none;
}
.cs-card:hover img.campus-logo { transform: none; }
.cs-card:hover .cs-card-icon { background: rgba(255,255,255,.36); transform: scale(1.08); }
.cs-card-arrow {
  font-size: 1.15rem; color: rgba(255,255,255,.65);
  transition: color .22s, transform .22s; z-index: 2;
}
.cs-card:hover .cs-card-arrow { color: #fff; transform: translate(3px,-3px); }
.cs-card-bottom { display: flex; flex-direction: column; gap: 5px; }
.cs-card-name {
  font-family: var(--font-title);
  font-size: 15px; font-weight: 800; line-height: 1.3;
  color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: none;
}
.cs-card-full {
  font-size: 11px; color: rgba(255,255,255,.72);
  line-height: 1.4; transition: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

[data-bs-theme="dark"] .campus-showcase { background: #070f1c; border-color: #253650; }

/* ================================================================
   FEATURED TAG DUO LAYOUT  (tng-duo-section)
================================================================ */
.tng-duo-section {
  padding: 60px 0;
  background: rgba(255,108,0,.04);
  border-top: 3px solid var(--border-color);
}
.tng-duo-section-alt { background: var(--bg-primary); }

/* ── Outer 2-col row; fixed height so both cols are equal ── */
.tng-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: 520px;
}
/* Use flex so .tng-big-card stretches reliably */
.tng-duo-feat  { display: flex; flex-direction: column; }
.tng-duo-stack { display: grid; }   /* keep grid for 2×2 */

/* Sports: reverse column order */
.tng-duo-rev .tng-duo-feat  { order: 2; }
.tng-duo-rev .tng-duo-stack { order: 1; }

/* ── BIG card — flex column: image grows, body is absolute overlay ── */
.tng-big-card {
  position: relative;          /* anchor for absolute children */
  display: flex;
  flex-direction: column;
  flex: 1;                     /* fill .tng-duo-feat flex height */
  min-height: 0;               /* prevent flex overflow */
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  background: #000812;
  transition: box-shadow .25s;
}
.tng-big-card:hover { box-shadow: var(--shadow-xl); }

/* Image — flex child that takes ALL remaining card height */
.tng-big-img {
  flex: 1;
  min-height: 0;
  position: relative;          /* anchor for the img inside */
  overflow: hidden;
}
.tng-big-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  transition: transform .6s ease;
}
.tng-big-card:hover .tng-big-img img { transform: scale(1.05); }
.tng-big-no-img {
  position: absolute; inset: 0;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: rgba(255,255,255,.12);
}

/* Dark gradient overlay — covers bottom 70% of card */
.tng-big-card::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0,4,20,.97)  0%,
    rgba(0,4,20,.82)  30%,
    rgba(0,4,20,.45)  55%,
    rgba(0,4,20,.08)  78%,
    transparent       100%
  );
  pointer-events: none;
}
/* Ribbon badge */
.tng-big-ribbon {
  position: absolute; top: 14px; left: 14px;
  font-size: 10.5px; font-weight: 800;
  padding: 4px 12px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: .4px;
  display: inline-flex; align-items: center; gap: 4px;
  backdrop-filter: blur(6px); z-index: 3;
}
/* Body — pinned to bottom of card, sits above gradient */
.tng-big-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 24px 26px;
  z-index: 2;
  display: flex; flex-direction: column; gap: 8px;
}
.tng-big-meta {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; font-size: 11px;
  color: rgba(255,255,255,.5);
}
.tng-big-date { display: flex; align-items: center; gap: 4px; }
.tng-big-date i { font-size: .62rem; color: rgba(97,185,240,.7); }
.tng-big-title {
  font-family: var(--font-title);
  font-size: 1.2rem; font-weight: 900;
  color: #fff; line-height: 1.3; margin: 0;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.tng-big-excerpt {
  font-size: 13px; color: rgba(255,255,255,.65);
  line-height: 1.55; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.tng-big-read-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; font-size: 12.5px; font-weight: 700;
  width: fit-content;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s;
  margin-top: 4px;
}
.tng-big-card:hover .tng-big-read-btn {
  background: #fff; border-color: #fff; color: var(--brand-navy);
}

/* ── STACK of 4 small cards — 2×2 grid ── */
.tng-duo-stack {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}
/* Each small card fills its grid cell */
.tng-stack-card {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  background: #000;
  transition: transform .22s, box-shadow .22s;
}
.tng-stack-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
/* Image fills entire small card */
.tng-stack-thumb {
  position: absolute;
  inset: 0;
}
.tng-stack-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  transition: transform .4s ease;
}
.tng-stack-card:hover .tng-stack-thumb img { transform: scale(1.08); }
.tng-stack-no-img {
  width: 100%; height: 100%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: rgba(255,255,255,.18);
}
/* Dark gradient overlay */
.tng-stack-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,4,20,.92)  0%,
    rgba(0,4,20,.55)  45%,
    rgba(0,4,20,.1)   75%,
    transparent       100%
  );
  pointer-events: none;
}
.tng-stack-video {
  position: absolute; top: 8px; right: 8px;
  background: var(--brand-orange); color: #fff;
  border-radius: 50%; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; z-index: 3;
}
/* Body — pinned to bottom, over gradient */
.tng-stack-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px 12px;
  z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
}
.tng-stack-meta {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.tng-stack-ribbon {
  font-size: 9px; font-weight: 800;
  padding: 1px 7px; border-radius: 50px;
  text-transform: uppercase;
}
.tng-stack-title {
  font-family: var(--font-title);
  font-size: 12.5px; font-weight: 800;
  color: #fff; line-height: 1.35; margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.tng-stack-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; flex-wrap: wrap; margin-top: 2px;
}
.tng-stack-date {
  font-size: 10px; color: rgba(255,255,255,.45);
  display: flex; align-items: center; gap: 3px;
}
.tng-stack-date i { font-size: .6rem; }
.tng-stack-stats { font-size: 10px; color: rgba(255,255,255,.45); display: flex; align-items: center; gap: 4px; }

/* Responsive */
@media (max-width: 1100px) { .tng-duo { height: 460px; } }
@media (max-width: 991px) {
  .tng-duo { grid-template-columns: 1fr; height: auto; }
  .tng-duo-feat  { height: 360px; }
  .tng-duo-stack { height: 400px; }
  .tng-duo-rev .tng-duo-feat  { order: 1; }
  .tng-duo-rev .tng-duo-stack { order: 2; }
}
@media (max-width: 575px) {
  .tng-duo-feat  { height: 280px; }
  .tng-duo-stack { grid-template-columns: 1fr; height: auto; }
  .tng-stack-card { height: 140px; }
}

/* Dark mode — overlay cards look the same in dark mode */
[data-bs-theme="dark"] .tng-duo-section     { background: rgba(255,108,0,.06); border-top-color: #253650; }
[data-bs-theme="dark"] .tng-duo-section-alt { background: var(--bg-primary); }

/* ================================================================
   TAG NEWS extras  (tng-kicker, tng-tag-chip)
================================================================ */
.tng-kicker {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--brand-orange); margin: 0;
}
.tng-tags-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tng-tag-chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 50px;
  font-size: 10.5px; font-weight: 600;
  background: rgba(0,55,123,.05);
  border: 1px solid rgba(0,55,123,.12);
  color: var(--brand-navy); text-decoration: none;
  transition: background .15s, color .15s;
}
.tng-tag-chip:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
[data-bs-theme="dark"] .tng-tag-chip { background: rgba(97,185,240,.07); border-color: rgba(97,185,240,.15); color: #61B9F0; }
[data-bs-theme="dark"] .tng-tag-chip:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ================================================================
   YOUTUBE VIDEO — play badge (card thumbnails) + embed (detail page)
================================================================ */
.yt-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  transition: transform .2s ease, font-size .2s ease;
}
.yt-play-badge-lg { font-size: 3.5rem; }
.bbp-hub-lead:hover .yt-play-badge,
.bbp-feat-card:hover .yt-play-badge,
.news-card-img:hover .yt-play-badge,
.tng-big-card:hover .yt-play-badge { transform: translate(-50%, -50%) scale(1.14); }

/* Full-cover autoplay iframe for hero slides (letterbox-free) */
.yt-bg-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 56.25vw;     /* 16:9 relative to viewport width */
  min-height: 100%;    /* cover when container is taller than 56.25vw */
  min-width: 177.78vh; /* cover when container is wider than 177.78vh */
  pointer-events: none;
  border: none;
  z-index: 0;
}

/* ── Card video thumbnail + click-to-play ── */
.yt-card-thumb {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  cursor: pointer;
}
.yt-card-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.yt-card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(200,0,0,.88);
  border: 2.5px solid rgba(255,255,255,.3);
  color: #fff; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
  transition: transform .2s, background .2s;
}
.yt-card-play:hover { transform: translate(-50%,-50%) scale(1.15); background: #ff0000; }
.yt-card-thumb.yt-card-playing { position: absolute; inset: 0; }

/* "Watch on YouTube" fallback button (shown when embedding is blocked) */
.yt-watch-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #ff0000;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(255,0,0,.4);
  transition: background .2s, transform .2s;
}
.yt-watch-btn:hover { background: #cc0000; color: #fff; transform: translateX(-50%) scale(1.05); }
.yt-watch-btn i { font-size: 16px; }

/* ── YouTube thumbnail + click-to-play player ── */
.nd-yt-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.nd-yt-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .4s ease;
}
.nd-yt-thumb:hover .nd-yt-thumb-img { transform: scale(1.03); }

.nd-yt-thumb-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.22);
  transition: background .25s;
}
.nd-yt-thumb:hover .nd-yt-thumb-overlay { background: rgba(0,0,0,.38); }

.nd-yt-play-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(210,0,0,.92);
  border: 3px solid rgba(255,255,255,.3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.85rem; color: #fff;
  box-shadow: 0 6px 28px rgba(0,0,0,.55), 0 0 0 8px rgba(255,255,255,.07);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.nd-yt-play-btn:hover {
  transform: scale(1.12); background: #ff0000;
  box-shadow: 0 8px 38px rgba(255,0,0,.5), 0 0 0 13px rgba(255,255,255,.1);
}
/* once playing, the wrap fills with iframe */
.nd-yt-thumb.nd-yt-playing { aspect-ratio: 16/9; }
.nd-yt-thumb.nd-yt-playing iframe {
  width: 100%; height: 100%; border: none; display: block;
}

/* ================================================================
   FEATURED VIDEOS SECTION  (fv-section) + CAROUSEL (fvc-*)
================================================================ */
.fv-section {
  position: relative;
  padding: 56px 0 52px;
  background: #07111f;
  overflow: hidden;
}

/* Blurred ambient background */
.fvc-bg-blur {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center;
  filter: blur(32px); opacity: .4;
  transition: background-image .7s ease;
  pointer-events: none; z-index: 0;
}
.fvc-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(7,17,31,.75) 0%, rgba(7,17,31,.5) 50%, rgba(7,17,31,.9) 100%);
  pointer-events: none; z-index: 0;
}
.fv-section > .container { position: relative; z-index: 1; }

/* Header */
.fv-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; flex-wrap: wrap;
  gap: 14px; margin-bottom: 32px;
}
.fv-head-left { display: flex; flex-direction: column; gap: 4px; }
.fv-eyebrow {
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--brand-orange, #ff6c00);
  display: flex; align-items: center; gap: 5px;
}
.fv-title {
  font-family: var(--font-title); font-size: 1.65rem;
  font-weight: 800; color: #fff; margin: 0; line-height: 1.15;
}
.fv-yt-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: #ff0000; color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: 6px; text-decoration: none;
  transition: background .2s, transform .15s; white-space: nowrap;
}
.fv-yt-link:hover { background: #cc0000; color: #fff; transform: translateY(-1px); }

/* ── Carousel stage ── */
.fvc-stage {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 12px 0 28px;
}

/* ── Far ghost cards (2 levels back) ── */
.fvc-far {
  flex-shrink: 0; width: 14%;
  position: relative; cursor: pointer;
  border-radius: 10px; overflow: hidden;
  background: #000; aspect-ratio: 16/9;
  transform: scaleX(-1); opacity: .28; filter: blur(2.5px);
  transition: opacity .35s, filter .35s; z-index: 0;
}
.fvc-far:hover { opacity: .48; filter: blur(0); }
.fvc-far-left  { margin-right: -3%; }
.fvc-far-right { margin-left:  -3%; }

/* ── Side ghost cards (1 level back) ── */
.fvc-side {
  flex-shrink: 0; width: 21%;
  position: relative; cursor: pointer;
  border-radius: 12px; overflow: hidden;
  background: #000; aspect-ratio: 16/9;
  transform: scaleX(-1); opacity: .60; filter: blur(1px);
  transition: opacity .35s, filter .35s; z-index: 1;
}
.fvc-side:hover { opacity: .82; filter: blur(0); }
.fvc-left  { margin-right: -4%; }
.fvc-right { margin-left:  -4%; }

.fvc-side-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fvc-left  .fvc-side-veil,
.fvc-far-left .fvc-side-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(0,0,0,.88) 0%, rgba(0,0,0,.12) 65%);
}
.fvc-right .fvc-side-veil,
.fvc-far-right .fvc-side-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.88) 0%, rgba(0,0,0,.12) 65%);
}

/* ── Center active card ── */
.fvc-center {
  flex-shrink: 0; width: 50%; max-width: 700px;
  position: relative; z-index: 2;
  border-radius: 16px; overflow: hidden;
  /* perspective origin so rotateY looks natural */
  transform-origin: center center;
}

.fvc-thumb-wrap {
  position: relative; aspect-ratio: 16/9;
  background: #000; transition: opacity .2s;
}
.fvc-thumb-wrap.fvc-hidden {
  opacity: 0; pointer-events: none; position: absolute; inset: 0;
}
.fvc-center-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.fvc-center-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.2); transition: background .25s;
}
.fvc-center:hover .fvc-center-overlay { background: rgba(0,0,0,.35); }

.fvc-play-btn {
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(210,0,0,.92);
  border: 3px solid rgba(255,255,255,.28);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.85rem; color: #fff;
  box-shadow: 0 6px 28px rgba(0,0,0,.55), 0 0 0 8px rgba(255,255,255,.07);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.fvc-play-btn:hover {
  transform: scale(1.12); background: #ff0000;
  box-shadow: 0 8px 38px rgba(255,0,0,.5), 0 0 0 13px rgba(255,255,255,.1);
}

/* iframe */
.fvc-iframe-wrap { display: none; aspect-ratio: 16/9; background: #000; }
.fvc-iframe-wrap.fvc-active { display: block; }
.fvc-iframe-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* ── Slide animations on center card ── */
@keyframes fvcSlideInRight { from { transform: translateX(60px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fvcSlideInLeft  { from { transform: translateX(-60px); opacity: .4; } to { transform: none; opacity: 1; } }

.fvc-center.fvc-slide-next { animation: fvcSlideInRight .45s cubic-bezier(.25,.46,.45,.94); }
.fvc-center.fvc-slide-prev { animation: fvcSlideInLeft  .45s cubic-bezier(.25,.46,.45,.94); }

/* ── Prev / Next nav buttons ── */
.fvc-nav {
  position: absolute; top: 48%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.35);
  transition: background .2s, transform .2s;
}
.fvc-nav:hover { background: rgba(255,255,255,.26); transform: translateY(-50%) scale(1.1); }
.fvc-nav-prev { left: 14px; }
.fvc-nav-next { right: 14px; }

/* ── Pill dots ── */
.fvc-dots-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 18px;
}
.fvc-dot {
  height: 4px; width: 20px; border-radius: 2px;
  background: rgba(255,255,255,.22);
  border: none; cursor: pointer; padding: 0;
  transition: background .25s, width .3s;
}
.fvc-dot.active { background: var(--brand-orange, #ff6c00); width: 36px; }

/* Dark mode */
[data-bs-theme="dark"] .fv-section  { background: #040b14; }
[data-bs-theme="dark"] .fvc-bg-blur { opacity: .25; }

/* Responsive */
@media (max-width: 900px) {
  .fvc-center { width: 62%; }
  .fvc-side   { width: 18%; }
  .fvc-far    { width: 11%; }
  .fvc-play-btn { width: 60px; height: 60px; font-size: 1.5rem; }
}
@media (max-width: 600px) {
  .fv-section { padding: 36px 0 36px; }
  .fv-title   { font-size: 1.35rem; }
  .fvc-center { width: 80%; }
  .fvc-side   { width: 14%; opacity: .4; filter: blur(2px); }
  .fvc-far    { display: none; }
  .fvc-nav    { width: 36px; height: 36px; font-size: .85rem; }
}
