/* ==========================================================
   BLOG / ARCHIVE FILTERS
   ========================================================== */

body .x7u50glz,
body a.x7u50glz {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 9px 18px !important;
  color: #cbd5e1 !important;
  background: #151c2b !important;
  border: 1px solid var(--sg-border, #2d3555) !important;
  border-radius: 999px !important;
  font-size: .95rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: color .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease !important;
}

body .x7u50glz:hover,
body a.x7u50glz:hover {
  color: #fff !important;
  background: rgba(0,191,255,.12) !important;
  border-color: var(--sg-neon-blue, #00bfff) !important;
  box-shadow: 0 0 0 1px rgba(0,191,255,.18), 0 0 18px rgba(0,191,255,.28) !important;
  transform: translateY(-2px) !important;
}

body .x7u50glz.active,
body a.x7u50glz.active,
body .x7u50glz[aria-current="page"],
body a.x7u50glz[aria-current="page"] {
  color: #fff !important;
  background: linear-gradient(135deg, #00bfff, #1677ff) !important;
  border-color: #00bfff !important;
  box-shadow: 0 0 0 1px rgba(0,191,255,.22), 0 0 22px rgba(0,191,255,.32) !important;
}

/* ==========================================================
   AUTOMATIC CATEGORY PAGE HERO
   ========================================================== */

.sg-category-page {
  min-height: 70vh;
  padding: 54px 20px 90px;
  background:
    radial-gradient(circle at 50% -10%, rgba(0,191,255,.07), transparent 35%),
    var(--sg-bg, #0a0e1a);
}

.sg-category-hero {
  --sg-cat-primary: #00bfff;
  --sg-cat-secondary: #6366f1;
  --sg-cat-deep: #101d42;
  position: relative;
  isolation: isolate;
  width: min(100%, 1200px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--sg-cat-primary) 42%, transparent);
  border-radius: 28px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--sg-cat-deep) 88%, #050a14), #07101f 68%);
  box-shadow:
    0 28px 80px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.sg-category-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, #000, transparent 76%);
}

.sg-category-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sg-cat-primary), var(--sg-cat-secondary), transparent 86%);
}

.sg-category-hero__glow {
  position: absolute;
  z-index: -1;
  top: -190px;
  right: -110px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--sg-cat-secondary) 34%, transparent), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

.sg-category-hero__inner {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 365px;
  padding: 62px 72px;
}

.sg-category-icon {
  position: relative;
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--sg-cat-primary) 26%, transparent),
      color-mix(in srgb, var(--sg-cat-secondary) 12%, #07101f));
  border: 1px solid color-mix(in srgb, var(--sg-cat-primary) 65%, transparent);
  border-radius: 38px;
  box-shadow:
    0 20px 55px color-mix(in srgb, var(--sg-cat-primary) 18%, transparent),
    inset 0 1px 0 rgba(255,255,255,.10);
  transform: rotate(-4deg);
}

.sg-category-icon::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 28px;
}

.sg-category-icon span {
  position: relative;
  z-index: 1;
  font-size: 4.6rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 28px color-mix(in srgb, var(--sg-cat-primary) 58%, transparent);
}

.sg-category-copy {
  max-width: 760px;
}

.sg-category-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--sg-cat-primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sg-category-label::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sg-cat-primary), var(--sg-cat-secondary));
  box-shadow: 0 0 15px color-mix(in srgb, var(--sg-cat-primary) 55%, transparent);
}

.sg-category-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 850;
  line-height: .94;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.sg-category-hero h1::after {
  content: ".";
  color: var(--sg-cat-primary);
  -webkit-text-fill-color: currentColor;
}

.sg-category-desc {
  max-width: 680px;
  margin: 24px 0 0;
  color: #bac7d8;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.75;
}

.sg-category-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
  color: #91a2b7;
  font-size: .9rem;
}

.sg-category-meta strong {
  color: #fff;
  font-weight: 800;
}

.sg-category-results {
  width: min(100%, 1200px);
  margin: 70px auto 0;
}

.sg-category-results__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sg-border, #2d3555);
}

.sg-category-results__kicker {
  margin: 0 0 7px;
  color: var(--sg-text-muted, #94a3b8);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sg-category-results h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.1;
}

.sg-category-page .archive-grid {
  max-width: none;
  padding: 0;
}

.sg-category-page .card {
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
}

.sg-category-page .card:hover {
  border-color: var(--sg-cat-primary, #00bfff);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--sg-cat-primary, #00bfff) 13%, transparent);
}

.sg-empty-state {
  grid-column: 1 / -1;
  padding: 50px;
  color: var(--sg-text-muted, #94a3b8);
  text-align: center;
  background: var(--sg-card, #1a1f35);
  border: 1px solid var(--sg-border, #2d3555);
  border-radius: 16px;
}

@media (max-width: 900px) {
  .sg-category-hero__inner {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 30px;
    min-height: 300px;
    padding: 46px;
  }

  .sg-category-icon {
    width: 118px;
    height: 118px;
    border-radius: 28px;
  }

  .sg-category-icon::before {
    border-radius: 20px;
  }

  .sg-category-icon span {
    font-size: 3.4rem;
  }
}

@media (max-width: 640px) {
  .sg-category-page {
    padding: 28px 14px 65px;
  }

  .sg-category-hero {
    border-radius: 22px;
  }

  .sg-category-hero__inner {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: auto;
    padding: 34px 25px 38px;
  }

  .sg-category-icon {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    transform: rotate(-3deg);
  }

  .sg-category-icon::before {
    inset: 8px;
    border-radius: 15px;
  }

  .sg-category-icon span {
    font-size: 2.35rem;
  }

  .sg-category-hero h1 {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

  .sg-category-desc {
    margin-top: 18px;
  }

  .sg-category-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .sg-category-meta span[aria-hidden="true"] {
    display: none;
  }

  .sg-category-results {
    margin-top: 46px;
  }
}
