/*
 * Stylesheet for every page under _LayoutHome: platform landing (Home/Index), guides, policy pages, login/register
 * on the platform gateway, and the public catalog (exam library, mock test, cart/checkout). Aesthetic: minimal
 * international SaaS (Linear / Notion / Stripe) — light surface, one accent, hairline borders, moderate radii,
 * no gradients, no heavy shadows. All colors/radii/spacing trace to wwwroot/css/tokens.css (--cq-*), loaded before
 * this file by every public layout.
 */

/* ================================================================
   BASE
   ================================================================ */
body {
    background-color: var(--cq-bg);
    color: var(--cq-ink);
    font-family: var(--cq-font-sans);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.1rem; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; }

a { color: var(--cq-accent); }
a:hover { color: var(--cq-accent-hover); }
::selection { background: var(--cq-accent); color: var(--cq-on-accent); }

:focus-visible {
    outline: 2px solid var(--cq-accent);
    outline-offset: 2px;
}

html { scroll-behavior: smooth; }
/* Room for the sticky/fixed navbar when jumping to an anchor (#features, #pricing...) */
section[id] { scroll-margin-top: 76px; }

.navbar-brand:focus, .navbar-brand:active { border: none; outline: none; }
.logo-small { height: 34px; }

/* ================================================================
   NAVBAR (platform gateway — Views/Shared/_LayoutHome.cshtml)
   ================================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--cq-surface) !important;
    border-bottom: 1px solid var(--cq-border);
    padding: .6rem 0;
    box-shadow: none;
    transition: background-color .2s var(--cq-ease), box-shadow .2s var(--cq-ease), padding .2s var(--cq-ease), border-color .2s var(--cq-ease);
}
.navbar .nav-link:not(.btn) {
    color: var(--cq-muted) !important;
    font-weight: 500;
    padding: .5rem .9rem !important;
    border-radius: var(--cq-radius-sm);
    transition: color .15s, background-color .15s;
}
.navbar .nav-link:not(.btn):hover, .navbar .nav-link:not(.btn).active { color: var(--cq-ink) !important; background: var(--cq-surface-muted); }
.navbar .btn { border-radius: var(--cq-radius-sm); font-weight: 600; }
.navbar .nav-link, .navbar .btn { white-space: nowrap; }
.navbar .btn-outline-light { color: var(--cq-ink) !important; border-color: var(--cq-border-strong); }
.navbar .btn-outline-light:hover, .navbar .btn-outline-light:focus { background: var(--cq-surface-muted) !important; color: var(--cq-ink) !important; border-color: var(--cq-border-strong); }
.navbar .btn-light, .navbar .btn-light:hover, .navbar .btn-light:focus { color: var(--cq-on-accent) !important; background: var(--cq-accent) !important; border-color: var(--cq-accent); }
.navbar .btn-light:hover { background: var(--cq-accent-hover) !important; }
.navbar #dropdown_usermenu { color: var(--cq-ink) !important; cursor: pointer; }
.navbar .dropdown-menu { border: 1px solid var(--cq-border); border-radius: var(--cq-radius); box-shadow: var(--cq-shadow-md); padding: .4rem; }
.navbar .dropdown-menu .btn-link { color: var(--cq-ink) !important; text-decoration: none; }
.navbar .dropdown-menu .btn-link:hover { color: var(--cq-accent) !important; }
@media (max-width: 1199.98px) {
    .navbar .navbar-collapse { background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius); margin-top: .6rem; padding: .6rem .8rem; box-shadow: var(--cq-shadow-md); }
    .navbar .navbar-nav.ms-auto + .navbar-nav { margin-top: .4rem; }
}

.btn { border-radius: var(--cq-radius-sm); }

/* ================================================================
   FOOTER (platform gateway)
   ================================================================ */
.footer { background: var(--cq-surface-muted); color: var(--cq-muted); border-top: 1px solid var(--cq-border); padding: 60px 0 28px; }
.footer a { color: var(--cq-muted); text-decoration: none; }
.footer a:hover { color: var(--cq-accent); }
.footer h5 { color: var(--cq-ink); font-weight: 700; font-size: 1rem; margin-bottom: 14px; }
.footer .footer-logo { float: none; height: 40px; margin: 0 0 14px; display: block; }
.footer ul li { margin-bottom: 8px; }
.footer .footer-company li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.footer .footer-company li i { width: 16px; text-align: center; margin-top: 5px; color: var(--cq-accent); flex: 0 0 auto; }
.footer .footer-bottom { border-top: 1px solid var(--cq-border); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .88rem; }
.footer .footer-bottom-links a { margin-left: 16px; }
.footer .footer-bottom-links a:first-child { margin-left: 0; }

/* ================================================================
   HOMEPAGE (Views/Home/Index.cshtml, _Pricing.cshtml)
   ================================================================ */
/* Nav sits in normal document flow now (no fixed overlay), so the hero only needs its own section padding */
.cq-hero { background: var(--cq-surface-muted); color: var(--cq-ink); padding: 72px 0 64px; }
.cq-hero h1 { font-size: clamp(2rem, 3.4vw + 1rem, 2.75rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--cq-ink); }
.cq-hero p.lead { font-size: 1.1rem; color: var(--cq-muted); max-width: 560px; }
.cq-hero .badges span { display: inline-flex; align-items: center; gap: 6px; background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-pill); padding: 6px 14px; margin: 4px 6px 0 0; font-size: .85rem; color: var(--cq-muted); }
.cq-hero .badges span i { color: var(--cq-accent); }
.cq-btn-main { background: var(--cq-accent); color: #fff; font-weight: 600; border: 0; }
.cq-btn-main:hover { background: var(--cq-accent-hover); color: #fff; }

/* Two entry points by intent: Teach (primary, solid accent) and Learn (secondary, hairline) */
.cq-doors { display: flex; flex-wrap: wrap; gap: 12px; }
.cq-door { display: flex; flex-direction: column; flex: 1 1 240px; max-width: 300px; padding: 16px 18px; border-radius: var(--cq-radius); border: 1px solid var(--cq-border); background: var(--cq-surface); color: var(--cq-ink); text-decoration: none; transition: border-color .2s var(--cq-ease), background-color .2s var(--cq-ease); }
.cq-door i { font-size: 1.3rem; margin-bottom: 8px; color: var(--cq-accent); }
.cq-door .t { font-weight: 600; font-size: 1.05rem; }
.cq-door .d { font-size: .88rem; color: var(--cq-muted); margin-top: 2px; }
.cq-door:hover { background: var(--cq-surface-muted); border-color: var(--cq-border-strong); color: var(--cq-ink); }
.cq-door-main { background: var(--cq-accent); color: #fff; border-color: var(--cq-accent); }
.cq-door-main i { color: #fff; }
.cq-door-main .d { color: rgba(255, 255, 255, .75); }
.cq-door-main:hover { background: var(--cq-accent-hover); color: #fff; border-color: var(--cq-accent-hover); }

.cq-section { padding: 96px 0; }
.cq-section h2 { font-weight: 700; font-size: clamp(1.5rem, 1.6vw + 1rem, 2rem); letter-spacing: -0.02em; }

/* Feature pillars: hairline border, no lift-and-shadow gimmick */
.cq-pillar { border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 28px; height: 100%; background: var(--cq-surface); transition: border-color .2s var(--cq-ease); }
.cq-pillar:hover { border-color: var(--cq-border-strong); }
.cq-pillar .ic { width: 44px; height: 44px; border-radius: var(--cq-radius-sm); display: grid; place-items: center; font-size: 1.25rem; color: var(--cq-accent); background: var(--cq-accent-soft); margin-bottom: 16px; }

.cq-step { text-align: center; padding: 16px; }
.cq-step .n { width: 40px; height: 40px; border-radius: 50%; background: var(--cq-accent-soft); color: var(--cq-accent); font-weight: 700; display: grid; place-items: center; margin: 0 auto 12px; }

.cq-section-muted { background: var(--cq-surface-muted); }
.cq-why { background: var(--cq-surface-muted); }
.cq-why .item { display: flex; gap: 12px; padding: 12px 0; }
.cq-why .item i { color: var(--cq-success); font-size: 1.1rem; margin-top: 3px; }
.cq-why-icon { font-size: 140px; color: var(--cq-border-strong); }

.cq-price { display: flex; flex-direction: column; border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 28px; height: 100%; background: var(--cq-surface); }
.cq-price.featured { border: 1.5px solid var(--cq-accent); }
.cq-price .amt { font-size: 2rem; font-weight: 700; color: var(--cq-ink); font-variant-numeric: tabular-nums; }
.cq-price ul { flex: 1 0 auto; }
.cq-price > .btn { margin-top: auto; }

.cq-cta { background: var(--cq-surface-muted); color: var(--cq-ink); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-lg); padding: 48px; }
.cq-cta p { color: var(--cq-muted); }
.cq-cta .btn-outline-light { background: transparent; color: var(--cq-ink); border: 1px solid var(--cq-border-strong); }
.cq-cta .btn-outline-light:hover { background: var(--cq-surface); color: var(--cq-ink); border-color: var(--cq-border-strong); }

/* Hero product mockup: a flat report-card UI panel, not stock art */
.cq-mock { background: var(--cq-surface); color: var(--cq-ink); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-lg); padding: 22px; box-shadow: var(--cq-shadow-md); }
.cq-mock-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.cq-ava { width: 42px; height: 42px; border-radius: var(--cq-radius-sm); background: var(--cq-accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.cq-mock-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--cq-border); font-size: .95rem; }
.cq-chip { display: inline-block; border-radius: var(--cq-radius-pill); padding: 5px 12px; font-size: .82rem; margin: 12px 6px 0 0; font-weight: 500; }
.cq-chip.ok { background: var(--cq-success-soft); color: var(--cq-success); }
.cq-chip.warn { background: var(--cq-danger-soft); color: var(--cq-danger); }
.cq-mock-pay { display: flex; align-items: center; gap: 10px; margin-top: 16px; background: var(--cq-surface-muted); border-radius: var(--cq-radius); padding: 12px 14px; }
.cq-mock-pay span { flex-grow: 1; color: var(--cq-muted); font-size: .9rem; }
.cq-mock-pay b { color: var(--cq-danger); }
.cq-qr { border: 0; background: var(--cq-accent); color: #fff; border-radius: var(--cq-radius-sm); padding: 7px 13px; font-size: .82rem; font-weight: 600; }

@media (max-width: 767.98px) {
    .cq-hero { padding: 40px 0 32px; }
    .cq-hero .cq-doors { margin-top: 20px !important; }
    .cq-hero .badges { margin-top: 16px !important; }
    .cq-door { max-width: none; padding: 14px 16px; }
    .cq-section { padding: 56px 0; }
    .cq-cta { padding: 32px 20px; border-radius: var(--cq-radius); }
}
@media (prefers-reduced-motion: reduce) {
    .cq-door, .cq-pillar { transition: none; }
}

/* ================================================================
   GUIDE ARTICLES (Views/Shared/_LayoutGuide.cshtml + Views/Guides/**)
   ================================================================ */
.cq-guide-hero { background: var(--cq-bg); color: var(--cq-ink); padding: 40px 0 32px; border-bottom: 1px solid var(--cq-border); }
.cq-guide-hero .crumb a { color: var(--cq-muted); text-decoration: none; }
.cq-guide-hero .crumb a:hover { color: var(--cq-ink); }
.cq-guide-hero h1 { color: var(--cq-ink); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; margin: 10px 0 8px; max-width: 860px; }
.cq-guide-hero p.lead { font-size: 1.05rem; color: var(--cq-muted); max-width: 760px; margin-bottom: 14px; }
.cq-guide-hero .meta { font-size: .88rem; color: var(--cq-muted-2); }
.cq-guide-hero .meta i { margin-right: 4px; }
.cq-guide-hero .btn-cta { background: var(--cq-accent); color: #fff; font-weight: 600; border-radius: var(--cq-radius-sm); padding: 10px 20px; }
.cq-guide-hero .btn-cta:hover { background: var(--cq-accent-hover); color: #fff; }
.cq-guide-body { padding: 40px 0 72px; background: var(--cq-bg); }
.cq-guide-nav { background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 14px; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.cq-guide-nav h6 { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cq-muted-2); margin: 10px 8px 6px; }
.cq-guide-nav a { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: var(--cq-radius-sm); color: var(--cq-ink); text-decoration: none; font-weight: 500; font-size: .92rem; line-height: 1.35; }
.cq-guide-nav a i { width: 18px; text-align: center; color: var(--cq-accent); flex: 0 0 auto; margin-top: 2px; }
.cq-guide-nav a:hover { background: var(--cq-surface-muted); }
.cq-guide-nav a.active { background: var(--cq-accent-soft); color: var(--cq-accent); }
.cq-guide-nav a.active i { color: var(--cq-accent); }
.cq-guide-nav .toc a { font-weight: 400; color: var(--cq-muted); padding: 5px 12px; font-size: .88rem; }
.cq-guide-nav .toc a.active { background: var(--cq-surface-muted); color: var(--cq-accent); font-weight: 600; }
.cq-guide-content { background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-lg); padding: 36px 40px; line-height: 1.75; font-size: 1.02rem; }
.cq-guide-content h2 { font-size: 1.35rem; font-weight: 700; margin: 36px 0 12px; color: var(--cq-ink); scroll-margin-top: 90px; }
.cq-guide-content h2:first-child { margin-top: 0; }
.cq-guide-content h3 { font-size: 1.08rem; font-weight: 600; margin: 24px 0 8px; scroll-margin-top: 90px; }
.cq-guide-content p, .cq-guide-content li { color: var(--cq-muted); max-width: 72ch; }
.cq-guide-content ul, .cq-guide-content ol { padding-left: 1.3rem; }
.cq-guide-content li { margin-bottom: 6px; }
.cq-guide-content a { color: var(--cq-accent); }
.cq-guide-content table { width: 100%; margin: 12px 0 18px; font-size: .95rem; }
.cq-guide-content table th, .cq-guide-content table td { padding: 10px 12px; border-bottom: 1px solid var(--cq-border); vertical-align: top; }
.cq-guide-content table th { background: var(--cq-surface-muted); font-weight: 600; text-align: left; }
.cq-guide-content .note { background: var(--cq-surface-muted); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-sm); padding: 14px 18px; margin: 18px 0; }
.cq-guide-content .tip { background: var(--cq-success-soft); border: 1px solid color-mix(in srgb, var(--cq-success) 30%, transparent); border-radius: var(--cq-radius-sm); padding: 14px 18px; margin: 18px 0; }
.cq-guide-content .warn { background: var(--cq-warning-soft); border: 1px solid color-mix(in srgb, var(--cq-warning) 30%, transparent); border-radius: var(--cq-radius-sm); padding: 14px 18px; margin: 18px 0; }
.cq-guide-content kbd, .cq-guide-content .ui { display: inline-block; background: var(--cq-accent-soft); color: var(--cq-accent); border: 1px solid var(--cq-border-strong); border-radius: 6px; padding: 0 6px; font-size: .92em; font-family: inherit; font-weight: 600; white-space: nowrap; }
/* Step list: a round number on the left, one step per paragraph */
.cq-guide-content ol.steps { list-style: none; padding-left: 0; counter-reset: step; }
.cq-guide-content ol.steps > li { counter-increment: step; position: relative; padding-left: 48px; margin-bottom: 16px; }
.cq-guide-content ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--cq-accent-soft); color: var(--cq-accent); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.cq-guide-content ol.steps > li > b:first-child { display: block; color: var(--cq-ink); }
/* Screenshots: thin frame, no shadow, caption underneath */
.cq-guide-content figure.shot { margin: 18px 0 24px; }
.cq-guide-content figure.shot img { width: 100%; height: auto; border: 1px solid var(--cq-border); border-radius: var(--cq-radius-sm); }
.cq-guide-content figure.shot figcaption { font-size: .88rem; color: var(--cq-muted); margin-top: 8px; text-align: center; }
.cq-guide-content .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.cq-guide-content .cards > div { border: 1px solid var(--cq-border); border-radius: var(--cq-radius-sm); padding: 14px 16px; background: var(--cq-surface-muted); }
.cq-guide-content .cards > div b { display: block; margin-bottom: 4px; color: var(--cq-ink); }
.cq-guide-content .cards > div p { margin: 0; font-size: .93rem; }
.cq-guide-content .cards > div i { color: var(--cq-accent); margin-right: 6px; }
.cq-guide-cta { margin-top: 28px; background: var(--cq-surface-muted); color: var(--cq-ink); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-lg); padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cq-guide-cta .t { flex: 1 1 320px; }
.cq-guide-cta h3 { font-weight: 700; font-size: 1.2rem; margin-bottom: 4px; }
.cq-guide-cta p { margin: 0; color: var(--cq-muted); }
.cq-guide-cta .btn { background: var(--cq-accent); color: #fff; font-weight: 600; border-radius: var(--cq-radius-sm); padding: 10px 22px; }
.cq-guide-cta .btn:hover { background: var(--cq-accent-hover); color: #fff; }
.cq-guide-cta .btn-outline-light { background: transparent; color: var(--cq-ink); border: 1px solid var(--cq-border-strong); }
.cq-guide-cta .btn-outline-light:hover { background: var(--cq-surface); color: var(--cq-ink); border-color: var(--cq-border-strong); }
.cq-guide-faq h2 { font-size: 1.35rem; font-weight: 700; margin: 36px 0 14px; }
.cq-guide-faq h3 { font-size: 1rem; font-weight: 600; margin: 0 0 4px; }
.cq-guide-faq p { color: var(--cq-muted); margin-bottom: 16px; }
.cq-guide-related h2 { font-size: 1.15rem; font-weight: 700; margin: 32px 0 12px; }
.cq-guide-card { display: block; height: 100%; background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 20px 22px; color: var(--cq-ink); text-decoration: none; transition: border-color .15s; }
.cq-guide-card:hover { border-color: var(--cq-border-strong); color: var(--cq-ink); }
.cq-guide-card .ic { width: 44px; height: 44px; border-radius: var(--cq-radius-sm); display: grid; place-items: center; background: var(--cq-accent-soft); color: var(--cq-accent); font-size: 1.2rem; margin-bottom: 12px; }
.cq-guide-card h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.cq-guide-card p { font-size: .92rem; color: var(--cq-muted); margin: 0; }
.cq-guide-card .more { display: block; margin-top: 10px; color: var(--cq-accent); font-weight: 600; font-size: .9rem; }
@media (max-width: 991.98px) {
    .cq-guide-nav { position: static; max-height: none; margin-bottom: 8px; }
    .cq-guide-nav .toc { display: none; }
    .cq-guide-content { padding: 24px 20px; }
    .cq-guide-hero { padding: 32px 0 24px; }
    .cq-guide-hero h1 { font-size: 1.5rem; }
    .cq-guide-body { padding: 48px 0 56px; }
}

/* ================================================================
   POLICY PAGES (Views/Shared/_LayoutPolicy.cshtml + Views/Policy/**)
   ================================================================ */
.cq-policy-hero { background: var(--cq-bg); color: var(--cq-ink); padding: 40px 0 32px; border-bottom: 1px solid var(--cq-border); }
.cq-policy-hero .crumb a { color: var(--cq-muted); text-decoration: none; }
.cq-policy-hero .crumb a:hover { color: var(--cq-ink); }
.cq-policy-hero h1 { color: var(--cq-ink); font-weight: 700; font-size: 2rem; letter-spacing: -0.02em; margin: 10px 0 8px; }
.cq-policy-hero p.lead { font-size: 1.05rem; color: var(--cq-muted); max-width: 720px; margin-bottom: 8px; }
.cq-policy-hero .meta { font-size: .88rem; color: var(--cq-muted-2); }
.cq-policy-body { padding: 44px 0 72px; background: var(--cq-bg); }
.cq-policy-nav { background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 14px; position: sticky; top: 90px; }
.cq-policy-nav h6 { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cq-muted-2); margin: 10px 8px 6px; }
.cq-policy-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--cq-radius-sm); color: var(--cq-ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.cq-policy-nav a i { width: 18px; text-align: center; color: var(--cq-accent); }
.cq-policy-nav a:hover { background: var(--cq-surface-muted); }
.cq-policy-nav a.active { background: var(--cq-accent-soft); color: var(--cq-accent); }
.cq-policy-nav a.active i { color: var(--cq-accent); }
.cq-policy-content { background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-lg); padding: 36px 40px; line-height: 1.75; }
.cq-policy-content h2 { font-size: 1.25rem; font-weight: 700; margin: 30px 0 12px; color: var(--cq-ink); }
.cq-policy-content h2:first-child { margin-top: 0; }
.cq-policy-content h3 { font-size: 1.05rem; font-weight: 600; margin: 20px 0 8px; }
.cq-policy-content p, .cq-policy-content li { color: var(--cq-muted); max-width: 72ch; }
.cq-policy-content ul, .cq-policy-content ol { padding-left: 1.3rem; }
.cq-policy-content li { margin-bottom: 6px; }
.cq-policy-content table { width: 100%; margin: 12px 0 18px; font-size: .95rem; }
.cq-policy-content table th, .cq-policy-content table td { padding: 10px 12px; border-bottom: 1px solid var(--cq-border); vertical-align: top; }
.cq-policy-content table th { background: var(--cq-surface-muted); font-weight: 600; text-align: left; }
.cq-policy-content .note { background: var(--cq-surface-muted); border: 1px solid var(--cq-border); border-radius: var(--cq-radius-sm); padding: 14px 18px; margin: 18px 0; }
.cq-policy-content a { color: var(--cq-accent); }
.cq-contact-card { background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 22px; height: 100%; }
.cq-contact-card .ic { width: 46px; height: 46px; border-radius: var(--cq-radius-sm); display: grid; place-items: center; background: var(--cq-accent-soft); color: var(--cq-accent); font-size: 1.2rem; margin-bottom: 12px; }
.cq-contact-card h5 { font-size: 1rem; font-weight: 700; }
.cq-contact-card a { color: var(--cq-accent); text-decoration: none; }
@media (max-width: 991.98px) {
    .cq-policy-nav { position: static; margin-bottom: 8px; }
    .cq-policy-content { padding: 24px 20px; }
    .cq-policy-hero { padding: 32px 0 24px; }
    .cq-policy-hero h1 { font-size: 1.6rem; }
    .cq-policy-body { padding: 48px 0 56px; }
}

/* ================================================================
   LOGIN / REGISTER (platform gateway — Views/Account/Login.cshtml, Register.cshtml)
   ================================================================ */
.login-container { width: 96%; margin: 1% auto 5%; padding: 0; }
.login-form {
    padding: 30px 28px;
    background: var(--cq-surface);
    border: 1px solid var(--cq-border);
    border-radius: var(--cq-radius-lg);
    box-shadow: var(--cq-shadow-md);
    margin: 24px auto 48px;
    max-width: 420px;
    width: 100%;
}
.login-form h1, .login-form h2, .login-form h3 { text-align: center !important; color: var(--cq-ink) !important; font-weight: 700; }
/* "Or" separator between submit and social login */
.login-form h3.mt-2 { color: var(--cq-muted-2) !important; font-size: .95rem; font-weight: 600; margin: .6rem 0 !important; }
.login-container form { padding: 2%; }
.btnSubmit {
    width: 50%;
    border-radius: var(--cq-radius-sm);
    padding: 1.5%;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    height: 46px;
    color: var(--cq-on-accent);
    background-color: var(--cq-accent);
}
.btnSubmit:hover, .btnSubmit:focus { background-color: var(--cq-accent-hover); color: var(--cq-on-accent); }
.login-form .ForgetPwd { display: block; margin-bottom: 10px; color: var(--cq-accent); font-weight: 600; text-decoration: none; }
.login-form .form-control, .login-form .form-select { border-radius: var(--cq-radius-sm); border-color: var(--cq-border-strong); padding: .65rem .85rem; }
.login-form .form-control:focus, .login-form .form-select:focus { border-color: var(--cq-accent); box-shadow: 0 0 0 .2rem var(--cq-accent-soft); }
/* Teacher / student path picker — segmented control: light track, white active segment, indigo active text */
.ws-pills { display: flex; gap: 3px; background: var(--cq-surface-muted); border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 3px; margin-bottom: 18px; }
.ws-pills a { flex: 1; text-align: center; padding: 8px 6px; border-radius: calc(var(--cq-radius) - 3px); color: var(--cq-muted); text-decoration: none; font-weight: 600; transition: background-color .15s var(--cq-ease), color .15s var(--cq-ease); }
.ws-pills a:hover { color: var(--cq-ink); }
.ws-pills a.active { background: var(--cq-surface); color: var(--cq-accent); box-shadow: var(--cq-shadow-sm); }
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    width: 100%;
    border: 1px solid var(--cq-border);
    border-radius: var(--cq-radius-sm);
    color: var(--cq-ink);
    background: var(--cq-surface);
    text-decoration: none;
}
.btn-social:hover { border-color: var(--cq-border-strong); }
/* Google sign-in: Google's "neutral" branding guideline (white surface, #747775 border, near-black text) */
.btn-social:has(.bi-google) { background: #fff; border-color: #747775; color: #1f1f1f; font-weight: 500; }
.btn-social:has(.bi-google):hover { background: #f7f8f8; border-color: #747775; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.btn-social:has(.bi-google) .bi-google { color: #1f1f1f; font-size: 1.05rem; }
.form-group { margin-bottom: 15px; }
.form-group .input-group { margin-bottom: 10px; }
#password-input::-ms-reveal { display: none; }
.btn-theme { width: 20px; height: 20px; border-radius: 100%; border-width: 1px; border-color: var(--cq-border-strong); }
#gg-login-div { width: 100%; }

/* ================================================================
   LOADER
   ================================================================ */
.is-loading:after, .loader {
    display: block;
    width: 2rem;
    height: 2rem;
    background: 0 0;
    border: 3px solid var(--cq-accent);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: 1s spin linear infinite;
    margin: auto;
}
.is-loading-lg:after, .loader-lg { width: 2rem; height: 2rem; border-width: 5px; }
.is-loading-sm:after, .loader-sm { width: 1rem; height: 1rem; border-width: 2px; }
.is-loading { position: relative; color: transparent !important; }
.is-loading > * { opacity: .2 !important; }
.is-loading:after { position: absolute; top: calc(50% - 1.5rem / 2); left: calc(50% - 1.5rem / 2); content: ''; }
.is-loading-lg:after { top: calc(50% - 2rem / 2); left: calc(50% - 2rem / 2); }
.is-loading-sm:after { top: calc(50% - 1rem / 2); left: calc(50% - 1rem / 2); }
@keyframes spin { to { transform: rotate(360deg); } }
/* jQuery .show() writes inline display:block, so !important keeps the flex centering */
#page-progress-bar { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; background-color: rgba(0, 0, 0, .35); }
#page-progress-bar[style*="block"] { display: flex !important; }

/* ================================================================
   PUBLIC CATALOG: sidebar filters, product listing/detail (Views/PublicCatalog/**)
   ================================================================ */
.sidebar { display: none; }
.sidebar.active { display: block; }
@media (min-width: 768px) { .sidebar { display: block; } }
.sidebar h4 { margin-bottom: 20px; }
.filter-section { margin-bottom: 20px; background-color: var(--cq-surface-muted); padding: 20px; border-radius: var(--cq-radius); border: 1px solid var(--cq-border); }
.filter-section h5 { margin-bottom: 10px; }
.form-check { margin-bottom: 10px; }

.product-card { display: flex; flex-direction: column; margin-bottom: 20px; }
.product-card del { font-size: .9em; }
.product-card .card { display: flex; flex-direction: column; height: 100%; border-color: var(--cq-border); border-radius: var(--cq-radius); }
.product-card .card-body { flex: 1; display: flex; flex-direction: column; }
.product-card .card-body .btn { margin-top: auto; }
.discount-badge {
    position: absolute; top: 0; right: -20px; background: url('/images/discount-badge.png') no-repeat center / contain;
    color: #fff; width: 50px; height: 100px; display: flex; align-items: center; justify-content: center;
    font-size: .9rem; font-weight: bold; border-radius: 50%; z-index: 10;
}

.product-detail { margin-top: 2rem; }
.product-title { font-size: 2rem; font-weight: bold; margin-bottom: 1rem; }
.product-price { font-size: 1.5rem; color: var(--cq-danger); margin-bottom: 1rem; }
.product-duration { font-size: 1.2rem; color: var(--cq-muted); margin-bottom: 1rem; }
.product-rating { margin-bottom: 1rem; }
.product-actions { display: flex; gap: 1rem; margin-top: 1rem; }
.product-actions form { flex: 1; max-width: 50%; }
.product-actions button { min-width: 200px; width: 100%; max-width: 40%; }
.product-description, .product-reviews, .related-products {
    background: var(--cq-surface-muted); border: 1px solid var(--cq-border); padding: 1.5rem; border-radius: var(--cq-radius);
}
.related-products { margin-bottom: 20px; }
.related-products h2 { margin-bottom: 1.5rem; }
.review { border-bottom: 1px solid var(--cq-border); padding: 1rem 0; }
.review:last-child { border-bottom: none; }
@media (max-width: 767px) { .product-actions { flex-direction: column; } }

.rate-display { display: flex; align-items: center; gap: .5rem; }
.stars { position: relative; white-space: nowrap; }
.stars svg { width: 16px; fill: gold; }
.overlay { background: #fff; height: 100%; overflow: hidden; mix-blend-mode: color; position: absolute; top: 0; right: 0; }
.rate-count { color: var(--cq-muted); font-size: .9rem; }

.cart-link { position: relative; display: inline-block; padding: 15px 30px 10px 10px !important; }
a.btn-link { text-decoration: none !important; }
.cart-badge {
    position: absolute; display: block; top: 5px; right: 10px; background-color: var(--cq-danger); color: #fff;
    border-radius: 50%; padding: .25rem .4rem; font-size: .75rem; min-width: 18px; aspect-ratio: 1 / 1; line-height: 1;
    text-align: center; font-weight: bold; border: 2px solid #fff;
}
#cart-count::before, #cart-count::after { content: none; }
.cart-title { margin: 2rem 0; text-align: center; }
.empty-cart { text-align: center; padding: 3rem 0; min-height: 60vh; }
.empty-cart i { font-size: 4rem; color: var(--cq-border-strong); margin-bottom: 1rem; }
.cart-container { display: flex; gap: 2rem; margin: 2rem 0; }
.cart-items { flex: 1; max-height: 400px; overflow-y: auto; margin-bottom: 1.5rem; }
.cart-items::-webkit-scrollbar { width: 6px; }
.cart-items::-webkit-scrollbar-thumb { background-color: var(--cq-accent); border-radius: 3px; }
.cart-items::-webkit-scrollbar-track { background-color: var(--cq-surface-muted); }
.cart-item { gap: 1rem; padding: 1rem; border: 1px solid var(--cq-border); border-radius: var(--cq-radius); margin-bottom: 1rem; background: var(--cq-surface); }
.cart-item-content { display: flex; }
.cart-item.removing { opacity: .5; pointer-events: none; }
.item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.btn-remove { background: none; border: none; color: var(--cq-danger); padding: .25rem; cursor: pointer; transition: transform .2s; }
.btn-remove:hover { color: var(--cq-danger); transform: scale(1.1); }
.item-image { width: 120px; min-width: 120px; }
.item-image img { width: 100%; height: auto; border-radius: var(--cq-radius-sm); }
.item-details { flex: 1; padding-left: 10px; }
.item-title { font-size: 1.1rem; margin-bottom: .5rem; }
.item-quantity { display: flex; align-items: center; gap: 1rem; margin: .5rem 0; }
.quantity-input { width: 80px; }
.cart-summary { width: 300px; min-width: 300px; }
.summary-content { position: sticky; top: 20px; padding: 1.5rem; border: 1px solid var(--cq-border); border-radius: var(--cq-radius); background: var(--cq-surface); }
.summary-row { display: flex; margin: 1rem 0; padding: .5rem 0; border-top: 1px solid var(--cq-border); }
.summary-row:first-child { border-top: 0; padding-top: 0; }
.summary-row > span:first-child { flex-grow: 1; }
.summary-row.total > span { font-weight: bold; }
.summary-row.paid > span { font-weight: bold; color: var(--cq-success); }
.btn-checkout, .btn-continue { width: 100%; margin-bottom: .5rem; }
.label { color: var(--cq-muted); min-width: 80px; display: inline-block; }
@media (max-width: 991px) {
    .cart-container { flex-direction: column; }
    .cart-summary { width: 100%; }
}
@media (max-width: 767px) {
    .cart-item-content { flex-direction: column; }
    .item-image { width: 100%; text-align: center; }
    .item-image img { max-width: 200px; }
    .item-details { width: 100%; }
    .item-quantity { justify-content: space-between; }
    .quantity-input { width: 100px; }
}

.checkout-container { padding: 2rem 0; max-width: 1400px; margin: 0 auto; }
.checkout-title { text-align: center; margin-bottom: 2rem; }
.checkout-content { display: flex; gap: 2rem; }
.checkout-details { flex: 1; min-width: 0; }
.checkout-summary { width: 400px; min-width: 400px; }
.summary-section, .shipping-info { top: 20px; background: var(--cq-surface); border: 1px solid var(--cq-border); border-radius: var(--cq-radius); padding: 1.5rem; }
.summary-section { position: sticky; }
@media (max-width: 1200px) {
    .checkout-container { padding: 1rem; }
    .checkout-content { gap: 1.5rem; }
    .checkout-summary { width: 350px; min-width: 350px; }
}
@media (max-width: 991px) {
    .checkout-content { flex-direction: column; }
    .checkout-summary { width: 100%; min-width: 100%; }
    .summary-section { position: relative; top: 0; }
    .cart-items { max-height: none; }
}
@media (max-width: 767px) {
    .checkout-container { padding: .5rem; }
    .form-row { flex-direction: column; }
    .form-group.col-md-6 { width: 100%; }
    .cart-item { flex-direction: column; }
}

.payment-methods { display: block; }
.payment-method { position: relative; background: var(--cq-surface); border: 1px solid var(--cq-border-strong); border-radius: var(--cq-radius); padding: 1rem; cursor: pointer; transition: border-color .2s; }
.payment-method input[type="radio"] { display: none; }
.payment-method label { display: flex; align-items: center; gap: 1rem; margin: 0; cursor: pointer; width: 100%; }
.payment-icon { width: 40px; height: 40px; min-width: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--cq-radius-sm); margin-right: 12px; font-size: 1.5rem; transition: transform .2s; }
.payment-icon .bi-bank { color: #2d4b94; }
/* Real payment-provider brand colors — not part of the accent system */
.momo-icon { background-color: #ae2070; color: #fff; }
.vnpay-icon { background-color: #004a9c; color: #fff; }
.cod-icon { background-color: #28a745; color: #fff; }
.payment-method:has(input[type="radio"]:checked) { background-color: var(--cq-accent-soft); border-color: var(--cq-accent); }
.payment-method input[type="radio"]:checked ~ label { color: var(--cq-accent); font-weight: 500; }
.payment-method input[type="radio"]:checked ~ label .payment-icon { transform: scale(1.08); }
.payment-method:hover:not(:has(input[type="radio"]:checked)) { border-color: var(--cq-accent); }
.btn-place-order { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; }
.order-amount { font-weight: bold; }
.btn-place-order.is-loading { position: relative; color: transparent !important; }
.btn-place-order.is-loading:after {
    content: ''; position: absolute; width: 1.2rem; height: 1.2rem; top: 50%; left: 50%; margin-left: -.6rem; margin-top: -.6rem;
    border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: button-loading-spinner 1s linear infinite;
}
@keyframes button-loading-spinner { from { transform: rotate(0turn); } to { transform: rotate(1turn); } }

/* ================================================================
   BOOTSTRAP PRIMARY OVERRIDES (platform gateway pages)
   ================================================================ */
.section-title { margin-top: 2rem; margin-bottom: 1rem; text-align: center; }
.section-title a { color: var(--cq-accent); text-decoration: none; }
.btn.btn-primary { background-color: var(--cq-accent); border-color: var(--cq-accent); }
.btn.btn-primary:hover, .btn.btn-primary:focus, .btn.btn-primary:active, .btn.btn-primary.active { background-color: var(--cq-accent-hover) !important; border-color: var(--cq-accent-hover) !important; }
.btn-outline-primary { color: var(--cq-accent); border-color: var(--cq-accent); }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active, .btn-outline-primary.active { color: #fff; background-color: var(--cq-accent); border-color: var(--cq-accent); }
.btn.btn-highlight { background-color: var(--cq-warning); border-color: var(--cq-warning); color: #fff; }
.btn.btn-highlight:hover, .btn.btn-highlight:focus, .btn.btn-highlight:active, .btn.btn-highlight.active { background-color: color-mix(in srgb, var(--cq-warning) 85%, black); border-color: color-mix(in srgb, var(--cq-warning) 85%, black); }
.card { border-color: var(--cq-border); border-radius: var(--cq-radius); }
.card-header { background-color: var(--cq-accent); color: #fff; }
.pagination .page-link { color: var(--cq-accent); }
.pagination .page-link:hover { color: #fff; background-color: var(--cq-accent); border-color: var(--cq-accent); }
.badge-primary { background-color: var(--cq-accent); }
.alert-primary { background-color: var(--cq-accent); border-color: var(--cq-accent); color: #fff; }
.progress-bar { background-color: var(--cq-accent); }
.text-primary { color: var(--cq-accent) !important; }
.border-primary { border-color: var(--cq-accent) !important; }
.bg-primary { background-color: var(--cq-accent) !important; }
.bg-secondary-gradient { background: var(--cq-accent) !important; }
.mt--5 { margin-top: -40px; }
.card.full-height { height: calc(100% - 30px); }

.select2 { flex-grow: 1; font-size: 1rem !important; }
.select2 .select2-selection--single { height: 36px !important; }
.select2-search__field:active, .select2-search__field:focus { outline: none; border: none; }
.select2-search__field { outline: none; border: none; }
.select2-input { position: relative; }
.select2-input label.error, .select2-input label.success { position: absolute; bottom: -30px; }
.select2-input .select2 { margin-bottom: 15px; }

.timeline { display: flex; justify-content: space-between; margin: 20px 0; position: relative; }
.timeline-step { flex: 1; text-align: center; position: relative; }
.timeline-step::before { content: ''; width: 100%; height: 4px; background: var(--cq-border); position: absolute; top: 50%; left: 0; z-index: 1; }
.timeline-step.completed::before { background: var(--cq-success); }
.timeline-step:not(:last-child)::after { content: ''; width: 100%; height: 4px; background: var(--cq-border); position: absolute; top: 50%; right: -50%; z-index: -1; }
.timeline-step.completed:not(:last-child)::after { background: var(--cq-success); }
.timeline-step .timeline-content { display: inline-block; width: 40px; height: 40px; line-height: 36px; background: var(--cq-surface); border: 2px solid var(--cq-border); border-radius: 50%; position: relative; z-index: 1; }
.timeline-step.completed .timeline-content { border-color: var(--cq-success); background: var(--cq-success); color: #fff; }
.timeline-step .timeline-content i { font-size: 24px; line-height: 36px; }

.new-orders { padding: 20px; }
.new-orders h1 { text-align: center; padding: 20px; }
.seller-info { font-size: 1.1em; font-style: italic; display: flex; }
.seller-info h2 { font-size: 1.1em; font-style: italic; }
.input-with-icon { position: relative; }
.input-with-icon input { width: calc(100% - 50px); border: none; }
.input-with-icon input:focus, .input-with-icon input:active { border: none; outline: none; }
.input-with-icon button { position: absolute; border: none; right: 5px; top: 0; bottom: 0; width: 50px; background-color: transparent; vertical-align: middle; }
