* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: consolas, monospace;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  /* min-height: 100vh; */
  background: #1d061a;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 40px 20px;
  gap: 2rem;
}

.container .box {
  position: relative;
  width: clamp(250px, 30vw, 350px);
  height: clamp(320px, 45vh, 420px);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px;
  transition: 0.5s;
}

.container .box::before,
.container .box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50px;
  width: 50%;
  height: 100%;
  background: #fff;
  border-radius: 8px;
  transform: skewX(15deg);
  transition: 0.5s;
}

.container .box:hover:before,
.container .box:hover:after {
  transform: skewX(0deg);
  left: 20px;
  width: calc(100% - 90px);
}

.container .box:nth-child(1)::before,
.container .box:nth-child(1)::after {
  background: linear-gradient(315deg, #ffbc00, #ff0058);
  /* background: linear-gradient(315deg, #ffffff, #dcdcdc); */
}

.container .box:nth-child(2)::before,
.container .box:nth-child(2)::after {
  background: linear-gradient(315deg, #03a9f4, #ff0058);
  /* background: linear-gradient(315deg, #ffbc00, #ff0058); */
}

.container .box:nth-child(3)::before,
.container .box:nth-child(3)::after {
  background: linear-gradient(315deg, #4dff03, #00d0ff);
  /* background: linear-gradient(315deg, #ffd700, #ffb300); */
}

.container .box span {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.container .box span::before,
.container .box span::after {
  content: '';
  position: absolute;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: 0.5s;
  animation: animate 2s ease-in-out infinite;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.container .box:hover span::before {
  top: -40px;
  left: 40px;
  width: 80px;
  height: 80px;
  opacity: 1;
}

.container .box:hover span::after {
  bottom: -40px;
  right: 40px;
  width: 80px;
  height: 80px;
  opacity: 1;
  animation-delay: -1s;
}

@keyframes animate {
  0%, 100% { transform: translateY(10px); }
  50% { transform: translate(-10px); }
}

.container .box .content {
  position: relative;
  left: 0;
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  z-index: 1;
  transition: 0.5s;
  color: #fff;
  text-align: center;
}

.container .box:hover .content {
  left: -10px;
  padding: 50px 30px;
}

.container .box .content h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: #fff;
  margin-bottom: 10px;
}

.container .box .content p {
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  margin-bottom: 10px;
  line-height: 1.5em;
}

/*Кнопка читать далее на карточках*/
/*
.container .box .content a {
  display: inline-block;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  color: #111;
  background: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 5px;
  transition: 0.3s;
}

.container .box .content a:hover {
  background: #ffcf4d;
  border: 1px solid rgba(255, 0, 88, 0.4);
  box-shadow: 0 1px 15px rgba(1, 1, 1, 0.2);
}
*/
.container .box .content a {
  display: inline-block;
  font-size: 1.1em;
  color: #fff !important;
  background: linear-gradient(to right, #f71f29, #2f2f31);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  overflow: hidden;
}

.container .box .content a::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 4px;
  background: linear-gradient(to right, #2f2f31, #f71f29);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.container .box .content a:hover::before {
  opacity: 1;
}

.container .box .content a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}


/* 📱 Адаптация под мобильные устройства */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .container .box {
    width: 90%;
    height: auto;
  }
  .container .box .content {
    padding: 25px 20px;
  }
}
