.search-results-page {
  --bs-body-bg: #ffffff;
  --sr-bg: #ffffff;
  --sr-card-bg: #ffffff;
  --sr-text: #22384c;
  --sr-muted: #8a9096;
  --sr-border: #e0e0e0;
  --sr-category: #cb842a;
  --sr-link: #6d9fd4;
  --sr-page-btn: #6d9fd4;
  --sr-badge-bg: #e6f0ff;
  --sr-badge-fg: #5b8fb9;
}

.sr-card__media{
    position: relative;
    overflow: hidden;
}

.sr-card__img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-results main {
  background: #ffffff;
}

/* —— Header (img 3) —— */

.sr-hero {
  padding: 0 0 1.5rem;
}

.sr-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: #0a0a0a;
}

.sr-hero__summary {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--sr-muted);
  max-width: 42rem;
}

.sr-hero__divider {
  margin: 1.25rem 0 1rem;
  border: 0;
  border-top: 1px solid #c8c8c8;
  opacity: 1;
}

.sr-filter__select {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-width: 9.5rem;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0a0a0a;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23333' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  border: 1px solid var(--sr-border);
  border-radius: 6px;
  cursor: pointer;
}

.sr-filter__select:focus {
  outline: 2px solid rgba(109, 159, 212, 0.45);
  outline-offset: 1px;
}

.sr-filter__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* —— Article cards (img 2) —— */

.sr-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sr-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--sr-card-bg);
  border: 1px solid var(--sr-border);
  border-radius: 10px;
}

@media (min-width: 768px) {
  .sr-card {
    flex-direction: row;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.15rem 1.25rem;
  }
}

.sr-card__media {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}

@media (min-width: 768px) {
  .sr-card__media {
    width: 220px;
  }
}

.sr-card__media a {
  display: block;
}

.sr-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.sr-empty {
  margin: 0;
  color: var(--sr-muted);
}

.sr-read-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--sr-badge-fg);
  background: var(--sr-badge-bg);
  line-height: 1.2;
  white-space: nowrap;
}

.sr-read-badge svg {
  flex-shrink: 0;
}

.sr-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sr-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.sr-card__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.sr-card__title a {
  color: #000;
  text-decoration: none;
}

.sr-card__title a:hover {
  color: var(--sr-link);
}

.sr-card__date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: #bdbdbd;
}

.sr-card__date svg {
  flex-shrink: 0;
  color: #bdbdbd;
}

.sr-card__category {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--sr-category);
  line-height: 1.2;
}

.sr-card__excerpt {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--sr-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.sr-card__link {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sr-link);
  text-decoration: none;
}

.sr-card__link:hover {
  color: #4f83bf;
  text-decoration: underline;
}

/* —— Pagination (img 1) —— */

.sr-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--sr-card-bg);
  border: 1px solid var(--sr-border);
  border-radius: 8px;
}

.sr-pagination__count {
  margin: 0;
  font-size: 0.875rem;
  color: #555;
  white-space: nowrap;
}

.sr-pagination__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.sr-page-btn,
.sr-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: 5px;
}

.sr-page-btn {
  color: #fff;
  background: var(--sr-page-btn);
  border: none;
}

.sr-page-btn:hover {
  color: #fff;
  background: #5a8fc9;
}

.sr-page-btn--active {
  pointer-events: none;
}

.sr-page-num {
  color: #555;
  background: transparent;
}

.sr-page-num:hover {
  color: var(--sr-link);
}

.sr-pagination__per-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sr-per-page-select {
  appearance: none;
  min-width: 3.25rem;
  height: 2rem;
  padding: 0 1.5rem 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  background-color: var(--sr-page-btn);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23fff' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.sr-per-page-select:focus {
  outline: 2px solid rgba(109, 159, 212, 0.5);
  outline-offset: 1px;
}

.sr-per-page-label {
  font-size: 0.875rem;
  color: #555;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .sr-pagination {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .sr-pagination__nav {
    order: -1;
  }
}
