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

:root {
    --primary-purple: #7857ff;
    --dark-navy: #1c1c3c;
    --light-cream: #f9f7f1;
    --accent-orange: #ff6b35;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--light-cream) 0%, #ffffff 100%);
    min-height: 100vh;
}

/* RTL Support */
[dir="rtl"] body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 30px;
    flex-wrap: wrap;
}

[dir="rtl"] .language-switcher {
    direction: ltr;
}

.language-switcher button {
    padding: 10px 20px;
    border: 2px solid var(--primary-purple);
    background: white;
    color: var(--primary-purple);
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.language-switcher button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.language-switcher button.active {
    background: var(--primary-purple);
    color: white;
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--dark-navy) 100%);
    color: white;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-medium);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header h2 {
    font-size: 1.3em;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 20px;
}

header .date {
    font-size: 0.95em;
    opacity: 0.85;
    margin-top: 15px;
}

/* Sections */
section {
    background: white;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

section h3 {
    color: var(--primary-purple);
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-purple);
    font-weight: 600;
}

section h4 {
    color: var(--dark-navy);
    font-size: 1.2em;
    margin: 20px 0 15px;
    font-weight: 600;
}

section p {
    color: var(--text-light);
    margin-bottom: 15px;
    text-align: justify;
}

[dir="rtl"] section p {
    text-align: right;
}

/* Lists */
section ul {
    margin: 15px 0;
    padding-left: 25px;
    color: var(--text-light);
}

[dir="rtl"] section ul {
    padding-left: 0;
    padding-right: 25px;
}

section ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

[dir="rtl"] section ul li {
    padding-left: 0;
    padding-right: 10px;
}

section ul li::before {
    content: "▸";
    color: var(--accent-orange);
    font-weight: bold;
    position: absolute;
    left: -20px;
}

[dir="rtl"] section ul li::before {
    left: auto;
    right: -20px;
}

/* Contact Info */
.contact-info {
    background: linear-gradient(135deg, var(--light-cream) 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid var(--accent-orange);
}

[dir="rtl"] .contact-info {
    border-left: none;
    border-right: 4px solid var(--accent-orange);
}

.contact-info p {
    margin: 8px 0;
    color: var(--dark-navy);
    font-weight: 500;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    header h2 {
        font-size: 1.1em;
    }

    section {
        padding: 20px;
        margin-bottom: 20px;
    }

    section h3 {
        font-size: 1.3em;
    }

    section h4 {
        font-size: 1.1em;
    }

    .language-switcher button {
        min-width: 80px;
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 15px;
    }

    header h1 {
        font-size: 1.6em;
    }

    header h2 {
        font-size: 1em;
    }

    section {
        padding: 15px;
    }

    section h3 {
        font-size: 1.2em;
    }

    section ul {
        padding-left: 20px;
    }

    [dir="rtl"] section ul {
        padding-left: 0;
        padding-right: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .language-switcher {
        display: none;
    }

    section {
        box-shadow: none;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }

    header {
        background: none;
        color: var(--dark-navy);
        border: 2px solid var(--dark-navy);
    }

    footer {
        display: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-purple: #5533cc;
        --dark-navy: #000033;
        --accent-orange: #ff5500;
        --text-dark: #000000;
        --text-light: #333333;
    }

    section {
        border: 2px solid var(--dark-navy);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #0f0f0f 100%);
        color: #e0e0e0;
    }

    section {
        background: #2a2a3e;
        color: #e0e0e0;
    }

    section p,
    section ul {
        color: #c0c0c0;
    }

    header {
        background: linear-gradient(135deg, #4a3a8e 0%, #2a2a4e 100%);
    }

    .contact-info {
        background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    }

    .language-switcher button {
        background: #2a2a3e;
        border-color: var(--primary-purple);
    }

    .language-switcher button.active {
        background: var(--primary-purple);
    }
}