/* ============================================================
   NOTICE BOARD — Premium 3-Column Section
   Place this file in your WordPress theme folder or enqueue it
   ============================================================ */

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

/* ── Root variables ── */
:root {
  --nb-bg: #f4f6fa;
  --nb-card-bg: #ffffff;
  --nb-radius: 16px;
  --nb-shadow: 0 4px 24px rgba(0,0,0,.07);
  --nb-transition: 0.3s cubic-bezier(.4,0,.2,1);

  --student-accent: #4f46e5;   /* indigo */
  --student-light:  #eef2ff;
  --staff-accent:   #0891b2;   /* cyan */
  --staff-light:    #ecfeff;
  --circular-accent:#059669;   /* emerald */
  --circular-light: #ecfdf5;
}

/* ── Section wrapper ── */
.nb-section {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--nb-bg);
  padding: 64px 24px;
}

.nb-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.nb-section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}

.nb-section-header p {
  font-size: .95rem;
  color: #6b7280;
  margin: 0;
}

/* ── Grid ── */
.nb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .nb-grid { grid-template-columns: 1fr; }
}

/* ── Column card ── */
.nb-column {
  background: var(--nb-card-bg);
  border-radius: var(--nb-radius);
  box-shadow: var(--nb-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 460px;
  border: 1px solid rgba(0,0,0,.05);
  transition: box-shadow var(--nb-transition), transform var(--nb-transition);
}

.nb-column:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* ── Column header ── */
.nb-col-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  flex-shrink: 0;
}

.nb-col-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nb-col-icon svg {
  width: 20px;
  height: 20px;
}

.nb-col-title {
  font-size: .95rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.nb-col-subtitle {
  font-size: .75rem;
  color: #9ca3af;
  margin: 0;
}

/* per-column colour tinting */
.nb-student .nb-col-icon  { background: var(--student-light);  color: var(--student-accent); }
.nb-staff   .nb-col-icon  { background: var(--staff-light);    color: var(--staff-accent);   }
.nb-circular .nb-col-icon { background: var(--circular-light); color: var(--circular-accent);}

/* ── Scroll viewport ── */
.nb-scroll-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  cursor: default;
}

/* fade top & bottom edges */
.nb-scroll-viewport::before,
.nb-scroll-viewport::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 28px;
  z-index: 2;
  pointer-events: none;
}

.nb-scroll-viewport::before { top: 0;    background: linear-gradient(to bottom, #fff, transparent); }
.nb-scroll-viewport::after  { bottom: 0; background: linear-gradient(to top,   #fff, transparent); }

/* ── Scroll track (cloned for seamless loop) ── */
.nb-scroll-track {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  will-change: transform;
}

.nb-scroll-track.paused {
  animation-play-state: paused !important;
}

/* ── Notice item ── */
.nb-item {
  padding: 12px 22px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background var(--nb-transition);
  flex-shrink: 0;
}

.nb-item:last-child { border-bottom: none; }

.nb-item:hover { background: #f9fafb; }

.nb-item-date {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.nb-student  .nb-item-date  { color: var(--student-accent);  }
.nb-staff    .nb-item-date  { color: var(--staff-accent);    }
.nb-circular .nb-item-date  { color: var(--circular-accent); }

.nb-item-title {
  font-size: .85rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.45;
}

.nb-item-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 2px;
  width: fit-content;
}

.nb-student  .nb-item-tag { background: var(--student-light);  color: var(--student-accent);  }
.nb-staff    .nb-item-tag { background: var(--staff-light);    color: var(--staff-accent);    }
.nb-circular .nb-item-tag { background: var(--circular-light); color: var(--circular-accent); }

/* ── NEW badge ── */
.nb-item-new {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .65rem;
  font-weight: 700;
  color: #ef4444;
  margin-left: 6px;
}

.nb-item-new::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
}

/* ── Column footer (view-all link) ── */
.nb-col-footer {
  padding: 12px 22px;
  border-top: 1px solid rgba(0,0,0,.06);
  flex-shrink: 0;
  text-align: right;
}

.nb-view-all {
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--nb-transition);
}

.nb-view-all:hover { gap: 8px; }

.nb-student  .nb-view-all { color: var(--student-accent);  }
.nb-staff    .nb-view-all { color: var(--staff-accent);    }
.nb-circular .nb-view-all { color: var(--circular-accent); }

.nb-view-all svg { width: 14px; height: 14px; }
