/* Índice: una sola geometría compartida para marco, contenido y rótulos.
   Los títulos viven como una capa superior independiente del recorte interno,
   para que sigan el gesto del frame pero no queden atrapados por su clip-path. */
#home .category-menu {
  --tile-cut: polygon(4% 0,100% 3%,96% 100%,0 96%);
}

#home .category-card {
  rotate: 0deg !important;
  transform: rotate(var(--tile-tilt,0deg));
  min-width: 0;
  isolation: isolate;
  overflow: visible !important;
  padding-top: clamp(18px, 2.5vh, 26px);
}
#home .category-card:nth-child(1){--tile-tilt:-1deg}
#home .category-card:nth-child(2){--tile-tilt:1deg}
#home .category-card:nth-child(3){--tile-tilt:-.7deg}
#home .category-card:nth-child(4){--tile-tilt:.9deg}
#home .category-card:nth-child(5){--tile-tilt:-.8deg}
#home .category-card:hover {
  rotate: 0deg !important;
  transform: rotate(0deg) translateY(-5px) scale(1.015) !important;
}

#home .category-title {
  position: absolute;
  top: 0;
  left: 14px;
  right: 40px;
  z-index: 8;
  margin: 0;
  font-family: var(--display) !important;
  font-size: clamp(15px, 1.45vw, 24px) !important;
  line-height: 0.95 !important;
  font-weight: 800 !important;
  letter-spacing: -0.05em !important;
  color: #f7f8ff !important;
  text-wrap: balance;
  text-shadow:
    0 0 12px rgba(3, 7, 16, 0.92),
    0 2px 16px rgba(3, 7, 16, 0.9),
    0 0 1px rgba(3, 7, 16, 1);
  pointer-events: none;
}

#home .category-card .category-visual {
  clip-path: var(--tile-cut) !important;
  border-radius: 0 !important;
  min-width: 0;
}

#home .category-card .category-info {
  clip-path: none !important;
  transform: none !important;
  margin: 8px 0 0 !important;
  padding: 8px 10px !important;
  min-width: 0;
  width: 100%;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#home .category-info p {
  margin: 0 !important;
  min-width: 0;
  flex: 1 1 auto;
  font-size: clamp(8px,.64vw,10px) !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere;
}

#home .category-info .category-arrow {
  flex: 0 0 auto;
}

/* El mismo sistema de coordenadas evita que los micro-rótulos invadan el corte diagonal. */
#home .category-visual .visual-label {
  left: 10% !important;
  top: 9% !important;
  max-width: 75%;
}
#home .category-visual .visual-number {
  right: 10% !important;
  top: 9% !important;
}

@media (max-width: 900px) {
  #home .category-card {
    transform: none !important;
    padding-top: 18px;
  }

  #home .category-title {
    font-size: clamp(16px, 2.35vw, 22px) !important;
    right: 28px;
  }
}

@media (max-width: 540px) {
  #home .category-card {
    padding-top: 16px;
  }

  #home .category-title {
    left: 10px;
    right: 26px;
    font-size: 16px !important;
    line-height: 1 !important;
  }

  #home .category-info {
    padding: 8px 4px !important;
  }

  #home .category-info p {
    font-size: 8px !important;
  }
}

/* V37 — corrección definitiva: el tema collage recortaba TODO el enlace.
   Únicamente .category-visual puede usar clip-path. El encabezado es
   un elemento de flujo normal, no un absoluto fuera de los límites. */
html body #home .category-menu > .category-card:nth-child(n) {
  clip-path: none !important;
  -webkit-clip-path: none !important;
  overflow: visible !important;
  padding-top: 0 !important;
}
html body #home .category-menu > .category-card .category-title {
  position: relative !important;
  display: flex !important;
  align-items: end;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  flex: 0 0 auto;
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 4px 8px 8px;
  margin: 0 !important;
  z-index: 12;
  font-size: clamp(14px, 1.45vw, 22px) !important;
  line-height: 1.14 !important;
  overflow-wrap: break-word;
  text-shadow: 0 2px 7px #070a0f;
}
html body #home .category-menu > .category-card .category-visual {
  clip-path: var(--tile-cut) !important;
  -webkit-clip-path: var(--tile-cut) !important;
  overflow: hidden !important;
}
@media (max-width: 900px) {
  html body #home .category-menu > .category-card .category-title {
    min-height: 42px;
    font-size: clamp(16px, 2.3vw, 21px) !important;
  }
}
@media (max-width: 540px) {
  html body #home .category-menu > .category-card .category-title {
    min-height: 38px;
    font-size: 16px !important;
  }
}
