/* =====================================================
   صِيت (Seet) — Legal Pages Shared Stylesheet
   Matches landing page: Light Mode + RTL + MsD Colors
   ===================================================== */

:root {
    --bg-dark: #f5f8fc;
    --bg-card: #ffffff;
    --bg-glass: rgba(25, 118, 210, 0.04);
    --bg-glass-border: rgba(25, 118, 210, 0.10);

    --text-primary: #1a2d4a;
    --text-secondary: #4a6280;
    --text-muted: #8a9ab5;

    --accent-primary: #1976d2;
    --accent-primary-hover: #1565c0;
    --accent-secondary: #00bcd4;
    --accent-gradient: linear-gradient(135deg, #1a3155, #1976d2, #29b6f6);

    --success: #00b874;
    --warning: #f59e0b;
    --danger: #ef4444;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 8px rgba(26, 49, 85, 0.05);
    --shadow-md: 0 4px 24px rgba(26, 49, 85, 0.07);
    --shadow-glow: 0 4px 30px rgba(25, 118, 210, 0.10);

    --font-family: 'Tajawal', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.8;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--accent-primary); transition: var(--transition); }
a:hover { color: var(--accent-primary-hover); }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-sm { padding: 10px 22px; font-size: 0.9rem; }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--bg-glass-border);
    padding: 10px 22px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(25, 118, 210, 0.05);
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(248, 249, 252, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bg-glass-border);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo { height: 36px; width: auto; }

.brand-text {
    font-size: 1.4rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Page Header ========== */
.page-header {
    padding: 130px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(25, 118, 210, 0.04) 0%, transparent 100%);
    border-bottom: 1px solid var(--bg-glass-border);
}

.section-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(25, 118, 210, 0.08);
    border: 1px solid rgba(25, 118, 210, 0.15);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 700;
    margin-bottom: 16px;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.page-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== Legal Layout ========== */
.legal-content {
    padding: 60px 0 80px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

/* ========== Table of Contents ========== */
.toc {
    position: sticky;
    top: 90px;
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.toc-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(25, 118, 210, 0.1);
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    counter-reset: toc-counter;
}

.toc-list li {
    counter-increment: toc-counter;
}

.toc-list a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.toc-list a:hover {
    color: var(--accent-primary);
    background: rgba(25, 118, 210, 0.06);
}

/* ========== Legal Article ========== */
.legal-article {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.legal-section {
    padding: 40px 0;
    border-bottom: 1px solid rgba(25, 118, 210, 0.06);
}

.legal-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-section-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(25, 118, 210, 0.12);
    position: relative;
}

.legal-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 48px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.legal-sub-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin: 24px 0 12px;
}

.legal-section p {
    color: var(--text-secondary);
    font-size: 0.97rem;
    margin-bottom: 12px;
    line-height: 1.9;
}

/* ========== Lists ========== */
.legal-list {
    margin: 8px 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-list li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 10px 16px 10px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border-right: 3px solid var(--bg-glass-border);
    line-height: 1.7;
}

.feature-list li {
    border-right-color: var(--success);
    background: rgba(0, 184, 116, 0.04);
}

.feature-list li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

.warning-list li {
    border-right-color: var(--danger);
    background: rgba(239, 68, 68, 0.04);
}

.warning-list li::before {
    content: '✗ ';
    color: var(--danger);
    font-weight: 700;
}

/* ========== Tables ========== */
.legal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 16px 0;
    font-size: 0.93rem;
}

.legal-table thead tr {
    background: linear-gradient(135deg, #1a3155, #1976d2);
    color: #fff;
}

.legal-table th {
    padding: 14px 16px;
    font-weight: 700;
    text-align: right;
    font-size: 0.88rem;
}

.legal-table td {
    padding: 13px 16px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(25, 118, 210, 0.06);
    line-height: 1.7;
}

.legal-table tbody tr:hover td {
    background: rgba(25, 118, 210, 0.03);
}

.legal-table tbody tr:first-child td {
    border-top: none;
}

/* ========== Notice Boxes ========== */
.notice-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    border: 1px solid;
}

.notice-box p {
    margin: 0 !important;
    font-size: 0.93rem !important;
}

.notice-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-info {
    background: rgba(25, 118, 210, 0.06);
    border-color: rgba(25, 118, 210, 0.15);
}

.notice-info p { color: #1565c0 !important; }

.notice-success {
    background: rgba(0, 184, 116, 0.06);
    border-color: rgba(0, 184, 116, 0.2);
}

.notice-success p { color: #007a4e !important; }

.notice-warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.2);
}

.notice-warning p { color: #92400e !important; }

.notice-security {
    background: rgba(25, 118, 210, 0.05);
    border-color: rgba(25, 118, 210, 0.2);
}

.notice-security p { color: #1a3155 !important; }

/* ========== Security Grid ========== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.security-icon { font-size: 1.2rem; }

/* ========== Contact Card ========== */
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 0.93rem;
    color: var(--text-primary);
    font-weight: 600;
}

.legal-footer-note {
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
    margin-top: 20px !important;
    text-align: center;
}

/* ========== Footer ========== */
.footer {
    background: #112240;
    padding: 32px 0;
    color: #c8d6e5;
}

.footer-bottom-only {
    text-align: center;
}

.footer-links-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links-row a {
    color: #7a8ea8;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links-row a:hover,
.footer-links-row a.active {
    color: #29b6f6;
}

.footer-links-row span {
    color: #3a5070;
}

.footer-bottom-only p {
    color: #7a8ea8;
    font-size: 0.82rem;
    margin-top: 6px;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .toc {
        position: static;
        order: -1;
    }

    .toc-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }

    .page-header { padding: 110px 0 40px; }

    .page-title { font-size: 1.8rem; }

    .page-subtitle { font-size: 0.95rem; }

    .legal-content { padding: 40px 0 60px; }

    .legal-section-title { font-size: 1.2rem; }

    .legal-table th,
    .legal-table td { padding: 10px 12px; font-size: 0.85rem; }

    .contact-grid { grid-template-columns: 1fr; }

    .security-grid { grid-template-columns: 1fr 1fr; }

    .toc-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .page-title { font-size: 1.5rem; }

    .brand-text { font-size: 1.2rem; }

    .brand-logo { height: 30px; }

    .legal-section { padding: 28px 0; }

    .legal-section-title { font-size: 1.1rem; }

    .legal-table { font-size: 0.8rem; }

    .legal-table th,
    .legal-table td { padding: 8px 10px; }

    .security-grid { grid-template-columns: 1fr; }

    .notice-box { padding: 14px 16px; }

    .toc { padding: 18px; }

    .contact-card { padding: 20px; }

    .footer-links-row { gap: 10px; }
}
