/* legal.css - terms + privacy policy styles - split from index.html */

            /* ── TERMS PAGE STYLES ── */
            .tos-page-wrap {
                max-width: 1100px; margin: 0 auto; padding: 60px 28px 100px;
            }
            /* Lang switcher inside terms */
            .tos-lang-bar {
                display: flex; align-items: center; justify-content: space-between;
                padding: 18px 0 40px;
                border-bottom: 1px solid rgba(255,255,255,0.04);
                margin-bottom: 48px;
            }
            .tos-back-btn {
                display: inline-flex; align-items: center; gap: 8px;
                background: rgba(122,0,0,0.12); border: 1px solid var(--red-border);
                color: #aaa; border-radius: 8px; padding: 8px 16px;
                font-size: 13px; cursor: pointer; font-family: 'Syne', sans-serif;
                transition: all 0.2s;
            }
            .tos-back-btn:hover { background: rgba(122,0,0,0.25); color: #fff; }
            .tos-lang-switcher {
                display: flex; align-items: center; gap: 4px;
                background: rgba(255,255,255,0.04);
                border: 1px solid var(--red-border);
                border-radius: 10px; padding: 4px;
            }
            .tos-lang-btn {
                padding: 6px 16px; border-radius: 7px;
                font-size: 13px; font-weight: 700;
                cursor: pointer; border: none;
                background: transparent; color: var(--muted);
                transition: all 0.25s; font-family: 'Syne', sans-serif;
            }
            .tos-lang-btn.active { background: var(--red); color: #fff; box-shadow: 0 2px 12px rgba(122,0,0,0.45); }
            #tosLangAr { font-family: 'Mada', sans-serif; }
            .tos-lang-btn:hover:not(.active) { color: var(--text); background: var(--red-dim); }

            /* Hero */
            .tos-hero-inner {
                text-align: center; max-width: 700px; margin: 0 auto 70px;
            }
            .tos-badge {
                display: inline-flex; align-items: center; gap: 8px;
                background: var(--red-dim); border: 1px solid var(--red-border);
                color: #c04040; border-radius: 50px;
                padding: 6px 18px; font-size: 12px; font-weight: 700;
                letter-spacing: 1.5px; text-transform: uppercase;
                margin-bottom: 22px;
            }
            .tos-main-title {
                font-family: 'Rajdhani', sans-serif;
                font-size: clamp(38px, 6vw, 64px); font-weight: 700;
                letter-spacing: 2px; line-height: 1.1;
                background: linear-gradient(135deg, #fff 0%, #ddd 40%, #c04040 80%, var(--red) 100%);
                -webkit-background-clip: text; background-clip: text; color: transparent;
                margin-bottom: 16px;
            }
            .tos-main-sub { color: var(--muted); font-size: 15px; margin-bottom: 14px; line-height: 1.7; }
            .tos-updated-tag {
                display: inline-flex; align-items: center; gap: 6px;
                color: #555; font-size: 13px; font-family: 'JetBrains Mono', monospace;
            }
            .tos-updated-tag i { color: var(--red); font-size: 10px; }

            /* Layout */
            .tos-layout {
                display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start;
            }
            @media(max-width:860px) {
                .tos-layout { grid-template-columns: 1fr; gap: 0; }
                .tos-toc {
                    position: sticky;
                    top: 56px;
                    z-index: 50;
                    background: rgba(8,8,8,0.97);
                    backdrop-filter: blur(12px);
                    border-bottom: 1px solid var(--red-border);
                    border-radius: 0;
                    max-height: none;
                    overflow-y: visible;
                    padding: 10px 16px;
                    margin: 0 -28px;
                    width: calc(100% + 56px);
                }
                .tos-toc-label { display: none; }
                .tos-toc-list {
                    display: flex;
                    flex-direction: row;
                    overflow-x: auto;
                    gap: 4px;
                    border-left: none;
                    padding-bottom: 2px;
                    scrollbar-width: none;
                }
                .tos-toc-list::-webkit-scrollbar { display: none; }
                .tos-toc-list li a {
                    white-space: nowrap;
                    border-left: none;
                    border-bottom: 2px solid transparent;
                    margin-left: 0;
                    padding: 6px 12px;
                    border-radius: 6px;
                    font-size: 12px;
                    background: rgba(255,255,255,0.04);
                }
                .tos-toc-list li a.toc-active {
                    background: var(--red-dim);
                    border-color: var(--red);
                    color: #c04040;
                }
            }

            /* Sidebar */
            .tos-toc {
                position: sticky;
                top: 80px;
                max-height: calc(100vh - 100px);
                overflow-y: auto;
                align-self: start;
            }
            .tos-toc-label {
                font-size: 10px; font-weight: 700; letter-spacing: 2px;
                text-transform: uppercase; color: var(--red); margin-bottom: 12px;
                padding-left: 14px;
            }
            .tos-toc-list { list-style: none; border-left: 2px solid var(--red-border); }
            .tos-toc-list li a {
                display: block; padding: 8px 14px; font-size: 13px;
                color: var(--muted); font-weight: 600; transition: all 0.2s;
                border-left: 2px solid transparent; margin-left: -2px;
            }
            .tos-toc-list li a:hover, .tos-toc-list li a.toc-active { color: #c04040; border-color: var(--red); }

            /* Sections */
            .tos-sec { margin-bottom: 52px; }
            .tos-sec-header {
                display: flex; align-items: center; gap: 14px;
                margin-bottom: 22px; padding-bottom: 16px;
                border-bottom: 1px solid rgba(255,255,255,0.05);
            }
            .tos-sec-num {
                width: 36px; height: 36px; flex-shrink: 0;
                background: var(--red-dim); border: 1px solid var(--red-border);
                border-radius: 8px; display: flex; align-items: center; justify-content: center;
                font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--red);
            }
            .tos-sec-title { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 700; color: var(--text); }

            .tos-card {
                background: rgba(255,255,255,0.02); border: 1px solid var(--card-border);
                border-radius: 14px; padding: 26px 30px; position: relative; overflow: hidden;
                transition: border-color 0.25s;
            }
            .tos-card:hover { border-color: var(--red-border); }
            .tos-card::before {
                content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
                background: linear-gradient(90deg, transparent, rgba(122,0,0,0.3), transparent);
            }
            .tos-card + .tos-card { margin-top: 14px; }
            .tos-card p { color: #bbb; font-size: 15px; line-height: 1.85; margin-bottom: 14px; }
            .tos-card p:last-child { margin-bottom: 0; }
            .tos-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin-top: 8px; }
            .tos-card li { color: #bbb; font-size: 15px; line-height: 1.75; display: flex; align-items: flex-start; gap: 10px; }
            .tos-card li::before { content: ''; flex-shrink: 0; width: 5px; height: 5px; background: var(--red); border-radius: 50%; margin-top: 10px; }

            .tos-card.warn { background: rgba(122,0,0,0.07); border-color: rgba(122,0,0,0.25); }
            .tos-card.warn::before { background: linear-gradient(90deg, transparent, rgba(122,0,0,0.5), transparent); }
            .tos-warn-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; color: #c04040; font-size: 15px; }
            .tos-card.info { background: rgba(255,215,0,0.04); border-color: rgba(255,215,0,0.15); }
            .tos-info-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; color: var(--gold); font-size: 15px; }

            /* Contact grid */
            .tos-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
            @media(max-width:600px) { .tos-contact-grid { grid-template-columns: 1fr; } }
            .tos-contact-item {
                display: flex; align-items: center; gap: 12px;
                background: rgba(255,255,255,0.02); border: 1px solid var(--card-border);
                border-radius: 10px; padding: 16px 18px; transition: all 0.25s; text-decoration: none;
            }
            .tos-contact-item:hover { border-color: var(--red-border); background: var(--red-dim); }
            .tos-contact-icon { width: 38px; height: 38px; flex-shrink: 0; background: var(--red-dim); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--red); font-size: 16px; }
            .tos-contact-label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.5px; display: block; }
            .tos-contact-value { font-size: 14px; color: var(--text); font-weight: 600; display: block; }

            /* RTL support */
            .tos-page-wrap.rtl { direction: rtl; font-family: 'Mada', sans-serif !important; }
            .tos-page-wrap.rtl .tos-main-title,
            .tos-page-wrap.rtl .tos-sec-title,
            .tos-page-wrap.rtl .tos-updated-tag,
            .tos-page-wrap.rtl .tos-badge,
            .tos-page-wrap.rtl .tos-toc-label,
            .tos-page-wrap.rtl .tos-toc-list li a,
            .tos-page-wrap.rtl .tos-card p,
            .tos-page-wrap.rtl .tos-card li,
            .tos-page-wrap.rtl .tos-sec-num,
            .tos-page-wrap.rtl .tos-main-sub {
                font-family: 'Mada', sans-serif !important;
                letter-spacing: 0 !important;
            }
            .tos-page-wrap.rtl .tos-toc-label { padding-left: 0; padding-right: 14px; }
            .tos-page-wrap.rtl .tos-toc-list { border-left: none; border-right: 2px solid var(--red-border); }
            .tos-page-wrap.rtl .tos-toc-list li a { border-left: none; border-right: 2px solid transparent; margin-left: 0; margin-right: -2px; padding-left: 0; padding-right: 14px; }
            .tos-page-wrap.rtl .tos-card li { flex-direction: row-reverse; }
            /* ── PRIVACY PAGE — reuses .tos-* classes ── */
            .pp-page-wrap {
                max-width: 1100px; margin: 0 auto; padding: 60px 28px 100px;
            }
            .pp-page-wrap.rtl { direction: rtl; font-family: 'Mada', sans-serif !important; }
            .pp-page-wrap.rtl .tos-main-title,
            .pp-page-wrap.rtl .tos-sec-title,
            .pp-page-wrap.rtl .tos-updated-tag,
            .pp-page-wrap.rtl .tos-badge { font-family: 'Mada', sans-serif !important; }
            .pp-page-wrap.rtl .tos-toc-list { border-left: none; border-right: 2px solid var(--red-border); }
            .pp-page-wrap.rtl .tos-toc-list li a { border-left: none; border-right: 3px solid transparent; margin-left: 0; margin-right: -2px; }
            .pp-page-wrap.rtl .tos-toc-list li a.toc-active { border-right-color: var(--red); }
            .pp-page-wrap.rtl .tos-sec-header { flex-direction: row-reverse; }
            .pp-page-wrap.rtl .tos-card li { flex-direction: row-reverse; }
