
#page-content .post-item.border {
  padding: 0 !important; margin: 0 !important;
  border: 1px solid #e3e3e3 !important; border-radius: 16px !important; overflow: hidden;
  background: #fff; display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
#page-content .post-item.border:hover { border-color: #636d2f !important; box-shadow: 0 4px 16px rgba(99, 109, 47, .15); }
#page-content .post-item.border .post-item-wrap { padding: 0 !important; margin: 0 !important; display: flex; flex-direction: column; flex: 1; }

/* imaginea: lipita de marginea de sus, aceeasi proportie pe toate cardurile */
#page-content .post-item.border .post-image {
  margin: 0 !important; padding: 0 !important; height: auto !important;
  aspect-ratio: 16 / 10; overflow: hidden; background: #f3f4ef;
}
#page-content .post-item.border .post-image a { display: block; height: 100%; }
#page-content .post-item.border .post-image img {
  display: block; width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important;
}

/* textul: titlul sus, data si vizualizarile pe un rand, lipite de baza cardului */
#page-content .post-item.border .post-item-description {
  padding: 18px 20px 20px !important; display: flex; flex-direction: column; flex: 1;
}
#page-content .post-item.border .post-item-description h2 { margin: 0 0 12px !important; font-size: 19px !important; line-height: 1.35 !important; font-weight: 600 !important; }
#page-content .post-item.border .post-item-description a {
  color: #1c1c1c !important; font-size: 19px; line-height: 1.35; font-weight: 600; text-decoration: none !important;
}
#page-content .post-item.border:hover .post-item-description a,
#page-content .post-item.border .post-item-description a:hover { color: #636d2f !important; }
#page-content .post-item.border .post-item-description > div:last-child,
#page-content .post-item.border .post-item-description > .row:last-child {
  margin-top: auto !important; padding-top: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; color: #545454;
}
#page-content .post-item.border .post-item-description > .row:last-child { margin-left: 0; margin-right: 0; justify-content: space-between; }
#page-content .post-item.border .post-item-description > .row:last-child > [class*="col-"] { flex: 0 0 auto; width: auto; max-width: none; padding: 0; }
#page-content .post-item.border .timed, #page-content .post-item.border .viewed,
#page-content .post-item.border .post-meta-date, #page-content .post-item.border .post-meta-comments {
  font-size: 14px !important; color: #545454 !important; margin: 0 !important; white-space: nowrap;
}

/* ---------- prima pagina: widgeturile de stiri ---------- */
/* coloanele se intind pe inaltimea randului, cardul le umple; intre randuri (pe mobil) 24px */
#page-content .latest_news_widget_title + .row { row-gap: 24px; }
#page-content .latest_news_widget_title + .row > [class*="col-"] { display: flex; }
#page-content .latest_news_widget_title + .row > [class*="col-"] > .post-item.border { flex: 1; }
/* spatiu intre carduri si butonul "vezi mai mult" */
#page-content .latest_news_widget_title + .row + .float-none { margin-top: 32px !important; }

/* ---------- listele de stiri (Noutati, Webinare, Istorii de succes) ----------
   Tema aseaza cardurile cu un script de tip masonry (pozitii absolute, spatiul inauntrul chenarului),
   de aceea cardurile se lipeau. Aici le aseaza o grila CSS: aceeasi inaltime pe rand si 24px intre ele. */
#page-content #blog.grid-layout {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; height: auto !important; margin-bottom: 32px !important;
}
#page-content #blog.grid-layout.post-3-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#page-content #blog.grid-layout.post-4-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#page-content #blog.grid-layout > .row { grid-column: 1 / -1; margin: 0; }
#page-content #blog.grid-layout > .row:empty, #page-content #blog.grid-layout > .row > .col-md-12:empty { display: none; }
#page-content #blog.grid-layout > .post-item.border {
  position: static !important; left: auto !important; top: auto !important; width: auto !important; transform: none !important;
}

@media (max-width: 991.98px) {
  #page-content #blog.grid-layout.post-3-columns, #page-content #blog.grid-layout.post-4-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  #page-content #blog.grid-layout, #page-content #blog.grid-layout.post-3-columns, #page-content #blog.grid-layout.post-4-columns { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #page-content .latest_news_widget_title + .row { row-gap: 16px; }
  #page-content .post-item.border .post-item-description a, #page-content .post-item.border .post-item-description h2 { font-size: 17px !important; }
}
