/* News and Stories - blog list and article pages (blog.php, post.php). */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- filter bar ---------- */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}
.blog-filter__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-filter__cats a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid #d9dae8;
  background: #fff;
  color: #343877;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.blog-filter__cats a:hover,
.blog-filter__cats a:focus {
  border-color: #343877;
  text-decoration: none;
}
.blog-filter__cats a.is-active {
  background: #343877;
  border-color: #343877;
  color: #fff;
}
.blog-filter__search {
  display: flex;
  margin: 0;
  flex: 0 1 300px;
  min-width: 0;
}
.blog-filter__search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d9dae8;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.blog-filter__search input:focus {
  border-color: #343877;
}
.blog-filter__search button {
  width: 46px;
  height: 42px;
  border: 0;
  border-radius: 0 6px 6px 0;
  background: #343877;
  color: #fff;
  cursor: pointer;
}

.blog-empty {
  text-align: center;
  font-size: 18px;
  padding: 40px 0;
}

/* ---------- cards ---------- */
.blog-card {
  display: flex;
  flex-direction: column;
  height: calc(100% - 30px);
  margin-bottom: 30px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(52, 56, 119, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}
.blog-card__img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #eceef6;
  overflow: hidden;
}
.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__img img {
  transform: scale(1.04);
}
.blog-card__img img.blog-card__placeholder {
  object-fit: contain;
  padding: 18%;
}
.blog-card__badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 4px 12px;
  border-radius: 4px;
  background: #efc940;
  color: #343877;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.blog-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 20px;
}
.blog-card__title {
  font-size: 19px;
  line-height: 1.35;
  margin: 0 0 10px;
  text-transform: none;
}
.blog-card__title a {
  color: #343877;
  text-decoration: none;
}
.blog-card__title a:hover {
  color: #e5405e;
}
.blog-card__excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 18px;
  flex: 1;
}
.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #777;
}
.blog-card__author {
  font-weight: 700;
  color: #343877;
}

/* ---------- pagination ---------- */
.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
}
.blog-pagination a {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d9dae8;
  color: #343877;
  font-weight: 600;
  text-decoration: none;
}
.blog-pagination a.is-active,
.blog-pagination a:hover {
  background: #343877;
  border-color: #343877;
  color: #fff;
}

/* ---------- article ---------- */
.blog-preview-note {
  background: #fff6d6;
  border: 1px solid #efc940;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 30px;
  font-weight: 600;
}
.blog-article {
  background: #fff;
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 4px 14px rgba(52, 56, 119, 0.08);
  margin-bottom: 30px;
}
@media (max-width: 575px) {
  .blog-article {
    padding: 24px 18px;
  }
}
.blog-article__back {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #343877;
  margin-bottom: 18px;
}
.blog-article__category {
  display: block;
  width: max-content;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  background: #efc940;
  color: #343877;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.blog-article__title {
  color: #343877;
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 22px;
  text-transform: none;
}
@media (max-width: 767px) {
  .blog-article__title {
    font-size: 26px;
  }
}
.blog-article__byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid #eee;
}
.blog-article__avatar {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #343877;
  color: #efc940;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-article__author {
  display: block;
  font-weight: 700;
  color: #343877;
}
.blog-article__date {
  display: block;
  font-size: 14px;
  color: #777;
}
.blog-article__cover {
  margin: 0 0 30px;
}
.blog-article__cover img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center center;
  border-radius: 8px;
}
.blog-article__body {
  font-size: 17px;
  line-height: 1.8;
  color: #333;
  overflow-wrap: break-word;
}
.blog-article__body p {
  margin: 0 0 1.2em;
}
.blog-article__body h2,
.blog-article__body h3,
.blog-article__body h4 {
  color: #343877;
  text-transform: none;
  line-height: 1.35;
  margin: 1.6em 0 0.6em;
}
.blog-article__body h2 { font-size: 26px; }
.blog-article__body h3 { font-size: 22px; }
.blog-article__body h4 { font-size: 19px; }
.blog-article__body a {
  color: #e5405e;
  text-decoration: underline;
}
.blog-article__body ul,
.blog-article__body ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}
.blog-article__body li {
  margin-bottom: 0.4em;
}
.blog-article__body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 8px;
}
.blog-article__body figure {
  margin: 1.5em 0;
  text-align: center;
}
.blog-article__body figcaption {
  font-size: 14px;
  color: #777;
  margin-top: -0.8em;
}
.blog-article__body blockquote {
  margin: 1.5em 0;
  padding: 6px 0 6px 20px;
  border-left: 4px solid #efc940;
  font-style: italic;
  color: #343877;
}
.blog-article__body iframe,
.blog-article__body .ql-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  margin: 1.5em 0;
}
.blog-article__body .ql-align-center { text-align: center; }
.blog-article__body .ql-align-right { text-align: right; }
.blog-article__body .ql-align-justify { text-align: justify; }

.blog-article__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}
.blog-article__written {
  color: #343877;
}
.blog-share {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-share a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #343877;
  color: #fff;
  transition: background-color 0.2s, color 0.2s;
}
.blog-share a:hover {
  background: #efc940;
  color: #343877;
}

/* ---------- sidebar ---------- */
.blog-sidebar {
  background: #fff;
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow: 0 4px 14px rgba(52, 56, 119, 0.08);
}
@media (min-width: 992px) {
  .blog-sidebar {
    position: sticky;
    top: 110px;
  }
}
.blog-sidebar__title {
  font-size: 18px;
  color: #343877;
  text-transform: none;
  margin: 0 0 16px;
}
.blog-sidebar__title:not(:first-child) {
  margin-top: 30px;
}
.blog-recent {
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-recent li + li {
  margin-top: 14px;
}
.blog-recent a {
  display: flex;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.blog-recent__img {
  flex: none;
  width: 72px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: #eceef6;
}
.blog-recent__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-recent__title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  color: #343877;
}
.blog-recent a:hover .blog-recent__title {
  color: #e5405e;
}
.blog-recent__meta {
  display: block;
  font-size: 12px;
  color: #777;
  margin-top: 3px;
}
.blog-sidebar__cats {
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-sidebar__cats a {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  color: #343877;
  text-decoration: none;
}
.blog-sidebar__cats a:hover {
  color: #e5405e;
}
.blog-sidebar__cats span {
  color: #999;
}
.blog-sidebar__cta {
  margin-top: 30px;
  padding: 22px;
  border-radius: 8px;
  background: #343877;
  color: #fff;
}
.blog-sidebar__cta .blog-sidebar__title {
  color: #efc940;
  margin-top: 0;
}
.blog-sidebar__cta p {
  color: #fff;
  font-size: 14px;
}

.blog-notfound__title {
  color: #343877;
  text-transform: none;
}
