/*!
 * QTS (Oct 2026): "Ask QTS AI" – Claude-powered assistant page, home-page "Ask our AI" box,
 * "Ask AI" menu link and footer "Ask Claude about QTS" button.  v1.0 (9 Oct 2026)
 */

/* ------------------------------------------------------------ menu link */
.navbar .navbar-nav .nav-link.qts-nav-ai {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #02889D !important;
    background: rgba(2, 136, 157, .07);
    border: 1.5px solid rgba(2, 136, 157, .40);
    border-radius: 30px;
    padding: 8px 15px !important;
    margin-left: 10px;
    line-height: 1.2;
    font-weight: 600;
}
.navbar .navbar-nav .nav-link.qts-nav-ai i { color: #64AC28; font-size: .95em; }
.navbar .navbar-nav .nav-link.qts-nav-ai:hover,
.navbar .navbar-nav .nav-link.qts-nav-ai:focus,
.navbar .navbar-nav .nav-link.qts-nav-ai.active {
    color: #02889D !important;
    background: rgba(2, 136, 157, .14);
    border-color: #02889D;
}
.navbar .navbar-nav .nav-link.qts-nav-ai::before,
.navbar .navbar-nav .nav-link.qts-nav-ai::after { display: none !important; }
.navbar .navbar-nav .nav-item:has(> .qts-nav-ai) { display: flex; align-items: center; }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar .navbar-nav .nav-link.qts-nav-ai { padding: 7px 12px !important; margin-left: 6px; }
    .navbar .navbar-nav .nav-link.qts-nav-ai i { display: none; }
}
@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link.qts-nav-ai { margin: 10px 0 0; align-self: flex-start; }
}

/* ------------------------------------------------------------ footer "Ask Claude about QTS" */
.qts-footer .qf-ask-claude {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 9px 18px 9px 9px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 40px;
    color: #fff;
    background: rgba(255, 255, 255, .04);
    text-decoration: none;
    line-height: 1.25;
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.qts-footer .qf-ask-claude:hover,
.qts-footer .qf-ask-claude:focus { color: #fff; background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .45); transform: translateY(-1px); }
.qts-footer .qf-ask-claude .qf-ac-ico {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #02889D 0%, #64AC28 100%);
    font-size: 14px;
}
.qts-footer .qf-ask-claude strong { display: block; font-size: 14.5px; font-weight: 600; }
.qts-footer .qf-ask-claude small { display: block; font-size: 12px; color: rgba(255, 255, 255, .62); }

/* ------------------------------------------------------------ home page "Ask our AI" box */
.qai-home { padding: 80px 0; background: #F4F9FA; }
.qai-home-card {
    position: relative;
    overflow: hidden;
    padding: 46px 44px;
    border-radius: 22px;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(100, 172, 40, .22), transparent 60%),
        radial-gradient(520px 300px at 0% 100%, rgba(2, 136, 157, .30), transparent 60%),
        #0A2830;
    color: rgba(255, 255, 255, .80);
    box-shadow: 0 18px 50px rgba(10, 40, 48, .18);
}
.qai-home-card .site-title-tagline { color: #8BD14E; }
.qai-home-card .qai-home-title { color: #fff; font-size: 38px; font-weight: 800; line-height: 1.2; margin: 10px 0 14px; }
.qai-home-card .qai-home-title span { color: #8BD14E; }
.qai-home-card p { color: rgba(255, 255, 255, .78); font-size: 16.5px; line-height: 1.7; margin: 0; }
.qai-home-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.qai-home-points li { font-size: 14.5px; color: #fff; }
.qai-home-points li i { color: #8BD14E; margin-right: 6px; }
.qai-home-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.qai-home-input > i { color: #02889D; font-size: 18px; }
.qai-home-input input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 12px 4px;
    font-size: 16px;
    color: #0A1D43;
    background: transparent;
}
.qai-home-input .theme-btn { flex: 0 0 auto; border: 0; border-radius: 12px; padding: 12px 22px; white-space: nowrap; }
.qai-home-input .theme-btn i { margin-left: 6px; }
.qai-home-try { margin: 22px 0 10px !important; font-size: 14px !important; color: rgba(255, 255, 255, .62) !important; }
.qai-home-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.qai-home-chips a {
    display: inline-block;
    padding: 9px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}
.qai-home-chips a:hover, .qai-home-chips a:focus { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); color: #fff; }
@media (max-width: 991.98px) {
    .qai-home { padding: 60px 0; }
    .qai-home-card { padding: 34px 24px; }
    .qai-home-card .qai-home-title { font-size: 30px; }
}
@media (max-width: 575.98px) {
    .qai-home-card { padding: 28px 18px; border-radius: 18px; }
    .qai-home-card .qai-home-title { font-size: 26px; }
    .qai-home-input { flex-wrap: wrap; padding: 8px; }
    .qai-home-input > i { display: none; }
    .qai-home-input input { flex-basis: 100%; padding: 10px 8px; }
    .qai-home-input .theme-btn { width: 100%; }
}

/* ------------------------------------------------------------ Ask QTS AI page */
.qai-page { padding: 80px 0 70px; background: #F4F9FA; }
.qai-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #E2ECEE;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(10, 29, 67, .04), 0 14px 40px rgba(10, 29, 67, .07);
    overflow: hidden;
}
.qai-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #02889D 0%, #0B7A6E 55%, #64AC28 100%);
    color: #fff;
}
.qai-avatar { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 4px; object-fit: contain; flex: 0 0 46px; }
.qai-head-text { flex: 1 1 auto; min-width: 0; }
.qai-head .qai-title { color: #fff; font-size: 19px; font-weight: 700; margin: 0; line-height: 1.25; }
.qai-status { margin: 3px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .88); display: flex; align-items: center; gap: 7px; }
.qai-dot { width: 9px; height: 9px; border-radius: 50%; background: #8BD14E; box-shadow: 0 0 0 3px rgba(139, 209, 78, .3); flex: 0 0 9px; }
.qai-card.is-off .qai-dot { background: #F5B942; box-shadow: 0 0 0 3px rgba(245, 185, 66, .3); }
.qai-free { flex: 0 0 auto; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px; border-radius: 20px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); }

.qai-msgs {
    min-height: 230px;
    max-height: 520px;
    overflow-y: auto;
    padding: 22px 20px 10px;
    background: #FAFCFC;
    scroll-behavior: smooth;
}
.qai-msg { display: flex; margin-bottom: 16px; }
.qai-msg.qai-user { justify-content: flex-end; }
.qai-bubble {
    max-width: 86%;
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 15.5px;
    line-height: 1.6;
    color: #24314A;
    background: #fff;
    border: 1px solid #E2ECEE;
    border-top-left-radius: 5px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.qai-user .qai-bubble { background: #02889D; color: #fff; border-color: #02889D; border-top-left-radius: 16px; border-top-right-radius: 5px; }
.qai-bubble p { margin: 0 0 8px; color: inherit; font-size: inherit; line-height: inherit; }
.qai-bubble p:last-child { margin-bottom: 0; }
.qai-bubble ul { margin: 4px 0 8px; padding-left: 20px; }
.qai-bubble ul:last-child { margin-bottom: 0; }
.qai-bubble li { margin-bottom: 4px; list-style: disc; color: inherit; }
.qai-bubble strong { color: #0A1D43; font-weight: 700; }
.qai-user .qai-bubble strong { color: #fff; }
.qai-bubble a { color: #02889D; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.qai-user .qai-bubble a { color: #fff; }
.qai-bubble .qai-inline-btn {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
    padding: 8px 14px; border-radius: 30px; border: 0; cursor: pointer;
    background: #64AC28; color: #fff; font-size: 14px; font-weight: 600;
}
/* details form shown in the chat after the first answer */
.qai-msg.qai-lf-wrap .qai-bubble { max-width: 94%; width: 94%; border-color: #BFE0E4; box-shadow: 0 6px 18px rgba(2, 136, 157, .08); }
.qai-lf { margin: 0; }
.qai-lf-intro { margin: 0 0 10px !important; }
.qai-lf-row { display: flex; gap: 10px; }
.qai-lf-row label { flex: 1 1 0; min-width: 0; }
.qai-lf label { display: block; margin: 0 0 8px; }
.qai-lf label span { display: block; font-size: 13px; font-weight: 600; color: #0A1D43; margin: 0 0 4px; }
.qai-lf input[type="text"], .qai-lf input[type="tel"] {
    width: 100%; padding: 10px 12px; border: 1px solid #D5E3E6; border-radius: 10px;
    font-size: 15px; color: #0A1D43; background: #F8FBFB; outline: none;
}
.qai-lf input:focus { border-color: #02889D; background: #fff; box-shadow: 0 0 0 3px rgba(2, 136, 157, .12); }
.qai-lf .qai-lf-city { max-width: 60%; }
.qai-lf .qai-lf-btn { margin-top: 4px; background: linear-gradient(135deg, #02889D 0%, #64AC28 100%); }
.qai-lf .qai-lf-btn[disabled] { opacity: .6; cursor: default; }
.qai-lf-msg { margin: 8px 0 0 !important; font-size: 13.5px !important; color: #C0392B; min-height: 0; }
.qai-lf-msg:empty { display: none; }
.qai-lf-note { margin: 8px 0 0 !important; font-size: 12.5px !important; color: #6B7689 !important; }
@media (max-width: 575.98px) {
    .qai-lf-row { flex-direction: column; gap: 0; }
    .qai-lf .qai-lf-city { max-width: 100%; }
}

.qai-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qai-cta a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none !important;
    border: 1px solid #CFE3E6;
    color: #02889D;
    background: #fff;
    transition: background .2s ease, border-color .2s ease;
}
.qai-cta a:hover, .qai-cta a:focus { background: #EEF7F8; border-color: #02889D; color: #02889D; }
.qai-cta a.qai-cta-wa { color: #128C4A; border-color: #BFE5CE; }
.qai-cta a.qai-cta-wa:hover { background: #EFFAF3; border-color: #25D366; color: #128C4A; }
.qai-cta a.qai-cta-book { color: #fff; border-color: transparent; background: linear-gradient(135deg, #02889D 0%, #64AC28 100%); }
.qai-cta a.qai-cta-book:hover { color: #fff; filter: brightness(1.06); }

.qai-typing { display: inline-flex; gap: 5px; align-items: center; padding: 4px 2px; }
.qai-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9BB7BC; animation: qaiBlink 1.2s infinite ease-in-out; }
.qai-typing span:nth-child(2) { animation-delay: .15s; }
.qai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes qaiBlink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.qai-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 20px 14px; background: #FAFCFC; }
.qai-suggest[hidden] { display: none; }
.qai-chip {
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid #CFE3E6;
    background: #fff;
    color: #0A1D43;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.qai-chip:hover, .qai-chip:focus { border-color: #02889D; color: #02889D; background: #EEF7F8; }

.qai-form { display: flex; align-items: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid #E2ECEE; background: #fff; }
.qai-form textarea {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    max-height: 150px;
    resize: none;
    padding: 12px 14px;
    border: 1px solid #D5E3E6;
    border-radius: 14px;
    font-size: 16px;
    line-height: 1.45;
    color: #0A1D43;
    background: #F8FBFB;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.qai-form textarea:focus { border-color: #02889D; box-shadow: 0 0 0 3px rgba(2, 136, 157, .12); background: #fff; }
.qai-send {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #02889D 0%, #64AC28 100%);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    transition: filter .2s ease, opacity .2s ease;
}
.qai-send:hover { filter: brightness(1.07); }
.qai-send[disabled] { opacity: .55; cursor: default; }
.qai-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.qai-note { margin: 0; padding: 0 18px 16px; font-size: 13px; line-height: 1.55; color: #6B7689; background: #fff; }
.qai-note i { color: #02889D; margin-right: 4px; }

.qai-side { display: flex; flex-direction: column; gap: 20px; }
.qai-box {
    background: #fff;
    border: 1px solid #E2ECEE;
    border-radius: 18px;
    padding: 24px 22px;
    box-shadow: 0 8px 26px rgba(10, 29, 67, .05);
}
.qai-box h3 { font-size: 20px; font-weight: 700; color: #0A1D43; margin: 0 0 8px; }
.qai-box p { font-size: 15px; line-height: 1.6; color: #5B6577; margin: 0 0 14px; }
.qai-box-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64AC28; margin-bottom: 6px; }
.qai-box-expert { border-top: 4px solid #02889D; }
.qai-btn-full { width: 100%; justify-content: center; text-align: center; display: inline-flex; align-items: center; gap: 8px; border: 0; }
.qai-contact-btns { display: flex; flex-direction: column; gap: 10px; }
.qai-contact-btns a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 14px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none;
}
.qai-contact-btns .qai-wa { background: #25D366; color: #fff; }
.qai-contact-btns .qai-wa:hover { background: #1FBE5B; color: #fff; }
.qai-contact-btns .qai-call { border: 1px solid #CFE3E6; color: #0A1D43; }
.qai-contact-btns .qai-call:hover { border-color: #02889D; color: #02889D; }
#qai-cb-form label { display: block; font-size: 13.5px; font-weight: 600; color: #0A1D43; margin: 0 0 5px; }
#qai-cb-form input[type="text"], #qai-cb-form input[type="tel"] {
    width: 100%; margin: 0 0 12px; padding: 11px 13px; border: 1px solid #D5E3E6; border-radius: 10px;
    font-size: 15px; color: #0A1D43; background: #F8FBFB; outline: none;
}
#qai-cb-form input:focus { border-color: #02889D; background: #fff; box-shadow: 0 0 0 3px rgba(2, 136, 157, .12); }
.qai-cb-msg { margin: 10px 0 0 !important; font-size: 14px !important; }
.qai-cb-msg.is-ok { color: #2F7D12 !important; }
.qai-cb-msg.is-err { color: #C0392B !important; }
.qai-box.is-flash { animation: qaiFlash 1.4s ease; }
@keyframes qaiFlash { 0%, 100% { box-shadow: 0 8px 26px rgba(10, 29, 67, .05); } 30% { box-shadow: 0 0 0 4px rgba(100, 172, 40, .45); } }

/* topics */
.qai-topics { padding: 80px 0; background: #fff; }
.qai-topics .site-heading { margin-bottom: 44px; }
.qai-topics-sub { max-width: 680px; margin: 14px auto 0; font-size: 16.5px; line-height: 1.7; color: #5B6577; }
.qai-topic {
    height: 100%;
    padding: 26px 24px 20px;
    border: 1px solid #E2ECEE;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(10, 29, 67, .04), 0 10px 30px rgba(10, 29, 67, .05);
    position: relative;
    overflow: hidden;
}
.qai-topic::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: linear-gradient(90deg, #02889D 0%, #64AC28 100%); }
.qai-topic-ico { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: #EEF7F8; color: #02889D; font-size: 21px; margin-bottom: 14px; }
.qai-topic h3 { font-size: 19px; font-weight: 700; color: #0A1D43; margin: 0 0 12px; }
.qai-topic ul { list-style: none; margin: 0; padding: 0; }
.qai-topic li { margin: 0 0 6px; }
.qai-ask {
    display: flex; align-items: flex-start; gap: 8px; width: 100%;
    padding: 7px 0; border: 0; background: none; text-align: left; cursor: pointer;
    color: #24314A; font-size: 15px; line-height: 1.45;
}
.qai-ask i { color: #64AC28; margin-top: 4px; font-size: 13px; }
.qai-ask:hover, .qai-ask:focus { color: #02889D; }
.qai-topic .qai-topic-link { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 600; color: #02889D; }

/* FAQ */
.qai-faq { padding: 10px 0 90px; background: #fff; }
.qai-faq-title { font-size: 30px; font-weight: 800; color: #0A1D43; margin: 0 0 22px; text-align: center; }
.qai-faq details { border: 1px solid #E2ECEE; border-radius: 14px; padding: 0 20px; margin-bottom: 12px; background: #fff; }
.qai-faq summary { cursor: pointer; padding: 17px 0; font-weight: 600; font-size: 16.5px; color: #0A1D43; list-style: none; position: relative; padding-right: 28px; }
.qai-faq summary::-webkit-details-marker { display: none; }
.qai-faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; color: #02889D; font-weight: 400; }
.qai-faq details[open] summary::after { content: "\2212"; }
.qai-faq details p { margin: 0 0 18px; font-size: 15.5px; line-height: 1.7; color: #5B6577; }

@media (max-width: 991.98px) {
    .qai-page { padding: 50px 0 50px; }
    .qai-msgs { max-height: 480px; }
    .qai-topics { padding: 60px 0; }
}
@media (max-width: 575.98px) {
    .qai-page { padding: 24px 0 40px; }
    .qai-head { padding: 14px 16px; gap: 11px; }
    .qai-avatar { width: 40px; height: 40px; flex-basis: 40px; }
    .qai-head .qai-title { font-size: 17px; }
    .qai-msgs { max-height: 64vh; min-height: 200px; padding: 16px 12px 8px; }
    .qai-bubble { max-width: 92%; font-size: 15px; }
    .qai-suggest { padding: 4px 12px 12px; }
    .qai-form { padding: 10px; }
    .qai-note { padding: 0 12px 14px; }
    .qai-faq-title { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
    .qai-msgs { scroll-behavior: auto; }
    .qai-typing span, .qai-box.is-flash { animation: none; }
}
