.smart-content-filter {
  --scf-gap: 1.25rem;
  --scf-radius: 16px;
  --scf-border: #c8cdd8;
  --scf-surface: #ffffff;
  --scf-muted: #667085;
  --scf-text: #1d2939;
  --scf-accent: #2563eb;
  --scf-image-ratio: 16 / 10;
  --scf-card-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
  --scf-card-shadow-hover: 0 24px 56px rgba(16, 24, 40, 0.22);
  --scf-border-width: 1px;
  --scf-ui-radius: 10px;
  --scf-ui-radius-pill: 999px;
  --scf-cols-mobile: 1;
  --scf-cols-tablet: 2;
  --scf-cols-desktop: 3;
  position: relative;
}

.smart-content-filter--has-view-toggle,
.smart-content-filter--has-chrome-actions {
  padding-top: 2.75rem;
}

.scf-chrome-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.scf-filters-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0 0.8rem;
  border: 1px solid var(--scf-border);
  border-radius: var(--scf-ui-radius);
  background: var(--scf-surface);
  color: var(--scf-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.scf-filters-toggle:hover,
.scf-filters-toggle:focus-visible,
.scf-filters-toggle.is-active {
  border-color: var(--scf-accent);
  color: var(--scf-accent);
}

.scf-filters-toggle.is-active {
  background: color-mix(in srgb, var(--scf-accent) 12%, var(--scf-surface));
}

.scf-filters-toggle__icon {
  display: inline-flex;
  line-height: 0;
}

.scf-filters-toggle__label {
  font-size: 0.86rem;
  font-weight: 600;
}

.scf-filters-panel {
  margin-bottom: 0.25rem;
}

.scf-filters-panel[hidden] {
  display: none !important;
}

.smart-content-filter--ui-squared {
  --scf-ui-radius: 0;
  --scf-ui-radius-pill: 0;
}

.scf-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.scf-control {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--scf-muted);
  font-size: 0.88rem;
}

/* Templates commonly add a bottom margin to every label, which pushes the labelled
   fields up and leaves the reset button sitting lower than the rest of the row. */
[id^="smart-content-filter-"] .scf-toolbar > .scf-control,
[id^="smart-content-filter-"] .scf-toolbar > .scf-control > .scf-control__label,
[id^="smart-content-filter-"] .scf-toolbar > .scf-control > .scf-field,
[id^="smart-content-filter-"] .scf-toolbar > .scf-reset,
[id^="smart-content-filter-"] .scf-toolbar .scf-control--action .scf-reset {
  margin: 0 !important;
}

[id^="smart-content-filter-"] .scf-toolbar > .scf-reset {
  align-self: end;
}

.scf-control__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--scf-muted);
  line-height: 1.2;
}

.scf-control__label--spacer {
  visibility: hidden;
  user-select: none;
}

.scf-control--search {
  grid-column: 1 / -1;
  max-width: min(100%, 26rem);
}

.scf-control--action {
  justify-items: start;
  width: auto;
  max-width: max-content;
}

.scf-field {
  position: relative;
  display: block;
  min-width: 0;
}

.scf-field__icon {
  position: absolute;
  top: 50%;
  left: 0.65rem;
  z-index: 1;
  display: inline-flex;
  color: var(--scf-muted);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 0.2s ease;
}

.scf-field--search:focus-within .scf-field__icon {
  color: var(--scf-accent);
}

[id^="smart-content-filter-"] .scf-control input,
[id^="smart-content-filter-"] .scf-control select,
[id^="smart-content-filter-"] .scf-field input,
[id^="smart-content-filter-"] .scf-field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem !important;
  border: 1px solid var(--scf-border) !important;
  border-radius: var(--scf-ui-radius) !important;
  background: var(--scf-surface) !important;
  color: var(--scf-text) !important;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.3;
  padding: 0.65rem 0.85rem !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

[id^="smart-content-filter-"] .scf-control--search .scf-field--search input[type="search"] {
  padding-left: 3.15rem !important;
}

.scf-field--select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--scf-muted) 50%),
    linear-gradient(135deg, var(--scf-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.05rem) calc(50% - 0.12rem),
    calc(100% - 0.7rem) calc(50% - 0.12rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

.scf-field--select select[multiple] {
  appearance: auto;
  -webkit-appearance: auto;
  padding-right: 0.85rem;
  background-image: none;
  min-height: 6.5rem;
  cursor: default;
}

.scf-control input::placeholder,
.scf-field input::placeholder {
  color: color-mix(in srgb, var(--scf-muted) 82%, transparent);
  opacity: 1;
}

[id^="smart-content-filter-"] .scf-control input:hover,
[id^="smart-content-filter-"] .scf-control select:hover,
[id^="smart-content-filter-"] .scf-field input:hover,
[id^="smart-content-filter-"] .scf-field select:hover {
  border-color: color-mix(in srgb, var(--scf-accent) 35%, var(--scf-border)) !important;
}

[id^="smart-content-filter-"] .scf-control input:focus,
[id^="smart-content-filter-"] .scf-control select:focus,
[id^="smart-content-filter-"] .scf-field input:focus,
[id^="smart-content-filter-"] .scf-field select:focus {
  border-color: var(--scf-accent) !important;
  outline: none !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--scf-accent) 18%, transparent) !important,
    0 1px 2px rgba(16, 24, 40, 0.04) !important;
}

.scf-control input[type="search"]::-webkit-search-decoration,
.scf-control input[type="search"]::-webkit-search-cancel-button,
.scf-field input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

.scf-control input[type="search"]::-webkit-search-cancel-button,
.scf-field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 0.9rem;
  width: 0.9rem;
  margin-right: 0.15rem;
  background:
    linear-gradient(45deg, transparent 42%, var(--scf-muted) 42%, var(--scf-muted) 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, var(--scf-muted) 42%, var(--scf-muted) 58%, transparent 58%);
  cursor: pointer;
}

.scf-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  width: auto;
  border: 1px solid var(--scf-border);
  border-radius: var(--scf-ui-radius);
  background: color-mix(in srgb, var(--scf-muted) 6%, var(--scf-surface));
  color: var(--scf-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

[id^="smart-content-filter-"] .scf-toolbar .scf-reset {
  min-height: 2.75rem !important;
  line-height: 1.3;
}

.scf-reset:hover,
.scf-reset:focus-visible {
  border-color: var(--scf-accent);
  color: var(--scf-accent);
  background: color-mix(in srgb, var(--scf-accent) 8%, var(--scf-surface));
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--scf-accent) 16%, transparent);
}

.scf-reset:active {
  transform: translateY(1px);
}

.scf-reset--icon {
  width: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
}

.scf-reset__icon {
  display: inline-flex;
  line-height: 0;
  flex-shrink: 0;
}

.scf-reset__text {
  line-height: 1;
}

@media (max-width: 640px) {
  .scf-control--search {
    max-width: none;
  }

  .scf-control--action {
    max-width: none;
    width: 100%;
  }

  .scf-control--action .scf-reset:not(.scf-reset--icon) {
    width: 100%;
  }
}

.scf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.scf-tab {
  cursor: pointer;
  font: inherit;
  padding: 0.55rem 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Category filter: tabs (underline bar) */

.smart-content-filter--category-tabs .scf-tabs {
  gap: 0.15rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0;
  border-bottom: 2px solid var(--scf-border);
}

.smart-content-filter--category-tabs .scf-tab {
  border: none;
  border-radius: var(--scf-ui-radius) var(--scf-ui-radius) 0 0;
  background: transparent;
  color: var(--scf-muted);
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}

.smart-content-filter--category-tabs .scf-tab:hover,
.smart-content-filter--category-tabs .scf-tab:focus-visible {
  color: var(--scf-accent);
  background: color-mix(in srgb, var(--scf-accent) 7%, transparent);
  border-bottom-color: color-mix(in srgb, var(--scf-accent) 30%, transparent);
}

.smart-content-filter--category-tabs .scf-tab.is-active {
  color: var(--scf-accent);
  background: color-mix(in srgb, var(--scf-accent) 8%, transparent);
  border-bottom-color: var(--scf-accent);
}

/* Category filter: pills (filled chips) */

.smart-content-filter--category-pills .scf-tabs {
  gap: 0.5rem;
}

.smart-content-filter--category-pills .scf-tab {
  border: 1px solid var(--scf-border);
  border-radius: var(--scf-ui-radius-pill);
  background: var(--scf-surface);
  color: var(--scf-text);
}

.smart-content-filter--category-pills .scf-tab:hover,
.smart-content-filter--category-pills .scf-tab:focus-visible {
  border-color: var(--scf-accent);
  color: var(--scf-accent);
  transform: translateY(-1px);
}

.smart-content-filter--category-pills .scf-tab.is-active {
  border-color: var(--scf-accent);
  background: var(--scf-accent);
  color: #ffffff;
  transform: none;
}

/* Tag filter pills */

.scf-control--tags {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  grid-column: 1 / -1;
  min-width: 0;
}

.scf-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scf-tag-pill {
  cursor: pointer;
  font: inherit;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--scf-border);
  border-radius: var(--scf-ui-radius-pill);
  background: var(--scf-surface);
  color: var(--scf-text);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.scf-tag-pill:hover,
.scf-tag-pill:focus-visible {
  border-color: var(--scf-accent);
  color: var(--scf-accent);
  transform: translateY(-1px);
}

.scf-tag-pill.is-active {
  border-color: var(--scf-accent);
  background: var(--scf-accent);
  color: #ffffff;
  transform: none;
}

.smart-content-filter--ui-squared .scf-tag-pill {
  border-radius: 0;
}

select[data-scf-tag][multiple] {
  min-height: 6.5rem;
}

.scf-status {
  min-height: 1.4rem;
  color: var(--scf-muted);
  font-size: 0.9rem;
}

.scf-count {
  margin-bottom: 0.75rem;
  color: var(--scf-muted);
  font-size: 0.92rem;
}

.scf-grid {
  display: grid;
  gap: var(--scf-gap);
  grid-template-columns: repeat(var(--scf-cols-mobile), minmax(0, 1fr));
  align-items: stretch;
}

.scf-card {
  overflow: hidden;
  box-sizing: border-box;
  border: var(--scf-border-width) solid var(--scf-border);
  border-radius: var(--scf-radius);
  background: var(--scf-surface);
  box-shadow: var(--scf-card-shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.scf-card:focus {
  outline: none;
}

.scf-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--scf-accent) 65%, transparent);
  outline-offset: 2px;
}

.smart-content-filter--border-none .scf-card,
.smart-content-filter--border-none .scf-card:hover {
  border: none;
}

/* --- Card style presets (enhanced) --- */

.smart-content-filter--style-default:not(.smart-content-filter--border-none) .scf-card {
  border-color: color-mix(in srgb, var(--scf-border) 85%, var(--scf-accent));
}

.smart-content-filter--style-default .scf-card:hover {
  border-color: color-mix(in srgb, var(--scf-accent) 45%, var(--scf-border));
  box-shadow: var(--scf-card-shadow-hover);
}

.smart-content-filter--hover-shadow-none.smart-content-filter--style-default:not(.smart-content-filter--border-none) .scf-card:hover {
  border-color: color-mix(in srgb, var(--scf-border) 85%, var(--scf-accent));
  box-shadow: var(--scf-card-shadow) !important;
}

.smart-content-filter--border-none.smart-content-filter--style-default .scf-card:hover {
  border-color: transparent;
}

.smart-content-filter--style-outlined:not(.smart-content-filter--border-none) .scf-card {
  border-width: var(--scf-border-width);
  border-color: color-mix(in srgb, var(--scf-text) 18%, var(--scf-border));
  box-shadow: none;
}

.smart-content-filter--style-outlined:not(.smart-content-filter--border-none) .scf-card:hover {
  border-color: var(--scf-accent);
  border-width: var(--scf-border-width);
  box-shadow: var(--scf-card-shadow-hover);
}

.smart-content-filter--hover-shadow-none.smart-content-filter--style-outlined:not(.smart-content-filter--border-none) .scf-card:hover {
  border-color: color-mix(in srgb, var(--scf-text) 18%, var(--scf-border));
  box-shadow: none !important;
}

.smart-content-filter--style-flat:not(.smart-content-filter--border-none) .scf-card {
  border-color: transparent;
  background: #eef1f6;
  box-shadow: none;
}

.smart-content-filter--style-flat .scf-card:hover {
  background: var(--scf-surface);
  border-color: color-mix(in srgb, var(--scf-accent) 25%, transparent);
  box-shadow: var(--scf-card-shadow-hover);
}

.smart-content-filter--hover-shadow-none.smart-content-filter--style-flat .scf-card:hover {
  background: #eef1f6;
  border-color: transparent;
  box-shadow: none !important;
}

.smart-content-filter--border-none.smart-content-filter--style-flat .scf-card:hover {
  border-color: transparent;
}

.smart-content-filter--style-compact .scf-card {
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
}

.smart-content-filter--style-compact .scf-card:hover {
  box-shadow: var(--scf-card-shadow-hover);
}

.smart-content-filter--hover-shadow-none.smart-content-filter--style-compact .scf-card:hover {
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06) !important;
}

.smart-content-filter--style-compact .scf-card__body {
  padding: var(--scf-card-padding, 0.7rem 0.85rem);
}

.smart-content-filter--style-compact .scf-card__title {
  font-size: 0.95rem;
}

.smart-content-filter--style-compact .scf-card__intro {
  font-size: 0.86rem;
  margin-bottom: 0.65rem;
  line-height: 1.45;
}

.smart-content-filter--style-compact .scf-card__meta {
  font-size: 0.78rem;
}

/* --- Equal card height --- */

.smart-content-filter--equal-height .scf-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.smart-content-filter--equal-height .scf-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.smart-content-filter--equal-height .scf-card__readmore {
  margin-top: auto;
}

/* --- Image + hover zoom --- */

.scf-card__image {
  display: block;
  position: relative;
  aspect-ratio: var(--scf-image-ratio);
  overflow: hidden;
  background: #e8edf4;
}

.scf-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.smart-content-filter--hover-zoom .scf-card:hover .scf-card__image img,
.smart-content-filter--hover-zoom .scf-card__image:hover img {
  transform: scale(1.08);
}

.smart-content-filter--hover-brighten .scf-card:hover .scf-card__image img,
.smart-content-filter--hover-brighten .scf-card__image:hover img {
  transform: scale(1.05);
  filter: brightness(1.12) saturate(1.08);
}

.smart-content-filter--hover-grayscale .scf-card__image img {
  filter: grayscale(1);
}

.smart-content-filter--hover-grayscale .scf-card:hover .scf-card__image img,
.smart-content-filter--hover-grayscale .scf-card__image:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}

.smart-content-filter--hover-none .scf-card__image img {
  transition: none;
}

.smart-content-filter--hover-none .scf-card__image-shade {
  transition: none;
}

.smart-content-filter--hover-none .scf-card:hover .scf-card__image-shade {
  opacity: 1;
}

.smart-content-filter--hover-none .scf-card:hover .scf-card__image img,
.smart-content-filter--hover-none .scf-card__image:hover img {
  transform: none;
  filter: none;
}

/* --- Title overlay on image --- */

.scf-card__image--overlay {
  color: #ffffff;
  text-decoration: none;
}

.scf-card__image-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 35%, rgba(15, 23, 42, 0.55) 65%, rgba(15, 23, 42, 0.92) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scf-card:hover .scf-card__image-shade {
  opacity: 0.95;
}

.scf-card__image-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.9rem 0.85rem;
}

.scf-card__meta--overlay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  line-height: 1.2;
}

.scf-card__meta--overlay .scf-card__category {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  padding: 0.18rem 0.5rem;
  text-transform: uppercase;
}

.scf-card__meta--overlay time,
.scf-card__meta--overlay .scf-card__author,
.scf-card__meta--overlay .scf-card__hits,
.scf-card__meta--overlay .scf-card__reading-time {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.76rem;
}

.scf-card__meta--overlay .scf-card__badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.scf-card__title--overlay {
  margin: 0;
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1.2;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.scf-card--lead .scf-card__title--overlay {
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.15;
}

.scf-card__category {
  font-weight: 600;
  color: var(--scf-accent);
}

.scf-card--overlay .scf-card__body .scf-card__title {
  display: none;
}

.smart-content-filter--title-overlay .scf-card--overlay .scf-card__image {
  aspect-ratio: 4 / 3;
}

.smart-content-filter--title-overlay:not(.smart-content-filter--card-padding-custom) .scf-card--overlay .scf-card__body {
  padding-top: 0.85rem;
}

.smart-content-filter--card-padding-custom .scf-card__body {
  padding: var(--scf-card-padding);
}

.smart-content-filter--card-padding-custom .scf-grid--list .scf-card__body {
  padding: var(--scf-card-padding);
}

/* --- Layout preset: News Portal --- */

@media (min-width: 992px) {
  .smart-content-filter--preset-news-portal .scf-card--lead {
    grid-column: 1 / -1;
  }

  .smart-content-filter--preset-news-portal.smart-content-filter--equal-height .scf-card--lead:not(.scf-card--overlay) {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .smart-content-filter--preset-news-portal .scf-card--lead:not(.scf-card--overlay) {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .smart-content-filter--preset-news-portal .scf-card--lead:not(.scf-card--overlay) .scf-card__image {
    aspect-ratio: auto;
    min-height: 100%;
  }

  .smart-content-filter--preset-news-portal .scf-card--lead:not(.scf-card--overlay) .scf-card__title {
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.2;
  }

  .smart-content-filter--preset-news-portal .scf-card--lead:not(.scf-card--overlay) .scf-card__intro {
    font-size: 1.02rem;
    line-height: 1.55;
  }

  .smart-content-filter--preset-news-portal .scf-card--lead.scf-card--overlay .scf-card__image {
    aspect-ratio: 21 / 9;
    min-height: 280px;
  }

  .smart-content-filter--preset-news-portal .scf-card--lead.scf-card--overlay .scf-card__title--overlay {
    font-size: clamp(1.5rem, 2.8vw, 2.35rem);
  }
}

/* --- Layout preset: Magazine --- */

@media (min-width: 992px) {
  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card--lead {
    grid-column: span 4;
    grid-row: span 2;
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card:not(.scf-card--lead) {
    grid-column: span 2;
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card--lead:not(.scf-card--overlay) .scf-card__title {
    font-size: clamp(1.3rem, 2vw, 1.85rem);
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card--lead.scf-card--overlay {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card--lead.scf-card--overlay .scf-card__image {
    flex: 1 1 auto;
    aspect-ratio: auto;
    min-height: 320px;
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card--lead.scf-card--overlay .scf-card__title--overlay {
    font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card:not(.scf-card--lead).scf-card--overlay .scf-card__image {
    aspect-ratio: 3 / 4;
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card:not(.scf-card--lead).scf-card--overlay .scf-card__title--overlay {
    font-size: 1rem;
  }
}

@media (min-width: 640px) and (max-width: 991px) {
  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) .scf-card--lead {
    grid-column: 1 / -1;
  }
}

.scf-card__body {
  padding: var(--scf-card-padding, 1.1rem);
}

.scf-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  color: var(--scf-muted);
  font-size: 0.86rem;
}

.scf-card__badge {
  border-radius: 999px;
  background: color-mix(in srgb, var(--scf-accent) 14%, #ffffff);
  color: var(--scf-accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.55rem;
}

.scf-card__title {
  margin: 0 0 0.65rem;
  color: var(--scf-text);
  font-size: 1.15rem;
  line-height: 1.3;
}

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

.scf-card__title a:hover,
.scf-card__title a:focus-visible {
  color: var(--scf-accent);
}

.scf-card__title.scf-card__title--overlay,
.scf-card__title.scf-card__title--overlay span {
  color: #ffffff;
}

.scf-card__title.scf-card__title--overlay a {
  color: #ffffff;
}

.scf-card__title.scf-card__title--overlay a:hover,
.scf-card__title.scf-card__title--overlay a:focus-visible {
  color: rgba(255, 255, 255, 0.88);
}

.scf-card__image--overlay .scf-card__meta--overlay {
  color: rgba(255, 255, 255, 0.92);
}

.scf-card__intro {
  margin: 0 0 1rem;
  color: var(--scf-muted);
  line-height: 1.5;
}

.scf-card__intro--html > *:first-child {
  margin-top: 0;
}

.scf-card__intro--html > *:last-child {
  margin-bottom: 0;
}

.scf-card__intro--html p,
.scf-card__intro--html ul,
.scf-card__intro--html ol {
  margin: 0 0 0.55rem;
}

.scf-card__intro--html a {
  color: var(--scf-accent, #2563eb);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.scf-card__fields {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
}

.scf-card__field {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--scf-border) 80%, transparent);
  padding-top: 0.35rem;
}

.scf-card__field dt {
  color: var(--scf-muted);
  font-size: 0.86rem;
}

.scf-card__field dd {
  margin: 0;
  color: var(--scf-text);
  font-weight: 700;
  text-align: right;
}

.scf-card__readmore {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  color: var(--scf-accent);
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.scf-card__readmore:hover,
.scf-card__readmore:focus-visible {
  text-decoration: none;
  filter: brightness(0.92);
}

.smart-content-filter--button-filled .scf-card__readmore {
  padding: 0.55rem 1.15rem;
  border-radius: var(--scf-ui-radius-pill);
  background: var(--scf-accent);
  color: #ffffff;
  border: 1px solid var(--scf-accent);
}

.smart-content-filter--button-outline .scf-card__readmore {
  padding: 0.55rem 1.15rem;
  border-radius: var(--scf-ui-radius-pill);
  border: 1px solid var(--scf-accent);
  color: var(--scf-accent);
  background: transparent;
}

.smart-content-filter--button-text .scf-card__readmore {
  padding: 0;
  border: 0;
  background: transparent;
}

.smart-content-filter--button-text .scf-card__readmore:hover,
.smart-content-filter--button-text .scf-card__readmore:focus-visible {
  text-decoration: underline;
  filter: none;
}

.scf-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.scf-load-more {
  border: 1px solid var(--scf-accent);
  border-radius: var(--scf-ui-radius-pill);
  background: var(--scf-accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
}

.smart-content-filter--button-outline .scf-load-more {
  background: transparent;
  color: var(--scf-accent);
}

.smart-content-filter--button-text .scf-load-more {
  border-color: transparent;
  background: transparent;
  color: var(--scf-accent);
  padding-inline: 0;
}

.scf-load-more:hover,
.scf-load-more:focus-visible {
  filter: brightness(0.95);
}

.smart-content-filter.is-loading .scf-load-more,
.smart-content-filter.is-loading .scf-tab,
.smart-content-filter.is-loading .scf-tag-pill {
  cursor: wait;
  opacity: 0.7;
}

.scf-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--scf-muted);
}

@media (min-width: 640px) {
  .scf-grid {
    grid-template-columns: repeat(var(--scf-cols-tablet), minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .scf-grid {
    grid-template-columns: repeat(var(--scf-cols-desktop), minmax(0, 1fr));
  }

  .smart-content-filter--preset-magazine .scf-grid:not(.scf-grid--list) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* --- List view (toggle or preset) --- */

.smart-content-filter--preset-list .scf-grid,
.scf-grid--list {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start;
}

.smart-content-filter--preset-list .scf-card,
.scf-grid--list .scf-card,
.scf-grid--list .scf-card--lead,
.scf-grid--list .scf-card--overlay {
  display: grid !important;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  height: auto !important;
  align-items: start;
  gap: 1rem;
}

.smart-content-filter--preset-list .scf-card__image,
.scf-grid--list .scf-card__image,
.scf-grid--list .scf-card--lead .scf-card__image,
.scf-grid--list .scf-card--overlay .scf-card__image {
  aspect-ratio: 4 / 3;
  min-width: 0;
  width: 100%;
  max-width: 200px;
  min-height: 0;
  max-height: 150px;
  height: auto;
  align-self: start;
  overflow: hidden;
}

.scf-grid--list .scf-card__image img {
  height: 100%;
  width: 100%;
  min-height: 0;
  object-fit: cover;
}

.scf-grid--list .scf-card__image-shade,
.scf-grid--list .scf-card__image-content {
  display: none !important;
}

.scf-grid--list .scf-card__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
  padding: var(--scf-card-padding, 0.25rem 0.5rem 0.25rem 0);
}

.scf-grid--list .scf-card__meta {
  margin-bottom: 0;
}

.scf-grid--list .scf-card__title {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.scf-grid--list .scf-card__intro {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-bottom: 0;
}

.scf-grid--list .scf-card__readmore {
  margin-top: 0.15rem;
}

.scf-grid--list .scf-card__share {
  margin-top: 0.25rem;
}

.smart-content-filter--equal-height .scf-grid--list .scf-card {
  display: grid !important;
  flex-direction: unset;
  height: auto !important;
}

.smart-content-filter--preset-magazine .scf-grid--list .scf-card--lead,
.smart-content-filter--preset-magazine .scf-grid--list .scf-card,
.smart-content-filter--preset-news-portal .scf-grid--list .scf-card--lead,
.smart-content-filter--preset-news-portal .scf-grid--list .scf-card {
  grid-column: auto !important;
  grid-row: auto !important;
}

.smart-content-filter--preset-masonry .scf-grid {
  columns: var(--scf-cols-desktop);
  column-gap: var(--scf-gap);
}

.smart-content-filter--preset-masonry .scf-card {
  break-inside: avoid;
  margin-bottom: var(--scf-gap);
  display: inline-block;
  width: 100%;
}

.smart-content-filter--preset-carousel .scf-grid {
  display: flex;
  gap: var(--scf-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}

.smart-content-filter--preset-carousel .scf-card {
  flex: 0 0 clamp(240px, 72vw, 320px);
  scroll-snap-align: start;
}

.smart-content-filter--category-dropdown .scf-category-select {
  margin-bottom: 1rem;
}

.smart-content-filter--theme-dark {
  --scf-surface: #111827;
  --scf-text: #f8fafc;
  --scf-muted: #94a3b8;
  --scf-border: #334155;
}

.scf-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.scf-subtab {
  border: 1px solid var(--scf-border);
  border-radius: var(--scf-ui-radius-pill);
  background: var(--scf-surface);
  color: var(--scf-text);
  cursor: pointer;
  font: inherit;
  padding: 0.45rem 0.85rem;
}

.scf-subtab.is-active,
.scf-subtab:hover,
.scf-subtab:focus-visible {
  border-color: var(--scf-accent);
  color: var(--scf-accent);
}

.scf-view-toggle--icons {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 0;
}

.scf-view-toggle--icons .scf-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--scf-border);
  border-radius: var(--scf-ui-radius);
  background: var(--scf-surface);
  color: var(--scf-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.scf-view-toggle--icons .scf-view-btn:hover,
.scf-view-toggle--icons .scf-view-btn:focus-visible {
  border-color: var(--scf-accent);
  color: var(--scf-accent);
}

.scf-view-toggle--icons .scf-view-btn.is-active {
  background: var(--scf-accent);
  border-color: var(--scf-accent);
  color: #fff;
}

.scf-view-toggle--icons .scf-view-btn__icon {
  display: inline-flex;
  line-height: 0;
}

.scf-view-toggle--icons .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scf-view-btn.is-active {
  background: var(--scf-accent);
  border-color: var(--scf-accent);
  color: #fff;
}

.scf-section-heading {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0.25rem;
  color: var(--scf-text);
  font-size: 1.2rem;
}

.smart-content-filter:not(.smart-content-filter--hover-lift-none).smart-content-filter--style-default .scf-card:hover,
.smart-content-filter:not(.smart-content-filter--hover-lift-none).smart-content-filter--style-outlined .scf-card:hover,
.smart-content-filter:not(.smart-content-filter--hover-lift-none).smart-content-filter--style-flat .scf-card:hover,
.smart-content-filter:not(.smart-content-filter--hover-lift-none).smart-content-filter--style-compact .scf-card:hover {
  transform: translateY(calc(var(--scf-hover-lift, 5px) * -1));
}

.smart-content-filter--hover-shadow-none .scf-card:hover {
  box-shadow: var(--scf-card-shadow) !important;
}

.smart-content-filter--card-hover-static .scf-card,
.smart-content-filter--card-hover-static .scf-card__image img,
.smart-content-filter--card-hover-static .scf-card__image-shade {
  transition: none;
}

.smart-content-filter--card-hover-static .scf-card:hover {
  transform: none !important;
}

.smart-content-filter--card-hover-static .scf-card:hover .scf-card__image-shade {
  opacity: 1;
}

.scf-card__title {
  font-size: var(--scf-title-size, 1.15rem);
  font-weight: var(--scf-title-weight, 700);
}

.scf-card__title:not(.scf-card__title--overlay) a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--scf-title-lines, unset);
  overflow: hidden;
}

.scf-card__meta {
  font-size: var(--scf-meta-size, 0.86rem);
}

.scf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.scf-card__tags li {
  border-radius: 999px;
  background: color-mix(in srgb, var(--scf-accent) 12%, #fff);
  color: var(--scf-accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
}

.scf-card__share {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.scf-card__share-label {
  color: var(--scf-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.scf-card__share-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.scf-card__share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--scf-border);
  border-radius: 999px;
  color: var(--scf-muted);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.scf-card__share-icon:hover,
.scf-card__share-icon:focus-visible {
  border-color: var(--scf-accent);
  color: var(--scf-accent);
  background: color-mix(in srgb, var(--scf-accent) 8%, #ffffff);
}

.smart-content-filter--sticky-toolbar {
  overflow: visible;
}

.smart-content-filter--sticky-toolbar .scf-sticky-controls {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0 0.65rem;
  background: color-mix(in srgb, var(--scf-surface) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--scf-border) 55%, transparent);
}

.smart-content-filter--sticky-toolbar .scf-sticky-controls .scf-toolbar-wrap,
.smart-content-filter--sticky-toolbar .scf-sticky-controls .scf-tabs,
.smart-content-filter--sticky-toolbar .scf-sticky-controls .scf-category-select,
.smart-content-filter--sticky-toolbar .scf-sticky-controls .scf-subtabs,
.smart-content-filter--sticky-toolbar .scf-sticky-controls .scf-count {
  margin-top: 0;
  margin-bottom: 0;
}

.smart-content-filter--sticky-toolbar .scf-sticky-footer {
  position: sticky;
  bottom: 0;
  z-index: 24;
  margin-top: 0.75rem;
  padding: 0.65rem 0 0.5rem;
  background: color-mix(in srgb, var(--scf-surface) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid color-mix(in srgb, var(--scf-border) 55%, transparent);
}

.smart-content-filter--sticky-toolbar .scf-sticky-footer .scf-actions {
  margin-top: 0;
}

.smart-content-filter--sticky-toolbar .scf-sticky-controls.is-fixed,
.smart-content-filter--sticky-toolbar .scf-sticky-footer.is-fixed {
  position: fixed;
  z-index: 1030;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
}

.smart-content-filter--sticky-toolbar .scf-sticky-controls.is-fixed {
  border-bottom: 1px solid color-mix(in srgb, var(--scf-border) 55%, transparent);
}

.smart-content-filter--sticky-toolbar .scf-sticky-footer.is-fixed {
  border-top: 1px solid color-mix(in srgb, var(--scf-border) 55%, transparent);
}

.scf-sticky-placeholder {
  display: block;
  width: 100%;
}

.smart-content-filter--transitions .scf-grid.is-swapping {
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

.smart-content-filter--transitions .scf-grid {
  transition: opacity 0.25s ease;
}

.scf-card--skeleton {
  pointer-events: none;
}

.scf-skeleton__image,
.scf-skeleton__line {
  animation: scf-shimmer 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, #e8edf4 25%, #f5f7fb 50%, #e8edf4 75%);
  background-size: 200% 100%;
}

.scf-skeleton__image {
  aspect-ratio: var(--scf-image-ratio);
}

.scf-skeleton__line {
  height: 0.85rem;
  margin: 0.85rem 1rem 0.45rem;
}

.scf-skeleton__line--short {
  width: 55%;
}

@keyframes scf-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.scf-retry {
  border: 0;
  background: none;
  color: var(--scf-accent);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.scf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.82);
}

.scf-lightbox.is-open {
  display: grid;
}

body.scf-lightbox-open {
  overflow: hidden;
}

.scf-lightbox__image {
  max-width: min(92vw, 960px);
  max-height: 70vh;
  border-radius: 12px;
}

.scf-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.scf-lightbox__link {
  margin-top: 1rem;
  color: #fff;
  font-weight: 700;
}

@media (max-width: 767px) {
  .smart-content-filter--preset-list .scf-card,
  .scf-grid--list .scf-card,
  .scf-grid--list .scf-card--lead,
  .scf-grid--list .scf-card--overlay {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.75rem;
  }

  .scf-grid--list .scf-card__image {
    max-width: none;
    max-height: none;
    aspect-ratio: var(--scf-image-ratio);
  }

  .scf-grid--list .scf-card__body {
    padding: var(--scf-card-padding, 0);
  }

  .smart-content-filter--card-padding-custom .scf-grid--list .scf-card__body {
    padding: var(--scf-card-padding);
  }
}
