/* ----------------------------------------------
   Cards Carousel
---------------------------------------------- */

.icon-cards {
  position: relative;
  width: 60vw;
  height: 40vw;
  max-width: 380px;
  max-height: 250px;
  margin: 0 auto;
  display: block;
  color: white;
  perspective: 1000px;
  transform-origin: center;
}

.icon-cards__content {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transform-style: preserve-3d;
  transform: translateZ(-30vw) rotateY(0);
  animation: carousel 15s infinite cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.icon-cards__content.step-animation {
  animation: carousel 8s infinite steps(6) forwards;
}

.icon-cards__content--4 {
  transform: translateZ(-25vw) rotateY(0);
  animation: carousel4 8s infinite cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.icon-cards--4 .icon-cards__item:nth-child(1) { transform: rotateY(0deg) translateZ(30vw); }
.icon-cards--4 .icon-cards__item:nth-child(2) { transform: rotateY(90deg) translateZ(30vw); }
.icon-cards--4 .icon-cards__item:nth-child(3) { transform: rotateY(180deg) translateZ(30vw); }
.icon-cards--4 .icon-cards__item:nth-child(4) { transform: rotateY(270deg) translateZ(30vw); }

@keyframes carousel4 {
  0%, 20%   { transform: translateZ(-25vw) rotateY(0deg); }
  25%, 45%  { transform: translateZ(-25vw) rotateY(-90deg); }
  50%, 70%  { transform: translateZ(-25vw) rotateY(-180deg); }
  75%, 100% { transform: translateZ(-25vw) rotateY(-270deg); }
}

.icon-cards__item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 60vw;
  height: 40vw;
  max-width: 380px;
  max-height: 300px;
  box-shadow: 0 5px 20px rgba(0,0,0,.1);
  border-radius: 6px;
  transform-origin: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.icon-cards__item:nth-child(1) {
  background: #FDD94F;
  transform: rotateY(0) translateZ(35vw);
}

.icon-cards__item:nth-child(2) {
  background: #F87949;
  transform: rotateY(60deg) translateZ(35vw);
}

.icon-cards__item:nth-child(3) {
  background: #FBAB48;
  transform: rotateY(120deg) translateZ(35vw);
}

.icon-cards__item:nth-child(4) {
  background: #c7812c;
  transform: rotateY(180deg) translateZ(35vw);
}

.icon-cards__item:nth-child(5) {
  background: #c76a2c;
  transform: rotateY(240deg) translateZ(35vw);
}

.icon-cards__item:nth-child(6) {
  background: #c7312c;
  transform: rotateY(300deg) translateZ(35vw);
}



/* ----------------------------------------------
   Carousel animation
---------------------------------------------- */

@keyframes carousel {
  0%, 16.66%   { transform: translateZ(-35vw) rotateY(0deg); }
  16.67%, 33.33%  { transform: translateZ(-35vw) rotateY(-60deg); }
  33.34%, 50%     { transform: translateZ(-35vw) rotateY(-120deg); }
  50.01%, 66.66%  { transform: translateZ(-35vw) rotateY(-180deg); }
  66.67%, 83.33%  { transform: translateZ(-35vw) rotateY(-240deg); }
  83.34%, 100%    { transform: translateZ(-35vw) rotateY(-300deg); }
}


/* ----------------------------------------------
   Page layout
---------------------------------------------- */


/* ----------------------------------------------
   Checkbox styles
---------------------------------------------- */

/* ----------------------------------------------
   Toggle Animation Button 
---------------------------------------------- */

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #F47956;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.checkbox:hover {
  background: #1B396A;
  color: #F7A95A;
}

.checkbox input {
  display: none;
}

.checkbox__checkbox {
  width: 22px;
  height: 22px;
  background: #F47956;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.checkbox__checkbox::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.checkbox input:checked + .checkbox__checkbox::after {
  opacity: 1;
  transform: scale(1);
}

.checkbox__label {
  color: #F47956;
  font-weight: 700;
  letter-spacing: 0.05em;
}


/* ----------------------------------------------
   Jelly animation
---------------------------------------------- */

@keyframes jelly {
  from { transform: scale(1, 1); }
  30% { transform: scale(1.25, 0.75); }
  40% { transform: scale(0.75, 1.25); }
  50% { transform: scale(1.15, 0.85); }
  65% { transform: scale(0.95, 1.05); }
  75% { transform: scale(1.05, 0.95); }
  to { transform: scale(1, 1); }
}

