/* PEF: arhive vesti „Актуелно“ (/category/aktuelno/) i „Најаве“ (/tag/najave/), 1. 12. 2026.
   Klasu tela pef-vesti-arhiva dodaje modul samo na te dve arhive.
   Modul mu-plugins/pef-moduli/pef-aktuelno-arhiva.php.
   Prva vest široka kartica, ostale mreža 3/2/1 kolona. Pravila nadjačavaju
   blok „ARHIVA – horizontalne kartice“ iz Dodatnog CSS-a samo na ovoj arhivi. */

/* ---------- Zaglavlje arhive ---------- */
body.pef-vesti-arhiva .ast-archive-description {
  max-width: 1140px !important;
  margin: 0 auto 32px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
body.pef-vesti-arhiva .ast-archive-description .ast-archive-title {
  margin: 0 0 8px !important;
}
body.pef-vesti-arhiva .ast-archive-description p {
  margin: 0 !important;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--pef-fg2, #4A5B6E);
}

/* ---------- Mreža ---------- */
body.pef-vesti-arhiva .ast-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  max-width: 1140px !important;
  margin: 0 auto !important;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post {
  width: auto !important;
  max-width: none !important;
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
}
body.pef-vesti-arhiva .ast-article-post .ast-article-inner,
body.pef-vesti-arhiva .ast-article-post .post-content {
  height: 100%;
}

/* ---------- Kartica ---------- */
body.pef-vesti-arhiva .ast-article-post .post-content {
  display: flex !important;
  flex-direction: column !important;
}
body.pef-vesti-arhiva .ast-article-post .ast-blog-featured-section.post-thumb {
  order: 0;
}
body.pef-vesti-arhiva .ast-article-post .post-thumb-img-content {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  background: var(--pef-navy-deep, #072036);
}
body.pef-vesti-arhiva .ast-article-post .entry-header.ast-blog-meta-container {
  display: block !important;
  order: 1;
  padding: 16px 20px 0 !important;
  margin: 0 !important;
}
body.pef-vesti-arhiva .ast-article-post .entry-meta {
  font-size: 13px !important;
  line-height: 1.4 !important;
  color: var(--pef-fg3, #6B7788) !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
body.pef-vesti-arhiva .ast-article-post .entry-title {
  order: 2;
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  padding: 6px 20px 0 !important;
  margin: 0 0 8px !important;
}
body.pef-vesti-arhiva .ast-article-post .ast-excerpt-container {
  display: block !important;
  order: 3;
  padding: 0 20px !important;
  margin: 0 0 20px !important;
}
body.pef-vesti-arhiva .ast-article-post .ast-excerpt-container p {
  margin: 0 !important;
  font-size: 14px;
  line-height: 1.55;
  color: var(--pef-fg2, #4A5B6E);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.pef-vesti-arhiva .ast-article-post .read-more {
  order: 4;
}
body.pef-vesti-arhiva .ast-article-post .entry-title a {
  font-weight: 600 !important;
}
body.pef-vesti-arhiva .ast-article-post a:focus-visible {
  outline: 2px solid var(--pef-blue, #1B5BA8) !important;
  outline-offset: 2px;
}

/* ---------- Prva vest: široka kartica ---------- */
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child {
  grid-column: 1 / -1;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .post-content {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
  grid-template-rows: 1fr auto auto auto auto 1fr !important;
  column-gap: 0 !important;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .ast-blog-featured-section.post-thumb {
  grid-column: 1;
  grid-row: 1 / -1 !important;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .post-thumb-img-content {
  height: 100% !important;
  min-height: 100%;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-header.ast-blog-meta-container,
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-title,
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .ast-excerpt-container,
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .read-more {
  grid-column: 2;
  padding-left: 36px !important;
  padding-right: 36px !important;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-header.ast-blog-meta-container { grid-row: 2; padding-top: 32px !important; }
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-title {
  grid-row: 3;
  font-size: 26px !important;
  line-height: 1.3 !important;
  margin: 0 0 12px !important;
  padding-top: 10px !important;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .ast-excerpt-container { grid-row: 4; margin-bottom: 18px !important; }
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .ast-excerpt-container p {
  font-size: 16px;
  line-height: 1.6;
  -webkit-line-clamp: 4;
}
body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .read-more {
  display: block !important;
  grid-row: 5;
  margin: 0 !important;
  padding-bottom: 32px !important;
}
body.pef-vesti-arhiva .ast-article-post .read-more a {
  color: var(--pef-blue, #1B5BA8) !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
}
body.pef-vesti-arhiva .ast-article-post .read-more a::after {
  content: " →" / "";
}
body.pef-vesti-arhiva .ast-article-post .read-more a:hover {
  text-decoration: underline !important;
}
body.pef-vesti-arhiva:not(.paged) .ast-row > .ast-article-post:first-child .entry-meta::before {
  content: "Најновије";
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pef-orange-text, #5E3A1C);
}

/* Tačno 5 vesti na strani (široka + 4): mreža u 2 kolone, bez usamljene kartice. */
@media (min-width: 1025px) {
  body.pef-vesti-arhiva .ast-row:has(> .ast-article-post:nth-child(5):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ---------- Paginacija ---------- */
body.pef-vesti-arhiva .ast-pagination {
  margin-top: 44px !important;
}
body.pef-vesti-arhiva .ast-pagination .page-numbers,
body.pef-vesti-arhiva .ast-pagination .prev,
body.pef-vesti-arhiva .ast-pagination .next {
  min-width: 44px !important;
  height: 44px !important;
  font-size: 14px !important;
}
/* Jedna strelica na svim širinama (ranije dupla na telefonu, nijedna na računaru). */
body.pef-vesti-arhiva .ast-pagination .next .ast-right-arrow,
body.pef-vesti-arhiva .ast-pagination .prev .ast-left-arrow {
  display: none !important;
}
body.pef-vesti-arhiva .ast-pagination .next::after {
  content: "→" / "" !important;
  margin-left: 6px;
}
body.pef-vesti-arhiva .ast-pagination .prev::after {
  content: none !important;
}
body.pef-vesti-arhiva .ast-pagination .prev::before {
  content: "←" / "" !important;
  margin-right: 6px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  body.pef-vesti-arhiva .ast-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}
@media (max-width: 900px) {
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .post-content {
    display: flex !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-header.ast-blog-meta-container,
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-title,
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .ast-excerpt-container,
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .read-more {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-header.ast-blog-meta-container { padding-top: 18px !important; }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .entry-title { font-size: 21px !important; }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .read-more { padding-bottom: 22px !important; }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .post-thumb-img-content { height: auto !important; min-height: 0; }
}

/* ---------- Telefon: kompaktna lista ---------- */
@media (max-width: 767px) {
  body.pef-vesti-arhiva .ast-archive-description { margin-bottom: 24px !important; }
  body.pef-vesti-arhiva .ast-archive-description p { font-size: 15px; }
  body.pef-vesti-arhiva .ast-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .post-content {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr) !important;
    grid-template-rows: auto 1fr !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .ast-blog-featured-section.post-thumb {
    grid-column: 1;
    grid-row: 1 / -1 !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .post-thumb-img-content {
    width: 112px !important;
    height: 100% !important;
    min-height: 84px;
    aspect-ratio: auto !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .entry-header.ast-blog-meta-container {
    grid-column: 2;
    grid-row: 1;
    padding: 12px 14px 0 !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .entry-meta { font-size: 12px !important; }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .entry-title {
    grid-column: 2;
    grid-row: 2;
    font-size: 15px !important;
    padding: 4px 14px 12px !important;
    margin: 0 !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .ast-excerpt-container,
  body.pef-vesti-arhiva .ast-row > .ast-article-post:not(:first-child) .read-more {
    display: none !important;
  }
  body.pef-vesti-arhiva .ast-row > .ast-article-post:first-child .ast-excerpt-container p { font-size: 15px; }
}
