*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue';
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: white transparent;
}

body {
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  place-content: center;
  background-color: #000;
  overflow: hidden;
}

.container-cards {
  position: relative;
  display: flex;
  width: 250px;
  height: 250px;
  margin-inline: auto;
  transform-style: preserve-3d;
  perspective: 1000px;

  @media (width <= 1111px) and (orientation: landscape) {
    zoom: 0.7;
    overflow: hidden;
  }
  @media (width <= 1111px) and (orientation: portrait) {
    overflow: hidden;
  }

  .card {
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;

    transition: transform 0.5s ease;
    -webkit-box-reflect: below 1px
      linear-gradient(to bottom, transparent, transparent, #0002);

    &:nth-child(1) {
      transform: translate(-500px, 0) rotateY(40deg) scale(0.8);
      z-index: -1;
    }
    &:nth-child(2) {
      transform: translate(-500px, 0) rotateY(40deg) scale(0.8);
      z-index: 2;
    }

    &:nth-child(3) {
      transform: translate(-250px, 0) rotateY(30deg) scale(0.9);
      z-index: 3;
    }
    &:nth-child(4) {
      transform: translate(0, 0) rotateY(0);
      z-index: 2;
    }
    &:nth-child(5) {
      transform: translate(250px, 0) rotateY(-30deg) scale(0.9);
      z-index: 3;
    }
    &:nth-child(6) {
      transform: translate(500px, 0) rotateY(-40deg) scale(0.8);
      z-index: 2;
    }

    &:nth-child(7) {
      transform: translate(500px, 0) rotateY(-40deg) scale(0.8);
      z-index: -1;
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      -webkit-box-reflect: below 1px
        linear-gradient(to bottom, transparent, transparent, #0004);
    }
  }
}

.container-buttons {
  display: flex;
  justify-content: center;
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);

  @media (width <= 1111px) and (orientation: landscape) {
    zoom: 0.7;
  }

  button {
    width: 50px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: transparent;
    display: flex;
    flex-wrap: wrap;
    place-content: center;
    outline: none;
    transition: box-shadow 0.35s;

    @media (hover: hover) {
      &:hover {
        box-shadow: inset 0 0 30px 0 #fff8;
      }
    }

    @media not (hover: hover) {
      &.activo {
        box-shadow: inset 0 0 30px 0 #fff8;
      }
    }

    &::after {
      content: '';
      display: block;
      position: relative;
      width: 15px;
      height: 15px;
      border-top: 2px solid #fff;
      border-left: 2px solid #fff;
    }

    &:nth-child(1) {
      border-radius: 999px 0 0 999px;

      &::after {
        left: 5px;
        transform: rotate(-45deg);
      }
    }
    &:nth-child(2) {
      transform: translateX(-2px);
      border-radius: 0 999px 999px 0;
      border-left-color: transparent;

      &::after {
        right: 5px;
        transform: rotate(135deg);
      }
    }
  }
}
