/* =============================================
   HELP CENTER & FAQ — SavingsHub
   Theme-compliant using CSS variables
   ============================================= */

/* --- Hero --- */
.help-hero {
    position: relative;
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
}
.help-hero-compact {
    padding: 60px 24px 40px;
}
.help-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        var(--deals-primary, #3b82f6),
        color-mix(in srgb, var(--deals-primary, #3b82f6) 70%, #7c3aed)
    );
    z-index: 0;
}
.help-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%);
}
.help-hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}
.help-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}
.help-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.15;
}
.help-hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin: 0 0 32px;
    line-height: 1.5;
}

/* --- Breadcrumb --- */
.help-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.6);
}
.help-breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.help-breadcrumb a:hover {
    color: #fff;
}

/* --- Search --- */
.help-search {
    max-width: 560px;
    margin: 0 auto;
}
.help-search-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    padding: 6px 6px 6px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.help-search-icon {
    flex-shrink: 0;
    color: #9ca3af;
}
.help-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 12px;
    font-size: 0.95rem;
    background: transparent;
    color: var(--deals-heading, #1f2937);
}
.help-search-input::placeholder {
    color: #9ca3af;
}
.help-search-btn {
    flex-shrink: 0;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    background: var(--deals-primary, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.help-search-btn:hover {
    background: color-mix(in srgb, var(--deals-primary, #3b82f6) 85%, #000);
    transform: translateY(-1px);
}

/* --- Sections --- */
.help-section {
    padding: 60px 24px;
}
.help-section-alt {
    background: color-mix(in srgb, var(--deals-surface, #ffffff) 50%, var(--deals-bg, #f9fafb));
}
.help-container {
    max-width: 960px;
    margin: 0 auto;
}
.help-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--deals-heading, #1f2937);
    text-align: center;
    margin: 0 0 8px;
}
.help-section-subtitle {
    font-size: 1rem;
    color: var(--deals-text-muted, #6b7280);
    text-align: center;
    margin: 0 0 40px;
}

/* --- Topic Cards --- */
.help-topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.help-topic-card {
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    border-radius: 16px;
    background: var(--deals-surface, #ffffff);
    border: 1px solid color-mix(in srgb, var(--deals-heading, #1f2937) 8%, transparent);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.help-topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: color-mix(in srgb, var(--deals-primary, #3b82f6) 30%, transparent);
}
.help-topic-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.help-topic-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--deals-heading, #1f2937);
    margin: 0 0 8px;
}
.help-topic-desc {
    font-size: 0.88rem;
    color: var(--deals-text-muted, #6b7280);
    line-height: 1.5;
    margin: 0 0 auto;
    padding-bottom: 12px;
}
.help-topic-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--deals-primary, #3b82f6);
    margin-top: 8px;
}

/* --- FAQ --- */
.help-faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.help-faq-item {
    border-radius: 12px;
    background: var(--deals-surface, #ffffff);
    border: 1px solid color-mix(in srgb, var(--deals-heading, #1f2937) 8%, transparent);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.help-faq-item[open] {
    border-color: color-mix(in srgb, var(--deals-primary, #3b82f6) 25%, transparent);
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.help-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--deals-heading, #1f2937);
    cursor: pointer;
    list-style: none;
    transition: color 0.2s;
}
.help-faq-question::-webkit-details-marker {
    display: none;
}
.help-faq-question:hover {
    color: var(--deals-primary, #3b82f6);
}
.help-faq-chevron {
    flex-shrink: 0;
    color: var(--deals-text-muted, #6b7280);
    transition: transform 0.3s ease;
}
.help-faq-item[open] .help-faq-chevron {
    transform: rotate(180deg);
    color: var(--deals-primary, #3b82f6);
}
.help-faq-answer {
    padding: 0 20px 20px;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--deals-text, #374151);
}
.help-faq-answer p {
    margin: 0 0 12px;
}
.help-faq-answer p:last-child {
    margin-bottom: 0;
}
.help-faq-answer ol,
.help-faq-answer ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}
.help-faq-answer li {
    margin-bottom: 6px;
}
.help-faq-answer a {
    color: var(--deals-primary, #3b82f6);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.help-faq-answer a:hover {
    color: color-mix(in srgb, var(--deals-primary, #3b82f6) 80%, #000);
}
.help-faq-more {
    text-align: center;
    margin-top: 32px;
}

/* --- FAQ Category (faq page) --- */
.faq-content-area {
    max-width: 780px;
}
.faq-category {
    margin-bottom: 48px;
    scroll-margin-top: 100px;
}
.faq-category:last-child {
    margin-bottom: 0;
}
.faq-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid color-mix(in srgb, var(--deals-heading, #1f2937) 8%, transparent);
}
.faq-category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.faq-category-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--deals-heading, #1f2937);
    margin: 0;
}
.faq-category .help-faq-item {
    border-radius: 10px;
    margin-bottom: 8px;
}

/* --- FAQ Navigation --- */
.faq-nav-section {
    padding: 0 24px;
    background: var(--deals-surface, #ffffff);
    border-bottom: 1px solid color-mix(in srgb, var(--deals-heading, #1f2937) 8%, transparent);
    position: sticky;
    top: 0;
    z-index: 50;
}
.faq-nav {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 12px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.faq-nav::-webkit-scrollbar {
    display: none;
}
.faq-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--deals-text-muted, #6b7280);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.faq-nav-item:hover {
    background: color-mix(in srgb, var(--deals-primary, #3b82f6) 8%, transparent);
    color: var(--deals-primary, #3b82f6);
}

/* --- Steps --- */
.help-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}
.help-step {
    flex: 1;
    max-width: 260px;
    text-align: center;
    padding: 0 16px;
}
.help-step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--deals-primary, #3b82f6);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--deals-primary, #3b82f6) 30%, transparent);
}
.help-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--deals-heading, #1f2937);
    margin: 0 0 8px;
}
.help-step-desc {
    font-size: 0.88rem;
    color: var(--deals-text-muted, #6b7280);
    line-height: 1.5;
    margin: 0;
}
.help-step-connector {
    display: flex;
    align-items: center;
    padding-top: 24px;
    flex-shrink: 0;
}

/* --- CTA --- */
.help-cta-section {
    padding-bottom: 80px;
}
.help-cta-card {
    background: linear-gradient(135deg,
        var(--deals-primary, #3b82f6),
        color-mix(in srgb, var(--deals-primary, #3b82f6) 70%, #7c3aed)
    );
    border-radius: 20px;
    padding: 56px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.help-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.help-cta-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.help-cta-content {
    position: relative;
    z-index: 1;
}
.help-cta-icon {
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
}
.help-cta-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
}
.help-cta-text {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* --- Buttons --- */
.help-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 12px;
    background: #fff;
    color: var(--deals-primary, #3b82f6);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.help-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.help-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 10px;
    background: var(--deals-primary, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.help-btn-secondary:hover {
    background: color-mix(in srgb, var(--deals-primary, #3b82f6) 85%, #000);
    transform: translateY(-1px);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .help-topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .help-hero {
        padding: 60px 20px 48px;
    }
    .help-hero-compact {
        padding: 48px 20px 32px;
    }
    .help-hero-title {
        font-size: 1.85rem;
    }
    .help-hero-subtitle {
        font-size: 0.95rem;
    }
    .help-section {
        padding: 40px 16px;
    }
    .help-section-title {
        font-size: 1.4rem;
    }
    .help-topics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .help-topic-card {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 20px;
    }
    .help-topic-icon {
        margin-bottom: 0;
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }
    .help-topic-desc {
        display: none;
    }
    .help-topic-link {
        display: none;
    }
    .help-steps {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .help-step {
        max-width: 100%;
    }
    .help-step-connector {
        transform: rotate(90deg);
        padding-top: 0;
    }
    .help-cta-card {
        padding: 40px 24px;
    }
    .help-cta-title {
        font-size: 1.4rem;
    }
    .faq-nav-item {
        padding: 8px 12px;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .help-hero {
        padding: 48px 16px 36px;
    }
    .help-hero-title {
        font-size: 1.5rem;
    }
    .help-search-wrapper {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }
    .help-search-icon {
        display: none;
    }
    .help-search-input {
        width: 100%;
        padding: 10px 12px;
    }
    .help-search-btn {
        width: 100%;
        padding: 12px;
    }
    .help-faq-question {
        padding: 14px 16px;
        font-size: 0.88rem;
    }
    .help-faq-answer {
        padding: 0 16px 16px;
        font-size: 0.85rem;
    }
    .faq-category-header {
        gap: 10px;
    }
    .faq-category-icon {
        width: 40px;
        height: 40px;
    }
    .faq-category-title {
        font-size: 1.1rem;
    }
}
