.cards-section {
  margin: 2.1rem auto 0;
  width: min(100%, 1080px);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.feature-card {
  --n1: #ff00d4;
  --n2: #7a35ff;
  --n3: #00d4ff;
  position: relative;
  min-height: 176px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.7rem 0.9rem;
  border-radius: 0.95rem;
  clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%);
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 8px rgba(255, 0, 212, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 8px color-mix(in srgb, var(--n1) 35%, transparent);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, filter 0.22s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 22%), linear-gradient(180deg, rgba(7, 10, 30, 0.02) 46%, rgba(7, 10, 30, 0.8) 100%);
  z-index: -1;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, 0) 280deg, var(--n1) 315deg, var(--n2) 338deg, var(--n3) 350deg, rgba(255, 255, 255, 0) 360deg);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transform: rotate(0deg);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.52), 0 0 14px rgba(255, 0, 212, 0.35), 0 0 18px rgba(122, 53, 255, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.52), 0 0 14px color-mix(in srgb, var(--n1) 55%, transparent), 0 0 18px color-mix(in srgb, var(--n2) 45%, transparent);
  filter: saturate(1.06);
}

.feature-card:hover::after {
  opacity: 1;
  animation: card-border-run 1.4s linear infinite;
  filter: drop-shadow(0 0 7px rgba(255, 0, 212, 0.4)) drop-shadow(0 0 8px rgba(0, 212, 255, 0.34));
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--n1) 70%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--n3) 55%, transparent));
}

@keyframes card-border-run {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.feature-card-title {
  color: #fff;
  font-family: "Segoe UI", Tahoma, sans-serif;
  width: 100%;
  text-align: center;
  font-size: clamp(1.4rem, 2.05vw, 2.1rem);
  font-weight: 900;
  line-height: 1.05;
  -webkit-text-stroke: 1.2px rgba(6, 9, 26, 0.65);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.78);
  z-index: 1;
}

.feature-card-guests .feature-card-title {
  font-size: clamp(1.2rem, 1.7vw, 1.65rem);
  overflow-wrap: anywhere;
}

.feature-card:focus-visible {
  outline: 2px solid var(--rt-accent-orange-3);
  outline-offset: 3px;
}

.feature-card-cosplay {
  --n1: #ff00d4;
  --n2: #d214ff;
  --n3: #7a35ff;
  background-image: linear-gradient(140deg, rgba(255, 0, 200, 0.45), rgba(40, 0, 80, 0.38)), url("../img/web/cosplay.avif");
  background-position: left center;
}

.feature-card-guests {
  --n1: #00d4ff;
  --n2: #3ac8ff;
  --n3: #5f7cff;
  background-image: linear-gradient(140deg, rgba(0, 209, 255, 0.4), rgba(6, 28, 78, 0.4)), url("../img/web/invitados.avif");
  background-position: center 40%;
}

.feature-card-tournaments {
  --n1: #9d2dff;
  --n2: #6f2cff;
  --n3: #ff00d4;
  background-image: linear-gradient(140deg, rgba(128, 0, 255, 0.42), rgba(43, 16, 94, 0.38)), url("../img/web/lanparty.avif");
  background-position: 64% 35%;
}

.feature-card-shops {
  --n1: #ff8a00;
  --n2: #ff3d00;
  --n3: #ff00d4;
  background-image: linear-gradient(140deg, rgba(255, 107, 0, 0.46), rgba(88, 19, 59, 0.4)), url("../img/web/tienda.avif");
  background-position: 82% center;
}

@media (max-width: 768px) {
  .cards-section {
    width: min(100%, 500px);
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .feature-card {
    min-height: 126px;
    padding: 0.65rem 0.7rem;
    border-radius: 0.75rem;
    clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
  }

  .feature-card-title {
    font-size: clamp(1.25rem, 5.5vw, 1.7rem);
  }
}

@media (max-width: 420px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 142px;
  }
}

@media (hover: none) {
  .feature-card:hover {
    transform: none;
    filter: none;
  }

  .feature-card:hover::after {
    opacity: 0;
    animation: none;
    filter: none;
  }
}

@supports not (clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%)) {
  .feature-card {
    clip-path: none;
    border-radius: 0.95rem;
  }
}

@supports not ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .feature-card::after {
    display: none;
  }
}
