/* ============================================
   ENCICLOPEDIA CDM - SOLO TÍTULOS
   Orden alfabético, sin metadatos ni imágenes
   ============================================ */

/* Forzar fondo oscuro */
body.category-enciclopedia-cdm,
body.category-enciclopedia-cdm .site,
body.category-enciclopedia-cdm .site-content {
    background-color: #0a0a0a !important;
    color: #e0e0e0;
}

/* Ocultar todo lo que no queremos */
body.category-enciclopedia-cdm .page-title,
body.category-enciclopedia-cdm .archive-description,
body.category-enciclopedia-cdm .ast-breadcrumbs-wrapper,
body.category-enciclopedia-cdm .breadcrumb,
body.category-enciclopedia-cdm .widget-area,
body.category-enciclopedia-cdm #secondary,
body.category-enciclopedia-cdm .post-thumb-img-content,
body.category-enciclopedia-cdm .ast-blog-featured-section,
body.category-enciclopedia-cdm .entry-meta,
body.category-enciclopedia-cdm .ast-blog-meta-outer,
body.category-enciclopedia-cdm .posted-on,
body.category-enciclopedia-cdm .byline,
body.category-enciclopedia-cdm .cat-links,
body.category-enciclopedia-cdm .tags-links,
body.category-enciclopedia-cdm .comments-link,
body.category-enciclopedia-cdm .edit-link,
body.category-enciclopedia-cdm .read-more,
body.category-enciclopedia-cdm .ast-read-more-container,
body.category-enciclopedia-cdm .entry-content,
body.category-enciclopedia-cdm .ast-excerpt-container,
body.category-enciclopedia-cdm .ast-blog-single-element.ast-excerpt-container {
    display: none !important;
}

/* Layout full width */
body.category-enciclopedia-cdm .primary,
body.category-enciclopedia-cdm #primary {
    width: 100% !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    float: none !important;
}

/* Reset de grid Astra */
body.category-enciclopedia-cdm .ast-row {
    display: block !important;
    margin: 0 !important;
}

body.category-enciclopedia-cdm [class*="ast-col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   HEADER
   ============================================ */
.enciclopedia-header-cdm {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #8b0000;
    position: relative;
}

.enciclopedia-header-cdm::after {
    content: '◆';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0a0a0a;
    padding: 0 15px;
    color: #8b0000;
    font-size: 1.2rem;
}

.enciclopedia-title-cdm {
    font-size: 2rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #e0e0e0;
    margin: 0;
    font-weight: 300;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(139, 0, 0, 0.5);
}

/* ============================================
   NAVEGADOR ALFABÉTICO STICKY
   ============================================ */
.abc-navigator-cdm {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: linear-gradient(to bottom, #0a0a0a 95%, rgba(10,10,10,0.9));
    padding: 20px 0 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid #1f1f1f;
}

.abc-container-cdm {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 10px;
}

.abc-capsule-cdm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1f1f1f;
    color: #555;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 13px;
    border: 2px solid #2a2a2a;
    transition: all 0.3s ease;
    cursor: default;
}

.abc-capsule-cdm.has-content {
    background: #141414;
    border-color: #3a3a3a;
    color: #e0e0e0;
    cursor: pointer;
}

.abc-capsule-cdm.has-content:hover {
    background: #8b0000;
    border-color: #a52a2a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.abc-capsule-cdm.active {
    background: #ff3333 !important;
    border-color: #ff3333 !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.5);
    transform: scale(1.1);
}

.abc-capsule-cdm.empty {
    opacity: 0.2;
    background: #151515;
    pointer-events: none;
}

.abc-progress-cdm {
    height: 2px;
    background: #8b0000;
    width: 0%;
    transition: width 0.1s linear;
    margin-top: 15px;
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

/* ============================================
   SECCIONES POR LETRA
   ============================================ */
.letter-section-cdm {
    margin-bottom: 40px;
    scroll-margin-top: 140px;
}

.letter-title-cdm {
    font-size: 3rem;
    color: #8b0000;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1f1f1f;
    font-weight: 300;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.letter-count-cdm {
    font-size: 0.9rem;
    color: #666;
    margin-left: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: sans-serif;
}

/* ============================================
   LISTA DE ENTRADAS - SOLO TÍTULOS
   ============================================ */
.entries-list-cdm {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Cada entrada es solo una línea */
body.category-enciclopedia-cdm article.post,
body.category-enciclopedia-cdm .post {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #1f1f1f !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.category-enciclopedia-cdm article.post:hover,
body.category-enciclopedia-cdm .post:hover {
    border-bottom-color: #8b0000 !important;
    background: rgba(139, 0, 0, 0.05) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Solo el título, nada más */
body.category-enciclopedia-cdm .entry-header {
    padding: 12px 15px !important;
    margin: 0 !important;
}

body.category-enciclopedia-cdm .entry-title,
body.category-enciclopedia-cdm h2.entry-title {
    font-size: 1.1rem !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
}

body.category-enciclopedia-cdm .entry-title a {
    color: #c0c0c0 !important;
    text-decoration: none !important;
    display: block !important;
    transition: all 0.2s ease !important;
}

body.category-enciclopedia-cdm .entry-title a:hover {
    color: #ff3333 !important;
    padding-left: 10px !important;
}

/* ============================================
   BOTÓN VOLVER ARRIBA
   ============================================ */
.back-to-top-cdm {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #8b0000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.back-to-top-cdm.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-cdm:hover {
    background: #ff3333;
    transform: translateY(-3px);
}

.back-to-top-cdm svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .enciclopedia-title-cdm {
        font-size: 1.4rem;
        letter-spacing: 0.2em;
    }
    
    .abc-capsule-cdm {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .letter-title-cdm {
        font-size: 2.5rem;
    }
    
    body.category-enciclopedia-cdm .entry-title {
        font-size: 1rem !important;
    }
}

/* ============================================
   OCULTAR NAVEGADOR DE CATEGORÍAS EN ENCICLOPEDIA
   ============================================ */

/* Ocultar el navegador de secciones/categorías solo en esta página */
body.category-enciclopedia-cdm .cdm-nav-secciones,
body.category-enciclopedia-cdm .secciones-cdm,
body.category-enciclopedia-cdm nav:has(.cdm-nav-label),
body.category-enciclopedia-cdm .wp-block-group:has(> .cdm-nav-secciones),
body.category-enciclopedia-cdm [class*="nav-secciones"],
body.category-enciclopedia-cdm [class*="cdm-nav"] {
    display: none !important;
}

/* Por si está dentro de algún contenedor específico */
body.category-enciclopedia-cdm #primary .cdm-nav-secciones,
body.category-enciclopedia-cdm #main .cdm-nav-secciones,
body.category-enciclopedia-cdm article .cdm-nav-secciones,
body.category-enciclopedia-cdm .entry-content .cdm-nav-secciones {
    display: none !important;
}