
:root {
    --help-nav-h: 61px;
    --help-content-max: 1200px;
    --help-content-pad: 20px;

    --help-orange: #ED7445;
    --help-orange-dark: #e55f2e;
    --help-navy: #0a1a3f;
    --help-text: #2e3b4e;
    --help-muted: #5a6879;
    --help-muted-2: #8894a6;
    --help-line: rgba(10, 26, 63, 0.08);
    --help-line-strong: rgba(10, 26, 63, 0.2);
    --help-bg: #f6f8fc;
    --help-white: #ffffff;
    --help-bubble-ai: #eef1f6;
    --help-wa: #25D366;
    --help-wa-dark: #1eb257;

    --help-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 576px) {
    :root { --help-nav-h: 56px; }
}

body[data-page="help"] {
    background: var(--help-bg);
}

body.help-chat-open {
    overflow: hidden;
}

body.help-chat-open .whatsapp-float {
    display: none;
}


body[data-page="help"] .navbar .nav-link.active {
    color: var(--help-orange);
    border-bottom: none;
}
body[data-page="help"] .navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--help-orange);
}
body[data-page="help"] .navbar .nav-link {
    position: relative;
}

.help-hero {
    margin-top: var(--help-nav-h);
    padding: 54px 0 26px;
    text-align: center;
    background:
        radial-gradient(900px 320px at 50% -120px, rgba(237,116,69,0.13), transparent 70%),
        var(--help-bg);
}
.help-hero__inner {
    width: 100%;
    max-width: var(--help-content-max);
    margin: 0 auto;
    padding: 0 var(--help-content-pad);
}
.help-hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--help-white);
    border: 1px solid rgba(10, 26, 63, 0.12);
    color: var(--help-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    padding: 0.35rem 1rem;
    border-radius: 40px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(10, 26, 63, 0.05);
}
.help-hero__pill i {
    font-size: 0.8rem;
    color: var(--help-muted-2);
}
.help-hero__title {
    font-size: 2.6rem;
    color: var(--help-navy);
    margin: 0 0 0.5rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.help-hero__sub {
    color: var(--help-muted);
    max-width: 620px;
    margin: 0 auto;
    font-size: 0.98rem;
    line-height: 1.6;
}


.help-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 760px;
    margin: 1.5rem auto 0;
    background: var(--help-white);
    border: 1px solid var(--help-line);
    border-radius: 60px;
    padding: 0.45rem 0.45rem 0.45rem 1.2rem;
    box-shadow: 0 10px 30px rgba(10, 26, 63, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.help-search:focus-within {
    border-color: rgba(10, 26, 63, 0.25);
    box-shadow: 0 12px 34px rgba(10, 26, 63, 0.1);
}
.help-search__icon {
    color: #9aa6b8;
    font-size: 1rem;
    flex: 0 0 auto;
}
.help-search__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--help-navy);
    padding: 0.85rem 0;
}
.help-search__input::placeholder {
    color: #9aa6b8;
}
.help-search__btn {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: var(--help-orange);
    color: #fff;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(237, 116, 69, 0.25);
    transition: background 0.2s ease, transform 0.15s ease;
}
.help-search__btn i {
    color: #fff;
    line-height: 1;
    transform: translateX(1px);
}
.help-search__btn:hover {
    background: var(--help-orange-dark);
    transform: translateY(-1px);
}
.help-search__btn:active {
    transform: translateY(0) scale(0.96);
}
.help-search__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.help-privacy {
    font-size: 0.72rem;
    color: var(--help-muted-2);
    margin: 0.85rem auto 0;
    line-height: 1.5;
    max-width: 640px;
}
.help-privacy a {
    color: var(--help-muted);
    text-decoration: underline;
}

.help-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.3rem;
}
.help-chip {
    background: var(--help-white);
    border: 1px solid var(--help-line);
    border-radius: 40px;
    padding: 0.42rem 0.95rem;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--help-text);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.help-chip:hover {
    border-color: var(--help-line-strong);
    color: var(--help-navy);
}

.help-chat {
    position: fixed;
    top: var(--help-nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--help-bg);
    display: flex;
    flex-direction: column;
    z-index: 900;
    animation: helpChatIn 0.28s var(--help-ease) both;
}
.help-chat[hidden] {
    display: none;
}
@keyframes helpChatIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.help-chat__back {
    position: absolute;
    top: 16px;
    left: max(var(--help-content-pad), calc((100% - var(--help-content-max)) / 2 + var(--help-content-pad)));
    z-index: 5;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--help-white);
    border: 1px solid rgba(10, 26, 63, 0.1);
    color: var(--help-navy);
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(10, 26, 63, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.help-chat__back i {
    color: inherit;
    font-size: 0.85rem;
    line-height: 1;
}
.help-chat__back:hover {
    background: var(--help-bg);
    border-color: var(--help-line-strong);
    box-shadow: 0 8px 18px rgba(10, 26, 63, 0.12);
}
.help-chat__back:active {
    transform: scale(0.96);
}
.help-chat__back:focus-visible {
    outline: 2px solid var(--help-orange);
    outline-offset: 2px;
}

.help-chat__messages {
    flex: 1 1 auto;
    overflow-y: auto;
    background: var(--help-bg);
    -webkit-overflow-scrolling: touch;
}
.help-chat__inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 72px 1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
    box-sizing: border-box;
}

.help-msg {
    display: flex;
    gap: 0.55rem;
    max-width: 100%;
    animation: helpMsgIn 0.28s ease both;
}
@keyframes helpMsgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* User */
.help-msg--user {
    justify-content: flex-end;
}
.help-msg--user .help-msg__bubble {
    background: var(--help-orange);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    padding: 0.7rem 1rem;
    max-width: 78%;
    font-size: 0.92rem;
    line-height: 1.55;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(237, 116, 69, 0.2);
    white-space: pre-wrap;
}

/* AI */
.help-msg--ai {
    justify-content: flex-start;
    align-items: flex-start;
}
.help-msg__body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 100%;
    min-width: 0;
}
.help-msg__name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--help-muted-2);
    letter-spacing: 0.2px;
    padding-left: 0.15rem;
    line-height: 1.2;
}
.help-msg--ai .help-msg__bubble {
    background: var(--help-bubble-ai);
    border: 1px solid var(--help-line);
    border-radius: 18px 18px 18px 4px;
    padding: 0.85rem 1.05rem;
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--help-text);
    box-shadow: 0 4px 12px rgba(10, 26, 63, 0.04);
    word-wrap: break-word;
}
.help-msg--ai .help-msg__bubble p {
    color: var(--help-text);
    font-size: 0.95rem;
    margin: 0 0 0.6rem;
    line-height: 1.7;
}
.help-msg--ai .help-msg__bubble p:last-child {
    margin-bottom: 0;
}
.help-msg--ai .help-msg__bubble ul {
    margin: 0 0 0.6rem;
    padding-left: 1.15rem;
    list-style: disc;
}
.help-msg--ai .help-msg__bubble li {
    margin-bottom: 0.3rem;
    color: var(--help-text);
    font-size: 0.95rem;
}
.help-msg--ai .help-msg__bubble strong {
    color: var(--help-navy);
    font-weight: 600;
}

/* Message state variants */
.help-msg--error .help-msg__bubble {
    background: #fff5f5;
    border-color: rgba(220, 53, 69, 0.18);
}
.help-msg--warn .help-msg__bubble {
    background: var(--help-bubble-ai);
    border-color: rgba(10, 26, 63, 0.12);
}

/* Loading dots */
.help-msg--loading .help-msg__bubble {
    padding: 0.9rem 1.1rem;
}
.help-typing {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.help-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--help-muted-2);
    opacity: 0.5;
    animation: helpTypingBounce 1.1s infinite ease-in-out;
}
.help-typing span:nth-child(2) { animation-delay: 0.15s; }
.help-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes helpTypingBounce {
    0%, 80%, 100% { transform: scale(0.85); opacity: 0.5; }
    40%           { transform: scale(1.15); opacity: 1; }
}

.help-msg__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--help-line);
}
.help-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--help-white);
    border: 1px solid var(--help-line);
    border-radius: 40px;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--help-navy);
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.help-link-btn:hover {
    border-color: var(--help-line-strong);
    background: #e7ebf1;
    color: var(--help-navy);
}
.help-link-btn i {
    color: var(--help-muted);
    font-size: 0.7rem;
}
.help-link-btn--wa {
    background: var(--help-wa);
    border-color: var(--help-wa);
    color: #fff;
}
.help-link-btn--wa:hover {
    background: var(--help-wa-dark);
    border-color: var(--help-wa-dark);
    color: #fff;
}
.help-link-btn--wa i {
    color: #fff;
}

/* Action row inside messages */
.help-msg__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--help-line);
}
.help-act {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 40px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    border: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.help-act--primary {
    background: var(--help-orange);
    color: #fff;
}
.help-act--primary:hover {
    background: var(--help-orange-dark);
}
.help-act--wa {
    background: var(--help-wa);
    color: #fff;
}
.help-act--wa:hover {
    background: var(--help-wa-dark);
}
.help-act--wa i {
    color: #fff;
}
.help-act--ghost {
    background: var(--help-white);
    color: var(--help-navy);
    border: 1px solid rgba(10, 26, 63, 0.1);
}
.help-act--ghost:hover {
    border-color: var(--help-line-strong);
    background: var(--help-bg);
    color: var(--help-navy);
}

.help-chat__inputbar {
    flex: 0 0 auto;
    background: var(--help-white);
    border-top: 1px solid var(--help-line);
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0.65rem));
}
.help-chat__inputinner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.help-chat__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(10, 26, 63, 0.1);
    border-radius: 24px;
    padding: 0.7rem 1.05rem;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--help-navy);
    outline: 0;
    background: var(--help-bg);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.help-chat__input::placeholder {
    color: #9aa6b8;
}
.help-chat__input:focus {
    border-color: rgba(10, 26, 63, 0.25);
    background: var(--help-white);
    box-shadow: 0 0 0 3px rgba(10, 26, 63, 0.06);
}
.help-chat__send {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: var(--help-orange);
    color: #fff;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(237, 116, 69, 0.25);
    transition: background 0.2s ease;
}
.help-chat__send i { color: #fff; line-height: 1; }
.help-chat__send:hover {
    background: var(--help-orange-dark);
}
.help-chat__send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.help-section-head {
    text-align: center;
    margin-bottom: 1.6rem;
}
.help-section-head h2 {
    font-size: 1.7rem;
    color: var(--help-navy);
    margin: 0 0 0.3rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.45rem;
    border-bottom: none;
    font-weight: 600;
}
.help-section-head h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--help-orange);
}
.help-section-head p {
    color: var(--help-muted);
    font-size: 0.9rem;
    margin: 0;
}

.help-topics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    max-width: 980px;
    margin: 0 auto;
}
.help-topic {
    display: block;
    background: var(--help-white);
    border: 1px solid var(--help-line);
    border-radius: 20px;
    padding: 1.2rem 1.15rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.help-topic:hover {
    border-color: var(--help-line-strong);
    background: #fafbfd;
    box-shadow: 0 8px 20px rgba(10, 26, 63, 0.06);
}
.help-topic__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(237, 116, 69, 0.1);
    color: var(--help-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}
.help-topic h3 {
    font-size: 0.98rem;
    color: var(--help-navy);
    margin: 0 0 0.25rem;
    font-weight: 600;
}
.help-topic p {
    font-size: 0.82rem;
    color: var(--help-muted);
    margin: 0;
    line-height: 1.5;
}


body.help-chat-open #help-hero,
body.help-chat-open #help-topics,
body.help-chat-open .footer {
    display: none;
}


@media (max-width: 992px) {
    .help-topics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .help-hero { padding: 40px 0 22px; }
    .help-hero__title { font-size: 2rem; }
    .help-search {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 0.65rem 0.9rem;
        gap: 0.4rem;
    }
    .help-search__input {
        padding: 0.4rem 0;
        flex: 1 1 auto;
        min-width: 0;
    }
    .help-search__icon { display: none; }
    .help-search__btn {
        width: 42px;
        height: 42px;
    }

    .help-chat__back {
        top: 12px;
        left: 14px;
        width: 38px;
        height: 38px;
    }
    .help-chat__back i { font-size: 0.8rem; }

    .help-chat__inner { padding: 62px 0.8rem 1.2rem; gap: 0.9rem; }
    .help-msg--user .help-msg__bubble { max-width: 85%; }
    .help-msg__body { max-width: 100%; }
    .help-msg__name { font-size: 0.66rem; }
    .help-chat__inputinner { padding: 0.6rem 0.75rem; }
}
@media (max-width: 560px) {
    .help-topics { grid-template-columns: 1fr; }
    .help-hero__title { font-size: 1.7rem; }
    .help-hero__sub { font-size: 0.9rem; }
}


.help-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .help-chat,
    .help-msg,
    .help-typing span {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}


.help-msg--ai .help-msg__bubble a,
.help-msg--ai .help-msg__bubble a:hover,
.help-msg--ai .help-msg__bubble a:focus,
.help-msg--ai .help-msg__bubble a:active,
.help-msg--ai .help-msg__bubble a:visited {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important;
}

.help-msg--ai .help-msg__bubble p a,
.help-msg--ai .help-msg__bubble li a {
    color: var(--help-navy);
    font-weight: 500;
}
.help-msg--ai .help-msg__bubble p a:hover,
.help-msg--ai .help-msg__bubble li a:hover {
    color: var(--help-navy);
    opacity: 0.85;
}

.help-msg--ai .help-msg__bubble a.help-link--wa {
    color: var(--help-wa);
}
.help-msg--ai .help-msg__bubble a.help-link--wa:hover {
    color: var(--help-wa-dark);
}

.help-msg__links a,
.help-msg__links a:hover,
.help-msg__links a:focus,
.help-msg__links a:active {
    text-decoration: none !important;
    border-bottom: none !important;
}

.help-msg__actions a,
.help-msg__actions a:hover,
.help-msg__actions a:focus,
.help-msg__actions a:active,
.help-msg__actions button,
.help-msg__actions button:hover,
.help-msg__actions button:focus,
.help-msg__actions button:active,
.help-act,
.help-act:hover,
.help-act:focus,
.help-act:active {
    text-decoration: none !important;
    border-bottom: none !important;
}