:root {
    --bg: #050505;
    --bg-card: #16161a;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    --purple: #5b2cff;
    --text: #ffffff;
    --text-muted: #9a9aa8;
    --text-soft: #b7b7c5;
    --icon-purple: #a78bfa;
    --radius-lg: 22px;
    --max: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(91, 44, 255, 0.22), transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.is-rtl {
    font-family: Cairo, "Plus Jakarta Sans", system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }

.legal-page {
    max-width: var(--max);
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.legal-hero {
    text-align: center;
    margin: 8px auto 24px;
}

.brand {
    color: var(--icon-purple);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

body.is-rtl .brand {
    letter-spacing: 0.04em;
    text-transform: none;
}

.legal-hero h1 {
    font-size: clamp(1.45rem, 5vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--text);
}

.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 22px 18px 26px;
    box-shadow: 0 0 0 1px rgba(91, 44, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.35);
}

.legal-empty {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 24px 8px;
}

.legal-content {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.legal-content > *:first-child { margin-top: 0; }
.legal-content > *:last-child { margin-bottom: 0; }

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 1.35em 0 0.55em;
}

.legal-content h1 { font-size: 1.35rem; }
.legal-content h2 { font-size: 1.15rem; }
.legal-content h3 { font-size: 1.02rem; }
.legal-content h4 { font-size: 0.95rem; }

.legal-content p {
    margin: 0 0 0.95em;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 1em;
    padding-inline-start: 1.25em;
}

.legal-content li {
    margin-bottom: 0.4em;
}

.legal-content a {
    color: var(--icon-purple);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content strong,
.legal-content b {
    color: var(--text);
    font-weight: 700;
}

.legal-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.4em 0;
}

.legal-content blockquote {
    margin: 1em 0;
    padding: 10px 14px;
    border-inline-start: 3px solid var(--purple);
    background: rgba(91, 44, 255, 0.08);
    border-radius: 0 10px 10px 0;
    color: var(--text-soft);
}

body.is-rtl .legal-content blockquote {
    border-radius: 10px 0 0 10px;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.85rem;
}

.legal-content th,
.legal-content td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: start;
}

.legal-content th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.legal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.legal-footer {
    margin-top: 28px;
    text-align: center;
}

.legal-other {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-purple);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(91, 44, 255, 0.35);
    background: rgba(91, 44, 255, 0.12);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.legal-other:hover {
    background: rgba(91, 44, 255, 0.22);
    border-color: rgba(91, 44, 255, 0.55);
}

@media (min-width: 768px) {
    .legal-page {
        padding: 40px 28px 64px;
    }

    .legal-card {
        padding: 32px 36px 36px;
    }

    .legal-content {
        font-size: 0.98rem;
        line-height: 1.75;
    }
}

/* Contact page — split layout (info | form) */
.contact-body {
    width: 100%;
    margin: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        radial-gradient(ellipse 70% 45% at 50% -5%, rgba(91, 44, 255, 0.2), transparent 55%),
        var(--bg);
    background-size: 28px 28px, 28px 28px, auto, auto;
    overflow-x: hidden;
}

.contact-topbar,
.contact-shell {
    width: min(1100px, 100%);
    margin-inline: auto;
    box-sizing: border-box;
}

.contact-topbar {
    padding: 16px 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.contact-topbar-brand {
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    min-width: 0;
}

.contact-topbar-current {
    color: var(--icon-purple);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.contact-shell {
    padding: 20px 16px 32px;
}

.contact-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.contact-alert--success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.contact-split {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    width: 100%;
}

.contact-info-card,
.contact-form-card {
    width: 100%;
    background: rgba(22, 22, 26, 0.92);
    border: 1px solid rgba(91, 44, 255, 0.22);
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 60px rgba(0, 0, 0, 0.35);
}

.contact-info-card {
    padding: 22px 20px 20px;
    position: sticky;
    top: 20px;
}

.contact-form-card {
    padding: 26px 24px 28px;
}

.contact-info-head,
.contact-form-head {
    margin-bottom: 20px;
}

.contact-info-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-info-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 44, 255, 0.15);
    color: var(--icon-purple);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-info-head h2,
.contact-form-head h2 {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.contact-info-head p,
.contact-form-head p {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.contact-quick-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-quick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.contact-quick:hover {
    transform: translateY(-1px);
}

.contact-quick--whatsapp {
    border-color: rgba(37, 211, 102, 0.35);
    background: rgba(37, 211, 102, 0.08);
}

.contact-quick--telegram {
    border-color: rgba(34, 158, 217, 0.35);
    background: rgba(34, 158, 217, 0.08);
}

.contact-quick-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.contact-quick--whatsapp .contact-quick-icon { background: rgba(37, 211, 102, 0.2); color: #25d366; }
.contact-quick--telegram .contact-quick-icon { background: rgba(34, 158, 217, 0.2); color: #229ed9; }

.contact-quick-icon svg {
    width: 20px;
    height: 20px;
}

.contact-quick-body {
    flex: 1;
    min-width: 0;
}

.contact-quick-title {
    display: block;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.contact-quick-meta {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.78rem;
    word-break: break-all;
}

.contact-quick-action {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.contact-quick--whatsapp .contact-quick-action {
    background: rgba(37, 211, 102, 0.18);
    color: #86efac;
}

.contact-quick--telegram .contact-quick-action {
    background: rgba(34, 158, 217, 0.18);
    color: #7dd3fc;
}

.contact-hours {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.contact-empty {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 600;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(91, 44, 255, 0.28);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: #6b7280;
}

.contact-field input:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: rgba(91, 44, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(91, 44, 255, 0.16);
}

.contact-field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.55;
}

.contact-field-error {
    margin-top: 6px;
    color: #fca5a5;
    font-size: 0.78rem;
}

.contact-submit {
    margin-top: 4px;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #5b2cff 0%, #7c3aed 100%);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(91, 44, 255, 0.32);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 34px rgba(91, 44, 255, 0.4);
}

body.is-rtl .contact-submit span {
    transform: scaleX(-1);
}

.contact-page-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.contact-page-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.contact-copyright {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.contact-social-icons {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-social-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.contact-social-icon-btn svg {
    width: 18px;
    height: 18px;
}

.contact-social-icon-btn:hover {
    color: var(--text);
    border-color: rgba(91, 44, 255, 0.4);
    background: rgba(91, 44, 255, 0.1);
}

.contact-social-icon-btn--youtube:hover { color: #ff0033; }
.contact-social-icon-btn--twitter:hover { color: #1da1f2; }
.contact-social-icon-btn--instagram:hover { color: #e1306c; }
.contact-social-icon-btn--facebook:hover { color: #1877f2; }

.contact-legal-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.contact-legal-links a:hover {
    color: var(--icon-purple);
}

@media (max-width: 1100px) {
    .contact-split {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .contact-split-form {
        order: 1;
    }

    .contact-split-info {
        order: 2;
    }

    .contact-info-card {
        position: static;
        padding: 18px 16px 16px;
        border-radius: 16px;
    }

    .contact-form-card {
        padding: 18px 16px 20px;
        border-radius: 16px;
    }

    .contact-info-head h2,
    .contact-form-head h2 {
        font-size: 1.05rem;
    }

    .contact-quick {
        padding: 12px;
    }

    .contact-field textarea {
        min-height: 120px;
    }

    .contact-page-footer-inner,
    .contact-page-footer-inner--legal-only {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .contact-topbar,
    .contact-shell {
        padding-inline: 12px;
    }

    .contact-shell {
        padding-top: 16px;
        padding-bottom: 24px;
    }

    .contact-submit {
        padding: 13px 14px;
        font-size: 0.92rem;
    }
}
