/* ============================
   News List Cards
============================ */

body {
  padding-top: 120px;
}

.news-breadcrumb {
  margin: 1rem 0 1.5rem;
}

.news-breadcrumb .breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 0.85rem;
}

.news-breadcrumb .breadcrumb-item a {
  color: #667085;
  text-decoration: none;
}

.news-breadcrumb .breadcrumb-item a:hover,
.news-breadcrumb .breadcrumb-item a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

.news-breadcrumb .breadcrumb-item.active {
  color: #1f2937;
  font-weight: 700;
}

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-right: 0;
  padding-left: 0.5rem;
  content: "›";
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.news-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e7ebf1;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: #d8e0ec;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
}

.news-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #edf3ff;
  color: var(--color-primary);
  text-decoration: none;
}

.news-image img,
.news-image-placeholder {
  width: 100%;
  height: 100%;
}

.news-image img {
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.news-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(11, 30, 107, 0.08)),
    #f8fafc;
}

.news-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem;
}

.news-content > * {
  margin: 0;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.news-tag {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--color-primary-light);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.news-tag:hover,
.news-tag:focus-visible {
  background: #dfeaff;
  color: var(--color-primary);
}

.news-title {
  color: var(--color-primary);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.45;
}

.news-title a {
  color: inherit;
  text-decoration: none;
}

.news-title a:hover,
.news-title a:focus-visible {
  color: var(--color-primary-light);
}

.news-title::after,
.news-title a::after {
  display: none !important;
  content: none !important;
}

.news-meta {
  color: #667085;
  font-size: 0.83rem;
  line-height: 1.5;
}

.news-excerpt {
  color: #344054;
  font-size: 0.94rem;
  line-height: 1.7;
}

.news-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease;
}

html[dir="rtl"] .news-btn {
  align-self: flex-end;
}

.news-btn:hover,
.news-btn:focus-visible {
  background: var(--color-primary-light);
  color: #fff;
}

.news-pagination .page-link {
  color: var(--color-primary);
}

.news-pagination .page-item.active .page-link {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

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

@media (max-width: 767.98px) {
  body {
    padding-top: 96px;
  }

  .news-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-image img,
  .news-btn {
    transition: none;
  }

  .news-card:hover,
  .news-card:hover .news-image img {
    transform: none;
  }
}
