/* ajuda.css — Help Center / FAQ page */

/* ===========================
   HERO
=========================== */
.faq-hero {
    background: linear-gradient(160deg, var(--dark-green) 0%, #2e7d32 60%, #1a5c20 100%);
    padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
    text-align: center;
}

.faq-hero-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--soft-gold);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(8px);
    animation: faqFadeUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
}

.faq-hero-title {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.025em;
    margin-bottom: 0.65rem;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(14px);
    animation: faqFadeUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.35s forwards;
}

.faq-hero-sub {
    font-size: clamp(0.92rem, 1.5vw, 1.05rem);
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 2.25rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(10px);
    animation: faqFadeUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.5s forwards;
}

/* Search bar */
.faq-search-wrap {
    display: flex;
    align-items: center;
    max-width: 620px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    animation: faqFadeUp 0.65s cubic-bezier(0.23, 1, 0.32, 1) 0.65s forwards;
}

.faq-search-icon {
    padding: 0 1rem 0 1.25rem;
    color: #aaa;
    font-size: 1rem;
    flex-shrink: 0;
}

.faq-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    font-size: 0.98rem;
    color: var(--dark-gray);
    padding: 1rem 0;
    background: transparent;
    min-width: 0;
}

.faq-search-input::placeholder {
    color: #bbb;
}

.faq-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 0.85rem;
    margin-right: 0.25rem;
    border-radius: 50%;
    transition: color 0.18s ease, background 0.18s ease;
}

.faq-search-clear:hover {
    color: #666;
    background: #f0f0f0;
}

.faq-search-clear.visible {
    display: flex;
}

/* ===========================
   CATEGORIES
=========================== */
.faq-cats {
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-cats-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.faq-cats-inner::-webkit-scrollbar { display: none; }

.faq-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 999px;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 0.83rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    touch-action: manipulation;
}

.faq-cat-btn i {
    font-size: 0.78rem;
}

.faq-cat-btn:hover {
    border-color: var(--moss-green);
    color: var(--dark-green);
    background: rgba(46, 125, 50, 0.05);
}

.faq-cat-btn:active {
    transform: scale(0.96);
    transition-duration: 0.1s;
}

.faq-cat-btn.active {
    background: var(--dark-green);
    border-color: var(--dark-green);
    color: var(--white);
    box-shadow: 0 2px 10px rgba(27, 94, 32, 0.25);
}

/* ===========================
   MAIN CONTENT
=========================== */
.faq-main {
    background: var(--light-gray);
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    min-height: 400px;
}

.faq-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.faq-results-count {
    font-size: 0.84rem;
    color: #777;
    font-weight: 500;
}

.faq-results-count strong {
    color: var(--dark-green);
}

.faq-sort-hint {
    font-size: 0.78rem;
    color: #aaa;
}

/* ===========================
   ACCORDION
=========================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.055);
    border: 1px solid rgba(0, 0, 0, 0.045);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 18px rgba(27, 94, 32, 0.1);
}

.faq-q-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--dark-gray);
    text-align: left;
    line-height: 1.45;
    transition: color 0.2s ease;
    touch-action: manipulation;
}

.faq-q-btn:hover {
    color: var(--dark-green);
}

.faq-q-btn:active {
    transform: scale(0.995);
}

.faq-q-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(46, 125, 50, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--moss-green);
    font-size: 0.72rem;
    transition: transform 0.28s cubic-bezier(0.23, 1, 0.32, 1), background 0.2s ease, color 0.2s ease;
}

.faq-item.open .faq-q-icon {
    transform: rotate(180deg);
    background: var(--dark-green);
    color: var(--white);
}

/* Answer panel */
.faq-answer-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.23, 1, 0.32, 1);
}

.faq-answer-inner {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.faq-answer-inner p {
    color: #5a5a5a;
    font-size: 0.93rem;
    line-height: 1.8;
    margin: 0 0 1rem;
    padding-top: 1.1rem;
}

.faq-answer-inner p:last-of-type {
    margin-bottom: 0;
}

/* Helpful feedback */
.faq-helpful {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 1rem;
}

.faq-helpful-label {
    font-size: 0.78rem;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
}

.faq-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 999px;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.faq-helpful-btn:hover {
    border-color: var(--moss-green);
    color: var(--dark-green);
    background: rgba(46, 125, 50, 0.06);
}

.faq-helpful-btn:active {
    transform: scale(0.95);
}

.faq-helpful-btn.voted-yes {
    background: rgba(46, 125, 50, 0.1);
    border-color: var(--moss-green);
    color: var(--dark-green);
    cursor: default;
}

.faq-helpful-btn.voted-no {
    background: rgba(229, 62, 62, 0.08);
    border-color: #e53e3e;
    color: #c62828;
    cursor: default;
}

.faq-helpful-btn[disabled] {
    pointer-events: none;
}

/* Category badge on item */
.faq-cat-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--soft-gold);
    margin-bottom: 0.2rem;
}

/* Search highlight */
mark.faq-hl {
    background: rgba(196, 154, 108, 0.28);
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

/* ===========================
   EMPTY STATE
=========================== */
.faq-empty {
    text-align: center;
    padding: 4rem 1rem;
    display: none;
}

.faq-empty.visible {
    display: block;
}

.faq-empty-icon {
    width: 64px;
    height: 64px;
    background: rgba(196, 154, 108, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
    color: var(--soft-gold);
}

.faq-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.faq-empty p {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ===========================
   CTA SECTION
=========================== */
.faq-cta {
    background: var(--white);
    margin-top: clamp(2.5rem, 5vw, 4rem);
    border-radius: 20px;
    padding: clamp(2rem, 4vw, 3rem);
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-cta h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--dark-green);
    letter-spacing: -0.015em;
    margin-bottom: 0.6rem;
}

.faq-cta p {
    font-size: 0.94rem;
    color: #666;
    margin-bottom: 1.75rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.faq-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.faq-cta-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.07);
    margin: 0 0 1.5rem;
}

.faq-cta-contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.faq-cta-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.faq-cta-contact-item i {
    color: var(--dark-green);
    font-size: 0.9rem;
}

.faq-btn-outline {
    background: transparent;
    color: var(--dark-green);
    border: 2px solid var(--dark-green);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.22s ease, color 0.22s ease, transform 0.15s ease;
}

.faq-btn-outline:hover {
    background: var(--dark-green);
    color: var(--white);
    transform: translateY(-2px);
}

.faq-btn-outline:active {
    transform: scale(0.97);
}

/* ===========================
   LOADING SKELETON
=========================== */
@keyframes faqShimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.faq-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-skel-item {
    background: var(--white);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.045);
}

.faq-skel-line {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: faqShimmer 1.4s infinite;
    margin-bottom: 0.65rem;
}

.faq-skel-line.w-80 { width: 80%; }
.faq-skel-line.w-60 { width: 60%; }
.faq-skel-line.w-40 { width: 40%; }

/* ===========================
   ANIMATIONS
=========================== */
@keyframes faqFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .faq-hero-eyebrow,
    .faq-hero-title,
    .faq-hero-sub,
    .faq-search-wrap {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 640px) {
    .faq-cta-contacts {
        flex-direction: column;
        gap: 0.75rem;
    }

    .faq-q-btn {
        padding: 1rem 1.25rem;
    }

    .faq-answer-inner {
        padding: 0 1.25rem 1.25rem;
    }

    .faq-helpful {
        flex-wrap: wrap;
    }

    .faq-cta-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1.5rem;
    }

    .faq-cta-actions .btn {
        text-align: center;
    }
}
