/**
 * TSW Legal Pages — Privacy Policy & Terms
 *
 * Ported from static site, adapted for theme CSS variables.
 *
 * @package TSW
 * @since   1.0.0
 */

/* ---------- Hero ---------- */
.lg-hero {
    padding: 130px 0 60px;
    background: var(--tsw-dark, #1a1a2e);
    position: relative;
    overflow: hidden;
}
.lg-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.lg-hero h1 {
    font-family: var(--tsw-font-display, 'Qilka', serif);
    font-size: clamp(2rem, 5vw, 3rem);
    color: #fff;
    margin-bottom: 12px;
}
.lg-hero-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 600px;
}
.lg-hero-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 50px;
}
.lg-hero-updated i {
    color: var(--tsw-accent, #2ecc71);
    font-size: 0.9rem;
}

/* ---------- Content Area ---------- */
.lg-content {
    padding: 60px 0 80px;
}
.lg-content-inner {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}
.lg-article {
    flex: 1;
    min-width: 0;
}
.lg-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 85px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Sidebar TOC */
.lg-toc {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--tsw-border, #e0e0e0);
}
.lg-toc-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tsw-text-muted, #666);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--tsw-border, #e0e0e0);
}
.lg-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lg-toc-list li {
    margin-bottom: 6px;
}
.lg-toc-list a {
    display: block;
    font-size: 0.84rem;
    color: var(--tsw-text-muted, #666);
    padding: 6px 10px;
    border-radius: 6px;
    transition: all var(--tsw-transition, 0.3s ease);
    line-height: 1.4;
    text-decoration: none;
}
.lg-toc-list a:hover,
.lg-toc-list a.active {
    color: var(--tsw-primary, #1a3a2a);
    background: var(--tsw-accent-light, rgba(46, 204, 113, 0.1));
    font-weight: 600;
}

/* Sidebar Quick Contact */
.lg-sidebar-contact {
    background: var(--tsw-dark, #1a1a2e);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    color: #fff;
}
.lg-sidebar-contact h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}
.lg-sidebar-contact p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 14px;
    line-height: 1.5;
}
.lg-sidebar-contact a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--tsw-accent, #2ecc71);
    font-weight: 600;
    text-decoration: none;
}
.lg-sidebar-contact a:hover {
    color: #fff;
}

/* ---------- Article Prose ---------- */
.lg-article h2 {
    font-family: var(--tsw-font-display, 'Qilka', serif);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    color: var(--tsw-dark, #1a1a2e);
    margin-top: 48px;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--tsw-border, #e0e0e0);
    scroll-margin-top: 90px;
}
.lg-article h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.lg-article h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tsw-text-muted, #666);
    margin-top: 28px;
    margin-bottom: 10px;
}
.lg-article p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #444;
    margin-bottom: 16px;
}
.lg-article ul,
.lg-article ol {
    margin-bottom: 18px;
    padding-left: 24px;
}
.lg-article li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 6px;
}
.lg-article li::marker {
    color: var(--tsw-accent, #2ecc71);
}
.lg-article strong {
    color: var(--tsw-dark, #1a1a2e);
    font-weight: 600;
}
.lg-article a {
    color: var(--tsw-primary, #1a3a2a);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.lg-article a:hover {
    color: var(--tsw-primary-dark, #0f2a1c);
}

/* Highlight box */
.lg-highlight {
    background: var(--tsw-accent-light, rgba(46, 204, 113, 0.1));
    border-left: 4px solid var(--tsw-accent, #2ecc71);
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 24px 0;
}
.lg-highlight p {
    margin: 0;
    color: var(--tsw-primary, #1a3a2a);
    font-size: 0.92rem;
}

/* Info box */
.lg-info {
    background: #fff;
    border: 1px solid var(--tsw-border, #e0e0e0);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
}
.lg-info-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tsw-accent, #2ecc71);
    margin-bottom: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .lg-content-inner {
        flex-direction: column;
    }
    .lg-sidebar {
        flex: none;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
        order: -1;
        margin-bottom: 30px;
    }
    .lg-toc {
        max-height: 200px;
        overflow-y: auto;
    }
}
@media (max-width: 575px) {
    .lg-hero {
        padding: 110px 0 40px;
    }
    .lg-content {
        padding: 40px 0 50px;
    }
    .lg-article h2 {
        margin-top: 32px;
        padding-top: 16px;
    }
}


/* ══════════════════════════════════════════════════════════
 *  LEGAL LAYOUT — .legal-* classes used by the page templates
 *  (Privacy Policy + Terms). TOC sidebar sits on the RIGHT and
 *  stays sticky while the article scrolls.
 * ══════════════════════════════════════════════════════════ */
.legal-content {
    padding: 60px 0 80px;
}

/* Article column (left) */
.legal-article {
    min-width: 0;
    max-width: 100%;
}

.legal-article h2[id],
.legal-article h3[id] {
    scroll-margin-top: 90px;
}

/* TOC sidebar (right, sticky) */
.legal-toc {
    position: sticky;
    top: 90px;
    background: var(--tsw-white, #fff);
    border: 1px solid var(--tsw-stone, #e9ecef);
    border-radius: 14px;
    padding: 20px 18px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06));
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.legal-toc-title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tsw-stone, #e9ecef);
    color: var(--tsw-ink, #1a1a2e);
}

.legal-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-toc-list a {
    display: block;
    padding: 7px 10px;
    font-size: .82rem;
    line-height: 1.45;
    color: var(--tsw-graphite, #6b7280);
    text-decoration: none;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.legal-toc-list a:hover,
.legal-toc-list a.active {
    color: var(--tsw-green, #44b968);
    background: rgba(68, 185, 104, .07);
    border-left-color: var(--tsw-green, #44b968);
}

.legal-toc-list a.legal-toc-sub {
    padding-left: 22px;
    font-size: .78rem;
}

/* Tablet / mobile: sidebar is hidden (d-none d-lg-block), so no
   sticky needed. These keep the article comfortable on small screens. */
@media (max-width: 991.98px) {
    .legal-content { padding: 44px 0 60px; }
}

@media (max-width: 575px) {
    .legal-content { padding: 34px 0 48px; }
}
