/* Aulibre — Estilos del Centro de Ayuda (ayuda.html) */

.help-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    min-height: calc(100vh - 72px);
    gap: 2rem;
    padding: 2rem 1.5rem;
}

/* --- BARRA DE BÚSQUEDA Y CABECERA --- */
.help-search-container {
    position: relative;
    max-width: 480px;
    width: 100%;
    margin: 0 1.5rem;
}

.help-search-input {
    width: 100%;
    padding: 0.65rem 2.6rem 0.65rem 2.6rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition-smooth);
}

.help-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
    background-color: var(--bg-card);
}

.help-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.help-search-clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition-smooth);
    opacity: 0;
    pointer-events: none;
}

.help-search-clear-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.help-search-clear-btn:hover {
    color: var(--text-main);
    background: var(--accent-bg);
}

/* --- NAVEGACIÓN LATERAL (CATEGORÍAS) --- */
.help-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 0.5rem;
    z-index: 10;
}

.help-category-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition-smooth);
    width: 100%;
}

.help-category-btn:hover {
    color: var(--text-main);
    background: var(--bg-card);
}

.help-category-btn.active {
    color: var(--accent);
    background: var(--accent-bg);
    font-weight: 600;
}

.help-category-btn svg {
    flex-shrink: 0;
}

/* --- PANEL PRINCIPAL DE ARTÍCULOS --- */
.help-content-area {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-quiet);
    position: relative;
    z-index: 1;
    min-height: 450px;
}

.help-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.help-article-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.help-article-summary {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.help-article-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-main);
}

.help-article-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.75rem 0 0.85rem 0;
    color: var(--text-main);
}

.help-article-body p {
    margin-bottom: 1rem;
}

.help-article-body ul, .help-article-body ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

.help-article-body li {
    margin-bottom: 0.5rem;
}

/* --- TARJETAS DE ARTÍCULOS Y RESULTADOS --- */
.help-article-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-main);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.help-article-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.help-search-result-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-main);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.help-search-result-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- BLOQUES DE ALERTA Y PASOS --- */
.help-callout {
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.help-callout-info {
    background: var(--accent-bg);
    border-left: 4px solid var(--accent);
    color: var(--text-main);
}

.help-callout-tip {
    background: rgba(26, 122, 74, 0.08);
    border-left: 4px solid var(--semantic-success);
    color: var(--text-main);
}

.help-steps-list {
    counter-reset: help-step;
    list-style: none !important;
    margin: 1.25rem 0 !important;
}

.help-steps-list li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.25rem !important;
}

.help-steps-list li::before {
    counter-increment: help-step;
    content: counter(help-step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- ESQUEMAS VISUALES Y MOCKUPS DE INTERFAZ EN ARTÍCULOS --- */
.help-mockup-container {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin: 1.75rem 0;
}

.help-mockup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.help-flow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.help-flow-step {
    flex: 1;
    min-width: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

.help-flow-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.help-flow-step-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.help-flow-step-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.help-flow-arrow {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-badge-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--accent-bg);
    color: var(--accent);
}

.help-badge-tag.success {
    background: rgba(26, 122, 74, 0.12);
    color: var(--semantic-success);
}

.help-badge-tag.warning {
    background: rgba(150, 101, 10, 0.12);
    color: var(--semantic-warning);
}

/* --- RESPONSIVE EN MÓVILES --- */
@media (max-width: 900px) {
    .help-header {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .help-search-container {
        max-width: 100%;
        order: 3;
    }

    .help-layout {
        flex-direction: column !important;
        padding: 1rem;
        gap: 1rem;
    }
    
    .help-sidebar {
        width: 100%;
        max-height: none;
        height: auto;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }
    
    .help-category-btn {
        white-space: nowrap;
        width: auto;
    }

    .help-content-area {
        padding: 1.25rem;
    }

    .help-article-title {
        font-size: 1.35rem;
    }

    .help-flow-diagram {
        flex-direction: column;
        align-items: stretch;
    }

    .help-flow-arrow {
        transform: rotate(90deg);
        margin: 0.25rem 0;
    }
}
