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

:root {
    --primary-color: #0d47a1; /* Deep Blue */
    --primary-hover: #1565c0;
    --secondary-color: #00897b; /* Teal */
    --accent-color: #ffca28;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --bg-light: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Logical Properties Utilities */
.ms-auto-logical { margin-inline-start: auto !important; }
.me-auto-logical { margin-inline-end: auto !important; }
.ps-logical { padding-inline-start: 1.5rem !important; }
.pe-logical { padding-inline-end: 1.5rem !important; }

/* Navigation */
.navbar-custom {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.navbar-custom .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    padding-inline: 1rem;
}

.navbar-custom .nav-link:hover, .navbar-custom .nav-link.active {
    color: var(--primary-color);
}

/* Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline-premium {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-outline-premium:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

/* Cards */
.card-premium {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

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

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Forms */
.form-control-premium {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-premium:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
    outline: none;
}

/* Footer */
.footer-premium {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-premium a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* RTL Specific Overrides */
[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .hero-section h1 {
    line-height: 1.4;
}

/* Loading State */
.btn-premium.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-premium.loading::after {
    content: "";
    position: absolute;
    width: 1.2rem;
    height: 1.2rem;
    top: 50%;
    left: 50%;
    margin: -0.6rem 0 0 -0.6rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spinner 0.6s linear infinite;
}

@keyframes btn-spinner {
    to { transform: rotate(360deg); }
}