/* ============================================================
   BASE.CSS — CSS custom properties, reset, typography, RTL
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ── Custom Properties ──────────────────────────────────────── */
:root {
    --primary:        #7C3AED;
    --primary-dark:   #5B21B6;
    --primary-light:  #EDE9FE;
    --primary-glow:   rgba(124, 58, 237, 0.15);
    --secondary:      #06B6D4;
    --secondary-dark: #0891B2;

    --dark:           #0F172A;
    --dark-2:         #1E293B;
    --dark-3:         #334155;

    --text:           #1E293B;
    --text-muted:     #64748B;
    --text-light:     #94A3B8;

    --border:         #E2E8F0;
    --border-light:   #F1F5F9;

    --bg:             #F8FAFC;
    --bg-card:        #FFFFFF;
    --white:          #FFFFFF;

    --success:        #10B981;
    --warning:        #F59E0B;
    --danger:         #EF4444;

    --font:           'Cairo', 'Segoe UI', sans-serif;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);

    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --radius-full: 9999px;

    --transition: 0.3s ease;
    --transition-fast: 0.15s ease;

    --container-max: 1200px;
    --container-pad: 1.5rem;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: var(--font);
    border: none;
    background: none;
}

/* ── Container ──────────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ── Section common styles ──────────────────────────────────── */
.section {
    padding-block: 5rem;
}

.section--light {
    background-color: var(--bg);
}

.section--white {
    background-color: var(--white);
}

.section--dark {
    background-color: var(--dark);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-inline: auto;
    line-height: 1.7;
}

.section--dark .section-title {
    color: var(--white);
}

.section--dark .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    transition: all var(--transition);
    white-space: nowrap;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn--primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn--primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.35);
    color: var(--white);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn--outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn--white {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.btn--white:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn--white-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn--white-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--white);
    color: var(--white);
}

.btn--lg {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
}

/* ── Badge / Tag ────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge--success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.badge--primary {
    background: var(--primary-light);
    color: var(--primary);
}

/* ── Card base ──────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state__text {
    font-size: 1rem;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    margin: 0.75rem auto 0;
}
