.blog-hero,
.catalog-header {
  padding: 5.5rem 0 3rem;
}

.blog-hero h1,
.catalog-header h1 {
  max-width: 850px;
  margin: 1.1rem 0;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: .98;
}

.blog-hero p,
.catalog-header p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.blog-home-hero {
  padding: 4.5rem 0 2.25rem;
}

.blog-home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.blog-home-hero h1 {
  max-width: 760px;
  margin: 1.1rem 0;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: .98;
}

.blog-home-hero p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.featured-article-card {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-bg-top), var(--card-bg-bottom));
  box-shadow: 0 1.3rem 3.5rem rgba(0, 0, 0, .16);
}

.featured-article-card a {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.featured-article-media {
  position: relative;
  min-height: 230px;
  border-bottom: 1px solid var(--thumb-border);
  background:
    radial-gradient(600px 240px at 30% 30%, rgba(47,107,255,.16), transparent 55%),
    radial-gradient(600px 240px at 70% 10%, rgba(106,168,255,.12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
}

.featured-article-media img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  opacity: .9;
}

.featured-article-body {
  padding: 1.35rem;
}

.featured-article-body h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 820;
  line-height: 1.18;
}

.featured-article-body > p:not(.card-eyebrow) {
  display: -webkit-box;
  margin: .85rem 0 1.15rem;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-article-section {
  padding: 1.7rem 0 2.1rem;
  border-top: 1px solid var(--stroke);
}

.home-category-title {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 860;
  letter-spacing: 0;
  line-height: 1.05;
}

.home-category-title::before {
  display: inline-block;
  width: .72rem;
  height: .72rem;
  border-radius: .22rem;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 .45rem 1rem rgba(47, 107, 255, .25);
  content: "";
}

.navbar-brand {
  color: var(--text) !important;
}

.navbar-brand .brand-badge {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(47, 107, 255, .95), rgba(106, 168, 255, .85));
  box-shadow: 0 10px 20px rgba(47, 107, 255, .25);
}

.navbar-brand .brand-badge::before {
  position: absolute;
  inset: 8px 9px;
  border: 2px solid #fff;
  border-radius: 3px;
  background:
    linear-gradient(#fff, #fff) 4px 5px / 8px 1.5px no-repeat,
    linear-gradient(#fff, #fff) 4px 9px / 10px 1.5px no-repeat,
    linear-gradient(#fff, #fff) 4px 13px / 7px 1.5px no-repeat;
  content: "";
}

.navbar-brand .brand-badge::after {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  background: rgba(255, 255, 255, .28);
  content: "";
}

.navbar-toggler {
  border-color: var(--stroke);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.nav-link.active {
  color: var(--text) !important;
  background: rgba(47, 107, 255, .13);
  border-radius: 999px;
}

.language-switcher {
  min-width: 0;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 2.25rem;
  padding: .24rem .52rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 76%, #fff 8%);
  color: var(--text);
  font-weight: 750;
  line-height: 1;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.language-button:hover,
.language-button:focus {
  border-color: rgba(106, 168, 255, .72);
  background: color-mix(in srgb, var(--bg) 68%, #fff 12%);
  color: var(--text);
}

.language-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .22rem rgba(47, 107, 255, .22);
}

.language-button::after {
  margin-left: .05rem;
}

.language-button-code,
.language-option-code {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--brand2);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .04em;
}

.language-button-code {
  padding: .2rem .34rem;
}

.dropdown-menu {
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg) 94%, #fff 6%);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .28);
}

.language-dropdown {
  min-width: 14rem;
  padding: .45rem;
}

.dropdown-item {
  color: var(--text);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(47, 107, 255, .13);
  color: var(--text);
}

.dropdown-item.active {
  background: var(--brand);
  color: #fff;
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.7rem;
  border-radius: .7rem;
  font-weight: 720;
}

.language-option-code {
  padding: .22rem .44rem;
}

.language-option.active .language-option-code {
  border-color: rgba(255, 255, 255, .38);
  color: #fff;
}

.main-site-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.35rem;
  padding: .42rem .48rem .42rem .86rem;
  border: 1px solid color-mix(in srgb, var(--brand2) 44%, var(--stroke));
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(47, 107, 255, .2), rgba(106, 168, 255, .08));
  color: var(--text);
  font-size: .9rem;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.main-site-link:hover,
.main-site-link:focus {
  border-color: rgba(106, 168, 255, .8);
  background: linear-gradient(135deg, rgba(47, 107, 255, .28), rgba(106, 168, 255, .14));
  color: var(--text);
  transform: translateY(-1px);
}

.main-site-link:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .22rem rgba(47, 107, 255, .22);
}

.main-site-link-icon {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .82rem;
  font-weight: 850;
}

.category-card,
.article-card {
  min-height: 100%;
}

.category-card .thumb {
  height: 190px;
}

.article-card .thumb {
  height: 210px;
}

.article-card.compact .thumb {
  height: 150px;
}

.article-card.compact .card-body {
  padding: 1.05rem;
}

.article-card.compact .card-description {
  margin-bottom: .95rem;
  font-size: .92rem;
  -webkit-line-clamp: 2;
}

.article-card.compact .article-meta {
  font-size: .78rem;
}

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

.card-article-link {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem;
}

.card-body h2 {
  line-height: 1.35;
}

.card-eyebrow {
  margin-bottom: .6rem;
  color: var(--brand2);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.card-description {
  display: -webkit-box;
  margin: .75rem 0 1.2rem;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-body time {
  margin-top: auto;
  color: var(--muted);
  font-size: .85rem;
}

.card-footer {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--stroke);
  background: transparent;
}

.card-footer a {
  color: var(--brand2);
  font-size: .9rem;
  font-weight: 750;
}

.category-symbol {
  position: absolute;
  inset: 50% auto auto 50%;
  color: rgba(255, 255, 255, .82);
  font-size: 4rem;
  transform: translate(-50%, -50%);
}

.blog-breadcrumb {
  display: flex;
  gap: .6rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: .9rem;
}

.blog-breadcrumb a,
.footer a {
  color: var(--brand2);
  text-decoration: none;
}

.category-filter {
  display: flex;
  align-items: end;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-bg-top), var(--card-bg-bottom));
}

.category-filter-field {
  display: grid;
  flex: 1;
  gap: .45rem;
}

.category-filter label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.category-filter select,
.category-filter input[type="search"] {
  width: 100%;
  min-height: 2.75rem;
  padding: .65rem .85rem;
  border: 1px solid var(--stroke);
  border-radius: .75rem;
  outline: none;
  background: color-mix(in srgb, var(--bg) 90%, #fff 10%);
  color: var(--text);
}

.category-filter select {
  padding-right: 2.5rem;
}

.category-filter input[type="search"]::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.category-filter select:focus,
.category-filter input[type="search"]:focus {
  border-color: rgba(106, 168, 255, .72);
  box-shadow: 0 0 0 .2rem rgba(47, 107, 255, .14);
}

.category-filter-search {
  flex: 1.35;
}

.catalog-summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.catalog-summary h2 {
  margin: 0;
  font-weight: 800;
}

.catalog-summary p {
  margin: 0;
  color: var(--muted);
}

.article-card > a {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  color: var(--muted);
  font-size: .83rem;
}

.article-meta span {
  color: var(--brand2);
  font-weight: 700;
}

.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-top: 2.5rem;
}

.pagination-nav a {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: .8rem;
  color: var(--muted);
  text-decoration: none;
}

.pagination-nav a:hover,
.pagination-nav a.active {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
}

.empty-state {
  padding: 4rem 1.5rem;
  border: 1px dashed var(--stroke);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state.compact {
  padding: 1.6rem;
}

.empty-state p {
  color: var(--muted);
}

@media (max-width: 767.98px) {
  .blog-home-hero {
    padding: 3.3rem 0 1.8rem;
  }

  .blog-home-hero-grid {
    grid-template-columns: 1fr;
  }

  .blog-hero,
  .catalog-header {
    padding: 3.5rem 0 2.25rem;
  }

  .catalog-summary {
    align-items: start;
    flex-direction: column;
  }

  .category-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .language-switcher {
    margin-top: .35rem;
  }

  .language-button {
    width: 100%;
    justify-content: space-between;
  }

  .language-dropdown {
    width: 100%;
  }

  .main-site-link {
    width: 100%;
    justify-content: space-between;
    margin-top: .35rem;
  }
}
