.nns-articles-browser {
  --nns-articles-primary: var(--wp--preset--color--principale, #2b317a);
  --nns-articles-secondary: var(--wp--preset--color--secondario, #0d0626);
  --nns-articles-accent: var(--wp--preset--color--light-orange, #ff7e00);
  --nns-articles-text: var(--wp--preset--color--terziario, #3c3c3b);
  --nns-articles-bg: var(--wp--preset--color--white, #fff);
  --nns-articles-heading: var(--wp--preset--font-family--serenity, inherit);
  --nns-articles-body: var(--wp--preset--font-family--myriad-pro, inherit);
  width: 100%;
  margin: 24px auto 64px;
  color: var(--nns-articles-text);
  background: transparent;
  font-family: var(--nns-articles-body);
  line-height: 1.5;
}

.nns-featured-article {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1400px, calc(100% - 40px));
  margin: -140px auto 0 !important;
  padding: var(--wp--preset--spacing--60);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 10px;
  background: var(--wp--preset--color--white, #fff);
  box-shadow: var(--wp--preset--shadow--natural, 0 8px 28px rgba(13, 6, 38, .14));
  box-sizing: border-box;
}

.nns-featured-article__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--wp--preset--color--light-blue, #9dccee);
}

.nns-featured-article__image,
.nns-featured-article__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.nns-featured-article__content {
  display: flex;
  min-width: 0;
  padding: var(--wp--preset--spacing--60);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.nns-featured-article__label {
  color: var(--wp--preset--color--principale, #2b317a);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.nns-featured-article__title {
  margin: 0;
  color: var(--wp--preset--color--principale, #2b317a);
  font-weight: 500;
  line-height: 1.2;
}

.nns-featured-article__title a {
  color: inherit;
  text-decoration: none;
}

.nns-featured-article__excerpt {
  margin: 0;
  color: var(--wp--preset--color--terziario, #3c3c3b);
  line-height: 1.5;
}

.nns-featured-article__button {
  padding: 3px 10px;
  border: 1px solid var(--wp--preset--color--secondario, #0d0626);
  border-radius: 10px;
  color: var(--wp--preset--color--secondario, #0d0626);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.nns-featured-article__button:hover,
.nns-featured-article__button:focus {
  border-color: var(--wp--preset--color--light-blue, #9dccee);
  background: var(--wp--preset--color--light-blue, #9dccee);
  color: #fff;
}

.nns-articles-browser *,
.nns-articles-browser *::before,
.nns-articles-browser *::after {
  box-sizing: border-box;
}

.nns-articles-browser a {
  color: var(--nns-articles-primary);
  text-decoration: none;
}

.nns-articles-browser a:hover {
  color: var(--nns-articles-accent);
}

.nns-articles-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.nns-articles-filter-sidebar {
  position: static;
  width: 100%;
  border: 1px solid rgba(60, 60, 59, .18);
  border-radius: 10px;
  background: #fff;
}

.nns-articles-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0;
  padding: 20px 24px;
  border-radius: 10px;
  background: #fff;
}

.nns-articles-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--nns-articles-secondary);
  font-size: 1.05rem;
  text-transform: uppercase;
}

.nns-articles-filter-close {
  display: none;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.nns-articles-category-filter {
  display: flex;
  flex: 1 1 680px;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.nns-articles-category-filter legend {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.nns-articles-category-filter label {
  position: relative;
  flex: 0 0 180px;
  margin: 0;
}

.nns-articles-category-filter input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nns-articles-category-filter span {
  display: grid;
  min-height: 40px;
  padding: 7px 10px;
  place-items: center;
  border: 1px solid var(--nns-articles-secondary);
  border-radius: 10px;
  color: var(--nns-articles-secondary);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
}

.nns-articles-category-filter input:checked + span {
  background: var(--nns-articles-secondary);
  color: #fff;
}

.nns-articles-category-filter input:focus-visible + span {
  outline: 3px solid var(--nns-articles-accent);
  outline-offset: 2px;
}

.nns-articles-clear-filters {
  flex: 0 0 auto;
  min-height: 36px;
  border: 0;
  background: none;
  color: var(--nns-articles-text);
  font-family: var(--nns-articles-body);
  font-size: .76rem;
  text-decoration: underline;
  text-transform: uppercase;
  cursor: pointer;
}

.nns-articles-filter-toggle {
  display: none;
  margin-bottom: 16px;
  padding: 3px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--nns-articles-secondary);
  color: #fff;
  font-family: var(--nns-articles-body);
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.nns-articles-results {
  min-width: 0;
}

.nns-articles-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  color: var(--nns-articles-secondary);
}

.nns-articles-results-toolbar > strong {
  font-size: 1.15rem;
}

.nns-articles-active-filter {
  display: flex;
  min-height: 34px;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.nns-articles-filter-chip {
  padding: 7px 10px;
  border: 1px solid rgba(60, 60, 59, .18);
  border-radius: 10px;
  background: #fff;
  color: var(--nns-articles-text);
  font-family: var(--nns-articles-body);
  font-size: .72rem;
  cursor: pointer;
}

.nns-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 16px;
}

.nns-articles-empty {
  padding: 40px 20px;
  color: var(--nns-articles-text);
  text-align: center;
  opacity: .7;
}

.nns-articles-search-results[aria-busy="true"] {
  opacity: .5;
  pointer-events: none;
}

.nns-articles-browser button:focus-visible,
.nns-articles-browser a:focus-visible {
  outline: 3px solid var(--nns-articles-accent);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .nns-articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The featured article stacks into the mobile layout below 1113px. */
@media (max-width: 1113px) {
  .nns-featured-article {
    width: calc(100% - 32px);
    margin-top: -80px !important;
    padding: var(--wp--preset--spacing--30);
    grid-template-columns: 1fr;
  }

  .nns-featured-article__media,
  .nns-featured-article__image,
  .nns-featured-article__placeholder {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .nns-featured-article__content {
    padding: var(--wp--preset--spacing--40) 0 0;
  }
}

@media (max-width: 900px) {
  .nns-articles-filter-toggle {
    display: none;
  }

  .nns-articles-filter-sidebar {
    position: static;
    width: 100%;
    overflow: visible;
    border: 1px solid rgba(60, 60, 59, .18);
    border-radius: 10px;
    box-shadow: none;
    transform: none;
  }

  .nns-articles-filter-close {
    display: none;
  }
}

@media (max-width: 680px) {
  .nns-articles-grid {
    grid-template-columns: 1fr;
  }

  .nns-articles-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .nns-articles-category-filter,
  .nns-articles-category-filter label {
    flex-basis: auto;
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  .nns-article-card,
  .nns-articles-filter-sidebar {
    transition: none;
  }
}
