:root {
  --card-height: 420px;
  --card-width: calc(var(--card-height) / 1.4);
}

.trilogia-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 50px;
  padding: 40px 0;
  background: #f9f9f9;
}

.card {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  perspective: 2500px;
  background: #fff;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wrapper {
  position: absolute;
  width: 100%;
  transition: all 0.5s;
  z-index: -1;
}

.card:hover .wrapper {
  transform: perspective(900px) translateY(-5%) rotateX(25deg);
  box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
}

.wrapper::before,
.wrapper::after {
  content: "";
  opacity: 0;
  width: 100%;
  transition: all 0.5s;
  position: absolute;
  left: 0;
}

.wrapper::before {
  top: 0;
  height: 100%;
  background-image: linear-gradient(
    to top,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}

.wrapper::after {
  bottom: 0;
  height: 120px;
  opacity: 1;
  background-image: linear-gradient(
    to bottom,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}

.card:hover .wrapper::before,
.card:hover .wrapper::after {
  opacity: 1;
}



.card:hover .title {
  transform: translate3d(0%, -30px, 100px);
}

.descripcion {
  font-size: 14px;
  color: #555;
  text-align: center;
  padding: 0 20px 20px;
}

.character {
  width: 100%;
  opacity: 0;
  transition: all 0.5s;
  position: absolute;
  z-index: -1;
}

.card:hover .character {
  opacity: 1;
  transform: translate3d(0%, -25%, 100px);
}

.card p {
  position: absolute;
  bottom: 15px;
  left: 10%;
  right: 10%;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.4;
}

.descripcion {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  padding: 15px;
  text-align: center;
}

.titulo-naranja {
  color: #f98012;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}


