.related-module {
    margin-top: 60px;
    width: 100%;
}

/* Título */
.related-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* GRID BASE — más ancho desde el inicio */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* antes 260px */
    gap: 28px;
    width: 100%;
}

/* ESCRITORIO GRANDE — columnas más anchas */
@media (min-width: 1400px) {
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); /* antes 320px */
        gap: 32px;
    }
}

/* ULTRA WIDE — pantallas enormes */
@media (min-width: 1800px) {
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); /* antes 360px */
        gap: 36px;
    }
}

/* MÓVIL — más grandes también */
@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* más equilibrado */
        gap: 18px;
    }
}

/* CARD */
.related-item {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: var(--card-bg);
    cursor: pointer;
}

.related-item-inner {
    width: 100%;
    height: 100%;
    transition: transform .25s ease;
}

.related-item:hover .related-item-inner {
    transform: scale(1.04);
}

/* Imagen */
.related-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Título dentro de la imagen */
.related-meta {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.75rem;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* EFECTO RELÁMPAGO */
.related-item-inner {
    position: relative;
    overflow: hidden;
}

.related-item-inner::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.35) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-20deg);
    pointer-events: none;
    opacity: 0;
}

.related-item:hover .related-item-inner::after {
    animation: lightningFlash 0.45s ease;
}

@keyframes lightningFlash {
    0%   { left: -120%; opacity: 0; }
    20%  { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}
