/* ==========================================================================
   cms-extra.css — self-contained styles for CMS-added features
   (FAQ chat widget + custom pages). NOT generated by Tailwind, so these
   survive a Tailwind rebuild and don't depend on purged utility classes.
   ========================================================================== */

/* ------------------------------------------------------------------ */
/*  FAQ chat widget                                                    */
/* ------------------------------------------------------------------ */

.faqbot {
    --faqbot-accent: #0284c7;
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;            /* sits at the very bottom; WhatsApp FAB stacks above it */
    z-index: 60;
    font-family: inherit;
}
.faqbot--bottom-left {
    right: auto;
    left: 1.25rem;
    bottom: 1.5rem;
}

.faqbot__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.1rem 0 0.85rem;
    border: none;
    border-radius: 999px;
    background: var(--faqbot-accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px -6px rgba(0, 0, 0, 0.35), 0 3px 8px -3px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.faqbot__toggle:hover { transform: translateY(-2px); filter: brightness(1.05); }
.faqbot__toggle:focus-visible { outline: 3px solid rgba(2, 132, 199, 0.45); outline-offset: 2px; }
.faqbot__toggle svg { width: 22px; height: 22px; flex-shrink: 0; }
.faqbot__toggle-label { white-space: nowrap; }

.faqbot__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(370px, calc(100vw - 2.5rem));
    max-height: min(70vh, 540px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.35), 0 8px 20px -8px rgba(15, 23, 42, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.faqbot--bottom-left .faqbot__panel { right: auto; left: 0; transform-origin: bottom left; }
.faqbot.is-open .faqbot__panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.faqbot__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--faqbot-accent);
    color: #fff;
}
.faqbot__header-info { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.faqbot__avatar {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 999px; background: rgba(255, 255, 255, 0.22);
}
.faqbot__avatar svg { width: 20px; height: 20px; }
.faqbot__header-text { min-width: 0; }
.faqbot__header h2 { margin: 0; font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; }
.faqbot__status { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; opacity: 0.9; }
.faqbot__status::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: #4ade80; display: inline-block; }
.faqbot__close {
    border: none; background: rgba(255, 255, 255, 0.2); color: #fff;
    width: 30px; height: 30px; flex-shrink: 0; border-radius: 999px;
    font-size: 1.15rem; line-height: 1; cursor: pointer; transition: background 0.15s ease;
}
.faqbot__close:hover { background: rgba(255, 255, 255, 0.35); }

/* Messages area (the chat) */
.faqbot__messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: #f1f5f9;
    -webkit-overflow-scrolling: touch;
}
.faqbot__msg {
    max-width: 86%;
    padding: 0.65rem 0.85rem;
    border-radius: 16px;
    font-size: 0.86rem;
    line-height: 1.5;
    animation: faqbot-pop 0.18s ease;
}
.faqbot__msg--bot {
    align-self: flex-start;
    background: #fff;
    color: #1e293b;
    border: 1px solid #e7edf3;
    border-bottom-left-radius: 5px;
}
.faqbot__msg--user {
    align-self: flex-end;
    background: var(--faqbot-accent);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.faqbot__msg a { color: var(--faqbot-accent); font-weight: 700; text-decoration: underline; }
.faqbot__msg--user a { color: #fff; }
@keyframes faqbot-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.faqbot__q { margin: 0 0 0.3rem; font-size: 0.88rem; font-weight: 700; color: #0f172a; line-height: 1.35; }
.faqbot__a { margin: 0; font-size: 0.85rem; line-height: 1.55; color: #475569; white-space: pre-line; }
.faqbot__cat {
    display: inline-block; margin-top: 0.5rem; padding: 0.12rem 0.5rem;
    border-radius: 999px; background: rgba(2, 132, 199, 0.12);
    color: var(--faqbot-accent); font-size: 0.68rem; font-weight: 700;
}
a.faqbot__cat--link { text-decoration: none; transition: background 0.15s ease, color 0.15s ease; }
a.faqbot__cat--link:hover { background: var(--faqbot-accent); color: #fff; }

/* Clickable question pills, inside the chat flow */
.faqbot__pills { display: flex; flex-wrap: wrap; gap: 0.4rem; align-self: stretch; }
.faqbot__pills-lead { width: 100%; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; margin-bottom: 0.1rem; }
.faqbot__pill {
    text-align: left;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--faqbot-accent);
    border-radius: 999px;
    background: #fff;
    color: var(--faqbot-accent);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.faqbot__pill:hover { background: var(--faqbot-accent); color: #fff; }

/* Input bar */
.faqbot__inputbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
    border-top: 1px solid #e7edf3;
    background: #fff;
}
.faqbot__search {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faqbot__search:focus { outline: none; border-color: var(--faqbot-accent); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18); }
.faqbot__send {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex-shrink: 0;
    border: none; border-radius: 999px;
    background: var(--faqbot-accent); color: #fff; cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.faqbot__send:hover { filter: brightness(1.07); transform: scale(1.05); }
.faqbot__send svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
    .faqbot { right: 1rem; left: 1rem; bottom: 1.25rem; }
    .faqbot--bottom-left { bottom: 1.25rem; }
    .faqbot__toggle { margin-left: auto; }
    .faqbot__panel {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 5rem;
        width: auto;
        max-height: 72vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faqbot__toggle, .faqbot__panel, .faqbot__msg { transition: none; animation: none; }
}


/* ------------------------------------------------------------------ */
/*  Custom pages (CMS-created)                                         */
/* ------------------------------------------------------------------ */

.cpage { padding-top: 6rem; padding-bottom: 5rem; background: #fff; color: #0f172a; }
.cpage__inner { max-width: 820px; margin: 0 auto; padding: 0 1.25rem; }

.cpage__hero { margin-bottom: 2.5rem; }
.cpage__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0 0 1rem;
    color: #0f172a;
}
.cpage__intro { font-size: 1.15rem; line-height: 1.6; color: #475569; margin: 0; max-width: 60ch; }

.cpage__block { margin: 0 0 1.6rem; }
.cpage__h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -0.01em; margin: 2rem 0 0.85rem; color: #0f172a; }
.cpage__p { font-size: 1.05rem; line-height: 1.7; color: #334155; margin: 0 0 1rem; }
.cpage__list { margin: 0 0 1.2rem; padding-left: 1.3rem; color: #334155; line-height: 1.7; }
.cpage__list li { margin-bottom: 0.35rem; }

.cpage__quote {
    margin: 1.5rem 0;
    padding: 1rem 1.4rem;
    border-left: 4px solid var(--primary-blue, #0284c7);
    background: #f8fafc;
    border-radius: 0 12px 12px 0;
    font-size: 1.15rem;
    font-style: italic;
    color: #1e293b;
}
.cpage__quote cite { display: block; margin-top: 0.5rem; font-size: 0.9rem; font-style: normal; font-weight: 600; color: #64748b; }

.cpage__figure { margin: 1.75rem 0; }
.cpage__img { width: 100%; height: auto; border-radius: 16px; display: block; }
.cpage__caption { margin-top: 0.55rem; font-size: 0.85rem; color: #64748b; text-align: center; }

.cpage__btnrow { margin: 1.75rem 0; }
.cpage__btn {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.cpage__btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cpage__btn--primary { background: var(--primary-blue, #0284c7); color: #fff; box-shadow: 0 10px 20px -8px rgba(2, 132, 199, 0.5); }
.cpage__btn--outline { background: transparent; color: var(--primary-blue, #0284c7); border: 2px solid var(--primary-blue, #0284c7); }

.cpage__split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; margin: 2rem 0; }
.cpage__split--right { direction: rtl; }
.cpage__split--right > * { direction: ltr; }
.cpage__split .cpage__img { border-radius: 16px; }
.cpage__split-h { font-size: 1.5rem; font-weight: 800; margin: 0 0 0.75rem; color: #0f172a; }
@media (max-width: 640px) { .cpage__split { grid-template-columns: 1fr; direction: ltr; } }

.cpage__gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin: 1.75rem 0; }
.cpage__gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }

.cpage__divider { border: none; border-top: 1px solid #e2e8f0; margin: 2.5rem 0; }
.cpage__spacer { display: block; }
.cpage__spacer--s { height: 1rem; }
.cpage__spacer--m { height: 2.5rem; }
.cpage__spacer--l { height: 4.5rem; }

.cpage__back { display: inline-block; margin-top: 2rem; color: var(--primary-blue, #0284c7); font-weight: 600; text-decoration: none; }
.cpage__back:hover { text-decoration: underline; }
