/* ══════════════════════════════════════════════════════════════════
   ANNOUNCEMENTS — NEO-BRUTALIST CHAPTER BULLETIN & PRESS FEED
   Inspired by the tactile Know-Us design system with unique dispatch tiles
   ══════════════════════════════════════════════════════════════════ */

/* ── Page Layout & Spacing Overrides ── */
.main-content {
  padding-top: calc(var(--nav-h, 64px) + 0.5rem) !important;
  padding-bottom: 3.5rem !important;
}

.announcements-wrapper {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.ann-page-header {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px dashed rgba(11, 15, 13, 0.15);
}

body:not(.light-theme) .ann-page-header {
  border-bottom-color: rgba(209, 250, 229, 0.15);
}

.ann-page-header .label {
  margin-bottom: 0.2rem;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ann-page-header .page-title {
  margin-top: 0.25rem !important;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem) !important;
  line-height: 1.15 !important;
}

/* ── Interactive Category Filter Tabs ── */
.ann-filter-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.ann-tab-btn {
  background: #ffffff;
  color: #0B0F0D;
  border: 2px solid #0B0F0D;
  box-shadow: 2.5px 2.5px 0px #0B0F0D;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

body:not(.light-theme) .ann-tab-btn {
  background: #192720;
  color: #D1FAE5;
  border-color: #0B0F0D;
  box-shadow: 2.5px 2.5px 0px #0B0F0D;
}

.ann-tab-btn:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4px 4px 0px #0B0F0D;
  background: #facc15;
  color: #0B0F0D;
}

.ann-tab-btn[data-cat="all"]:hover,
.ann-tab-btn[data-cat="cyan"]:hover {
  background: #38bdf8;
  color: #0B0F0D;
}

.ann-tab-btn[data-cat="violet"]:hover {
  background: #c084fc;
  color: #0B0F0D;
}

.ann-tab-btn[data-cat="emerald"]:hover {
  background: #86efac;
  color: #0B0F0D;
}

.ann-tab-btn[data-cat="rose"]:hover {
  background: #fb7185;
  color: #0B0F0D;
}

.ann-tab-btn.is-active {
  background: #38bdf8 !important;
  color: #0B0F0D !important;
  transform: translate(1px, 1px);
  box-shadow: 1.5px 1.5px 0px #0B0F0D !important;
}

.ann-tab-btn.is-active[data-cat="violet"] {
  background: #c084fc !important;
}

.ann-tab-btn.is-active[data-cat="emerald"] {
  background: #86efac !important;
}

.ann-tab-btn.is-active[data-cat="rose"] {
  background: #fb7185 !important;
}

.ann-tab-btn.is-active:hover {
  transform: translate(1px, 1px);
  box-shadow: 1.5px 1.5px 0px #0B0F0D !important;
}

/* ── Live Badge ── */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  background: #86efac;
  color: #0B0F0D;
  border: 1.5px solid #0B0F0D;
  box-shadow: 2px 2px 0px #0B0F0D;
  border-radius: 999px;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  border: 1px solid #0B0F0D;
  animation: annPulse 2s ease-in-out infinite;
}

@keyframes annPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.75); }
}

/* ── Feed Grid ── */
.announcements-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  counter-reset: ann;
}

/* ── Neo-Brutalist Dispatch Card ── */
.space-card {
  --ann-card-bg: #192720;
  --ann-accent: #38bdf8;
  --ann-text: #D1FAE5;

  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem 1.4rem;
  border-radius: 20px;
  border: 2.5px solid #0B0F0D;
  box-shadow: 4.5px 4.5px 0px #0B0F0D;
  background: var(--ann-card-bg);
  color: var(--ann-text);
  overflow: visible;
  counter-increment: ann;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background-color 0.25s ease;
}

body.light-theme .space-card {
  --ann-card-bg: #ffffff;
  --ann-text: #0B0F0D;
}

/* Category Accent Themes */
.space-card.cyan {
  --ann-accent: #38bdf8;
}
.space-card.violet, .space-card.event {
  --ann-accent: #c084fc;
}
.space-card.emerald {
  --ann-accent: #86efac;
}
.space-card.rose, .space-card.alert {
  --ann-accent: #fb7185;
}
.space-card.amber, .space-card.general {
  --ann-accent: #facc15;
}

/* Explicit Card Hover States — prevents any black or muddy gradient override */
.space-card:hover {
  background: var(--ann-card-bg) !important;
}

body:not(.light-theme) .space-card:hover {
  background: #1f352b !important;
  color: #D1FAE5 !important;
}

body.light-theme .space-card:hover {
  background: #ffffff !important;
  color: #0B0F0D !important;
}

/* Alternating subtle tilt & enhanced shadow on hover */
.space-card:nth-child(odd):hover {
  transform: translateY(-5px) rotate(-0.6deg);
  box-shadow: 7px 7px 0px #0B0F0D;
}

.space-card:nth-child(even):hover {
  transform: translateY(-5px) rotate(0.6deg);
  box-shadow: 7px 7px 0px #0B0F0D;
}

.space-card:hover .space-card-tape {
  transform: rotate(-2deg) scale(1.06);
}

.space-card:hover .item-index-num {
  opacity: 1;
}

/* Top corner tape / pin sticker tag */
.space-card-tape {
  position: absolute;
  top: -10px;
  right: 1.5rem;
  background: var(--ann-accent);
  color: #0B0F0D;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 2px solid #0B0F0D;
  box-shadow: 2px 2px 0px #0B0F0D;
  white-space: nowrap;
  z-index: 5;
  transform: rotate(2deg);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Card Header Meta ── */
.item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.item-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Category Pill Badge */
.space-card .item-badge {
  padding: 0.2rem 0.65rem;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ann-accent);
  color: #0B0F0D;
  border: 1.5px solid #0B0F0D;
  box-shadow: 1.5px 1.5px 0px #0B0F0D;
  border-radius: 999px;
}

.item-time {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
}

body.light-theme .item-time {
  color: #64748b;
}

/* Ghosted index number */
.item-index-num {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--ann-accent);
  opacity: 0.6;
}

/* ── Card Typography ── */
.item-title {
  margin: 0.2rem 0 0.35rem 0;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--ann-text);
  line-height: 1.25;
}

.item-body {
  margin: 0;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ann-text);
  opacity: 0.85;
}

/* ── Bottom Dispatch Action Bar ── */
.space-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  margin-top: 0.25rem;
  border-top: 1.5px dashed rgba(11, 15, 13, 0.2);
}

body:not(.light-theme) .space-card-footer {
  border-top-color: rgba(209, 250, 229, 0.15);
}

.space-card-stamp {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.space-share-btn {
  background: #ffffff;
  border: 1.5px solid #0B0F0D;
  box-shadow: 1.5px 1.5px 0px #0B0F0D;
  border-radius: 8px;
  padding: 0.25rem 0.6rem;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  color: #0B0F0D;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.space-share-btn:hover {
  background: #facc15;
  transform: scale(1.05);
}

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR (THE BULLETIN DESK)
   ══════════════════════════════════════════════════════════════════ */
.ann-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ann-side-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.ann-side-card {
  padding: 1.25rem;
  border-radius: 18px;
  border: 2.5px solid #0B0F0D;
  box-shadow: 4px 4px 0px #0B0F0D;
  background: #192720;
  color: #D1FAE5;
}

body.light-theme .ann-side-card {
  background: #ffffff;
  color: #0B0F0D;
}

/* Category Legend Items */
.ann-categories {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ann-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid #0B0F0D;
  background: #ffffff;
  color: #0B0F0D;
  box-shadow: 2px 2px 0px #0B0F0D;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

body:not(.light-theme) .ann-legend-item {
  background: #111A16;
  color: #D1FAE5;
}

.ann-legend-item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #0B0F0D;
  background: #facc15;
  color: #0B0F0D;
}

.ann-legend-item-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ann-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #0B0F0D;
  flex-shrink: 0;
}

.dot-cyan    { background: #38bdf8; }
.dot-violet  { background: #c084fc; }
.dot-emerald { background: #86efac; }
.dot-rose    { background: #fb7185; }

/* Activity Stats Tiles */
.ann-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.ann-stat-tile {
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: 14px;
  border: 2px solid #0B0F0D;
  box-shadow: 2.5px 2.5px 0px #0B0F0D;
  background: #ffffff;
  color: #0B0F0D;
}

.ann-stat-tile.num-cyan {
  background: #38bdf8;
}

.ann-stat-tile.num-violet {
  background: #c084fc;
}

.ann-stat-number {
  display: block;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
  color: #0B0F0D;
}

.ann-stat-label {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0B0F0D;
}

/* Quick Newsletter / Broadcast Callout */
.ann-broadcast-card {
  padding: 1.25rem;
  border-radius: 18px;
  border: 2.5px solid #0B0F0D;
  box-shadow: 4px 4px 0px #0B0F0D;
  background: #facc15;
  color: #0B0F0D;
  text-align: center;
}

.ann-broadcast-card h4 {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.05rem;
  font-weight: 900;
  margin: 0 0 0.35rem 0;
}

.ann-broadcast-card p {
  font-size: 0.78rem;
  line-height: 1.5;
  font-weight: 600;
  margin: 0 0 0.85rem 0;
}

.ann-broadcast-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 1rem;
  background: #0B0F0D;
  color: #ffffff;
  border: 2px solid #0B0F0D;
  border-radius: 10px;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.ann-broadcast-btn:hover {
  background: #10B981;
  color: #0B0F0D;
  transform: translate(-1px, -1px);
}
