/*---------------------------------------
    Animation banner (5 фактов)
    портировано с cycloferon.ru
-----------------------------------------*/

:root {
  --color-magenta: #d10a57;
  --ico-size: 1.6em;
  --containerHeight: 17em;
  --movingDivHeight: 17em;
  --durAnim: 4s;
}

.anim-container {
  position: relative;
}

.animationBanner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  position: relative;
  height: var(--containerHeight);
  color: #263949;
  text-align: left;
}

.animationBanner .column {
  flex: 1;
  position: relative;
}

.animationBanner .arrowRed {
  min-width: 19em;
}

.animationBanner .arrowRed img {
  position: absolute;
  z-index: 10;
  height: var(--movingDivHeight);
  aspect-ratio: 550 / 340;
  display: block;
  width: auto;
  left: -4em;
}

.animationBanner .right-column {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  padding: 15px;
}

.animationBanner .cntBenefitDesc {
  display: grid;
  height: var(--containerHeight);
  grid-gap: 0;
  padding-left: 0;
  z-index: 30;
  position: relative;
}

.arrowText a {
  cursor: pointer;
  transition: background ease .6s;
  min-height: var(--ico-size);
  font-weight: bold;
  font-size: 1.3em;
  color: #263949;
  padding-left: calc(var(--ico-size) + .6em);
  background: url(../images/anim/ico-index-01.svg) left 50% no-repeat;
  background-size: var(--ico-size) var(--ico-size);
  display: grid;
  align-items: center;
}

.arrowText a[name="b01"] { background: url(../images/anim/ico-index-01.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); margin-left: 0; }
.arrowText a[name="b02"] { background: url(../images/anim/ico-index-02.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); margin-left: 2em; }
.arrowText a[name="b03"] { background: url(../images/anim/ico-index-03.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); margin-left: 4em; }
.arrowText a[name="b04"] { background: url(../images/anim/ico-index-04.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); margin-left: 4em; }
.arrowText a[name="b05"] { background: url(../images/anim/ico-index-05.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); margin-left: 2em; }
.arrowText a[name="b06"] { background: url(../images/anim/ico-index-06.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); margin-left: 0; }

.arrowText a[name="b01"]:hover { background: url(../images/anim/ico-index-01a.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); }
.arrowText a[name="b02"]:hover { transition: all ease 1s; background: url(../images/anim/ico-index-02a.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); }
.arrowText a[name="b03"]:hover { transition: all ease 1s; background: url(../images/anim/ico-index-03a.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); }
.arrowText a[name="b04"]:hover { transition: all ease 1s; background: url(../images/anim/ico-index-04a.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); }
.arrowText a[name="b05"]:hover { transition: all ease 1s; background: url(../images/anim/ico-index-05a.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); }
.arrowText a[name="b06"]:hover { transition: all ease 1s; background: url(../images/anim/ico-index-06a.svg) left 50% no-repeat; background-size: var(--ico-size) var(--ico-size); }

.arrowText a:hover p {
  color: var(--color-magenta);
}

.arrowText a p {
  line-height: 1.1;
  margin: 0;
  font-size: .92em;
  color: inherit;
}

.cntBenefitDesc div {
  display: none;
  position: absolute;
  left: 150%;
  font-weight: normal;
  font-size: .7em;
  width: 15em;
  z-index: 48;
  transition: all ease 1s;
  border: .2em solid var(--color-magenta);
  background: white;
  padding: 1em;
  border-radius: 1em;
}

.cntBenefitDesc a > div {
  display: block;
  opacity: 0;
  left: 150%;
  padding-top: 0;
}

.cntBenefitDesc a:hover > div {
  transition: all ease 1s;
  opacity: 1;
}

.cntBenefitDesc a[name="b01"] > div { top: 0; }
.cntBenefitDesc a[name="b02"] > div { top: 3em; }
.cntBenefitDesc a[name="b03"] > div { top: 6em; }
.cntBenefitDesc a[name="b04"] > div { bottom: 0; }
.cntBenefitDesc a[name="b05"] > div { bottom: 0; }
.cntBenefitDesc a[name="b06"] > div { bottom: 0; }

.cntBenefitDesc a[name="b01"]:hover > div { top: 0; left: 90%; }
.cntBenefitDesc a[name="b02"]:hover > div { top: 3em; left: 90%; }
.cntBenefitDesc a[name="b03"]:hover > div { top: 6em; left: 110%; }
.cntBenefitDesc a[name="b04"]:hover > div { bottom: 0; left: 105%; }
.cntBenefitDesc a[name="b05"]:hover > div { bottom: 0; left: 100%; }
.cntBenefitDesc a[name="b06"]:hover > div { bottom: 0; left: 90%; }

.cntBenefitDesc a > div:before {
  width: 1em;
  height: 1em;
  background: url(../images/anim/ugol.svg);
  position: relative;
  display: block;
  content: " ";
  left: -2em;
  top: 1em;
}

.cntBenefitDesc a[name="b04"] > div:before { top: 1.5em; }
.cntBenefitDesc a[name="b05"] > div:before { top: 3em; }
.cntBenefitDesc a[name="b06"] > div:before { top: 6em; }

.animationBanner .moving-div {
  position: absolute;
  width: auto;
  height: var(--movingDivHeight);
  opacity: 0.7;
  top: 0;
  animation: move var(--durAnim) linear forwards;
  aspect-ratio: 400 / 340;
  background-image: url(../images/anim/arrow-yellow.svg);
  background-repeat: no-repeat;
  background-size: contain;
}

.animationBanner .moving-div.fadeout {
  opacity: 0;
  transition: opacity 1.5s ease;
}

.animationBanner img {
  position: absolute;
  width: 3em;
  height: 3em;
  transition: filter 0.5s, opacity 2s;
}

.animationBanner img.hit {
  filter: grayscale(100%);
  opacity: 0;
}

.animationBanner img.stay {
  filter: grayscale(100%);
  opacity: 1;
  animation: shake 0.5s infinite;
}

.animButton {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.animButton.fadein {
  opacity: 1;
  animation: pulse 1.5s infinite;
}

.animationBanner img.butBig,
.animationBanner img.butBig.hit,
.animationBanner img.virus01,
.animationBanner img.virus01.hit,
.animationBanner img.virus02,
.animationBanner img.virus02.hit,
.animationBanner img.virus03,
.animationBanner img.virus04.hit {
  filter: grayscale(0);
  opacity: 1;
  height: auto;
}

.animationBanner img.butBig { width: 13em; top: 0; left: 0; left: calc(50% - 6.5em); }
.animationBanner img.virus01 { width: 4.5em; top: -3.5em; left: 4em; animation: shake 0.4s infinite; }
.animationBanner img.virus02 { width: 8em; top: -5.5em; animation: shake 0.5s infinite; }
.animationBanner img.virus03 { width: 5em; top: -3.75em; right: 4em; animation: shake 0.3s infinite; }

.animationBanner img.fadeout-stay {
  animation: fadeout 2s forwards;
}

.animationBanner #right-column img {
  animation: ellipticalMotion var(--duration) linear infinite;
}

@keyframes move {
  0% { left: -20px; }
  100% { left: calc(100% + 20px); }
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, -2px); }
  50% { transform: translate(2px, 2px); }
  75% { transform: translate(-2px, 2px); }
}

@keyframes ellipticalMotion {
  0% { transform: translate(0px, 0px) rotate(var(--angle)) translate(0, 0) rotate(calc(-1 * var(--angle))); }
  25% { transform: translate(0px, 0px) rotate(var(--angle)) translate(35px, 15px) rotate(calc(-1 * var(--angle))); }
  50% { transform: translate(0px, 0px) rotate(var(--angle)) translate(70px, 0px) rotate(calc(-1 * var(--angle))); }
  75% { transform: translate(0px, 0px) rotate(var(--angle)) translate(35px, -15px) rotate(calc(-1 * var(--angle))); }
  100% { transform: translate(0px, 0px) rotate(var(--angle)) translate(0, 0) rotate(calc(-1 * var(--angle))); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes fadeout {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* --- адаптив: планшет --- */

@media (max-width: 1199px) {
  .animationBanner {
    font-size: 14px;
  }
}

@media (max-width: 991px) {
  .animationBanner .right-column,
  .animationBanner .moving-div {
    display: none;
  }
}

/* --- адаптив: мобильный --- */

@media (max-width: 767px) {
  .animationBanner {
    display: block;
    height: auto;
    font-size: 16px;
  }

  .animationBanner .arrowRed {
    min-width: 0;
  }

  .animationBanner .arrowRed img {
    position: static;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0 auto 1.5em;
    left: 0;
  }

  .animationBanner .cntBenefitDesc {
    height: auto;
    grid-gap: 1em;
  }

  .arrowText a[name="b01"],
  .arrowText a[name="b02"],
  .arrowText a[name="b03"],
  .arrowText a[name="b04"],
  .arrowText a[name="b05"],
  .arrowText a[name="b06"] {
    margin-left: 0;
  }

  .cntBenefitDesc a > div {
    display: none;
  }
}
