/* ************************************/
/* blog category archive               */
/* Class: blog-category                */
/* ************************************/

.category .blog-wrapper.page-wrapper {
  padding-top: 0;
  padding-bottom: 0;
  background: #F2F4F7;
}

.category .blog-wrapper>.row>.large-10,
.category .blog-wrapper>.row>.large-9,
.category .blog-wrapper>.row>.large-12 {
  flex-basis: 100%;
  max-width: 100%;
}

.category .post-sidebar,
.category #secondary {
  display: none;
}

.blog-category-after-header-block,
.blog-category-hero {
  position: relative;
  width: auto;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.blog-category-hero {
  min-height: 230px;
  background-image:
    linear-gradient(90deg,
      rgba(var(--bg-light-rgb), 0.82) 0%,
      rgba(var(--primary-100-rgb), 0.28) 48%,
      rgba(var(--primary-100-rgb), 0.12) 100%),
    var(--blog-category-hero-image);
  background-position: center;
  background-size: cover;
}

.blog-category-hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 230px;
  padding: 22px 15px 24px;
}

.blog-category-hero__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  color: var(--on-dark-text);
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(var(--primary-dark-rgb), 0.26);
}

.blog-category-hero__breadcrumbs a,
.blog-category-hero__breadcrumbs span,
.blog-category-hero__breadcrumbs .divider {
  color: inherit;
}

.blog-category-hero__title {
  margin: 0;
  color: var(--primary);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(var(--white-rgb), 0.6);
}

.blog-category-hero__description {
  max-width: 760px;
  margin-top: 12px;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.6;
}

#post-list {
  width: 100%;
}

.blog-category-featured-posts {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(360px, 4fr);
  gap: 14px;
  align-items: start;
  margin: 0 0 24px;
}

.blog-category-featured-posts--has-side {
  align-items: stretch;
}

.blog-category-featured-post {
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.blog-category-featured-post--main {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 8;
  min-height: 0;
  border-radius: 12px;
  background: var(--panel, var(--surface-bg));
  box-shadow: var(--shadow-ui-card);
}

.blog-category-featured-posts--has-side .blog-category-featured-post--main {
  align-self: stretch;
  height: auto;
  aspect-ratio: auto;
}

.blog-category-featured-posts--has-side .blog-category-featured-post--main .blog-category-featured-post__image {
  position: absolute;
  inset: 0;
  height: auto;
}

.blog-category-featured-post__image {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  height: 100%;
  border-radius: 0;
  background: var(--badge-primary-bg);
}

.blog-category-featured-post__image img,
.blog-category-featured-post__thumb img,
.blog-category-post-card__image-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-category-featured-post__image img {
  min-height: 0;
}

.blog-category-featured-post__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 72px 24px 22px;
  border-radius: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
      rgba(var(--primary-dark-rgb), 0) 28%,
      rgba(var(--primary-dark-rgb), 0.9) 100%);
}

.blog-category-featured-post__label {
  display: inline-flex;
  align-self: flex-start;
  order: 1;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-on);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  pointer-events: auto;
}

.blog-category-featured-post__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  order: 3;
  margin: 10px 0 0;
  color: var(--on-dark-text);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.blog-category-featured-post__date::before,
.blog-category-featured-post__side-date::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--primary);
  border-radius: 3px;
  box-shadow: inset 0 3px 0 rgba(var(--primary-rgb), 0.22);
  flex: 0 0 12px;
}

.blog-category-featured-post__title {
  order: 2;
  margin: 0;
  max-width: 760px;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.blog-category-featured-post__title a {
  color: var(--on-dark-text);
}

.blog-category-featured-posts__side {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  row-gap: 4px;
  column-gap: 0;
  align-content: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
}

.blog-category-featured-post--side {
  position: relative;
  display: flex;
  gap: 0;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-bottom: 0;
  border-radius: 12px;
  background: var(--surface-bg);
  border: 1px solid var(--border-ui);
}

.blog-category-featured-post--side+.blog-category-featured-post--side {
  padding-top: 0;
}

.blog-category-featured-post--side:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.blog-category-featured-post__thumb {
  display: block;
  flex: 0 0 132px;
  overflow: hidden;
  width: 132px;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  background: var(--badge-primary-bg);
}

.blog-category-featured-post__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 0;
  background: transparent;
}

.blog-category-featured-post__side-label {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 7px;
  padding: 6px 9px;
  border-radius: 5px;
  background: var(--primary);
  color: var(--primary-on);
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.blog-category-featured-post__label:hover,
.blog-category-featured-post__side-label:hover {
  background: var(--primary-hover);
  color: var(--primary-on);
}

.blog-category-featured-post__side-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 9px;
  color: var(--text-heading-accent);
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-category-featured-post__side-title a {
  color: inherit;
}

.blog-category-featured-post__side-date {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
}

.blog-category-featured-post__side-date::before {
  display: none;
}

.blog-category-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 16px;
}

.blog-category-post-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-ui);
  background: var(--surface-bg);
  box-shadow: var(--shadow-ui-card);
}

.blog-category-post-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 0;
  border-radius: 0;
  background: var(--badge-primary-bg);
}

.blog-category-post-card__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-category-post-card__category {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 78px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-on);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  text-align: center;
}

.blog-category-post-card__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  padding: 14px 16px 0;
  color: var(--text-heading-accent);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-category-post-card__title a {
  color: inherit;
}

.blog-category-post-card__title a:hover,
.blog-category-featured-post__side-title a:hover {
  color: var(--primary);
}

.blog-category-post-card__author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  padding: 0 16px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.35;
}

.blog-category-post-card__author a {
  color: var(--text-heading-accent);
}

.blog-category-post-card__meta-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}

.blog-category-post-card__meta-date::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.blog-category-post-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  padding: 0 16px 16px;
  color: var(--text-soft-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.category .page-numbers {
  margin-top: 28px;
}

/* Category navigation: make the parent/child hierarchy immediately scannable. */
.blog-category-sidebar {
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid #e8e4f1;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(45, 32, 74, 0.08);
}

.blog-category-sidebar nav {
  padding: 8px 20px 16px;
}

.blog-category-sidebar__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #eeeaf5;
  color: #1e293b;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-category-sidebar__title-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  color: #7e22ce;
  font-size: 16px;
}

.blog-category-tree,
.blog-category-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-category-children {
  margin: 2px 0 4px 10px !important;
  padding-left: 8px !important;
  border-left: 1px solid var(--primary-200);
}

.blog-category-children > .blog-category-branch {
  position: relative;
}

.blog-category-children > .blog-category-branch::before {
  position: absolute;
  top: 20px;
  left: -8px;
  width: 8px;
  border-top: 1px solid var(--primary-200);
  content: "";
}

.blog-category-children > .blog-category-branch > a {
  padding-right: 8px;
  padding-left: 8px;
  font-size: 13px;
}

.blog-category-children > .blog-category-branch + .blog-category-branch {
  margin-top: 2px;
}

.blog-category-connector {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
  background: var(--primary-300);
}

[aria-current="page"] .blog-category-connector {
  background: rgba(255, 255, 255, 0.82);
}

.blog-category-mobile-nav > summary:focus {
  outline: 2px solid transparent;
}

.blog-category-mobile-nav > summary:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .blog-category-tree a {
    transition: none;
  }
}

@media (max-width: 1024px) {
  .blog-category-featured-posts {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .blog-category-featured-posts--has-side .blog-category-featured-post--main {
    height: auto;
    aspect-ratio: 16 / 8;
  }

  .blog-category-featured-posts__side {
    grid-template-rows: none;
  }

  .blog-category-featured-post__thumb {
    flex-basis: 132px;
    width: 132px;
    height: auto;
    align-self: stretch;
  }
}

@media (max-width: 849px) {
  .blog-category-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 549px) {

  .blog-category-hero,
  .blog-category-hero__inner {
    min-height: 132px;
  }

  .blog-category-featured-posts--has-side .blog-category-featured-post--main,
  .blog-category-featured-post--main {
    aspect-ratio: 16 / 9;
  }

  .blog-category-featured-post__overlay {
    padding: 48px 14px 14px;
    background: linear-gradient(180deg,
        rgba(var(--primary-dark-rgb), 0) 18%,
        rgba(var(--primary-dark-rgb), 0.94) 100%);
  }

  .blog-category-featured-post__label {
    margin-bottom: 7px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .blog-category-featured-post__title {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    font-size: 19px;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .blog-category-featured-post__date {
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
  }

  .blog-category-featured-post__date::before {
    width: 10px;
    height: 10px;
    flex-basis: 10px;
  }

  .blog-category-featured-posts__side {
    row-gap: 6px;
  }

  .blog-category-featured-post--side {
    align-items: stretch;
    min-height: 128px;
  }

  .blog-category-featured-post__thumb {
    flex: 0 0 132px;
    width: 132px;
    height: auto;
    align-self: stretch;
  }

  .blog-category-featured-post__body {
    padding: 12px 14px;
  }

  .blog-category-featured-post__side-title {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.28;
  }

  .blog-category-featured-post__side-date {
    font-size: 13px;
  }

  .blog-category-post-grid {
    grid-template-columns: 1fr;
  }
}
