/* ============================================================
   Legal document pages
   Used by eula.html / eula-ar.html and privacy.html / privacy-ar.html.
   Loaded after style.css and reuses its header/footer/container.
   ============================================================ */

/* Page shell */
.legal-main {
    padding: 120px 0 96px;
    background: #fff;
}

.legal-doc {
    max-width: 820px;
    margin: 0 auto;
}

/* Header: language switch */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    direction: ltr;
}

.nav .lang-switch .lang-btn {
    margin-left: 0;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.75);
    transition: background 0.2s, color 0.2s;
}

.nav .lang-switch .lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav .lang-switch .lang-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

/* Document */
.legal-doc .legal-title {
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin-bottom: 10px;
}

.legal-doc .legal-product {
    font-size: 1.15rem;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 4px;
}

.legal-doc .legal-updated {
    font-size: 0.92rem;
    color: #64748b;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.legal-doc h2 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    color: #0f172a;
    margin: 40px 0 12px;
}

.legal-doc h3 {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.5;
    color: #334155;
    margin: 26px 0 8px;
}

.legal-doc p {
    font-size: 1rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 16px;
}

.legal-doc .clause-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.legal-doc .clause-list li {
    font-size: 1rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 8px;
    padding-inline-start: 12px;
}

.legal-doc a {
    color: #6366f1;
    transition: color 0.2s;
}

.legal-doc a:hover {
    color: #a855f7;
}

/* Arabic (right-to-left) */
html[dir="rtl"] body {
    font-family: 'Segoe UI', Tahoma, 'Noto Naskh Arabic', 'Traditional Arabic', 'Amiri', Arial, sans-serif;
}

html[dir="rtl"] .legal-doc,
html[dir="rtl"] .legal-doc h2,
html[dir="rtl"] .legal-doc h3,
html[dir="rtl"] .legal-doc p,
html[dir="rtl"] .legal-doc .clause-list li {
    text-align: right;
}

html[dir="rtl"] .legal-doc p,
html[dir="rtl"] .legal-doc .clause-list li {
    line-height: 1.9;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-main {
        padding: 104px 0 64px;
    }

    /* The logo already links home, so the nav link is redundant on small screens */
    .legal-page .nav > a {
        display: none;
    }

    .nav .lang-switch .lang-btn {
        padding: 5px 12px;
        font-size: 0.78rem;
    }
}

@media (max-width: 400px) {
    .legal-page .logo {
        font-size: 1.05rem;
        gap: 8px;
    }

    .legal-page .logo img {
        width: 30px;
        height: 30px;
    }
}
