/* ── Clusters Temáticos ────────────────────────────────────────────── */

/* Index: Grid de clusters */
.clusters-hero {
    text-align: center;
    padding: 3rem 0 2rem;
}
.clusters-hero h1 {
    font-size: 2.6rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #cc0000 0%, #ff4444 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.clusters-hero p {
    color: #888;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0.8rem auto 0;
}

.cluster-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #0d0d0d 0%, #111 100%);
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    min-height: 260px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
}
.cluster-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, #cc0000);
    opacity: 0.6;
    transition: opacity 0.3s, height 0.3s;
}
.cluster-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-accent, #cc0000);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(204, 0, 0, 0.08);
}
.cluster-card:hover::before {
    opacity: 1;
    height: 4px;
}
.cluster-card__icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--card-accent, #cc0000);
    opacity: 0.85;
    transition: transform 0.3s;
}
.cluster-card:hover .cluster-card__icon {
    transform: scale(1.15);
}
.cluster-card__name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
}
.cluster-card__desc {
    font-size: 0.88rem;
    color: #777;
    line-height: 1.55;
    flex-grow: 1;
}
.cluster-card__meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #555;
}
.cluster-card__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cluster-card__meta i {
    color: var(--card-accent, #cc0000);
    font-size: 0.75rem;
}

/* View: Detalle de cluster - HORROR REDESIGN */
.cluster-cinematic-header {
    position: relative;
    padding: 6rem 2rem 5rem;
    margin-bottom: 3rem;
    text-align: center;
    border-radius: 16px;
    background-color: #030303;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Niebla / Resplandor de fondo */
.cluster-cinematic-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, var(--accent-red, #cc0000) 0%, transparent 60%);
    opacity: 0.15;
    z-index: -1;
    filter: blur(40px);
    animation: horrorPulse 6s infinite alternate ease-in-out;
}

/* Efecto Ruido / Textura */
.cluster-cinematic-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
}

.cluster-cinematic-header__icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: var(--accent-red, #cc0000);
    text-shadow: 0 0 20px var(--accent-red, #cc0000);
    animation: iconFloat 4s ease-in-out infinite;
}

.cluster-cinematic-header h1 {
    font-size: 3.5rem;
    letter-spacing: 3px;
    font-family: 'Playfair Display', serif;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8), 0 0 15px rgba(204, 0, 0, 0.4);
    margin-bottom: 1.5rem;
}

.cluster-cinematic-header__desc {
    color: #bbb;
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
}

/* Animaciones */
@keyframes horrorPulse {
    0% { opacity: 0.1; transform: scale(1); }
    100% { opacity: 0.25; transform: scale(1.05); }
}
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); text-shadow: 0 0 15px var(--accent-red, #cc0000); }
    50% { transform: translateY(-10px); text-shadow: 0 0 30px var(--accent-red, #cc0000); }
}

/* Subcluster cards - HORROR */
.subcluster-card {
    display: flex;
    align-items: center;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
    overflow: hidden;
}

/* Borde superior sangriento inicial */
.subcluster-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-accent, #cc0000);
    opacity: 0.3;
    transition: all 0.4s ease;
}

.subcluster-card:hover {
    background: #0d0d0d;
    transform: translateY(-5px);
    border-color: #333;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 20px rgba(204, 0, 0, 0.15);
}

.subcluster-card:hover::before {
    opacity: 1;
    height: 4px;
    box-shadow: 0 0 10px var(--card-accent, #cc0000);
}

.subcluster-card__icon {
    font-size: 1.8rem;
    color: var(--card-accent, #cc0000);
    margin-right: 1.2rem;
    opacity: 0.8;
    width: 40px;
    text-align: center;
    transition: transform 0.3s;
    text-shadow: 0 0 10px rgba(204, 0, 0, 0.3);
}

.subcluster-card:hover .subcluster-card__icon {
    transform: scale(1.1) rotate(-5deg);
    opacity: 1;
}

.subcluster-card__body {
    flex: 1;
}
.subcluster-card__name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #eaeaea;
    letter-spacing: 0.5px;
}
.subcluster-card__slug {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
    font-family: 'Outfit', sans-serif;
}
.subcluster-card__arrow {
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.subcluster-card:hover .subcluster-card__arrow {
    color: var(--card-accent, #cc0000);
    transform: translateX(8px);
    text-shadow: 0 0 8px var(--card-accent, #cc0000);
}

/* Sidebar */
.cluster-sidebar__item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-decoration: none !important;
    color: #aaa !important;
    transition: all 0.25s;
    font-size: 0.95rem;
    line-height: 1.3;
}
.cluster-sidebar__item:hover {
    background: #111;
    color: #f0f0f0 !important;
    transform: translateX(4px);
}
.cluster-sidebar__item i {
    font-size: 1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Topic pills in subcluster view */
.topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111;
    border: 1px solid #1f1f1f;
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
    font-size: 0.88rem;
    color: #ccc;
    transition: all 0.25s;
}
.topic-pill:hover {
    border-color: var(--card-accent, #cc0000);
    color: #f0f0f0;
    background: #1a1a1a;
}
.topic-pill i {
    color: var(--card-accent, #cc0000);
    font-size: 0.7rem;
}

/* Breadcrumb dark */
.cluster-breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    margin: 0 0 1rem;
    font-size: 0.85rem;
}
.cluster-breadcrumb li {
    color: #555;
}
.cluster-breadcrumb li a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}
.cluster-breadcrumb li a:hover {
    color: #cc0000;
}
.cluster-breadcrumb li + li::before {
    content: '›';
    margin: 0 0.5rem;
    color: #444;
}

/* Section divider - HORROR */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(204, 0, 0, 0.2), #1a1a1a, transparent);
    margin: 3.5rem 0;
    position: relative;
    border: none;
}
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 1px;
    background: var(--accent-red, #cc0000);
    box-shadow: 0 0 10px var(--accent-red, #cc0000);
}

/* Responsive */
@media (max-width: 768px) {
    .clusters-hero h1 {
        font-size: 1.8rem;
    }
    .cluster-card {
        padding: 1.5rem 1.2rem;
        min-height: 200px;
    }
    .cluster-header h1 {
        font-size: 1.8rem;
    }
}
