.ribbon-container {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin: 50px auto 0;
}

/* Main ribbon */
.ribbon {
  position: relative;
  color: #fff;
  font: 20px/1.4 sans-serif;
  font-weight: 600;
  text-align: center;
  /* text-transform: uppercase; */
  padding: 12px 30px;
  /* space around text */
  background-image: linear-gradient(
    0deg,
    rgba(255, 162, 0, 1) 5.6%,
    rgba(255, 195, 0, 1) 95.7%
  );
  animation: ribbon-main 250ms ease-out;
  /* white-space: nowrap; */
  width: 100%;
  max-width: 520px;
  /* min-width: 280px; */
  margin: 30px 30px;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ribbon edges */
.ribbon i {
  position: absolute;
}

.ribbon i:first-child,
.ribbon i:nth-child(2) {
  bottom: -20px;
  z-index: -1;
  border: 20px solid transparent;
  border-right-color: #402304;
  animation: ribbon-edge 500ms ease-out;
}

.ribbon i:first-child {
  left: -20px;
}

.ribbon i:nth-child(2) {
  left: auto;
  right: -20px;
  border-right-color: transparent;
  border-left-color: #402304;
}

/* Ribbon tails */
.ribbon i:nth-child(3),
.ribbon i:last-child {
  width: 20px;
  bottom: -20px;
  z-index: -2;
  border: 30px solid rgb(255, 136, 0);
  border-left-color: transparent;
  animation: ribbon-back 600ms ease-out;
  transform-origin: 100% 0;
}

.ribbon i:nth-child(3) {
  left: -39px;
}

.ribbon i:last-child {
  left: auto;
  right: -39px;
  border-right-color: transparent;
  border-left-color: rgb(255, 136, 0);
  transform-origin: 0 100%;
}

/* Animations */
@keyframes ribbon-main {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

@keyframes ribbon-edge {
  0%,
  50% {
    transform: scaleY(0);
  }

  100% {
    transform: scaleY(1);
  }
}

@keyframes ribbon-back {
  0%,
  75% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}
