/* =========================================================
   CONTENT / LEGAL PAGES (Terms & Conditions, policies)
   ========================================================= */

.np-legal { background: var(--np-soft, #f8f9fc); }

/* ---------- Hero ---------- */
.np-legal-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 30px;
    padding: 30px 32px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--np-border, #eceef4);
    overflow: hidden;
}

.np-legal-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--np-pink, #e7287c), var(--np-blue, #2873ba), var(--np-cyan, #43a8d8));
}

.np-legal-hero-text { flex: 1 1 520px; min-width: 0; }

.np-legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 30px;
    background: rgba(40, 115, 186, .08);
    color: var(--np-blue, #2873ba);
    font-size: 12.5px;
    font-weight: 700;
}

.np-legal-hero h2 { margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 36px); }
.np-legal-hero p { margin: 0 0 16px; color: var(--np-text, #555b6d); line-height: 1.65; max-width: 680px; }

.np-legal-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13.5px;
    color: var(--np-text, #555b6d);
}

.np-legal-facts i { margin-right: 4px; color: var(--np-pink, #e7287c); }
.np-legal-facts strong { color: var(--np-dark, #09052f); }

.np-legal-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.np-legal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--np-dark, #09052f);
    border-radius: 10px;
    background: var(--np-dark, #09052f);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.np-legal-btn:hover { background: var(--np-pink, #e7287c); border-color: var(--np-pink, #e7287c); color: #fff; }

.np-legal-btn-ghost { background: #fff; color: var(--np-dark, #09052f); border-color: var(--np-border, #e1e4ec); }
.np-legal-btn-ghost:hover { background: #fff; color: var(--np-pink, #e7287c); border-color: var(--np-pink, #e7287c); }

/* ---------- Table of contents ---------- */
.np-legal-toc {
    position: sticky;
    top: 110px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--np-border, #eceef4);
}

.np-legal-toc-toggle { display: none; }

.np-legal-toc-body { padding: 18px 10px 14px 14px; }

.np-legal-toc-head { padding: 0 8px 0 4px; margin-bottom: 12px; }

.np-legal-toc-head h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--np-text, #555b6d);
}

.np-legal-progress {
    height: 4px;
    border-radius: 4px;
    background: var(--np-soft, #f1f2f6);
    overflow: hidden;
}

.np-legal-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--np-pink, #e7287c), var(--np-blue, #2873ba));
    transition: width .15s linear;
}

.np-legal-search { position: relative; margin: 0 8px 10px 4px; }

.np-legal-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0b1;
    font-size: 13px;
}

.np-legal-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 34px;
    border: 1px solid #e1e4ec;
    border-radius: 10px;
    font-size: 13.5px;
    outline: none;
}

.np-legal-search input:focus { border-color: var(--np-pink, #e7287c); box-shadow: 0 0 0 3px rgba(231, 40, 124, .1); }

.np-legal-toc-list {
    list-style: none;
    margin: 0;
    padding: 0 4px 0 0;
    max-height: calc(100vh - 330px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d5d8e3 transparent;
}

.np-legal-toc-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 9px;
    color: var(--np-dark, #09052f);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
    transition: background .15s ease, color .15s ease;
}

.np-toc-num {
    flex-shrink: 0;
    min-width: 24px;
    height: 22px;
    padding: 0 5px;
    border-radius: 6px;
    background: var(--np-soft, #f1f2f6);
    color: var(--np-text, #555b6d);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    transition: background .15s ease, color .15s ease;
}

.np-legal-toc-list a:hover { background: var(--np-soft, #f8f9fc); color: var(--np-pink, #e7287c); }

.np-legal-toc-list a.active { background: rgba(231, 40, 124, .07); color: var(--np-pink, #e7287c); font-weight: 700; }
.np-legal-toc-list a.active .np-toc-num { background: var(--np-pink, #e7287c); color: #fff; }

.np-legal-noresult { margin: 6px 10px; font-size: 13px; color: var(--np-text, #555b6d); }

/* ---------- Content ---------- */
.np-legal-body {
    padding: 34px 40px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--np-border, #eceef4);
    color: #3d4256;
    font-size: 15.5px;
    line-height: 1.75;
}

.np-legal-body > p:first-child { font-size: 16.5px; color: var(--np-dark, #09052f); }

.np-legal-body p { margin: 0 0 14px; }

.np-legal-body h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 38px 0 16px;
    padding-top: 26px;
    border-top: 1px solid var(--np-border, #eceef4);
    font-size: 21px;
    line-height: 1.3;
    color: var(--np-dark, #09052f);
    scroll-margin-top: 120px;
}

.np-legal-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.np-legal-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--np-pink, #e7287c), var(--np-blue, #2873ba));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.np-legal-body h2 a.np-legal-anchor {
    margin-left: auto;
    padding: 0 6px;
    color: #c4c8d4;
    font-size: 18px;
    font-weight: 400;
    opacity: 0;
    transition: opacity .15s ease, color .15s ease;
}

.np-legal-body h2:hover a.np-legal-anchor,
.np-legal-body h2 a.np-legal-anchor:focus { opacity: 1; }

.np-legal-body h2 a.np-legal-anchor:hover { color: var(--np-pink, #e7287c); }

.np-legal-body h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 10px;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--np-blue, #2873ba);
}

.np-legal-body h3::before {
    content: "";
    flex-shrink: 0;
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--np-blue, #2873ba);
}

.np-legal-body h2 + h3, .np-legal-body p + h3 { margin-top: 22px; }

.np-legal-body h2.np-flash { animation: npLegalFlash 1.4s ease; }

@keyframes npLegalFlash {
    0%, 30% { background: rgba(231, 40, 124, .08); }
    100% { background: transparent; }
}

/* Bullet lists as tidy chips grid when long, check bullets otherwise */
.np-legal-body ul {
    list-style: none;
    margin: 4px 0 18px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--np-soft, #f8f9fc);
    border: 1px solid var(--np-border, #eceef4);
    columns: 2 260px;
    column-gap: 28px;
}

.np-legal-body ul li {
    position: relative;
    padding: 3px 0 3px 22px;
    break-inside: avoid;
    font-size: 14.5px;
    line-height: 1.55;
}

.np-legal-body ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--np-pink, #e7287c);
    background: #fff;
}

.np-legal-body ol {
    margin: 4px 0 18px;
    padding: 0;
    list-style: none;
    counter-reset: legal-ol;
}

.np-legal-body ol li {
    position: relative;
    counter-increment: legal-ol;
    margin-bottom: 8px;
    padding: 10px 14px 10px 48px;
    border-radius: 10px;
    background: var(--np-soft, #f8f9fc);
    border: 1px solid var(--np-border, #eceef4);
}

.np-legal-body ol li::before {
    content: counter(legal-ol);
    position: absolute;
    left: 12px;
    top: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--np-blue, #2873ba);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}

.np-legal-body a { color: var(--np-pink, #e7287c); font-weight: 600; }
.np-legal-body strong { color: var(--np-dark, #09052f); }

.np-legal-body blockquote {
    margin: 28px 0 0;
    padding: 18px 22px 18px 54px;
    position: relative;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(231, 40, 124, .07), rgba(40, 115, 186, .07));
    border-left: 4px solid var(--np-pink, #e7287c);
    color: var(--np-dark, #09052f);
    font-weight: 600;
}

.np-legal-body blockquote::before {
    content: "\f058";
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 20px;
    top: 18px;
    color: var(--np-pink, #e7287c);
    font-size: 20px;
}

.np-legal-body blockquote p:last-child { margin-bottom: 0; }

.np-legal-body table {
    width: 100%;
    margin: 4px 0 18px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--np-border, #eceef4);
    border-radius: 12px;
    overflow: hidden;
    font-size: 14.5px;
}
.np-legal-body th, .np-legal-body td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--np-border, #eceef4); }
.np-legal-body tr:last-child td { border-bottom: 0; }
.np-legal-body th {
    background: linear-gradient(135deg, rgba(231, 40, 124, .08), rgba(40, 115, 186, .08));
    color: var(--np-dark, #09052f);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.np-legal-body td:first-child { font-weight: 700; color: var(--np-dark, #09052f); }
.np-legal-body tbody tr:nth-child(even) td { background: #fcfcfe; }
.np-legal-body img { max-width: 100%; height: auto; border-radius: 10px; }

/* ---------- Bottom CTA ---------- */
.np-legal-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding: 24px 28px;
    border-radius: 18px;
    background: var(--np-dark, #09052f);
    color: rgba(255, 255, 255, .8);
}

.np-legal-cta h3 { margin: 0 0 4px; font-size: 20px; color: #fff; }
.np-legal-cta p { margin: 0; font-size: 14.5px; }
.np-legal-cta a:not(.theme-btn) { color: #fff; font-weight: 600; text-decoration: underline; }
.np-legal-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.np-legal-cta .np-legal-btn-alt { background: transparent; border: 1px solid rgba(255, 255, 255, .4); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .np-legal-toc { position: sticky; top: 76px; z-index: 5; }

    .np-legal-toc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 18px;
        border: 0;
        background: none;
        font-size: 15px;
        font-weight: 700;
        color: var(--np-dark, #09052f);
    }

    .np-legal-toc-toggle i.far { margin-right: 6px; color: var(--np-pink, #e7287c); }
    .np-legal-toc-toggle .fa-angle-down { transition: transform .2s ease; }
    .np-legal-toc.open .np-legal-toc-toggle .fa-angle-down { transform: rotate(180deg); }

    .np-legal-toc-body { display: none; padding-top: 0; border-top: 1px solid var(--np-border, #eceef4); }
    .np-legal-toc.open .np-legal-toc-body { display: block; padding-top: 14px; }
    .np-legal-toc-list { max-height: 50vh; }
}

@media (max-width: 575px) {
    .np-legal-hero { padding: 24px 20px; }
    .np-legal-hero-actions, .np-legal-btn { width: 100%; justify-content: center; }
    .np-legal-body { padding: 24px 18px; font-size: 15px; }
    .np-legal-body h2 { font-size: 18.5px; gap: 10px; }
    .np-legal-num { min-width: 32px; height: 32px; font-size: 14px; }
    .np-legal-body ul { columns: 1; padding: 14px; }
    .np-legal-cta { padding: 22px 20px; }
}

/* ---------- Print: just the document ---------- */
@media print {
    header, footer, .breadcrumb-wrapper, .np-legal-toc, .np-legal-hero-actions, .np-legal-cta,
    .np-legal-anchor, .offcanvas__info, .offcanvas__overlay, .side_bar, .search-wrap,
    #back-top, .back-to-top, .scroll-up, .preloader, .np-legal .col-lg-4 { display: none !important; }
    .np-legal, .np-legal-hero, .np-legal-body { background: #fff !important; border: 0 !important; padding: 0 !important; }
    .np-legal .col-lg-8, .np-legal .col-xl-9 { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
    .np-legal-body { font-size: 11pt; color: #000; }
    .np-legal-body h2 { break-after: avoid; border-top: 1px solid #ccc; }
    .np-legal-body ul, .np-legal-body ol li { background: #fff !important; }
    .np-legal-num { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
