/* ============================================
   MAIN STYLES - Figma-Quality Mobile Design
   ============================================ */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-base);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

[dir="rtl"] body {
    font-family: var(--font-family-ar);
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }

@media (min-width: 768px) {
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    h3 { font-size: var(--font-size-xl); }
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary-500);
    text-decoration: none;
}

/* Container - No gaps on mobile */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

@media (min-width: 768px) {
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }
}

/* ============================================
   NAVBAR - Premium Design
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding-top: var(--safe-top);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.navbar:hover {
    background: var(--bg-secondary);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

@media (min-width: 768px) {
    .nav-container {
        padding: 0 var(--space-6);
    }
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.nav-logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: white;
}

.logo-text {
    color: var(--primary-400);
    font-weight: 700;
    font-size: var(--font-size-lg);
}

/* Navigation Links - Desktop */
.nav-links {
    display: none;
    align-items: center;
    gap: var(--space-6);
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    padding: var(--space-2) 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Theme/Lang toggle buttons in header */
.nav-actions .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-actions .btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--primary-500);
}

/* Hide all nav actions on mobile - they're in bottom nav now */
@media (max-width: 1023px) {
    .nav-actions {
        display: none;
    }
}

/* ============================================
   HERO SECTION - Clean & Impactful
   ============================================ */
.hero {
    padding-top: calc(var(--header-height) + var(--safe-top) + var(--space-6));
    padding-bottom: var(--space-8);
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gradient-hero);
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 1024px) {
    .hero {
        padding-top: calc(var(--header-height) + var(--space-12));
    }
    
    .hero-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
        align-items: center;
    }
}

.hero-text {
    margin-bottom: var(--space-6);
}

@media (min-width: 1024px) {
    .hero-text {
        margin-bottom: 0;
    }
}

.hero-title {
    font-size: clamp(1.75rem, 6vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-4);
    color: var(--primary-400);
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.hero-stats {
    display: flex;
    gap: var(--space-6);
}

.stat {
    text-align: left;
}

[dir="rtl"] .stat {
    text-align: right;
}

.stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-400);
    line-height: 1.2;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Card */
.hero-image {
    display: none;
}

@media (min-width: 1024px) {
    .hero-image {
        display: flex;
        justify-content: center;
    }
}

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    width: 280px;
    height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-preview {
    color: var(--text-secondary);
}

.preview-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.card-preview p {
    font-size: var(--font-size-sm);
    margin: 0;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-10) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-12) 0;
    }
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-6);
    font-size: var(--font-size-xl);
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-8);
    }
}

/* ============================================
   STEPS GRID - Compact Cards
   ============================================ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
    }
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: center;
    position: relative;
    transition: all var(--transition-normal);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-500);
}

@media (min-width: 768px) {
    .step-card {
        padding: var(--space-5);
    }
}

/* Step Image Icon */
.step-icon-img {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-3);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.step-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.step-card:hover .step-icon-img img {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .step-icon-img {
        width: 100px;
        height: 100px;
    }
}

.step-card h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.step-card p {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   FEATURES GRID
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: center;
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
}

.feature-card h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.feature-card p {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: var(--gradient-primary);
}

.cta-content {
    text-align: center;
    padding: var(--space-2) 0;
}

.cta-content h2 {
    color: white;
    margin-bottom: var(--space-2);
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-4);
}

/* ============================================
   FOOTER - Minimal
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: var(--space-6) 0;
    padding-bottom: calc(var(--space-6) + var(--safe-bottom));
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

@media (min-width: 768px) {
    .footer-brand {
        align-items: flex-start;
    }
}

.footer-brand p {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-4);
}

.footer-links a {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.footer-disclaimer {
    background: var(--bg-tertiary);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    margin-top: var(--space-4);
}

.footer-disclaimer p {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin: 0;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.hidden { display: none !important; }

@media (max-width: 639px) {
    .sm\:hidden { display: none !important; }
}

@media (min-width: 640px) {
    .sm\:flex { display: flex !important; }
}