/* =========================================
   TERMS & PRIVACY PAGES — Astro Dark Shared
   ========================================= */

:root {
    --tp-bg:        #070912;
    --tp-bg-2:      #0c0f1c;
    --tp-border:    rgba(255, 255, 255, 0.06);
    --tp-border-hi: rgba(99, 102, 241, 0.4);
    --tp-text:      #e8ecf6;
    --tp-text-dim:  #90a0bd;
    --tp-text-mute: #5f6f8a;
    --tp-accent:    #6366f1;
    --tp-accent-2:  #a855f7;
    --tp-accent-3:  #22d3ee;
    --tp-gradient:  linear-gradient(135deg, #22d3ee 0%, #6366f1 50%, #a855f7 100%);
}

body.tp-page {
    background-color: var(--tp-bg);
    color: var(--tp-text);
}

body.tp-page .main-header.scrolled {
    background-color: rgba(7, 9, 18, 0.9);
    backdrop-filter: blur(12px);
}

body.tp-page .main-footer { background-color: #050610; }

/* =========================================
   HERO
   ========================================= */
.tp-hero {
    position: relative;
    padding: 190px 0 80px;
    background-color: var(--tp-bg);
    background-image:
        linear-gradient(180deg, rgba(7,9,18,0.9) 0%, rgba(7,9,18,0.95) 60%, var(--tp-bg) 100%),
        url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center top;
    overflow: hidden;
    text-align: center;
    color: #ffffff;
}

.tp-hero-glow {
    position: absolute;
    top: -150px; left: 50%;
    transform: translateX(-50%);
    width: 1000px; height: 1000px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.tp-hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    z-index: 1;
    pointer-events: none;
}

.tp-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.tp-hero-eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--tp-accent-3);
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.3);
    padding: 8px 18px;
    border-radius: 100px;
    margin-bottom: 26px;
    font-weight: 700;
}

.tp-hero-title {
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    color: #ffffff;
}

.tp-accent {
    background: var(--tp-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.tp-hero-desc {
    font-size: 17px;
    line-height: 1.7;
    color: var(--tp-text-dim);
    max-width: 720px;
    margin: 0 auto 30px;
}

.tp-hero-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    color: var(--tp-text-mute);
    padding: 12px 22px;
    border: 1px solid var(--tp-border);
    border-radius: 100px;
    background: rgba(255,255,255,0.02);
}

.tp-dot { color: var(--tp-accent); }

/* =========================================
   CONTENT + SIDEBAR
   ========================================= */
.tp-content {
    padding: 80px 0 110px;
    background: var(--tp-bg);
}

.tp-content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    align-items: flex-start;
}

/* TOC sidebar */
.tp-toc {
    position: sticky;
    top: 100px;
    padding: 26px 22px;
    border: 1px solid var(--tp-border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
}

.tp-toc-title {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--tp-accent-3);
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tp-border);
}

.tp-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}

.tp-toc-list li { margin-bottom: 8px; }

.tp-toc-list a {
    display: block;
    font-size: 13px;
    color: var(--tp-text-dim);
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.25s ease;
    border-left: 2px solid transparent;
}

.tp-toc-list a:hover {
    color: #ffffff;
    background: rgba(99,102,241,0.08);
    border-left-color: var(--tp-accent);
}

/* Main doc */
.tp-doc {
    max-width: 820px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.005) 100%);
    border: 1px solid var(--tp-border);
    border-radius: 20px;
    padding: 50px 45px;
    position: relative;
    overflow: hidden;
}

.tp-doc::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--tp-accent), transparent);
}

.tp-section {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--tp-border);
}

.tp-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.tp-section h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin-bottom: 18px;
}

.tp-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    color: var(--tp-accent-3);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.tp-section p {
    font-size: 15.5px;
    line-height: 1.8;
    color: var(--tp-text-dim);
    margin-bottom: 14px;
}

.tp-section p:last-child { margin-bottom: 0; }

.tp-section ul {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}

.tp-section ul li {
    position: relative;
    padding-left: 24px;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--tp-text-dim);
    margin-bottom: 10px;
}

.tp-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--tp-accent-3);
    font-weight: 700;
}

.tp-section ul li strong {
    color: #ffffff;
    font-weight: 600;
}

.tp-link {
    color: var(--tp-accent-3);
    font-weight: 600;
    transition: color 0.3s;
}

.tp-link:hover { color: var(--tp-accent); }

/* Contact box */
.tp-contact-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
    padding: 22px;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    background: rgba(99,102,241,0.04);
}

.tp-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--tp-text-dim);
}

.tp-contact-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Doc footer */
.tp-doc-footer {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--tp-border);
    text-align: center;
}

.tp-doc-footer p {
    font-size: 14px;
    color: var(--tp-text-mute);
    margin-bottom: 16px;
    font-style: italic;
}

.tp-next-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--tp-accent-3);
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid rgba(99,102,241,0.35);
    background: rgba(99,102,241,0.06);
    transition: all 0.3s;
}

.tp-next-link:hover {
    background: var(--tp-accent);
    color: #070912;
    border-color: var(--tp-accent);
    box-shadow: 0 10px 30px -10px rgba(99,102,241,0.6);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 991px) {
    .tp-hero { padding: 130px 0 60px; }
    .tp-content { padding: 60px 0 80px; }

    .tp-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tp-toc {
        position: static;
        padding: 22px 20px;
    }

    .tp-toc-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px 10px;
    }

    .tp-doc { padding: 36px 30px; }
}

@media (max-width: 640px) {
    .tp-hero { padding: 100px 0 50px; }
    .tp-hero-meta { flex-direction: column; gap: 6px; padding: 14px 20px; }
    .tp-dot { display: none; }

    .tp-toc-list { grid-template-columns: 1fr; }

    .tp-doc { padding: 28px 22px; border-radius: 16px; }
    .tp-section h2 { font-size: 18px; gap: 10px; }
    .tp-num { width: 32px; height: 32px; font-size: 11px; }

    .tp-section p,
    .tp-section ul li { font-size: 14.5px; }

    .tp-contact-box { grid-template-columns: 1fr; padding: 18px; }
}

/* RTL */
html[dir="rtl"] .tp-toc-list a {
    border-left: none;
    border-right: 2px solid transparent;
    padding: 8px 10px;
}
html[dir="rtl"] .tp-toc-list a:hover {
    border-right-color: var(--tp-accent);
}
html[dir="rtl"] .tp-section ul li {
    padding-left: 0;
    padding-right: 24px;
}
html[dir="rtl"] .tp-section ul li::before {
    left: auto;
    right: 0;
    content: '◂';
}
html[dir="rtl"] .tp-hero-meta { flex-direction: row-reverse; }
html[dir="rtl"] .tp-section h2 { flex-direction: row-reverse; }