/* ==========================================================================
   ESTILOS ESPECÍFICOS: BIBLIOTECA PENSAR MEJOR (TEMA AZUL ELÉCTRICO / ZAFIRO)
   ========================================================================== */
:root {
    --accent-blue: #3a86ff;
    --glow-blue: rgba(58, 134, 255, 0.25);
    --border-color: rgba(58, 134, 255, 0.2);
    --border-hover: rgba(58, 134, 255, 0.5);
    --bg-card: rgba(15, 23, 42, 0.6);
}

.biblioteca-main-section {
    padding: 80px 20px;
    background: linear-gradient(180deg, #060913 0%, #0b0f19 100%);
    min-height: 80vh;
}

.biblioteca-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Encabezado */
.library-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.library-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

.library-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-blue);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.library-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.library-desc {
    font-size: 0.95rem;
    color: #94a3b8;
}

/* Acordeón Principal (Tipo) */
.type-details {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.type-details[open] {
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-blue);
}

.type-summary {
    list-style: none;
    padding: 20px 24px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.2s ease;
}

.type-summary::-webkit-details-marker {
    display: none;
}

.type-summary:hover {
    background: rgba(58, 134, 255, 0.05);
    color: var(--accent-blue);
}

.type-summary::after {
    content: '▾';
    font-size: 1rem;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
}

.type-details[open] > .type-summary::after {
    transform: rotate(180deg);
}

.badge-count {
    background: rgba(58, 134, 255, 0.15);
    color: var(--accent-blue);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(58, 134, 255, 0.3);
    margin-left: auto;
    margin-right: 15px;
    font-weight: 500;
}

/* Subtipos */
.subtypes-container {
    padding: 0 24px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subtype-details {
    background: rgba(10, 15, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.subtype-summary {
    list-style: none;
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.subtype-summary::-webkit-details-marker {
    display: none;
}

.subtype-summary:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.subtype-summary::after {
    content: '▾';
    font-size: 0.85rem;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
}

.subtype-details[open] > .subtype-summary::after {
    transform: rotate(180deg);
}

/* Documentos */
.documents-list {
    list-style: none;
    padding: 8px 18px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 30, 50, 0.4);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

.document-item:hover {
    border-color: rgba(58, 134, 255, 0.3);
    background: rgba(58, 134, 255, 0.03);
}

.doc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.doc-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}

.doc-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    padding: 6px 12px;
    background: rgba(58, 134, 255, 0.1);
    border: 1px solid rgba(58, 134, 255, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.doc-link:hover {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 0 10px var(--glow-blue);
}