/* =========================================================
   GNIPST NOTICES & ANNOUNCEMENTS SYSTEM — STYLESHEET
   Matches the design system, layout, and intent of events.php
   ========================================================= */

/* =========================================================
   1. ARCHIVE / LISTING SECTION
   ========================================================= */
.notices-section {
  padding: 56px 0 96px;
  background: var(--cream);
  min-height: 60vh;
}

/* ---- Interactive Filter Toolbar ---- */
.notices-toolbar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  box-shadow: 0 4px 18px -8px rgba(10, 61, 38, 0.06);
}

.notices-search-wrap {
  position: relative;
  flex: 1 1 280px;
  max-width: 440px;
}

.notices-search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-family: inherit;
  font-size: .88rem;
  color: var(--ink);
  transition: all .2s ease;
  outline: none;
}

.notices-search-input:focus {
  border-color: var(--green-700);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(18, 96, 59, 0.12);
}

.notices-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.notices-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.notices-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .18s ease;
}

.notices-tab:hover {
  color: var(--green-800);
  background: var(--green-100);
}

.notices-tab.is-active {
  background: var(--green-900);
  color: #ffffff;
  box-shadow: 0 6px 16px -8px rgba(10, 61, 38, 0.4);
}

.notices-count {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---- Notices Cards Grid ---- */
.notices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.notice-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  box-shadow: 0 4px 16px -8px rgba(10, 61, 38, 0.07);
  position: relative;
}

.notice-card:hover {
  transform: translateY(-5px);
  border-color: var(--green-700);
  box-shadow: var(--shadow-card);
}

/* Card Header Theming */
.notice-card-top {
  position: relative;
  padding: 22px 24px;
  background: linear-gradient(135deg, #0a3d26 0%, #177a49 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.notice-card.cat-examination .notice-card-top {
  background: linear-gradient(135deg, #78350f 0%, #b45309 100%);
}

.notice-card.cat-training .notice-card-top {
  background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 100%);
}

.notice-card.cat-admin .notice-card-top {
  background: linear-gradient(135deg, #0a3d26 0%, #177a49 100%);
}

/* Watermark SVG icon inside card header */
.notice-card-watermark {
  position: absolute;
  right: -10px;
  bottom: -15px;
  width: 90px;
  height: 90px;
  opacity: 0.12;
  color: #ffffff;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}

.notice-card:hover .notice-card-watermark {
  transform: scale(1.1) rotate(-5deg);
  opacity: 0.2;
}

/* Prominent Date Badge */
.notice-badge-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--green-900);
  border-radius: 10px;
  padding: 6px 14px;
  min-width: 54px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
}

.notice-badge-date .day {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
}

.notice-badge-date .mon {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-top: 2px;
}

.notice-card.cat-examination .notice-badge-date .mon {
  color: #b45309;
}

.notice-card.cat-training .notice-badge-date .mon {
  color: #0284c7;
}

/* Card Header Tags */
.notice-card-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.notice-badge-type {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notice-badge-doc {
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}

/* Card Body */
.notice-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.notice-card-date-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.notice-card-date-line span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.notice-card-ref {
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.7;
  font-family: monospace;
}

.notice-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--green-900);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.35em;
}

.notice-card-title a {
  color: inherit;
  transition: color .2s ease;
}

.notice-card-title a:hover {
  color: var(--gold-600);
}

.notice-card-desc {
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 22px;
  flex-grow: 1;
}

/* Card Footer */
.notice-card-footer {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notice-file-badge {
  font-size: 0.75rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.notice-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: all .2s ease;
}

.notice-card:hover .notice-btn {
  background: var(--green-900);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 61, 38, 0.25);
}

.notice-btn svg {
  width: 15px;
  height: 15px;
  transition: transform .2s ease;
}

.notice-card:hover .notice-btn svg {
  transform: translateX(3px);
}

/* ---- Loading Skeleton ---- */
.notice-skeleton-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 380px;
  display: flex;
  flex-direction: column;
}

.notice-skeleton-top {
  height: 90px;
  background: linear-gradient(90deg, #ece9df 25%, #f6f4ee 37%, #ece9df 63%);
  background-size: 400% 100%;
  animation: ntcShimmer 1.4s ease infinite;
}

.notice-skeleton-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
}

.notice-skeleton-line {
  border-radius: 6px;
  background: linear-gradient(90deg, #ece9df 25%, #f6f4ee 37%, #ece9df 63%);
  background-size: 400% 100%;
  animation: ntcShimmer 1.4s ease infinite;
}

.notice-skeleton-line.short { width: 35%; height: 14px; }
.notice-skeleton-line.title { width: 90%; height: 24px; }
.notice-skeleton-line.text { width: 100%; height: 48px; }
.notice-skeleton-line.btn { width: 45%; height: 38px; margin-top: auto; border-radius: 8px; }

@keyframes ntcShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---- Empty State ---- */
.notices-empty {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
  box-shadow: 0 4px 18px -8px rgba(10, 61, 38, 0.05);
}

.notices-empty svg {
  width: 54px;
  height: 54px;
  color: var(--ink-soft);
  opacity: 0.6;
  margin-bottom: 18px;
}

.notices-empty h3 {
  font-size: 1.35rem;
  color: var(--green-900);
  margin-bottom: 8px;
}

.notices-empty p {
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto 24px;
  font-size: .92rem;
  line-height: 1.6;
}

/* ---- Pagination Controls ---- */
.notices-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 52px;
  flex-wrap: wrap;
}

.notices-page-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
}

.notices-page-btn:hover:not(:disabled) {
  border-color: var(--green-700);
  color: var(--green-800);
  background: var(--green-100);
}

.notices-page-btn.is-active {
  background: var(--green-900);
  border-color: var(--green-900);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 61, 38, 0.28);
}

.notices-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.notices-page-ellipsis {
  padding: 0 6px;
  color: var(--ink-soft);
  font-weight: 700;
}

/* ---- Responsive Breakpoints ---- */
@media (max-width: 1080px) {
  .notices-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (max-width: 720px) {
  .notices-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
  }
  .notices-search-wrap {
    max-width: 100%;
  }
  .notices-grid {
    grid-template-columns: 1fr;
  }
  .notices-tabs {
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .notices-tab {
    flex-shrink: 0;
  }
}
