.nrw-section {
  --nrw-section-bg: #f4f5f8;
  --nrw-text-color: #24262d;
  --nrw-muted-color: #5c616d;
  --nrw-accent-color: #f3254f;
  --nrw-accent-soft: rgba(243, 37, 79, 0.14);
  --nrw-surface-color: #ffffff;
  --nrw-border-color: rgba(17, 18, 22, 0.08);
  --nrw-radius: 18px;
  --nrw-gap: 32px;
  --nrw-card-gap: 28px;
  --nrw-container-max: 1170px;
  --nrw-focus-ring: 0 0 0 3px rgba(243, 37, 79, 0.22);
  background: var(--nrw-section-bg);
  color: var(--nrw-text-color);
  padding: 88px 0 96px;
}

.nrw-section *,
.nrw-section *::before,
.nrw-section *::after {
  box-sizing: border-box;
}

.nrw-section__inner {
  width: min(100% - 48px, var(--nrw-container-max));
  margin: 0 auto;
}

.nrw-section__heading {
  display: grid;
  gap: 18px;
}

.nrw-section__title {
  margin: 0;
  font: inherit;
  font-size: clamp(2.05rem, 1.86rem + 0.94vw, 3.2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--nrw-text-color);
}

.nrw-section__line {
  display: block;
  width: 101px;
  height: 5px;
  border-radius: 999px;
  background: var(--nrw-accent-color);
}

.nrw-section__description {
  max-width: 1120px;
  margin: 0;
  font: inherit;
  font-size: clamp(1.02rem, 0.93rem + 0.44vw, 1.42rem);
  line-height: 1.28;
  color: var(--nrw-text-color);
}

.nrw-section--portfolio {
  padding: 36px 0 104px;
}

.nrw-section--portfolio .nrw-filters {
  margin-top: 0;
  margin-bottom: 28px;
}

.nrw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  margin-bottom: 40px;
  padding-bottom: 0;
  overflow: visible;
}

.nrw-filter {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(214, 220, 233, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: #5a5c63;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nrw-filter:hover {
  border-color: rgba(243, 37, 79, 0.2);
  color: var(--nrw-text-color);
}

.nrw-filter.nrw-is-active {
  color: var(--nrw-accent-color);
  border-color: rgba(243, 37, 79, 0.16);
  background: rgba(255, 255, 255, 0.99);
}

.nrw-filter:focus-visible,
.nrw-arrow:focus-visible,
.nrw-card__link:focus-visible {
  outline: 0;
  box-shadow: var(--nrw-focus-ring);
}

.nrw-stage {
  position: relative;
}

.nrw-track {
  display: flex;
  gap: var(--nrw-card-gap);
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nrw-track--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--nrw-card-gap);
  overflow: visible;
  scroll-snap-type: none;
}

.nrw-track::-webkit-scrollbar {
  display: none;
}

.nrw-card {
  flex: 0 0 calc((100% - (var(--nrw-card-gap) * 2)) / 3);
  min-width: 0;
  scroll-snap-align: start;
}

.nrw-track--grid .nrw-card {
  flex: initial;
}

.nrw-card[hidden] {
  display: none !important;
}

.nrw-card__link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: var(--nrw-radius);
  background: var(--nrw-surface-color);
  border: 1px solid rgba(214, 220, 233, 0.92);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(16, 18, 27, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.nrw-card__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(16, 18, 27, 0.09);
}

.nrw-card__media {
  position: relative;
  aspect-ratio: 1.52 / 1;
  background: #e5e7ee;
  overflow: hidden;
}

.nrw-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nrw-card__placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(243, 37, 79, 0.09), rgba(36, 38, 45, 0.06)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55) 18px, rgba(226, 229, 236, 0.7) 18px, rgba(226, 229, 236, 0.7) 36px);
}

.nrw-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 20px;
  min-height: 218px;
  padding: 24px 20px 28px;
}

.nrw-card__title {
  margin: 0;
  font: inherit;
  font-size: clamp(1.32rem, 1.16rem + 0.32vw, 1.75rem);
  font-weight: 800;
  line-height: 1.14;
  text-align: center;
  text-wrap: balance;
}

.nrw-card__excerpt {
  margin: 0;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--nrw-muted-color);
}

.nrw-arrow {
  --nrw-arrow-shift: 0px;
  position: absolute;
  top: 236px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid #e1e5ed;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #232328;
  box-shadow: 0 10px 24px rgba(93, 106, 140, 0.08);
  cursor: pointer;
  transform: translate(var(--nrw-arrow-shift), -50%);
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.nrw-arrow:hover:not(:disabled) {
  transform: translate(var(--nrw-arrow-shift), calc(-50% - 1px));
  box-shadow: var(--nrw-focus-ring), 0 14px 30px rgba(93, 106, 140, 0.14);
}

.nrw-arrow:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.nrw-arrow--prev {
  left: 0;
  --nrw-arrow-shift: -26px;
}

.nrw-arrow--next {
  right: 0;
  --nrw-arrow-shift: 26px;
}

.nrw-arrow__icon {
  display: inline-flex;
  width: 24px;
  height: 14px;
}

.nrw-arrow__icon svg {
  width: 100%;
  height: 100%;
}

.nrw-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nrw-empty {
  width: 100%;
  padding: 48px 32px;
  border: 1px dashed rgba(17, 18, 22, 0.14);
  border-radius: var(--nrw-radius);
  background: rgba(255, 255, 255, 0.8);
}

.nrw-empty__text {
  margin: 0;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--nrw-muted-color);
}

@media (max-width: 1199px) {
  .nrw-arrow--prev {
    --nrw-arrow-shift: -4px;
  }

  .nrw-arrow--next {
    --nrw-arrow-shift: 4px;
  }
}

@media (max-width: 1024px) {
  .nrw-section {
    padding: 82px 0 96px;
  }

  .nrw-section--portfolio {
    padding: 28px 0 88px;
  }

  .nrw-filters {
    gap: 10px;
    margin-top: 34px;
    margin-bottom: 34px;
  }

  .nrw-section--portfolio .nrw-filters {
    margin-top: 0;
    margin-bottom: 24px;
  }

  .nrw-card {
    flex-basis: calc((100% - var(--nrw-card-gap)) / 2);
  }

  .nrw-track--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nrw-card__body {
    min-height: 200px;
    padding: 22px 18px 24px;
  }

  .nrw-arrow {
    top: 220px;
    width: 48px;
    height: 48px;
  }

  .nrw-arrow__icon {
    width: 22px;
    height: 13px;
  }
}

@media (max-width: 767px) {
  .nrw-section {
    padding: 68px 0 84px;
  }

  .nrw-section--portfolio {
    padding: 20px 0 72px;
  }

  .nrw-section__inner {
    width: min(100% - 32px, var(--nrw-container-max));
  }

  .nrw-filters {
    flex-wrap: nowrap;
    margin-top: 28px;
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nrw-filters::-webkit-scrollbar {
    display: none;
  }

  .nrw-filter {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  .nrw-track {
    gap: 24px;
  }

  .nrw-track--grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .nrw-card {
    flex-basis: 100%;
  }

  .nrw-card__body {
    min-height: 0;
    gap: 14px;
    padding: 20px 16px 22px;
  }

  .nrw-arrow {
    top: 160px;
    width: 42px;
    height: 42px;
  }

  .nrw-arrow--prev {
    left: 8px;
    --nrw-arrow-shift: 0px;
  }

  .nrw-arrow--next {
    right: 8px;
    --nrw-arrow-shift: 0px;
  }

  .nrw-arrow__icon {
    width: 20px;
    height: 12px;
  }
}

@media (max-width: 479px) {
  .nrw-section__description {
    font-size: 1.15rem;
  }

  .nrw-arrow {
    top: 144px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nrw-track {
    scroll-behavior: auto;
  }

  .nrw-filter,
  .nrw-arrow,
  .nrw-card__link {
    transition: none;
  }
}
