*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.header {
  text-align: center;
  margin-top: 80px;
}

.container{
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  column-gap: 30px;
  row-gap: 30px;
  justify-content: center;
  align-items: center;
}

.flip-card-container {
  width: 250px;
  height: 250px;
  margin: 0px;
}

.flip-card {
  width: inherit;
  height: inherit;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  transform-style: preserve-3d;
  transition: .6s .1s;
}

.flip-card-container:hover .flip-card,
.flip-card-container:focus-within .flip-card {
  transform: rotateY(-180deg);
}


.card-front,
.card-back {
  width: 100%;
  height: 100%;
  border-radius: 24px;

  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;

  backface-visibility: hidden;

  display: flex;
  justify-content: center;
  align-items: center;
}

.card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

.card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

.card-back p {
  font-size: 14px;
  color: #fff;
  margin:auto;
  padding:5px;
}

figure {
  z-index: -1;
}

figure,
.img-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

img {
  height: 250px;
  width: 100%;
  border-radius: 24px;
}

figcaption {
  display: block;
  width: auto;
  margin-top: 12%;
  padding: 8px 22px;
  font-weight: bold;
  line-height: 1.6;
  letter-spacing: 2px;
  word-spacing: 6px;
  text-align: center;
  position: absolute;
  top: 0;
  color: #fff;
  background: hsla(var(--hue), 25%, 10%, .5);
}

.img-bg {
  background: hsla(var(--hue), 25%, 10%, .5);
}

.card-back .img-bg{
  background: hsla(var(--hue), 5%, 5%, .9);

}

.card-front .img-bg::before {
  content: "";
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(18deg);
  width: 100%;
  height: 6px;
  border: 1px solid var(--primary);
  border-left-color: transparent;
  border-right-color: transparent;
  transition: .1s;
}

.flip-card-container:hover .card-front .img-bg::before {
  width: 6px;
  border-left-color: var(--primary);
  border-right-color: var(--primary);
}

.after{
  display: flex;
  justify-content: center;
  padding: 20px;
}

.other-links {
  padding-bottom: 3vh;
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 450px;
}

section .other-links a {
  color: #000;
  font-size: 16px;
  text-decoration: none;
  margin-top: 15px;
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 1rem;
  border: 0.2rem solid #6c0b0b;
  text-align: center;
}

section .other-links a:hover {
  color: #fff;
  font-weight: bold;
  display: block;
  background-color: #6c0b0b;
  text-decoration: none;
}

section .other-links {
  justify-content: center;
  align-items: center;
  display: flex;
  column-gap: 50px;
}

@media (max-width: 1000px) {
  .container{
    justify-content: center;
  }
}

@media (max-width: 800px) {
  .container{
    justify-content: center;
    margin: auto 0;
    row-gap: 20px;
  }

  .flip-card-container{
    width: calc(100% - 20px);
    height: 160px;
  }
}

@media (max-width: 600px) {
  .container{
    justify-content: center;
    margin: auto 0;
    row-gap: 20px;
  }

  .flip-card-container{
    width: calc(100% - 20px);
    height: 160px;
  }
}

@media (max-width: 400px) {
  .container{
    justify-content: center;
    margin: auto 0;
    row-gap: 20px;
  }

  .flip-card-container{
    width: calc(100% - 20px);
    height: 160px;
  }
}