/* ===================================
   CSS Variables & Reset
   =================================== */

:root {
    /* Colors - Moroccan inspired palette */
    --primary-color: #1a5f7a;
    --primary-dark: #0d3b4d;
    --primary-light: #2d8ba8;
    --secondary-color: #d4af37;
    --accent-color: #c85a54;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    
    /* Neutrals */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a5f7a 0%, #2d8ba8 100%);
    --gradient-secondary: linear-gradient(135deg, #d4af37 0%, #f0c674 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(26, 95, 122, 0.95) 0%, rgba(45, 139, 168, 0.9) 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 6rem;
    
    /* Typography */
    --font-primary: 'Cairo', 'Tajawal', sans-serif;
    --font-secondary: 'Tajawal', 'Cairo', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.7;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
}

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

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

ul, ol {
    list-style-position: inside;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

strong {
    font-weight: 700;
    color: var(--primary-color);
}

/* ===================================
   Container & Layout
   =================================== */

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

section {
    padding: var(--spacing-xl) 0;
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-button-nav {
    background: var(--gradient-primary);
    color: var(--bg-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.cta-button-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   Buttons
   =================================== */

.cta-button-hero,
.submit-button,
.final-cta-button {
    background: var(--gradient-secondary);
    color: var(--text-dark);
    padding: 1.25rem 2.5rem;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
    display: inline-block;
    text-align: center;
}

.cta-button-hero:hover,
.submit-button:hover,
.final-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ===================================
   Section Headers
   =================================== */

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

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

.footer-logo p {
    color: var(--text-light);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: var(--bg-white);
    transition: var(--transition-normal);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

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

/* ===================================
   Animations
   =================================== */

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-in-delay-1 {
    animation: fadeIn 0.6s ease 0.2s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 0.6s ease 0.4s forwards;
    opacity: 0;
}

.fade-in-delay-3 {
    animation: fadeIn 0.6s ease 0.6s forwards;
    opacity: 0;
}

.fade-in-delay-4 {
    animation: fadeIn 0.6s ease 0.8s forwards;
    opacity: 0;
}

.fade-in-delay-5 {
    animation: fadeIn 0.6s ease 1s forwards;
    opacity: 0;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-xxl: 4rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .nav-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .cta-button-hero,
    .submit-button,
    .final-cta-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}
