/**
 * Humber Salt – blog templates.
 * Mobile-first. Breakpoints: 768px (tablet), 1024px (desktop), 1440px (wide).
 * Loaded only on blog views (see inc/blog.php).
 */

/* ==========================================================================
   Tokens (taken from the live site: custom.css, Elementor header/footer, plugin)
   ========================================================================== */

:root {
  /* Brand blue #3d9be9 is used for accents and fills. White text sits on the
	   darker blues below, which meet WCAG AA (4.5:1) with white. */
  --hsb-primary: #3d9be9;
  --hsb-primary-light: #6bc5f8;
  --hsb-primary-50: #eff6ff;
  --hsb-primary-100: #dbeafe;
  --hsb-primary-600: #2076c4;
  --hsb-primary-700: #1a66ad;
  --hsb-primary-800: #1a5f9e;
  --hsb-accent: #f0a500;
  --hsb-accent-50: #fff8e6;

  --hsb-heading: #1a2733;
  --hsb-text: #1e293b;
  --hsb-muted: #56657a;
  --hsb-border: #e2e8f0;
  --hsb-soft: #f4f6f9;
  --hsb-white: #fff;

  --hsb-font:
    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --hsb-radius-card: 20px;
  --hsb-radius-btn: 12px;
  --hsb-radius-md: 16px;
  --hsb-radius-pill: 999px;

  --hsb-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --hsb-shadow-card-hover: 0 10px 28px rgba(26, 39, 51, 0.14);
  --hsb-shadow-btn: 0 6px 18px rgba(61, 155, 233, 0.38);
  --hsb-shadow-btn-hover: 0 10px 28px rgba(61, 155, 233, 0.5);

  --hsb-gradient-brand: linear-gradient(135deg, #3d9be9 0%, #1a7ecf 100%);
  --hsb-gradient-btn: linear-gradient(135deg, #2076c4 0%, #1a5f9e 100%);
  --hsb-gradient-band: linear-gradient(135deg, #2076c4 0%, #174f80 100%);

  --hsb-container: 1240px;
  --hsb-gutter: 24px;
  --hsb-focus: #1a5f9e;
  --hsb-sticky-top: 24px;
}

@media (max-width: 479px) {
  :root {
    --hsb-gutter: 16px;
  }
}

@media (min-width: 1024px) {
  .admin-bar {
    --hsb-sticky-top: 56px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

.hsb-blog {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  overflow-x: clip;
  font-family: var(--hsb-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--hsb-text);
}

.hsb-blog,
.hsb-blog *,
.hsb-blog *::before,
.hsb-blog *::after {
  box-sizing: border-box;
}

/*
 * Astra wrappers on blog views only (body.hsb-view is added in inc/blog.php).
 * Astra's page-builder layout already removes the container width and padding;
 * this also drops the flex row and any padding or background Astra layouts add.
 */
body.hsb-view #content > .ast-container {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.hsb-view #primary {
  float: none;
  flex: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

.hsb-blog h1,
.hsb-blog h2,
.hsb-blog h3,
.hsb-blog h4 {
  margin: 0;
  font-family: var(--hsb-font);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--hsb-heading);
}

:where(.hsb-blog) p {
  margin: 0;
}

:where(.hsb-blog) a {
  color: var(--hsb-primary-600);
}

:where(.hsb-blog) img {
  max-width: 100%;
  height: auto;
}

.hsb-blog :focus-visible {
  outline: 3px solid var(--hsb-focus);
  outline-offset: 3px;
}

.hsb-container {
  width: 100%;
  max-width: var(--hsb-container);
  margin-inline: auto;
  padding-inline: var(--hsb-gutter);
}

.hsb-container--narrow {
  max-width: calc(880px + var(--hsb-gutter) * 2);
}

.hsb-icon {
  flex: none;
  transition: transform 0.2s ease;
}

.hsb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hsb-primary-700);
}

.hsb-eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--hsb-primary);
}

.hsb-eyebrow--on-dark {
  color: #fff;
}

.hsb-eyebrow--on-dark::before {
  background: var(--hsb-primary-light);
}

.hsb-blog .hsb-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--hsb-primary-700);
  text-decoration: none;
}

.hsb-blog .hsb-link-arrow:hover {
  color: var(--hsb-primary-800);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hsb-link-arrow:hover .hsb-icon--arrow-r,
.hsb-product:hover .hsb-icon--arrow-r,
.hsb-featured:hover .hsb-icon--arrow-r {
  transform: translateX(4px);
}

/* ==========================================================================
   Buttons (site pattern: gradient, 12px radius, 600 uppercase, soft blue shadow)
   ========================================================================== */

.hsb-blog .hsb-btn,
.hsb-blog .hsb-btn:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--hsb-radius-btn);
  font-family: var(--hsb-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.22s ease,
    background-color 0.2s ease;
}

.hsb-blog .hsb-btn--primary,
.hsb-blog .hsb-btn--primary:focus {
  background: var(--hsb-gradient-btn);
  color: #fff;
  box-shadow: var(--hsb-shadow-btn);
}

.hsb-blog .hsb-btn--primary:hover {
  background: var(--hsb-gradient-btn);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--hsb-shadow-btn-hover);
}

.hsb-blog .hsb-btn--light,
.hsb-blog .hsb-btn--light:focus {
  background: #fff;
  color: var(--hsb-primary-800);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.hsb-blog .hsb-btn--light:hover {
  background: #fff;
  color: var(--hsb-primary-800);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.hsb-blog .hsb-btn--ghost,
.hsb-blog .hsb-btn--ghost:focus {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
  text-transform: none;
  letter-spacing: 0;
}

.hsb-blog .hsb-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ==========================================================================
   Breadcrumb (Astra trail markup)
   ========================================================================== */

.hsb-breadcrumb {
  font-size: 14px;
  color: var(--hsb-muted);
}

.hsb-breadcrumb .trail-items {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hsb-breadcrumb .trail-item {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.hsb-breadcrumb .trail-item:not(.trail-end)::after {
  content: "/";
  margin: 0 8px;
  color: #94a3b8;
}

.hsb-breadcrumb a {
  color: var(--hsb-muted);
  text-decoration: none;
}

.hsb-breadcrumb a:hover {
  color: var(--hsb-primary-700);
  text-decoration: underline;
}

.hsb-breadcrumb .trail-end {
  color: var(--hsb-heading);
  font-weight: 500;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hsb-hero {
  position: relative;
  padding: 20px 0 44px;
  background: var(--hsb-soft);
  border-bottom: 1px solid var(--hsb-border);
}

.hsb-hero--wash {
  background:
    radial-gradient(
      900px 360px at 100% 0%,
      rgba(61, 155, 233, 0.16),
      transparent 65%
    ),
    linear-gradient(180deg, var(--hsb-primary-50) 0%, var(--hsb-soft) 100%);
  border-bottom: 0;
}

.hsb-hero--wash::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--hsb-gradient-brand);
}

.hsb-hero__body {
  max-width: 780px;
  margin-top: 28px;
}

.hsb-blog .hsb-hero__title {
  font-size: clamp(1.875rem, 1.35rem + 2.2vw, 3rem);
  line-height: 1.15;
}

.hsb-hero__intro {
  max-width: 660px;
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--hsb-muted);
}

.hsb-hero__intro p + p {
  margin-top: 0.75em;
}

.hsb-hero__meta {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hsb-primary-800);
}

.hsb-hero .hsb-search {
  margin-top: 28px;
}

@media (min-width: 1024px) {
  .hsb-hero {
    padding: 28px 0 64px;
  }
}

/* ==========================================================================
   Search form
   ========================================================================== */

.hsb-search {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 640px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--hsb-border);
  border-radius: 14px;
  box-shadow: var(--hsb-shadow-card);
}

.hsb-search:focus-within {
  border-color: var(--hsb-primary);
  box-shadow:
    0 0 0 3px rgba(61, 155, 233, 0.3),
    var(--hsb-shadow-card);
}

.hsb-search__icon {
  position: absolute;
  top: 50%;
  left: 18px;
  display: flex;
  color: var(--hsb-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.hsb-blog .hsb-search__input,
.hsb-blog .hsb-search__input:focus {
  flex: 1;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 10px 10px 10px 42px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  outline: 0;
  font-family: var(--hsb-font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--hsb-text);
}

.hsb-search__input::placeholder {
  color: #6b7a8f;
  opacity: 1;
}

.hsb-blog .hsb-search__submit,
.hsb-blog .hsb-search__submit:focus {
  min-height: 44px;
  padding: 10px 18px;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Listing layout, category chips
   Rhythm: 48px hero → featured, 48px featured → chips/grid.
   ========================================================================== */

.hsb-blog__body {
  padding-block: 48px 64px;
}

.hsb-featured + .hsb-chips {
  margin-top: 48px;
}

.hsb-chips {
  margin: 0 0 24px;
}

.hsb-chips__list {
  display: flex;
  gap: 8px;
  margin: -4px;
  padding: 4px 4px 8px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hsb-chips__list li {
  flex: none;
  margin: 0;
}

.hsb-blog .hsb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--hsb-border);
  border-radius: var(--hsb-radius-pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--hsb-heading);
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.hsb-blog .hsb-chip:hover {
  border-color: var(--hsb-primary);
  color: var(--hsb-primary-700);
}

.hsb-blog .hsb-chip[aria-current] {
  background: var(--hsb-primary-700);
  border-color: var(--hsb-primary-700);
  color: #fff;
}

.hsb-blog .hsb-chip--sm {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 13px;
}

@media (min-width: 768px) {
  .hsb-chips__list {
    flex-wrap: wrap;
    overflow: visible;
  }
}

@media (min-width: 1024px) {
  .hsb-blog__body {
    padding-bottom: 96px;
  }
}

/* ==========================================================================
   Badges
   ========================================================================== */

.hsb-blog .hsb-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 12px;
  background: var(--hsb-primary-50);
  border-radius: var(--hsb-radius-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hsb-primary-700);
  text-decoration: none;
}

.hsb-blog a.hsb-badge:hover {
  background: var(--hsb-primary-100);
  color: var(--hsb-primary-800);
}

.hsb-blog .hsb-badge--highlight {
  background: var(--hsb-accent);
  color: var(--hsb-heading);
}

/* ==========================================================================
   Line clamping (shared)
   ========================================================================== */

.hsb-clamp-2,
.hsb-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.hsb-clamp-2 {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.hsb-clamp-3 {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* ==========================================================================
   Card grid
   ========================================================================== */

.hsb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.hsb-grid > * {
  min-width: 0;
}

@media (min-width: 768px) {
  .hsb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .hsb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

.hsb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border-radius: var(--hsb-radius-card);
  box-shadow: var(--hsb-shadow-card);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hsb-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hsb-shadow-card-hover);
}

.hsb-card:focus-within {
  box-shadow:
    0 0 0 3px var(--hsb-focus),
    var(--hsb-shadow-card-hover);
}

.hsb-card__media {
  position: relative;
  display: block;
  flex: none;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--hsb-soft);
}

.hsb-card__img,
.hsb-card__media .hsb-thumb-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hsb-card:hover .hsb-card__img,
.hsb-card:hover .hsb-thumb-fallback {
  transform: scale(1.04);
}

.hsb-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 24px;
}

.hsb-blog .hsb-card__title {
  max-width: 100%;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hsb-blog .hsb-card__title a,
.hsb-blog .hsb-featured__title a,
.hsb-blog .hsb-product__title a {
  color: var(--hsb-heading);
  text-decoration: none;
}

/* The title link covers the whole card; badges sit above it (z-index 2). */
.hsb-card__title a::after,
.hsb-featured__title a::after,
.hsb-product__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hsb-blog .hsb-card__title a:hover,
.hsb-blog .hsb-featured__title a:hover,
.hsb-blog .hsb-product__title a:hover {
  color: var(--hsb-primary-700);
}

.hsb-card__title a:focus-visible,
.hsb-featured__title a:focus-visible,
.hsb-product__title a:focus-visible {
  outline: 0;
}

.hsb-card__excerpt {
  max-width: 100%;
  font-size: 15px;
  line-height: 1.6;
  color: var(--hsb-muted);
  overflow-wrap: break-word;
}

.hsb-card__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 4px;
}

.hsb-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--hsb-muted);
}

.hsb-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hsb-primary-700);
}

.hsb-card:hover .hsb-icon--arrow-r {
  transform: translateX(4px);
}

/* Fallback thumbnail: used when a post has no featured image. */

.hsb-card__img,
.hsb-featured__img {
  display: block;
}

.hsb-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #3d9be9 0%, #1a7ecf 100%);
  color: #fff;
  text-align: center;
}

.hsb-thumb-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6v24M7.6 12l20.8 12M7.6 24l20.8-12M18 6l-3 3M18 6l3 3M18 30l-3-3M18 30l3-3'/%3E%3Cpath d='M54 42v24M43.6 48l20.8 12M43.6 60l20.8-12M54 42l-3 3M54 42l3 3M54 66l-3-3M54 66l3-3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  opacity: 0.08;
}

/* Darker pill behind the label keeps white text above 4.5:1 on the light end of the gradient. */
.hsb-thumb-fallback__label {
  position: relative;
  max-width: 85%;
  padding: 8px 16px;
  background: rgba(16, 52, 92, 0.4);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hsb-thumb-fallback__mark {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ==========================================================================
   Featured post
   ========================================================================== */

.hsb-featured {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border-radius: var(--hsb-radius-card);
  box-shadow: var(--hsb-shadow-card);
  transition: box-shadow 0.25s ease;
  margin-bottom: 30px;
}

.hsb-featured:hover {
  box-shadow: var(--hsb-shadow-card-hover);
}

.hsb-featured:focus-within {
  box-shadow:
    0 0 0 3px var(--hsb-focus),
    var(--hsb-shadow-card-hover);
}

.hsb-featured__media {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--hsb-soft);
}

/* Absolutely filled, so the image's own size never drives the layout. */
.hsb-featured__img,
.hsb-featured__media .hsb-thumb-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transition: transform 0.5s ease;
}

.hsb-featured:hover .hsb-featured__img {
  transform: scale(1.03);
}

.hsb-featured__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  padding: 24px;
}

.hsb-featured__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.hsb-blog .hsb-featured__title {
  max-width: 100%;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hsb-featured__excerpt {
  max-width: 100%;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--hsb-muted);
  overflow-wrap: break-word;
}

.hsb-featured .hsb-read-more {
  font-size: 15px;
}

.hsb-featured:hover .hsb-icon--arrow-r {
  transform: translateX(4px);
}

@media (min-width: 768px) {
  .hsb-featured__body {
    padding: 32px 36px;
  }
}

@media (min-width: 1024px) {
  .hsb-featured {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .hsb-featured__media {
    min-height: 380px;
    aspect-ratio: auto;
  }

  .hsb-featured__body {
    padding: 44px 48px;
  }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.hsb-pagination {
  margin-top: 48px;
}

.hsb-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hsb-pagination li {
  margin: 0;
}

.hsb-blog .hsb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--hsb-border);
  border-radius: var(--hsb-radius-btn);
  font-size: 15px;
  font-weight: 600;
  color: var(--hsb-heading);
  text-decoration: none;
}

.hsb-blog .hsb-pagination a.page-numbers:hover {
  border-color: var(--hsb-primary);
  color: var(--hsb-primary-700);
}

.hsb-blog .hsb-pagination .page-numbers.current {
  background: var(--hsb-gradient-btn);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--hsb-shadow-btn);
}

.hsb-blog .hsb-pagination .page-numbers.dots {
  min-width: auto;
  background: none;
  border: 0;
}

/* ==========================================================================
   Empty state
   ========================================================================== */

.hsb-empty {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
  background: var(--hsb-soft);
  border-radius: var(--hsb-radius-card);
}

.hsb-blog .hsb-empty__title {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.hsb-empty p {
  margin-bottom: 20px;
  color: var(--hsb-muted);
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.hsb-cta-band {
  position: relative;
  overflow: hidden;
  padding: 56px 0;
  background: var(--hsb-gradient-band);
  color: #fff;
}

.hsb-cta-band::before,
.hsb-cta-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hsb-cta-band::before {
  top: -160px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle,
    rgba(107, 197, 248, 0.35),
    transparent 70%
  );
}

.hsb-cta-band::after {
  bottom: -180px;
  left: -140px;
  width: 380px;
  height: 380px;
  background: radial-gradient(
    circle,
    rgba(61, 155, 233, 0.35),
    transparent 70%
  );
}

.hsb-cta-band__inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  gap: 28px;
}

.hsb-blog .hsb-cta-band__title {
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  color: #fff;
}

.hsb-cta-band__text {
  max-width: 600px;
  margin-top: 12px;
  font-size: 1.0625rem;
  color: #fff;
}

.hsb-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hsb-cta-band :focus-visible {
  outline-color: #fff;
}

@media (min-width: 1024px) {
  .hsb-cta-band {
    padding: 72px 0;
  }

  .hsb-cta-band__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
  }
}

/* ==========================================================================
   Single post
   ========================================================================== */

.hsb-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100000;
  height: 4px;
  pointer-events: none;
}

.admin-bar .hsb-progress {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .hsb-progress {
    top: 46px;
  }
}

@media screen and (max-width: 600px) {
  .admin-bar .hsb-progress {
    top: 0;
  }
}

.hsb-progress__bar {
  display: block;
  height: 100%;
  background: var(--hsb-gradient-brand);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.hsb-single__header {
  padding: 20px 0 48px;
  background: var(--hsb-soft);
}

.hsb-single__intro {
  max-width: 880px;
}

.hsb-article.has-post-thumbnail .hsb-single__header {
  padding-bottom: 96px;
}

.hsb-single__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.hsb-blog .hsb-single__title {
  margin-top: 16px;
  font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.75rem);
  line-height: 1.2;
}

.hsb-single__lede {
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--hsb-muted);
}

.hsb-single__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--hsb-muted);
}

.hsb-single__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hsb-heading);
}

.hsb-blog .hsb-single__author a {
  font-weight: 600;
  color: var(--hsb-heading);
  text-decoration: none;
}

.hsb-blog .hsb-single__author a:hover {
  color: var(--hsb-primary-700);
  text-decoration: underline;
}

.hsb-single__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.hsb-single__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hsb-single__figure {
  position: relative;
  margin-top: -72px;
  margin-bottom: 0;
}

.hsb-blog .hsb-single__img {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  border-radius: var(--hsb-radius-card);
  box-shadow: var(--hsb-shadow-card-hover);
}

.hsb-single__figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  color: var(--hsb-muted);
}

.hsb-single__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-block: 32px 56px;
}

.hsb-single__layout:not(.has-toc) .hsb-single__aside {
  display: none;
}

.hsb-single__main {
  min-width: 0;
  max-width: 760px;
}

@media (min-width: 1024px) {
  .hsb-single__layout {
    padding-block: 48px 72px;
  }

  .hsb-single__layout.has-toc {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 64px;
  }

  .hsb-single__layout.has-toc .hsb-single__aside {
    position: sticky;
    top: var(--hsb-sticky-top);
    order: 2;
    align-self: start;
    max-height: calc(100vh - var(--hsb-sticky-top) - 24px);
    overflow-y: auto;
  }

  .hsb-single__layout:not(.has-toc) {
    max-width: calc(760px + var(--hsb-gutter) * 2);
  }
}

@media (min-width: 1440px) {
  .hsb-single__layout.has-toc {
    gap: 96px;
  }
}

/* Table of contents */

.hsb-toc {
  background: #fff;
  border: 1px solid var(--hsb-border);
  border-radius: var(--hsb-radius-md);
}

.hsb-toc__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--hsb-heading);
  list-style: none;
  cursor: pointer;
}

.hsb-toc__summary::-webkit-details-marker {
  display: none;
}

.hsb-toc__summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}

.hsb-toc__details[open] > .hsb-toc__summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.hsb-toc__list {
  margin: 0;
  padding: 8px 18px 16px;
  border-top: 1px solid var(--hsb-border);
  list-style: none;
}

.hsb-toc__item {
  margin: 0;
}

.hsb-blog .hsb-toc__item a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--hsb-border);
  font-size: 14px;
  line-height: 1.45;
  color: var(--hsb-muted);
  text-decoration: none;
}

.hsb-blog .hsb-toc__item--h3 a {
  padding-left: 28px;
  font-size: 13.5px;
}

.hsb-blog .hsb-toc__item a:hover {
  color: var(--hsb-primary-700);
}

.hsb-blog .hsb-toc__item a[aria-current] {
  border-left-color: var(--hsb-primary);
  font-weight: 600;
  color: var(--hsb-primary-700);
}

@media (min-width: 1024px) {
  .hsb-toc {
    background: transparent;
    border: 0;
  }

  .hsb-toc__summary {
    padding: 0 0 12px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hsb-muted);
  }

  .hsb-toc__list {
    padding: 0;
    border-top: 0;
  }
}

/* ==========================================================================
   Article content
   ========================================================================== */

.hsb-prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--hsb-text);
  overflow-wrap: break-word;
}

.hsb-prose > * {
  margin-top: 0;
  margin-bottom: 0;
}

.hsb-prose > * + * {
  margin-top: 1.25em;
}

.hsb-blog .hsb-prose h2 {
  margin-top: 2em;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  scroll-margin-top: calc(var(--hsb-sticky-top) + 8px);
}

.hsb-blog .hsb-prose h3 {
  margin-top: 1.6em;
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  font-weight: 600;
  scroll-margin-top: calc(var(--hsb-sticky-top) + 8px);
}

.hsb-blog .hsb-prose h4 {
  margin-top: 1.5em;
  font-size: 1.125rem;
  font-weight: 600;
}

.hsb-prose > h2:first-child,
.hsb-prose > h3:first-child {
  margin-top: 0;
}

.hsb-prose h2 + *,
.hsb-prose h3 + *,
.hsb-prose h4 + * {
  margin-top: 0.75em;
}

.hsb-blog .hsb-prose a:not(.hsb-btn) {
  color: var(--hsb-primary-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.hsb-blog .hsb-prose a:not(.hsb-btn):hover {
  color: var(--hsb-primary-800);
  text-decoration-thickness: 2px;
}

.hsb-prose strong {
  font-weight: 600;
  color: var(--hsb-heading);
}

.hsb-prose ul,
.hsb-prose ol {
  margin-left: 0;
  padding-left: 1.4em;
}

.hsb-prose li + li {
  margin-top: 0.5em;
}

.hsb-prose ul li::marker {
  color: var(--hsb-primary);
}

.hsb-prose ol li::marker {
  font-weight: 600;
  color: var(--hsb-primary-700);
}

.hsb-blog .hsb-prose blockquote {
  margin-inline: 0;
  padding: 24px 24px 24px 28px;
  background: var(--hsb-primary-50);
  border: 0;
  border-left: 5px solid var(--hsb-primary);
  border-radius: 0 var(--hsb-radius-md) var(--hsb-radius-md) 0;
  font-size: 1.1875rem;
  font-style: normal;
  line-height: 1.6;
  color: var(--hsb-heading);
}

.hsb-blog .hsb-prose blockquote p {
  margin: 0;
  font-style: normal;
}

.hsb-blog .hsb-prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  color: var(--hsb-muted);
}

.hsb-prose blockquote cite::before {
  content: "— ";
}

.hsb-prose figure {
  margin-inline: 0;
}

.hsb-prose img {
  border-radius: var(--hsb-radius-md);
}

.hsb-prose figcaption,
.hsb-prose .wp-element-caption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--hsb-muted);
}

.hsb-prose .alignwide,
.hsb-prose .alignfull {
  max-width: 100%;
  margin-inline: 0;
}

.hsb-prose iframe,
.hsb-prose video,
.hsb-prose embed {
  max-width: 100%;
}

.hsb-prose pre {
  overflow-x: auto;
  padding: 16px 20px;
  background: var(--hsb-soft);
  border-radius: 12px;
  font-size: 14px;
}

.hsb-prose hr {
  margin-block: 2.5em;
  border: 0;
  border-top: 1px solid var(--hsb-border);
}

/* Tables scroll inside their own box on small screens. */

.hsb-prose .wp-block-table {
  overflow-x: auto;
}

.hsb-blog .hsb-prose table {
  width: 100%;
  min-width: 480px;
  margin: 0;
  border: 1px solid var(--hsb-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
}

.hsb-blog .hsb-prose th,
.hsb-blog .hsb-prose td {
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--hsb-border);
  text-align: left;
  vertical-align: top;
}

.hsb-blog .hsb-prose th {
  background: var(--hsb-soft);
  font-weight: 600;
  color: var(--hsb-heading);
}

.hsb-blog .hsb-prose tbody tr:last-child td {
  border-bottom: 0;
}

.hsb-blog .hsb-prose tbody tr:nth-child(even) td {
  background: #fafbfd;
}

/* Callout boxes (Group block → Styles → Callout / Callout (warning)). */

.hsb-prose .is-style-hs-callout,
.hsb-prose .is-style-hs-callout-warning {
  padding: 20px 24px;
  background: var(--hsb-primary-50);
  border-left: 5px solid var(--hsb-primary);
  border-radius: 14px;
}

.hsb-prose .is-style-hs-callout-warning {
  background: var(--hsb-accent-50);
  border-left-color: var(--hsb-accent);
}

.hsb-prose .is-style-hs-callout > *,
.hsb-prose .is-style-hs-callout-warning > * {
  margin: 0;
}

.hsb-prose .is-style-hs-callout > * + *,
.hsb-prose .is-style-hs-callout-warning > * + * {
  margin-top: 0.75em;
}

/* Mid-article CTA */

.hsb-prose > .hsb-cta-inline {
  margin-block: 2.25em;
}

.hsb-cta-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--hsb-border);
  border-radius: var(--hsb-radius-card);
  box-shadow: var(--hsb-shadow-card);
}

.hsb-cta-inline__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--hsb-primary-50);
  border-radius: 14px;
  color: var(--hsb-primary-700);
}

.hsb-cta-inline__title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hsb-heading);
}

.hsb-cta-inline__text {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hsb-muted);
}

.hsb-cta-inline__text a {
  white-space: nowrap;
}

.hsb-cta-inline__btn {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .hsb-cta-inline {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 24px 28px;
  }

  .hsb-cta-inline__btn {
    grid-column: auto;
  }
}

/* Tags and share */

.hsb-single__footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--hsb-border);
}

.hsb-tags__label,
.hsb-share__label {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hsb-muted);
}

.hsb-tags__list,
.hsb-share__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hsb-tags__list li,
.hsb-share__list li {
  margin: 0;
}

.hsb-blog .hsb-share__btn,
.hsb-blog .hsb-share__btn:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--hsb-border);
  border-radius: var(--hsb-radius-btn);
  color: var(--hsb-heading);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.hsb-blog .hsb-share__btn:hover {
  background: var(--hsb-primary-700);
  border-color: var(--hsb-primary-700);
  color: #fff;
}

.hsb-blog .hsb-share__btn[hidden] {
  display: none;
}

.hsb-share__status {
  min-height: 1.4em;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--hsb-primary-800);
}

@media (min-width: 768px) {
  .hsb-single__footer {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .hsb-share {
    flex: none;
  }
}

/* Author box */

.hsb-author-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 40px;
  padding: 22px;
  background: var(--hsb-soft);
  border-radius: var(--hsb-radius-card);
}

.hsb-blog .hsb-author-box__avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.hsb-blog .hsb-author-box__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hsb-muted);
}

.hsb-author-box__name {
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 700;
}

.hsb-blog .hsb-author-box__name a {
  color: var(--hsb-heading);
  text-decoration: none;
}

.hsb-blog .hsb-author-box__name a:hover {
  color: var(--hsb-primary-700);
}

.hsb-author-box__bio {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.65;
}

.hsb-author-box__bio p + p {
  margin-top: 0.75em;
}

.hsb-author-box .hsb-link-arrow {
  margin-top: 12px;
}

@media (min-width: 768px) {
  .hsb-author-box {
    gap: 24px;
    padding: 28px;
  }

  .hsb-blog .hsb-author-box__avatar {
    width: 96px;
    height: 96px;
  }
}

/* Previous / next */

.hsb-post-nav {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.hsb-blog .hsb-post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--hsb-border);
  border-radius: var(--hsb-radius-md);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hsb-blog .hsb-post-nav__link:hover {
  border-color: var(--hsb-primary);
  box-shadow: var(--hsb-shadow-card);
}

.hsb-post-nav__dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hsb-primary-700);
}

.hsb-post-nav__title {
  font-weight: 600;
  line-height: 1.4;
  color: var(--hsb-heading);
}

@media (min-width: 768px) {
  .hsb-post-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hsb-post-nav__link--next {
    grid-column: 2;
    align-items: flex-end;
    text-align: right;
  }
}

/* ==========================================================================
   Sections below the article
   ========================================================================== */

.hsb-section {
  padding: 56px 0;
}

.hsb-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}

.hsb-blog .hsb-section__title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.hsb-products {
  background: var(--hsb-soft);
}

.hsb-products__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hsb-product {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border-radius: var(--hsb-radius-card);
  box-shadow: var(--hsb-shadow-card);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hsb-product:hover {
  transform: translateY(-4px);
  box-shadow: var(--hsb-shadow-card-hover);
}

.hsb-product:focus-within {
  box-shadow:
    0 0 0 3px var(--hsb-focus),
    var(--hsb-shadow-card-hover);
}

.hsb-product__media {
  display: block;
  aspect-ratio: 1;
  padding: 16px;
}

.hsb-blog .hsb-product__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hsb-product__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 0 16px 18px;
}

.hsb-product__cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hsb-muted);
}

.hsb-blog .hsb-product__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.hsb-blog .hsb-product .hsb-link-arrow {
  margin-top: auto;
  padding-top: 6px;
  font-size: 14px;
}

@media (min-width: 1024px) {
  .hsb-section {
    padding: 72px 0;
  }

  .hsb-products__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }

  .hsb-product__body {
    padding: 0 20px 22px;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .hsb-blog *,
  .hsb-blog *::before,
  .hsb-blog *::after {
    transition: none !important;
    animation: none !important;
  }

  .hsb-card:hover,
  .hsb-product:hover,
  .hsb-blog .hsb-btn:hover,
  .hsb-card:hover .hsb-card__img,
  .hsb-featured:hover .hsb-featured__img {
    transform: none;
  }
}
