:root {
  --fm-red: #d71d1d;
  --fm-red-dark: #7e0b0b;
  --fm-white: #f6f6f3;
  --fm-muted: #dedede;
  --fm-ink: #050708;
  --fm-ratio-desktop: 970 / 250;
  --fm-ratio-mid: 728 / 90;
  --fm-ratio-mobile: 320 / 100;
  --fm-break-mid: 820px;
  --fm-break-mobile: 460px;
  --fm-font: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5f5f2;
}

body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  font-family: var(--fm-font);
  color: var(--fm-white);
  letter-spacing: 0;
}

.page--single {
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.single-view {
  width: 100%;
  max-width: 970px;
  margin: 0 auto;
}

.page--preview {
  background: #f6f6f2;
  color: #161616;
}

.preview {
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: 34px;
}

.preview__block {
  margin: 0 0 42px;
}

.preview__block h2 {
  margin: 0 0 14px;
  color: #171717;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 800;
}

.preview__block h2 span {
  font-weight: 500;
}

.preview__stage {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.preview__block--fluid {
  max-width: 970px;
}

.fm-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fm-ad-host {
  container: fm-ad-host / inline-size;
  width: 100%;
  max-width: 970px;
}

.fm-ad-host--fixed {
  width: var(--demo-width);
  max-width: none;
}

.fm-ad {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  aspect-ratio: var(--fm-ratio-desktop);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.72), rgba(4, 6, 7, 0.42) 52%, rgba(4, 5, 6, 0.05)),
    url("../img/fegyvermarket-banner-bg.png") center / cover no-repeat,
    #090b0c;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.fm-ad::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.28), rgba(3, 5, 6, 0.68) 36%, rgba(3, 5, 6, 0.2) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 8px);
  pointer-events: none;
}

.fm-ad__link {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: block;
}

.fm-ad__link:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: -5px;
}

.fm-ad__mark {
  position: absolute;
  top: 24px;
  left: 26px;
  z-index: 4;
  width: 185px;
  height: 202px;
}

.fm-ad__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.58));
}

.fm-ad__content {
  position: absolute;
  inset: 31px 265px 24px 230px;
  z-index: 5;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.fm-ad__brand {
  display: flex;
  max-width: 100%;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

.fm-ad__logo-text {
  display: block;
  width: min(395px, 100%);
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.58));
}

.fm-ad__brand span {
  margin-bottom: 10px;
  color: var(--fm-red);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.fm-ad__categories {
  max-width: 100%;
  margin: 15px 0 0;
  color: var(--fm-white);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.22;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
  white-space: normal;
}

.fm-ad__categories::first-letter {
  color: inherit;
}

.fm-ad__benefits {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 20px 0 0;
}

.fm-ad__benefit {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--fm-white);
  font-size: 9.8px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72);
}

.fm-ad__benefit svg {
  width: 25px;
  height: 25px;
  color: var(--fm-white);
  filter: drop-shadow(0 0 6px rgba(209, 18, 18, 0.38));
}

.fm-ad__benefit svg path:last-child,
.fm-ad__benefit svg circle {
  color: var(--fm-red);
}

.fm-ad__sep {
  display: block;
  width: 1px;
  height: 35px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.78), transparent);
}

.fm-ad__cta {
  position: absolute;
  right: 20px;
  bottom: 0;
  z-index: 6;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 0 18px 0 26px;
  border: 1px solid rgba(255, 90, 90, 0.8);
  border-radius: 0 0 12px 0;
  background: linear-gradient(180deg, #df2424, #a50f0f);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
  transform: skewX(-7deg);
  pointer-events: none;
}

.fm-ad__cta > * {
  transform: skewX(7deg);
}

.fm-ad__cta svg {
  width: 24px;
  height: 24px;
  transition: transform 180ms ease;
}

.fm-ad:hover .fm-ad__cta svg,
.fm-ad__link:focus-visible ~ .fm-ad__content .fm-ad__cta svg {
  transform: skewX(7deg) translateX(2px);
}

@container fm-ad-host (max-width: 820px) {
  .fm-ad {
    aspect-ratio: var(--fm-ratio-mid);
  }

  .fm-ad__mark {
    top: 7px;
    left: 25px;
    width: 70px;
    height: 76px;
  }

  .fm-ad__content {
    inset: 0 248px 0 128px;
    align-items: flex-start;
    justify-content: center;
  }

  .fm-ad__logo-text {
    width: 208px;
  }

  .fm-ad__brand span {
    margin-bottom: 4px;
    font-size: 17px;
  }

  .fm-ad__categories {
    margin-top: 5px;
    font-size: 9.2px;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
  }

  .fm-ad__benefits {
    display: none;
  }

  .fm-ad__benefit {
    gap: 2px;
    font-size: 6.4px;
    line-height: 1.05;
    text-align: left;
  }

  .fm-ad__benefit svg {
    width: 11px;
    height: 11px;
  }

  .fm-ad__sep {
    height: 18px;
  }

  .fm-ad__cta {
    top: 50%;
    right: 29px;
    bottom: auto;
    min-height: 39px;
    gap: 12px;
    padding: 0 13px 0 20px;
    border-radius: 0 0 10px 0;
    font-size: 17px;
    transform: translateY(-50%) skewX(-7deg);
  }
}

@container fm-ad-host (max-width: 460px) {
  .fm-ad {
    aspect-ratio: var(--fm-ratio-mobile);
    background-position: 58% center;
  }

  .fm-ad__mark {
    top: 8px;
    left: 10px;
    width: 74px;
    height: 82px;
  }

  .fm-ad__content {
    inset: 0 8px 0 92px;
    justify-content: center;
  }

  .fm-ad__logo-text {
    width: 166px;
  }

  .fm-ad__brand {
    justify-content: flex-start;
    gap: 2px;
  }

  .fm-ad__brand span {
    margin-bottom: 3px;
    font-size: 16px;
  }

  .fm-ad__categories {
    width: 216px;
    margin-top: 8px;
    font-size: 10.2px;
    line-height: 1.12;
    text-align: left;
    white-space: normal;
  }

  .fm-ad__benefits {
    display: none;
  }

  .fm-ad__cta {
    display: none;
  }

  .fm-ad__cta svg {
    width: 15px;
    height: 15px;
  }
}

.fm-ad-host[data-fm-size="mid"] .fm-ad {
  aspect-ratio: var(--fm-ratio-mid);
}

.fm-ad-host[data-fm-size="mobile"] .fm-ad {
  aspect-ratio: var(--fm-ratio-mobile);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 720px) {
  .preview {
    padding: 22px 16px 34px;
  }

  .preview__block {
    margin-bottom: 34px;
  }

  .preview__block h2 {
    font-size: 23px;
  }
}
