/* ============================================================
   Global SEO guide block (above the footer on key pages)
   ------------------------------------------------------------
   Markup:    resources/views/frontend/inc/seo-content.blade.php
   Behaviour: public/frontend/js/seo-content.js
   Content HTML comes from Admin > SEO Manager (h2/h3, p, ul/ol, table, ol.sxc__steps).
   Mobile-first.
   ============================================================ */

.sxc {
    --sx-blue: #2563eb;
    --sx-blue-d: #1d4ed8;
    --sx-green: #16a34a;
    --sx-ink: #0f172a;
    --sx-body: #334155;
    --sx-text: #475569;
    --sx-muted: #64748b;
    --sx-line: #e6ebf3;
    --sx-soft: #f5f8fe;
    padding: 56px 0;
    background: #fff;
    border-top: 1px solid var(--sx-line);
    color: var(--sx-body);
}
.sxc *, .sxc *::before, .sxc *::after { box-sizing: border-box; }
.sxc [hidden] { display: none !important; }
.sxc :focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 6px; }
.sxc__card { max-width: 1100px; margin: 0 auto; }

/* ── Header ───────────────────────────────────────────────── */
.sxc__head { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--sx-line); }
.sxc__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #eff5ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sx-blue);
}
.sxc__title { margin: 12px 0; font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 900; line-height: 1.2; letter-spacing: -.01em; color: var(--sx-ink); }
.sxc__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sxc__meta li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--sx-line);
    border-radius: 999px;
    background: var(--sx-soft);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--sx-muted);
}
.sxc__meta i { font-size: 11px; color: var(--sx-blue); }

/* ── Layout + contents list ───────────────────────────────── */
.sxc__layout { display: grid; gap: 22px; }
.sxc__toc { padding: 16px 18px; border: 1px solid var(--sx-line); border-radius: 14px; background: var(--sx-soft); }
.sxc__toc-title { display: block; padding-bottom: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sx-muted); }
.sxc__toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; counter-reset: sxc-toc; }
.sxc__toc li { counter-increment: sxc-toc; }
.sxc__toc a { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--sx-text); text-decoration: none; transition: color .2s; }
.sxc__toc a::before { content: counter(sxc-toc, decimal-leading-zero); flex-shrink: 0; min-width: 22px; font-size: 12px; font-weight: 800; line-height: 1.75; color: #a9bbd8; }
.sxc__toc a:hover { color: var(--sx-blue); }
.sxc__toc a:hover::before { color: var(--sx-blue); }

/* ── Article ──────────────────────────────────────────────── */
.sxc__body-wrap { position: relative; min-width: 0; }
.sxc__body { font-size: 16px; line-height: 1.8; overflow-wrap: break-word; }
.sxc__body > :first-child { margin-top: 0; }
.sxc__body > :last-child { margin-bottom: 0; }
.sxc__body p { margin: 0 0 14px; }
.sxc__body h2,
.sxc__body h3 { scroll-margin-top: 110px; color: var(--sx-ink); font-weight: 800; letter-spacing: -.01em; }
.sxc__body h2 { margin: 30px 0 12px; font-size: 1.35rem; line-height: 1.3; }
.sxc__body h3 { position: relative; margin: 26px 0 10px; padding-left: 14px; font-size: 1.12rem; line-height: 1.35; }
.sxc__body h3::before { content: ""; position: absolute; top: .18em; bottom: .18em; left: 0; width: 4px; border-radius: 4px; background: var(--sx-blue); }
.sxc__body strong { color: var(--sx-ink); }
.sxc__body a { color: var(--sx-blue-d); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(37, 99, 235, .35); text-underline-offset: 3px; }
.sxc__body a:hover { text-decoration-color: currentColor; }
.sxc__body ul,
.sxc__body ol { margin: 0 0 16px; padding-left: 22px; }
.sxc__body li { margin-bottom: 6px; }
.sxc__body li::marker { color: var(--sx-blue); font-weight: 700; }
.sxc__body table { display: block; width: 100%; max-width: 100%; margin: 8px 0 18px; overflow-x: auto; border-collapse: collapse; font-size: .95rem; }
.sxc__body th,
.sxc__body td { padding: 10px 12px; border: 1px solid var(--sx-line); text-align: left; vertical-align: top; }
.sxc__body th { background: var(--sx-soft); color: var(--sx-ink); font-weight: 800; }

/* Numbered steps (ol.sxc__steps in SEO Manager content) */
.sxc__body .sxc__steps { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: sxc-step; }
.sxc__body .sxc__steps li {
    position: relative;
    margin: 0;
    padding: 14px 16px 14px 58px;
    border: 1px solid var(--sx-line);
    border-radius: 14px;
    background: var(--sx-soft);
    line-height: 1.6;
    counter-increment: sxc-step;
}
.sxc__body .sxc__steps li::before {
    content: counter(sxc-step);
    position: absolute;
    top: 50%; left: 14px;
    width: 30px; height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sx-blue), #60a5fa);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    transform: translateY(-50%);
    box-shadow: 0 6px 14px rgba(37, 99, 235, .28);
}

/* Collapsed guide (phones) */
.sxc__body-wrap.is-collapsed .sxc__body { max-height: 520px; overflow: hidden; }
.sxc__fade { display: none; }
.sxc__body-wrap.is-collapsed .sxc__fade {
    display: block;
    position: absolute;
    left: 0; right: 0; bottom: 56px;
    height: 120px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}
.sxc__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    margin-top: 14px;
    padding: 0 18px;
    border: 1px solid var(--sx-line);
    border-radius: 10px;
    background: #fff;
    color: var(--sx-ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}
.sxc__toggle:hover { background: var(--sx-soft); border-color: #cbd8ee; }
.sxc__toggle i { font-size: 12px; transition: transform .2s; }
.sxc__toggle[aria-expanded="true"] i { transform: rotate(180deg); }

/* ── Quick answers ────────────────────────────────────────── */
.sxc__faqs { margin-top: 28px; padding: 18px; border: 1px solid var(--sx-line); border-radius: 16px; background: var(--sx-soft); }
.sxc__faqs-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1.1rem; font-weight: 900; color: var(--sx-ink); }
.sxc__faqs-title i { color: var(--sx-blue); }
.sxc__faqs-list { display: grid; gap: 8px; }
.sxc__q { border: 1px solid var(--sx-line); border-radius: 12px; background: #fff; }
.sxc__q[open] { border-color: #c7d7f3; }
.sxc__q summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--sx-ink);
    cursor: pointer;
    list-style: none;
}
.sxc__q summary::-webkit-details-marker { display: none; }
.sxc__q summary i {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sx-soft);
    color: var(--sx-blue);
    font-size: 11px;
    transition: transform .2s, background-color .2s, color .2s;
}
.sxc__q[open] summary i { transform: rotate(45deg); background: var(--sx-blue); color: #fff; }
.sxc__a { padding: 0 16px 14px; font-size: 14.5px; line-height: 1.7; color: var(--sx-text); }

/* ── ≥768px ───────────────────────────────────────────────── */
@media (min-width: 768px) {
    .sxc { padding: 72px 0; }
    .sxc__faqs { padding: 22px 24px; }
    .sxc__faqs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* ── ≥992px — contents list beside the guide ──────────────── */
@media (min-width: 992px) {
    .sxc { padding: 80px 0; }
    .sxc__layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 44px; }
    .sxc__layout--single { grid-template-columns: minmax(0, 860px); justify-content: center; }
    .sxc__toc { position: sticky; top: 100px; }
    .sxc__body { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .sxc *, .sxc *::before, .sxc *::after { transition: none !important; }
}
