/* ============================================================
   CENTRO DE AYUDA (HelpCanvas) — Fluent translúcido + guinda,
   iconográfico y animado. Patrón de canvas del proyecto.
   ============================================================ */

.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(36, 12, 18, 0.34);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
    animation: helpFade 0.22s ease-out;
}

.help-canvas {
    width: min(1120px, 96vw);
    height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(36, 12, 18, 0.28), 0 2px 8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: helpPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Encabezado ===== */
.help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: linear-gradient(120deg, rgba(122, 31, 51, 0.96), rgba(92, 23, 38, 0.96));
    color: #fff;
}
.help-head-title { display: flex; align-items: center; gap: 14px; }
.help-head-ico {
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    animation: helpFloat 3.5s ease-in-out infinite;
}
.help-head h5 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.help-head-sub { font-size: 11.5px; opacity: 0.85; }
.help-close {
    width: 34px; height: 34px; border-radius: 9px;
    border: none; background: rgba(255, 255, 255, 0.14); color: #fff;
    cursor: pointer; font-size: 15px; transition: background 0.15s, transform 0.15s;
}
.help-close:hover { background: rgba(255, 255, 255, 0.28); transform: rotate(90deg); }

/* ===== Cuerpo ===== */
.help-main { display: flex; flex: 1; min-height: 0; }

/* --- Menú lateral --- */
.help-aside {
    width: 268px;
    flex-shrink: 0;
    padding: 14px 12px;
    overflow-y: auto;
    border-right: 1px solid rgba(122, 31, 51, 0.12);
    background: rgba(255, 255, 255, 0.4);
}
.help-nav-sec {
    font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
    color: #9b6b76; padding: 14px 10px 5px;
}
.help-nav-item {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; margin-bottom: 2px;
    border: none; background: transparent; border-radius: 9px;
    font-size: 13px; color: #4a3b3f; text-align: left; cursor: pointer;
    transition: background 0.14s, color 0.14s, transform 0.14s;
}
.help-nav-item i { font-size: 16px; color: #7a1f33; flex-shrink: 0; }
.help-nav-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-nav-item:hover { background: rgba(122, 31, 51, 0.08); transform: translateX(2px); }
.help-nav-item.active { background: #7a1f33; color: #fff; }
.help-nav-item.active i { color: #fff; }
.help-dot { width: 7px; height: 7px; border-radius: 50%; background: #2e9e6b; flex-shrink: 0; }

/* --- Panel de contenido --- */
.help-content { flex: 1; overflow-y: auto; padding: 26px 30px; min-width: 0; }

/* Hero */
.help-hero { text-align: center; max-width: 640px; margin: 6px auto 26px; }
.help-hero-ico {
    width: 64px; height: 64px; margin: 0 auto 14px;
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #fff;
    background: linear-gradient(135deg, #7a1f33, #c8505a);
    box-shadow: 0 10px 24px rgba(122, 31, 51, 0.32);
    animation: helpFloat 3.5s ease-in-out infinite;
}
.help-hero h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; color: #2c0b14; }
.help-hero p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #5b4a4e; }

/* Grid de tarjetas */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}
.help-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; text-align: left;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(122, 31, 51, 0.14);
    border-radius: 13px; cursor: pointer;
    transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
    animation: helpCardIn 0.4s ease-out both;
}
.help-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(122, 31, 51, 0.16);
    border-color: rgba(122, 31, 51, 0.4);
}
.help-card-ico {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; color: #7a1f33; background: rgba(122, 31, 51, 0.1);
    transition: background 0.16s, color 0.16s;
}
.help-card:hover .help-card-ico { background: #7a1f33; color: #fff; }
.help-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.help-card-title { font-size: 13.5px; font-weight: 700; color: #2c0b14; display: flex; align-items: center; gap: 7px; }
.help-card-desc { font-size: 11.5px; color: #6b5a5e; line-height: 1.4; }
.help-card-arrow { color: #b58b94; font-size: 13px; transition: transform 0.16s, color 0.16s; }
.help-card:hover .help-card-arrow { color: #7a1f33; transform: translateX(3px); }
.help-badge {
    font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    background: #e7f6ee; color: #1f7a4d; border: 1px solid #b9e3cd; border-radius: 5px; padding: 1px 5px;
}

/* Detalle */
.help-detail { animation: helpCardIn 0.32s ease-out both; max-width: 760px; }
.help-detail-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.help-detail-ico {
    width: 60px; height: 60px; flex-shrink: 0; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff;
    background: linear-gradient(135deg, #7a1f33, #c8505a);
    box-shadow: 0 8px 20px rgba(122, 31, 51, 0.3);
    animation: helpPopIco 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.help-detail-head h2 { margin: 6px 0 0; font-size: 20px; font-weight: 700; color: #2c0b14; }
.help-detail-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.help-chip {
    font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
    background: rgba(122, 31, 51, 0.08); color: #7a1f33;
    border: 1px solid rgba(122, 31, 51, 0.22); border-radius: 5px; padding: 2px 7px;
}
.help-chip.code { font-family: 'Cascadia Code', Consolas, monospace; }
.help-chip.ok { background: #e7f6ee; color: #1f7a4d; border-color: #b9e3cd; }
.help-chip.wip { background: #fef3e2; color: #9a5b07; border-color: #f0cf9a; }
.help-detail-desc { font-size: 13.5px; line-height: 1.65; color: #4a3b3f; margin: 0 0 20px; }
.help-detail-h3 {
    font-size: 13px; font-weight: 700; color: #2c0b14;
    display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
}
.help-detail-h3 i { color: #7a1f33; }
.help-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.help-option {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; text-align: left;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(122, 31, 51, 0.14); border-radius: 10px;
    font-size: 13px; color: #3a2d30; cursor: pointer;
    transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.help-option i { color: #7a1f33; font-size: 15px; }
.help-option:hover { background: rgba(122, 31, 51, 0.07); border-color: rgba(122, 31, 51, 0.4); transform: translateX(3px); }
.help-detail-foot { border-top: 1px solid rgba(122, 31, 51, 0.12); padding-top: 18px; }
.help-go {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 22px; border: none; border-radius: 10px;
    background: #7a1f33; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.help-go:hover { background: #5c1726; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(122, 31, 51, 0.3); }

/* Scrollbars */
.help-aside::-webkit-scrollbar, .help-content::-webkit-scrollbar { width: 8px; }
.help-aside::-webkit-scrollbar-thumb, .help-content::-webkit-scrollbar-thumb { background: #d8c4c9; border-radius: 4px; }
.help-aside::-webkit-scrollbar-thumb:hover, .help-content::-webkit-scrollbar-thumb:hover { background: #b58b94; }

/* ===== Animaciones ===== */
@keyframes helpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes helpPop {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes helpCardIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes helpPopIco {
    0% { transform: scale(0.5) rotate(-12deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes helpFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ===== Responsivo ===== */
@media (max-width: 760px) {
    .help-canvas { height: 92vh; width: 96vw; }
    .help-aside { display: none; }
    .help-content { padding: 18px; }
}
