/* SeTechnota — Últimas noticias v0.1.6
   Ajustes únicamente de tarjetas, cuadrícula y paginación. */

.latest-section {
  padding: 22px 0 50px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
}

.section-heading h2 {
  margin: 0;
  padding-left: 12px;
  border-left: 4px solid var(--st-red);
  font-size: 23px;
  line-height: 1.3;
}

.section-heading span {
  color: var(--st-muted);
  font-size: 12px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px 18px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: #fff;
  border: 1px solid #ececec;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.news-card:hover {
  border-color: #dfd6d6;
  box-shadow: 0 8px 24px rgb(0 0 0 / 7%);
  transform: translateY(-2px);
}

.news-card:focus-within {
  border-color: var(--st-red);
}

.news-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.66;
  overflow: hidden;
  flex: none;
  background: #eee;
}

.news-image img,
.news-image .image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.035);
}

.news-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-start;
  padding: 14px 14px 16px;
}

.post-category {
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--st-red);
  font-weight: 800;
}

.news-card h3 {
  margin: 8px 0 13px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.38;
  overflow-wrap: break-word;
}

.news-card h3 a:hover {
  color: var(--st-red);
}

.news-card time {
  display: block;
  margin-top: auto;
  font-size: 11px;
  line-height: 1.4;
  color: var(--st-muted);
}

.news-card a:focus-visible,
.pagination a:focus-visible {
  outline: 2px solid var(--st-red);
  outline-offset: 3px;
}

.pagination,
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.pagination .page-numbers,
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 7px 12px;
  border: 1px solid var(--st-line);
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.2;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.pagination .current,
.nav-links .current,
.pagination a:hover,
.nav-links a:hover {
  background: var(--st-red);
  border-color: var(--st-red);
  color: #fff;
}

@media (max-width: 1020px) {
  .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .news-card-body { padding: 11px; }
  .news-card h3 { font-size: 13px; }
  .section-heading span { display: none; }
}

@media (max-width: 420px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-image { aspect-ratio: 1.9; }
  .section-heading h2 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-image img,
  .pagination .page-numbers,
  .nav-links .page-numbers { transition: none; }
  .news-card:hover { transform: none; }
}
