/* =========================================================
   Bizmantra - Quick Access (Government Portal Links)
   assets/css/quick-access.css?v=1
   - Same system as about.css?v=1: --bm-* tokens, light / dark theme.
   - Fallback values are included, so it also works on its own.
   ========================================================= */
.bmq {
    --q-bg: #F6F8FD;
    --q-card: #FFFFFF;
    --q-line: #E0E7F5;
    --q-sub: #4F5D7A;
    --q-muted: #7A87A3;

    --q-head: var(--bm-head, #16275C);
    --q-text: var(--bm-text, #1B2A4A);
    --q-blue: var(--bm-blue, #5A82E8);
    --q-blue-d: var(--bm-blue-d, #3A5FC7);
    --q-green: var(--bm-green, #9ACD4F);
    --q-btn: var(--bm-btn, #1F3573);
    --q-btn-h: var(--bm-btn-h, #2A4590);

    position: relative; overflow: hidden;
    padding-block: clamp(56px, 8vw, 104px);
    background: var(--q-bg);
    color: var(--q-text);
    font-family: var(--bm-font, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
}
:root[data-theme="dark"] .bmq {
    --q-bg: #0F1836;
    --q-card: #141E3D;
    --q-line: rgba(143,176,255,.20);
    --q-sub: #B4C1E0;
    --q-muted: #8F9DC2;
}

:where(.bmq) *, :where(.bmq) *::before, :where(.bmq) *::after { box-sizing: border-box; }
:where(.bmq) ul { list-style: none; margin: 0; padding: 0; }
:where(.bmq) h2, :where(.bmq) p { margin: 0; }
:where(.bmq) a { color: inherit; text-decoration: none; }
:where(.bmq) svg { display: block; flex: none; }
.bmq :focus-visible { outline: 2px solid var(--q-blue-d); outline-offset: 2px; border-radius: 8px; }
.bmq__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- LAYOUT ---------------- */
.bmq__container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }

/* ---------------- HEADING ---------------- */
.bmq__eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--q-blue-d);
}
.bmq__eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--q-blue), var(--q-green)); }
.bmq__title {
    margin-top: 14px; max-width: 22ch;
    font-size: clamp(28px, 3.5vw, 42px); font-weight: 800; line-height: 1.12; letter-spacing: -.03em;
    color: var(--q-head); text-wrap: balance;
}
.bmq__sub { margin-top: 16px; max-width: 58ch; font-size: clamp(15px, 1.3vw, 17px); line-height: 1.7; font-weight: 500; color: var(--q-sub); }

/* ---------------- FILTER + SEARCH ---------------- */
.bmq__tools { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; margin: 36px 0 26px; }
.bmq__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bmq__chips button {
    min-height: 42px; padding: 8px 18px; border: 1px solid var(--q-line); border-radius: 10px;
    background: var(--q-card); color: var(--q-sub); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.bmq__chips button:hover { border-color: var(--q-blue); color: var(--q-blue-d); }
.bmq__chips button.is-active { background: var(--q-btn); border-color: var(--q-btn); color: #fff; }

.bmq__search { position: relative; display: block; width: 300px; max-width: 100%; }
.bmq__search svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--q-muted); pointer-events: none; }
.bmq__search input {
    width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1px solid var(--q-line); border-radius: 10px;
    background: var(--q-card); color: var(--q-text); font: inherit; font-size: 14.5px; font-weight: 500;
    -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s;
}
.bmq__search input::placeholder { color: var(--q-muted); font-weight: 400; }
.bmq__search input:focus { outline: 0; border-color: var(--q-blue); box-shadow: 0 0 0 3px rgba(90,130,232,.2); }

/* ---------------- CARDS ---------------- */
.bmq__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bmq__item[hidden] { display: none; }

.bmq__card {
    position: relative; display: flex; align-items: center; gap: 16px; height: 100%; padding: 16px 18px;
    background: var(--q-card); border: 1px solid var(--q-line); border-radius: 14px;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.bmq__ico {
    display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 13px;
    background: var(--tint); background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .03em;
    transition: background .2s, color .2s;
}
:root[data-theme="dark"] .bmq__ico { color: color-mix(in srgb, var(--accent) 55%, #fff); }

.bmq__txt { flex: 1; min-width: 0; }
.bmq__txt strong { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.3; color: var(--q-head); }
.bmq__txt span { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--q-sub); }
.bmq__txt small { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .01em; color: var(--q-muted); }

.bmq__go {
    display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--q-line); color: var(--q-muted); transition: background .2s, border-color .2s, color .2s;
}
.bmq__go svg { width: 16px; height: 16px; transition: transform .2s; }

.bmq__card:focus-visible { outline-offset: 3px; border-radius: 14px; }
@media (hover: hover) {
    .bmq__card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 16px 28px -18px rgba(31,53,115,.45); }
    .bmq__card:hover .bmq__ico { background: var(--accent); color: #fff; }
    .bmq__card:hover .bmq__go { background: var(--accent); border-color: var(--accent); color: #fff; }
    .bmq__card:hover .bmq__go svg { transform: translate(2px, -2px); }
}

.bmq__empty { margin-top: 8px; padding: 28px 16px; border: 1px dashed var(--q-line); border-radius: 14px; background: var(--q-card); text-align: center; font-size: 14.5px; color: var(--q-sub); }
.bmq__empty[hidden] { display: none; }
.bmq__note { margin-top: 26px; font-size: 13px; line-height: 1.6; color: var(--q-muted); }

/* ---------------- SCROLL REVEAL (only when JS runs) ---------------- */
.bmq-js .bmq__item { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i, 0) * 70ms); }
.bmq-js .bmq__item.is-in { opacity: 1; transform: none; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1023px) {
    .bmq__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .bmq__tools { flex-direction: column-reverse; align-items: stretch; margin: 28px 0 22px; }
    .bmq__search { width: 100%; }
    .bmq__chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding: 0 20px 4px; scrollbar-width: none; }
    .bmq__chips::-webkit-scrollbar { display: none; }
}
@media (max-width: 599px) {
    .bmq__container { padding-inline: 16px; }
    .bmq__title { max-width: none; }
    .bmq__chips { margin-inline: -16px; padding-inline: 16px; }
    .bmq__chips button { min-height: 38px; padding: 6px 14px; font-size: 13px; }

    /* 2 cards per row: icon on top, text below */
    .bmq__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .bmq__card { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 12px 14px 14px; }
    .bmq__ico { width: 42px; height: 42px; border-radius: 11px; font-size: 12px; }
    .bmq__txt strong { font-size: 14px; }
    .bmq__txt span { font-size: 12px; line-height: 1.4; }
    .bmq__txt small { display: none; }
    .bmq__go { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; }
    .bmq__go svg { width: 14px; height: 14px; }
}
@media (max-width: 339px) {
    .bmq__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .bmq * { transition-duration: .01ms !important; transition-delay: 0ms !important; }
    .bmq-js .bmq__item { opacity: 1; transform: none; }
}