/* Portal de Ajuda: Central de Ajuda (/help) e Perguntas Frequentes (/help/faq).
   As cores vêm das variáveis de tema de app.css; o que é específico do módulo é
   declarado aqui como variável local e reescrito no tema escuro logo abaixo. */

.help-page {
    --help-accent: #14a2e0;
    --help-accent-strong: #0d8ec7;
    --help-hero-bg: #eff7fb;
    --help-surface: var(--card-bg);
    --help-open-from: #0a2233;
    --help-open-to: #0e3d59;
    --help-on-dark: #ffffff;
    --help-on-dark-muted: #cfe3ef;

    /* .main-content é flex column: sem width/box-sizing o bloco nasceria com a largura
       do conteúdo em vez de esticar (mesmo motivo do módulo Bíblia). */
    width: 100%;
    box-sizing: border-box;
    color: var(--text-color);
}

[data-theme="dark"] .help-page {
    --help-accent: #3bb4ea;
    --help-accent-strong: #57c2f2;
    --help-hero-bg: #182129;
    --help-open-from: #10202b;
    --help-open-to: #16394f;
    --help-on-dark: #eef6fb;
    --help-on-dark-muted: #a9c4d5;
}

.help-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 32px 56px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ---------- Hero + busca ---------- */

.help-hero {
    background-color: var(--help-hero-bg);
    border-radius: 0 0 24px 24px;
    padding: 56px 24px 48px;
    text-align: center;
}

.help-hero-title {
    margin: 0;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
}

.help-hero-subtitle {
    margin: 12px 0 28px;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.help-search {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.help-search-inline {
    margin: 0;
    max-width: 100%;
}

.help-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 48px 14px 20px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    font-style: italic;
}

.help-search-input:focus {
    outline: none;
    border-color: var(--help-accent);
    box-shadow: 0 0 0 3px rgba(20, 162, 224, 0.18);
}

.help-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* ---------- Estados ---------- */

.help-status {
    margin: 0;
    color: var(--text-secondary);
}

.help-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.help-alert-retry {
    border: none;
    background: none;
    color: var(--help-accent);
    font-weight: 600;
    cursor: pointer;
}

/* ---------- Card do Canal de Denúncias ---------- */

.help-denuncia {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    border-radius: 16px;
    text-decoration: none;
    background-color: var(--help-open-from);
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.65) 45%, rgba(0, 0, 0, 0.25) 100%), url('/images/help-denuncia-banner.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center right;
    color: var(--help-on-dark);
}

.help-denuncia:hover {
    filter: brightness(1.08);
}

.help-denuncia-shield {
    flex: 0 0 auto;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background-color: var(--card-bg);
    color: var(--help-accent);
    font-size: 2.2rem;
}

.help-denuncia-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.help-denuncia-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.help-denuncia-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.help-denuncia-badge {
    padding: 4px 10px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.16);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.help-denuncia-description {
    color: var(--help-on-dark-muted);
    font-size: 0.95rem;
}

.help-denuncia-cta {
    margin-top: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    background-color: var(--help-accent);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Cabeçalho de seção ---------- */

.help-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.help-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.help-section-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.help-section-subtitle {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.help-section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--help-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.help-section-link:hover {
    text-decoration: underline;
}

/* ---------- Tutoriais ---------- */

.help-tutorial-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.help-tutorial-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--help-surface);
    border: 1px solid var(--border-color);
}

.help-tutorial-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: var(--ark-cinza-claro);
}

.help-tutorial-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.help-tutorial-kind {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.7rem;
    font-weight: 600;
}

.help-tutorial-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 12px;
    flex: 1 1 auto;
}

.help-tutorial-tag {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 6px;
    background-color: var(--help-hero-bg);
    color: var(--help-accent);
    font-size: 0.72rem;
    font-weight: 600;
}

.help-tutorial-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.help-tutorial-cta {
    margin: 0 16px 16px;
    padding: 10px;
    border-radius: 6px;
    background-color: var(--help-accent);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.help-tutorial-cta:hover {
    background-color: var(--help-accent-strong);
}

/* ---------- FAQ ---------- */

.help-faq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.help-faq-card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--help-surface);
    overflow: hidden;
}

.help-faq-card.open {
    border-color: transparent;
    background: linear-gradient(160deg, var(--help-open-from) 0%, var(--help-open-to) 100%);
    color: var(--help-on-dark);
}

.help-faq-toggle {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
    border: none;
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.help-faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.help-faq-tag {
    padding: 3px 12px;
    border-radius: 999px;
    background-color: var(--help-hero-bg);
    color: var(--help-accent);
    font-size: 0.72rem;
    font-weight: 600;
}

.help-faq-card.open .help-faq-tag {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--help-open-from);
}

.help-faq-icon {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.help-faq-card.open .help-faq-icon {
    color: var(--help-on-dark);
}

.help-faq-question {
    font-size: 1rem;
    font-weight: 600;
}

.help-faq-answer {
    padding: 0 20px 20px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--help-on-dark-muted);
}

.help-faq-empty {
    margin: 0;
    color: var(--text-secondary);
}

/* ---------- Página de FAQ ---------- */

.help-page-inner .help-content {
    padding-top: 40px;
}

.help-inner-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.help-back {
    color: var(--text-color);
    font-size: 1.2rem;
    text-decoration: none;
    line-height: 1.6;
}

.help-inner-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.help-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.help-category-chip {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
}

.help-category-chip.active {
    background-color: var(--help-accent);
    border-color: var(--help-accent);
    color: #ffffff;
    font-weight: 600;
}

.help-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.help-pagination-controls {
    display: flex;
    gap: 6px;
}

.help-page-btn {
    min-width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.help-page-btn.active {
    background-color: var(--help-hero-bg);
    border-color: var(--help-accent);
    color: var(--help-accent);
    font-weight: 700;
}

.help-page-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.help-pagination-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ---------- Contato ---------- */

.help-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.help-contact-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.help-contact-subtitle {
    margin: 0 0 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.help-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.help-contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    box-sizing: border-box;
    padding: 32px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--help-surface);
    color: var(--text-color);
    text-decoration: none;
}

a.help-contact-card:hover {
    border-color: var(--help-accent);
}

.help-contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background-color: var(--help-accent);
    color: #ffffff;
    font-size: 1.4rem;
}

.help-contact-label {
    font-size: 1.05rem;
    font-weight: 700;
}

.help-contact-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-word;
}

/* ---------- Responsivo ---------- */

@media (max-width: 1100px) {
    .help-tutorial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .help-faq-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .help-content {
        padding: 20px 16px 40px;
        gap: 36px;
    }

    .help-hero {
        padding: 36px 16px 32px;
    }

    .help-hero-title {
        font-size: 2rem;
    }

    .help-tutorial-grid,
    .help-faq-grid,
    .help-contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .help-denuncia {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
        gap: 16px;
        /* No mobile o texto ocupa toda a largura: escurece mais o fundo para manter a leitura */
        background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.7) 100%), url('/images/help-denuncia-banner.png');
    }

    .help-denuncia-shield {
        width: 64px;
        height: 64px;
        font-size: 1.6rem;
    }

    .help-denuncia-title {
        font-size: 1.25rem;
    }

    .help-section-header {
        flex-direction: column;
        gap: 8px;
    }

    .help-pagination {
        justify-content: center;
    }

    .help-pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}
