
/* CMS blog article page */
.blog-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.blog-toolbar input,
.blog-toolbar select {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.blog-toolbar input {
  flex: 1;
}

#featuredBlog {
  margin-bottom: 34px;
}

#featuredBlog > .article-card {
  max-width: 760px;
}

#featuredBlog .article-card img,
.article-card > img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.article-card h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0 0 10px;
}

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

.post-meta {
  color: var(--muted);
  font-size: 13px;
}

.post-cover {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 30px;
}

.post-content {
  max-width: 760px;
  margin-inline: auto;
  font-size: 17px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.post-content h2,
.post-content h3 {
  line-height: 1.3;
  margin-top: 32px;
}

.related-posts {
  margin-top: 60px;
}

@media (max-width: 540px) {
  .blog-toolbar {
    flex-direction: column;
  }

  .post-content {
    font-size: 15px;
  }
}

/* Blog article cards */
.article-card {
  position: relative;
  overflow: hidden;
}

/* Article image */
.article-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Small category capsule */
.blog-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

/* Keep the article text compact */
.article-body {
  padding: 20px;
}

/* Blog card image and category capsule */
.blog-card-media {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.blog-card-media .blog-card-image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 28px);
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
}

/* Prevent the old oversized category block from appearing */
.article-card > .article-number {
  display: none;
}

/* Custom category selector */
.blog-category-filter {
  position: relative;
  width: 100%;
  min-width: 0;
}

.blog-category-trigger {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  color: #222;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.blog-category-trigger:focus-visible,
.blog-category-option:focus-visible {
  outline: 3px solid #eabf35;
  outline-offset: 2px;
}

.blog-category-arrow {
  color: #b91c1c;
  font-size: 22px;
  line-height: 1;
}

.blog-category-menu[hidden] {
  display: none;
}

.blog-category-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.blog-category-option {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #333;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.blog-category-option:hover,
.blog-category-option.is-selected {
  background: #fff1f1;
  color: #b91c1c;
}

.blog-category-check {
  color: #b91c1c;
  font-weight: 800;
}

@media (max-width: 600px) {
  .blog-card-media .blog-card-image {
    height: 200px;
  }

  .blog-category-trigger {
    min-height: 48px;
  }
}

