/* =========================================================
   Static pages - editor content normalised on the frontend
   Works with ANY editor markup (inline styles, pasted Word,
   CKEditor/TinyMCE/Summernote). Pair with static-page.js
   ========================================================= */
.static-page-wrapper {
    --vsp-ink: #062f47;
    --vsp-blue: #0a5580;
    --vsp-gold-deep: #b9851a; /* ab sirf H1 ki chhoti line me */
    --vsp-gold: #eeb842;
    --vsp-tan: #e6eef4;
    --vsp-tan-soft: #f4f8fb;
    --vsp-tan-line: #d8e3ec;
    --vsp-text: #26333d;

    padding: 48px 16px 88px;
    background:
        radial-gradient(900px 380px at 12% -80px, rgba(10,85,128,.13), transparent 70%),
        linear-gradient(180deg, var(--vsp-tan) 0%, var(--vsp-tan-soft) 420px, var(--vsp-tan-soft) 100%);
    color: var(--vsp-text);
    font-size: 17px; line-height: 1.78;
    overflow-wrap: anywhere;
}
.static-page-wrapper *, .static-page-wrapper *::before, .static-page-wrapper *::after { box-sizing: border-box; }
.static-page-wrapper .container { max-width: 1000px; }

/* white sheet that holds the article */
.static-page-wrapper .static-page-content {
    background: #fff; border-radius: 22px; border-top: 6px solid var(--vsp-blue);
    padding: clamp(24px, 5vw, 56px);
    box-shadow: 0 1px 0 var(--vsp-tan-line), 0 24px 60px -24px rgba(6,47,71,.25);
}

/* ---------- headings ---------- */
.static-page-wrapper h1, .static-page-wrapper h2, .static-page-wrapper h3, .static-page-wrapper h4, .static-page-wrapper h5 {
    color: var(--vsp-ink) !important; font-weight: 800; line-height: 1.2; letter-spacing: -.012em;
    font-family: inherit !important; background: none !important;
}
.static-page-wrapper .static-page-content > h1 {
    margin: 0 0 30px; padding-bottom: 18px; font-size: clamp(28px, 5.2vw, 46px);
    background: linear-gradient(var(--vsp-gold), var(--vsp-gold)) left bottom / 72px 4px no-repeat, linear-gradient(var(--vsp-tan-line), var(--vsp-tan-line)) left bottom / 100% 1px no-repeat !important;
}
.static-page-description h1 { font-size: clamp(26px, 4.4vw, 36px); margin: 44px 0 16px; }
.static-page-description h2 {
    font-size: clamp(22px, 3.7vw, 30px); margin: 46px 0 16px; padding: 4px 0 4px 16px;
    border-left: 6px solid var(--vsp-blue);
}
.static-page-description h3 { font-size: clamp(19px, 3vw, 24px); margin: 32px 0 10px; }
.static-page-description h4 { font-size: 18px; margin: 26px 0 8px; color: var(--vsp-blue) !important; }
.static-page-description h5 { font-size: 16px; margin: 20px 0 6px; }

/* ---------- text (kills pasted inline fonts/colors/sizes) ---------- */
.static-page-description p, .static-page-description li, .static-page-description span,
.static-page-description div, .static-page-description font {
    font-family: inherit !important; font-size: inherit !important; line-height: inherit !important;
    background-color: transparent !important;
}
.static-page-description p { margin: 0 0 18px; color: var(--vsp-text) !important; }
.static-page-description span, .static-page-description font { color: inherit !important; }
.static-page-description strong, .static-page-description b { color: var(--vsp-ink) !important; font-weight: 700; }
.static-page-description ul, .static-page-description ol { margin: 0 0 22px; padding-left: 26px; }
.static-page-description li { margin-bottom: 8px; }
.static-page-description li::marker { color: var(--vsp-blue); font-weight: 700; }
.static-page-description hr { border: 0; height: 1px; background: var(--vsp-tan-line); margin: 38px 0; }
.static-page-description blockquote {
    margin: 26px 0; padding: 18px 22px; background: var(--vsp-tan-soft);
    border-left: 5px solid var(--vsp-blue); border-radius: 0 12px 12px 0; color: var(--vsp-ink);
}
.static-page-description blockquote p:last-child { margin-bottom: 0; }

/* ---------- links ---------- */
.static-page-description a, .static-page-description a span {
    color: var(--vsp-blue) !important; font-weight: 600; text-decoration: underline;
    text-decoration-color: rgba(10,85,128,.35); text-underline-offset: 3px; transition: color .15s;
}
.static-page-description a:hover, .static-page-description a:hover span { color: var(--vsp-ink) !important; text-decoration-color: var(--vsp-ink); }
.static-page-description a:focus-visible { outline: 3px solid var(--vsp-blue); outline-offset: 2px; border-radius: 3px; }

/* ---------- images ---------- */
.static-page-description img {
    display: block; max-width: 100% !important; height: auto !important; margin: 26px auto;
    border-radius: 14px; box-shadow: 0 10px 28px -10px rgba(6,47,71,.3);
}
.static-page-description figure { margin: 26px 0; max-width: 100%; }
.static-page-description figure img { margin: 0 auto; }
.static-page-description figcaption { margin-top: 8px; text-align: center; font-size: 14px; color: #6b7a86; }

/* ---------- image row (JS adds .vsp-img-row; old wrapper names also styled) ---------- */
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) {
    display: flex !important; flex-wrap: nowrap; gap: 14px; margin: 30px 0; padding: 4px 2px 16px;
    overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--vsp-blue) var(--vsp-tan-line);
}
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row)::-webkit-scrollbar { height: 6px; }
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row)::-webkit-scrollbar-thumb { background: var(--vsp-blue); border-radius: 6px; }
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) img {
    flex: 1 0 160px; min-width: 160px; width: 100%; height: 180px !important; margin: 0;
    object-fit: cover; scroll-snap-align: start; border: 1px solid var(--vsp-tan-line); box-shadow: none;
}

/* ---------- tables: any editor markup -> clean table ---------- */
.static-page-description figure.table { margin: 0; overflow: visible; }
.vsp-table-wrap {
    margin: 30px 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--vsp-tan-line); border-radius: 14px; background: #fff;
    box-shadow: 0 8px 24px -14px rgba(6,47,71,.25);
}
.vsp-table-wrap table, .static-page-description table {
    width: 100% !important; min-width: 0 !important; max-width: none !important; height: auto !important;
    margin: 0; border-collapse: collapse !important; border-spacing: 0; border: 0 !important;
    background: transparent !important; font-size: 16px !important; line-height: 1.5 !important; table-layout: auto !important;
}
.static-page-description table :is(thead, tbody, tfoot, tr, th, td, colgroup, col) { width: auto !important; height: auto !important; }
.static-page-description th, .static-page-description td {
    padding: 14px 18px !important; text-align: left !important; vertical-align: top;
    border: 0 !important; border-bottom: 1px solid var(--vsp-tan-line) !important;
    background: transparent !important; color: var(--vsp-text) !important;
}
.static-page-description th {
    background: var(--vsp-ink) !important; color: #fff !important; font-weight: 700;
    white-space: nowrap; border-bottom: 3px solid var(--vsp-blue) !important;
}
.static-page-description th * { color: #fff !important; }
.static-page-description tbody tr:nth-child(even) td { background: var(--vsp-tan-soft) !important; }
.static-page-description tbody tr:hover td { background: #e8f1f7 !important; }
.static-page-description td:first-child { font-weight: 600; color: var(--vsp-ink) !important; }
.static-page-description td p, .static-page-description th p { margin: 0 !important; }
.static-page-description tbody tr:last-child td { border-bottom: 0 !important; }

/* mobile: every row becomes a labelled card (labels come from header text) */
@media (max-width: 640px) {
    .vsp-table-wrap { overflow: visible; border: 0; box-shadow: none; background: transparent; }
    .vsp-table-wrap table, .vsp-table-wrap tbody, .vsp-table-wrap tr, .vsp-table-wrap td { display: block !important; width: 100% !important; }
    .vsp-table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .vsp-table-wrap tr {
        margin-bottom: 14px; background: #fff; border: 1px solid var(--vsp-tan-line);
        border-left: 5px solid var(--vsp-blue); border-radius: 12px; overflow: hidden;
    }
    .vsp-table-wrap td { display: flex !important; gap: 12px; justify-content: space-between; padding: 11px 14px !important; text-align: right !important; }
    .vsp-table-wrap td::before {
        content: attr(data-label); flex: 0 0 38%; max-width: 38%; text-align: left;
        font-weight: 700; color: var(--vsp-blue);
    }
    .vsp-table-wrap tbody tr:nth-child(even) td { background: transparent !important; }
    .vsp-table-wrap td:first-child { background: var(--vsp-ink) !important; color: #fff !important; text-align: left !important; }
    .vsp-table-wrap td:first-child::before { color: #bcd9ec; }
}

/* ---------- misc ---------- */
.static-page-description :is(iframe, video) { max-width: 100%; border: 0; border-radius: 14px; }
.static-page-description pre { overflow-x: auto; padding: 16px; background: var(--vsp-ink); color: #fff; border-radius: 12px; font-size: 14px; }

@media (max-width: 768px) {
    .static-page-wrapper { padding: 24px 10px 56px; font-size: 16px; line-height: 1.7; }
    .static-page-wrapper .static-page-content { border-radius: 16px; }
}
@media (max-width: 480px) {
    .static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) img { flex-basis: 130px; min-width: 130px; height: 130px !important; }
}
@media (prefers-reduced-motion: reduce) { .static-page-wrapper * { transition: none !important; } }

/* =========================================================
   UPDATE: images = hamesha 1 row, ul/ol = icon bullets
   ========================================================= */

/* ---------- images: ek hi row, barabar width, zyada ho to swipe ---------- */
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) {
    display: flex !important; flex-wrap: nowrap !important; flex-direction: row !important;
    align-items: stretch; justify-content: flex-start; gap: 12px; width: 100%;
}
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) > * { flex: 1 1 0; min-width: 150px; margin: 0 !important; }
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) img {
    flex: 1 1 0; min-width: 150px; width: 100% !important; height: 190px !important; object-fit: cover; margin: 0 !important; display: block;
}
/* row ke andar <p>/<br> aaye to bhi row na tute */
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) br { display: none; }
.static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) p { margin: 0; display: contents; }

/* ---------- bullet list: icon ---------- */
.static-page-description ul { list-style: none; padding-left: 0; margin: 0 0 24px; }
.static-page-description ul > li { position: relative; padding-left: 34px; margin-bottom: 10px; }
.static-page-description ul > li::before {
    content: ""; position: absolute; left: 0; top: .3em; width: 22px; height: 22px; border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat,
        var(--vsp-ink);
}
.static-page-description ul ul { margin: 10px 0 4px; }
.static-page-description ul ul > li::before {
    width: 8px; height: 8px; top: .72em; left: 7px; background: var(--vsp-blue);
}

/* ---------- numbered list: gold number badge ---------- */
.static-page-description ol { list-style: none; counter-reset: vsp-n; padding-left: 0; margin: 0 0 24px; }
.static-page-description ol > li { position: relative; counter-increment: vsp-n; padding-left: 40px; margin-bottom: 12px; }
.static-page-description ol > li::before {
    content: counter(vsp-n); position: absolute; left: 0; top: .1em; width: 28px; height: 28px; border-radius: 8px;
    background: var(--vsp-blue); color: #fff; font-size: 14px; font-weight: 700; line-height: 28px; text-align: center;
}
.static-page-description li::marker { content: none; }

@media (max-width: 480px) {
    .static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) > *,
    .static-page-description :is(.vsp-img-row, .img-row, .image-row, .static-img-row, .content-images-row) img { min-width: 130px; height: 140px !important; }
}