:root {
    /* Primary Colors */
    --primary-color: #6B46C1;
    --primary-light: #8A6AD3;
    --primary-dark: #553098;
    --primary-bg: #F9F5FF;
    
    /* Secondary Colors */
    --secondary-color: #9F7AEA;
    --secondary-light: #B794F4;
    --secondary-dark: #805AD5;
    
    /* Accent Colors */
    --accent-color: #E9D8FD;
    --accent-light: #F3E8FF;
    --accent-dark: #D6BCFA;
    
    /* Neutral Colors */
    --text-color: #2D3748;
    --text-color-light: #4A5568;
    --text-color-lighter: #718096;
    --bg-color: #FFFFFF;
    --bg-color-alt: #F7FAFC;
    
    /* Star Colors */
    --star-color: #FFD700;
    --star-color-inactive: #E2E8F0;
    
    /* Success, Warning, Error */
    --success-color: #48BB78;
    --warning-color: #ED8936;
    --error-color: #F56565;
    
    /* Spacing */
    --spacing-xs: 0.25rem;  /* 4px */
    --spacing-sm: 0.5rem;   /* 8px */
    --spacing-md: 1rem;     /* 16px */
    --spacing-lg: 1.5rem;   /* 24px */
    --spacing-xl: 2rem;     /* 32px */
    --spacing-xxl: 3rem;    /* 48px */
    
    /* Borders */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-size-xs: 0.75rem;  /* 12px */
    --font-size-sm: 0.875rem; /* 14px */
    --font-size-md: 1rem;     /* 16px */
    --font-size-lg: 1.125rem; /* 18px */
    --font-size-xl: 1.25rem;  /* 20px */
    --font-size-2xl: 1.5rem;  /* 24px */
    --font-size-3xl: 1.875rem; /* 30px */
    --font-size-4xl: 2.25rem;  /* 36px */
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-loose: 1.75;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: var(--line-height-normal);
    color: var(--text-color);
    background-color: var(--bg-color);
}

body.ltr {
    direction: ltr;
    text-align: left;
}

body:not(.ltr) {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    margin-bottom: var(--spacing-md);
}

p.lead {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

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

a:hover {
    color: var(--primary-light);
}

/* Header */
.site-header {
    background-color: var(--bg-color);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: var(--font-size-xl);
    margin-bottom: 0;
    color: var(--primary-dark);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.language-switcher .switch-lang {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-md);
    transition: background-color var(--transition-fast);
}

.language-switcher .switch-lang:hover {
    background-color: var(--primary-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.hero h1, .hero p {
    color: white;
}

.hero h1 {
    margin-bottom: var(--spacing-lg);
}

/* Comparison Table */
.comparison {
    padding: var(--spacing-xxl) 0;
    background-color: var(--bg-color-alt);
}

.comparison h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.table-wrapper {
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-md);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-color);
}

.comparison-table th, .comparison-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--accent-color);
}

.ltr .comparison-table th, .ltr .comparison-table td {
    text-align: left;
}

body:not(.ltr) .comparison-table th, body:not(.ltr) .comparison-table td {
    text-align: right;
}

.comparison-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.comparison-table tr:hover {
    background-color: var(--primary-bg);
}

.comparison-table a {
    font-weight: 600;
}

/* Star Ratings */
.rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.rating-stars {
    color: var(--star-color-inactive);
    font-size: var(--font-size-lg);
    letter-spacing: 2px;
}

.rating-stars .filled {
    color: var(--star-color);
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
}

.rating-value {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* Brokers Section */
.brokers {
    padding: var(--spacing-xxl) 0;
}

.brokers h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.brokers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.broker-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.broker-header {
    background-color: var(--primary-color);
    padding: var(--spacing-md);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.broker-header h3 {
    color: white;
    margin-bottom: 0;
}

.broker-header .rating-stars {
    width: 80px;
    height: 16px;
}

.broker-details {
    padding: var(--spacing-lg);
}

.cta-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-align: center;
    transition: background-color var(--transition-fast);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    color: white;
}

.cta-button.secondary {
    background-color: var(--text-color-lighter);
}

.cta-button.secondary:hover {
    background-color: var(--text-color-light);
}

.cta-button.large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

/* Methodology Section */
.methodology {
    padding: var(--spacing-xxl) 0;
    background-color: var(--bg-color-alt);
}

.methodology h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.methodology-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    padding-top: 60px;
    transition: transform var(--transition-normal);
}

.methodology-card:hover {
    transform: translateY(-5px);
}

.card-number {
    position: absolute;
    top: -20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-lg);
}

body:not(.ltr) .card-number {
    left: auto;
    right: 20px;
}

.methodology-card h3 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

.trust-section {
    background-color: var(--primary-bg);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    margin-top: var(--spacing-xl);
}

.trust-section h3 {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-lg);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-lg);
}

.trust-item h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

/* Conclusion Section */
.conclusion {
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.conclusion .cta-button {
    margin-top: var(--spacing-lg);
}

/* Footer */
.site-footer {
    background-color: var(--text-color);
    color: white;
    padding: var(--spacing-xl) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

.footer-logo h2 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.footer-links h3 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--accent-light);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
}

/* 404 Error Page */
.error-page {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-container {
    width: 100%;
    max-width: 500px;
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.error-content h1 {
    font-size: 6rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.error-content h2 {
    margin-bottom: var(--spacing-lg);
}

.error-content p {
    margin-bottom: var(--spacing-xl);
}

.error-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.hero, .comparison, .brokers, .methodology, .conclusion {
    animation: fadeIn var(--transition-slow) forwards;
}

.broker-card, .methodology-card {
    animation: slideUp var(--transition-slow) forwards;
}