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

:root {
    --md-sys-color-primary: #6750a4;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: rgba(103, 80, 164, 0.1);
    --md-sys-color-on-primary-container: #21005d;
    
    /* Modern Backgrounds */
    --bg-gradient: radial-gradient(circle at top right, #f4ebff 0%, #ffffff 50%, #f9f5ff 100%);
    --surface-glass: rgba(255, 255, 255, 0.75);
    --surface-glass-heavy: rgba(255, 255, 255, 0.9);
    --border-glass: rgba(103, 80, 164, 0.15);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.05);
    
    --md-sys-color-surface: var(--surface-glass);
    --md-sys-color-on-surface: #1c1b1f;
    --md-sys-color-surface-variant: #e7e0ec;
    --md-sys-color-on-surface-variant: #49454f;
}

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

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: var(--md-sys-color-on-surface);
    background: var(--bg-gradient);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 90px; /* Space for bottom nav */
}

/* RTL Support */
html[dir="rtl"] {
    text-align: right;
}
html[dir="rtl"] .step-item {
    flex-direction: row-reverse;
}

.container { max-width: 1040px; margin: 0 auto; padding: 24px 16px; }

/* Header & Language Selector */
.top-header {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    position: relative;
    z-index: 10;
}
.lang-selector {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: var(--surface-glass);
    backdrop-filter: blur(8px);
    color: var(--md-sys-color-on-surface);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glass);
}
.lang-selector:hover {
    background: #fff;
    transform: translateY(-1px);
}

/* Hero Headers */
.header {
    text-align: center;
    padding: 60px 24px;
    animation: fadeInDown 0.8s ease-out;
}
.header h1 { 
    font-size: 48px; 
    font-weight: 700; 
    margin-bottom: 12px; 
    background: linear-gradient(135deg, #21005d 0%, #6750a4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}
.header .subtitle { 
    font-size: 20px; 
    color: var(--md-sys-color-on-surface-variant); 
    font-weight: 400; 
}

/* Glass Cards */
.glass-card {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-glass);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.08);
}

.hero-section {
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, #4a3382 100%);
    color: white;
    padding: 48px;
    border-radius: 28px;
    margin: 40px 0;
    text-align: center;
    box-shadow: 0 20px 40px rgba(103, 80, 164, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}
.hero-section h2 { margin-bottom: 16px; font-size: 28px; font-weight: 600; }
.hero-section p { font-size: 16px; opacity: 0.9; }

/* Sections & Steps */
.section { margin: 60px 0; animation: fadeInUp 0.8s ease-out 0.4s both; }
.section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--md-sys-color-primary);
}

.detailed-explanation {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow-glass);
}
.step-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    transition: transform 0.2s ease;
}
.step-item:hover { transform: translateX(4px); }
.step-item:last-child { margin-bottom: 0; }
.step-icon {
    background: linear-gradient(135deg, #f4ebff 0%, #eaddff 100%);
    color: var(--md-sys-color-primary);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(103, 80, 164, 0.1);
}
.step-content h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--md-sys-color-on-surface); }
.step-content p { color: var(--md-sys-color-on-surface-variant); font-size: 16px; line-height: 1.6; }

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, #4a3382 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(103, 80, 164, 0.25);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(103, 80, 164, 0.35);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface-glass-heavy);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 16px 0;
    z-index: 1000;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    transition: color 0.2s ease;
}
.nav-item:hover { color: var(--md-sys-color-primary); }
.nav-item.active { color: var(--md-sys-color-primary); }
.nav-item .material-icons { font-size: 24px; transition: all 0.2s ease; }
.nav-item.active .material-icons {
    background: var(--md-sys-color-primary-container);
    border-radius: 16px;
    padding: 4px 16px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 16px;
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 60px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
