/**
 * Estilos del módulo Shunfa Categorías Destacadas
 * Diseño elegante con fondo oscuro, grid responsive y efecto hover.
 */

/* ===== Bloque general ===== */
.shunfacat-block {
    /*background: radial-gradient(ellipse at top, #1c1c1e 0%, #0c0c0d 100%); */
    padding: 60px 20px 50px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

.shunfacat-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* ===== Título principal ===== */
.shunfacat-title {
    text-align: center;
    /*color: #f4f4f4;*/
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 auto 12px;
    line-height: 1.25;
    padding: 0 10px;
}

.shunfacat-title-line {
    display: block;
    width: 220px;
    max-width: 60%;
    height: 1px;
    margin: 0 auto 45px;
    /*background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);*/
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.55), transparent);
}

/* ===== Grid de tarjetas ===== */
.shunfacat-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(4, 1fr);
}

.shunfacat-cols-1 { grid-template-columns: repeat(1, 1fr); max-width: 420px; margin: 0 auto; }
.shunfacat-cols-2 { grid-template-columns: repeat(2, 1fr); }
.shunfacat-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ===== Tarjeta ===== */
.shunfacat-card {
    position: relative;
    display: block;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    background: #161616;
    /*box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);*/
    transition: transform 0.45s ease, box-shadow 0.45s ease;
    aspect-ratio: 2 / 3;
}

/* Fallback para navegadores sin soporte de aspect-ratio */
@supports not (aspect-ratio: 2 / 3) {
    .shunfacat-card { height: 0; padding-bottom: 150%; }
    .shunfacat-card-media { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
}

.shunfacat-card:hover {
    transform: translateY(-8px);
    /*box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);*/
    box-shadow: 2px 13px 20px 2px rgba(0, 0, 0, 0.2);
}

/* ===== Media / imagen ===== */
.shunfacat-card-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shunfacat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: brightness(0.92);
}

.shunfacat-card:hover .shunfacat-card-img {
    transform: scale(1.08);
    filter: brightness(1);
}

.shunfacat-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2c 0%, #141414 100%);
}

/* Degradado inferior para legibilidad del texto */
.shunfacat-card-overlay {
    position: absolute;
    inset: 0;
    /*background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 40%, rgba(0, 0, 0, 0) 70%);*/
    /*background: linear-gradient(to top, rgba(128, 128, 128, 0.82) 0%, rgba(128, 128, 128, 0.25) 40%, rgba(128, 128, 128, 128) 70%);*/
   
    transition: background 0.45s ease;
}

.shunfacat-card:hover .shunfacat-card-overlay {
    /*background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0) 75%);*/
}

/* ===== Título de la tarjeta ===== */
.shunfacat-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 20px;
    z-index: 2;
}

.shunfacat-card-title {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s ease;
    display: inline-block;
}

.shunfacat-card:hover .shunfacat-card-title {
    transform: translateY(-4px);
}

/* ===== Pie de bloque ===== */
.shunfacat-footer {
    text-align: center;
    margin-top: 45px;
}

.shunfacat-website {
    color: #cfcfcf;
    font-size: 1.15rem;
    letter-spacing: 4px;
    font-weight: 300;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .shunfacat-grid,
    .shunfacat-cols-3,
    .shunfacat-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .shunfacat-title { font-size: 1.8rem; letter-spacing: 2px; }
}

@media (max-width: 575px) {
    .shunfacat-block { padding: 40px 14px 35px; }
    .shunfacat-grid,
    .shunfacat-cols-2,
    .shunfacat-cols-3,
    .shunfacat-cols-4 {
        grid-template-columns: 1fr;
    }
    .shunfacat-cols-1 { max-width: 100%; }
    .shunfacat-title { font-size: 1.45rem; letter-spacing: 1.5px; }
    .shunfacat-card { aspect-ratio: 3 / 2; }
    @supports not (aspect-ratio: 3 / 2) {
        .shunfacat-card { padding-bottom: 66%; }
    }
    .shunfacat-card-title { font-size: 1.25rem; }
    .shunfacat-website { font-size: 1rem; letter-spacing: 2px; }
}
