/* =========================================================
   PUBLICATIONS PAGE — CONTENT STYLES ONLY
   (Layout kutoka news.css, adapted kwa body.publications)
========================================================= */

/* =========================================================
   NORMALIZE HEADING
========================================================= */
body.publications main.content h1 {
  margin-top: 0;
  margin-bottom: 10px;
}

body.publications main.content p:first-of-type {
  margin-top: 0;
}

/* =========================================================
   PAGE HERO
========================================================= */
body.publications .page-hero {
  background-color: var(--primary);
  color: var(--white);
  padding: 35px 30px 54px;
  border-radius: 12px;
  margin-top: 20px;
  margin-bottom: 25px;
  border-bottom: none;
  text-align: center;
}

.pub-section-label {
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: none;
  margin-bottom: 8px;
  line-height: 1.5;
  text-align: center;
}

body.publications .page-hero h1 {
  font-size: 38px;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.2;
}

body.publications .page-hero p {
  font-size: 15px;
  color: #ffffff;
  max-width: 700px;
  line-height: 1.7;
  margin: 0 auto;
}

/* =========================================================
   NEWS SECTION WRAPPER
========================================================= */
.news-section {
  background: #ffffff;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 20px;
  padding-left: 0;
}

/* =========================================================
   NEWS GRID
========================================================= */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 38px;
  margin-bottom: 80px;
}

/* =========================================================
   NEWS CARD
========================================================= */
.news-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(11, 37, 69, 0.10);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.05);
  position: relative;
}

.news-card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -19px;
  height: 1px;
  background: rgba(11, 37, 69, 0.08);
}

.news-card:last-child::after {
  display: none;
}

.news-card:hover {
  border-color: hwb(204 9% 11%);
}

/* =========================================================
   DATE BOX
========================================================= */
.news-date-box {
  background: var(--primary);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  flex-shrink: 0;
  min-width: 58px;
}

.news-day {
  font-size: 22px;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

.news-mon {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.88);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =========================================================
   CARD CONTENT
========================================================= */
.news-cat {
  font-size: 11px;
  color: var(--dark);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.news-title {
  font-size: 16px;
  font-weight: 600;
  color: #0B2545;
  margin-bottom: 6px;
  line-height: 1.4;
}

.news-body {
  font-size: 13px;
  color: #5a6378;
  line-height: 1.6;
}

/* =========================================================
   EXISTING FOLDER STYLES
========================================================= */
.publications-folders,
.publications-files {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.folder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.folder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--folder-bg);
  border: 1px solid var(--folder-border);
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  color: var(--primary);
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.folder-item:hover {
  background-color: var(--hover-soft);
  transform: translateY(-1px);
}

.folder-item i {
  margin-right: 10px;
}

.back-button {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  cursor: pointer;
  margin-bottom: 15px;
  transition: background 0.2s ease;
}

.back-button:hover {
  background-color: var(--secondary-dark);
}

table.file-table {
  width: 100%;
  border-collapse: collapse;
}

table.file-table th {
  background: var(--primary);
  color: var(--white);
}

table.file-table th,
table.file-table td {
  border: 1px solid var(--border-medium);
  padding: 10px;
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 600px) {
  .news-card {
    flex-direction: column;
    gap: 12px;
  }

  .news-date-box {
    min-width: unset;
    width: fit-content;
  }

  body.publications .page-hero {
    padding: 40px 1rem 32px;
  }

  body.publications .page-hero h1 {
    font-size: 28px;
  }

  .news-section {
    padding: 40px 1rem;
  }
}

/* =========================================================
   REVEAL ANIMATION
========================================================= */
body.publications .reveal-up {
  opacity: 0;
  transform: translateY(55px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
  will-change: transform, opacity;
}

body.publications .reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

body.publications .delay-1 {
  transition-delay: 0.1s;
}

body.publications .delay-2 {
  transition-delay: 0.25s;
}

body.publications .delay-3 {
  transition-delay: 0.4s;
}

body.publications .delay-4 {
  transition-delay: 0.55s;
}

/* =========================================================
   HERO EFFECT
========================================================= */
body.publications .page-hero h1 {
  animation: pubHeroSlide 1s ease both;
}

body.publications .page-hero p {
  animation: pubHeroFade 1.4s ease both;
}

@keyframes pubHeroSlide {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pubHeroFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* =========================================================
   CARD HOVER
========================================================= */
body.publications .news-card {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

body.publications .news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(11, 37, 69, 0.10);
}

body.publications .news-date-box {
  transition:
    transform 0.35s ease,
    background 0.35s ease;
}

body.publications .news-card:hover .news-date-box {
  transform: scale(1.06);
}

body.publications .news-title {
  transition: color 0.3s ease;
}

body.publications .news-card:hover .news-title {
  color: var(--primary);
}

/* SPACE BEFORE FOOTER */
body.publications main.content {
  padding-bottom: 20px;
}

/* =====================================================
   PUB-SECTION-LABEL INSIDE PAGE-HERO
===================================================== */
.page-hero .pub-section-label {
  display: inline-block;
  background: #000000;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  margin-bottom: 10px;
}

/* =========================================================
   FOLDER FILES PAGINATION (⏮ ◀ 1 2 3 ▶ ⏭)
========================================================= */
.folder-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 10px;
}

.folder-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--folder-border);
  background: #ffffff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.folder-page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--hover-soft);
}

.folder-page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.folder-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =========================================================
   ROWS-PER-PAGE BAR (mpya — juu ya .folder-pagination)
   Inatumia .folder-page-btn / .folder-pagination zilizopo
   juu, kwa hiyo rangi zake zinaendana na theme ya site.
========================================================= */
.folder-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.folder-pagination-bar .folder-pagination {
  margin: 0;
}

.folder-rows-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dark);
}

.folder-rows-select select {
  padding: 4px 10px;
  border: 1px solid var(--folder-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .folder-pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .folder-pagination-bar .folder-pagination {
    justify-content: center;
  }
}