/* =====================================================
   JobMetasearch Landing (فارسی) - Design System
   RTL layout with Vazirmatn font
   Uses same brand tokens as the main app
   ===================================================== */

/* CSS Variables */
:root {
    --brand-blue: #4A90E2;
    --brand-blue-dark: #3A7BC8;
    --brand-purple: #6059C3;
    --brand-purple-dark: #4A47A3;
    --brand-purple-light: #7B75D1;
    --brand-gray-50: #F9FAFB;
    --brand-gray-100: #F3F4F6;
    --brand-gray-200: #E5E7EB;
    --brand-gray-300: #D1D5DB;
    --brand-gray-400: #9CA3AF;
    --brand-gray-500: #6B7280;
    --brand-gray-600: #4B5563;
    --brand-gray-700: #374151;
    --brand-gray-800: #1F2937;
    --brand-gray-900: #111827;
    --light-purple: #F4F3FF;
    --active-purple: #EDEAFC;
    --gradient-primary: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-light));
    --gradient-hero: linear-gradient(180deg, var(--light-purple) 0%, #ffffff 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-elevated: 0 10px 30px -10px rgba(96, 89, 195, 0.3);
    --shadow-glow: 0 0 40px rgba(96, 89, 195, 0.15);
}

/* Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
    color: var(--brand-gray-800);
    line-height: 1.8;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
    direction: rtl;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--brand-gray-900);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-elevated);
    font-family: 'Vazirmatn', sans-serif;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(96, 89, 195, 0.4);
    background: var(--gradient-primary);
}

.btn-outline-secondary {
    border: 1.5px solid var(--brand-gray-200);
    color: var(--brand-gray-800);
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    background: transparent;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}
.btn-outline-secondary:hover {
    background: var(--brand-gray-100);
    border-color: var(--brand-gray-300);
    color: var(--brand-gray-900);
    transform: translateY(-1px);
}

.btn-light {
    background: #fff;
    color: var(--brand-purple);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    border: none;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}
.btn-light:hover {
    background: var(--brand-gray-50);
    color: var(--brand-purple-dark);
    transform: translateY(-2px);
}
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* =====================================================
   Navbar
   ===================================================== */
.navbar-fixed {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--brand-gray-100);
}
.navbar { padding: 0.75rem 0; }
.brand-name {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--brand-gray-900);
    letter-spacing: -0.01em;
}
.navbar-nav .nav-link {
    color: var(--brand-gray-600);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}
.navbar-nav .nav-link:hover { color: var(--brand-purple); }
.navbar-toggler { color: var(--brand-gray-800); }
.navbar-toggler:focus { box-shadow: none; }

/* =====================================================
   Hero Section
   ===================================================== */
.hero-section {
    position: relative;
    padding: 5rem 0 4rem;
    background: var(--gradient-hero);
    overflow: hidden;
}
@media (min-width: 992px) { .hero-section { padding: 7rem 0 5rem; } }

.hero-bg-decoration { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.hero-blob-1 {
    top: -10rem; left: -10rem; width: 24rem; height: 24rem;
    background: rgba(96, 89, 195, 0.1);
    animation: blobFloat 8s ease-in-out infinite;
}
.hero-blob-2 {
    bottom: -10rem; right: -10rem; width: 20rem; height: 20rem;
    background: rgba(74, 144, 226, 0.08);
    animation: blobFloat 10s ease-in-out infinite reverse;
}
.hero-blob-3 {
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 30rem; height: 30rem;
    background: rgba(96, 89, 195, 0.04);
    animation: blobPulse 6s ease-in-out infinite;
}

@keyframes blobFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}
@keyframes blobPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.25rem; border-radius: 9999px;
    background: var(--light-purple);
    border: 1px solid rgba(96, 89, 195, 0.2);
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(96, 89, 195, 0.1);
}
.hero-badge i { color: var(--brand-purple); font-size: 1rem; }
.hero-badge span { font-size: 0.875rem; font-weight: 600; color: var(--brand-purple-dark); }

.hero-title {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: var(--brand-gray-900);
}
@media (min-width: 576px) { .hero-title { font-size: 2.75rem; } }
@media (min-width: 992px) { .hero-title { font-size: 3.25rem; line-height: 1.35; } }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--brand-gray-600);
    max-width: 38rem;
    margin: 0 auto 2.5rem;
    line-height: 2;
}
@media (min-width: 576px) { .hero-subtitle { font-size: 1.15rem; } }

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}
@media (min-width: 576px) {
    .hero-cta { flex-direction: row; justify-content: center; }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 1.25rem;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(96, 89, 195, 0.1);
    box-shadow: var(--shadow-md);
}
@media (min-width: 576px) {
    .hero-stats { gap: 2rem; max-width: 36rem; padding: 2rem 2.5rem; }
}
.stat-item { text-align: center; }
.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-purple);
    margin-bottom: 0.25rem;
}
@media (min-width: 576px) { .stat-value { font-size: 2.25rem; } }
.stat-label { font-size: 0.85rem; font-weight: 500; color: var(--brand-gray-500); }

/* =====================================================
   How It Works Section
   ===================================================== */
.how-it-works-section {
    padding: 5rem 0;
    background: #fff;
}
@media (min-width: 992px) { .how-it-works-section { padding: 7rem 0; } }

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--brand-gray-900);
}
@media (min-width: 576px) { .section-title { font-size: 2.5rem; } }

.section-subtitle {
    font-size: 1.1rem;
    color: var(--brand-gray-500);
    max-width: 32rem;
    margin: 0 auto;
    line-height: 1.8;
}

.step-card {
    position: relative;
    padding: 2.5rem 2rem;
    border-radius: 1.25rem;
    background: var(--brand-gray-50);
    border: 1px solid var(--brand-gray-200);
    text-align: center;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}
.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.step-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(96, 89, 195, 0.2);
    background: #fff;
}
.step-card:hover::before { opacity: 1; }

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(96, 89, 195, 0.3);
}

.step-icon {
    width: 64px; height: 64px;
    border-radius: 1rem;
    background: var(--light-purple);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}
.step-card:hover .step-icon {
    background: rgba(96, 89, 195, 0.15);
    transform: scale(1.05);
}
.step-icon i { font-size: 1.75rem; color: var(--brand-purple); }

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--brand-gray-900);
}
.step-description {
    color: var(--brand-gray-600);
    line-height: 1.8;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* =====================================================
   Features Section
   ===================================================== */
.features-section {
    padding: 5rem 0;
    background: var(--brand-gray-50);
}
@media (min-width: 992px) { .features-section { padding: 7rem 0; } }

.section-subtitle-1 {
    font-size: 1.125rem;
    color: var(--brand-gray-600);
    margin-bottom: 0.5rem;
}
.section-subtitle-2 {
    font-size: 1rem;
    color: var(--brand-gray-500);
}

.feature-card {
    padding: 2rem;
    border-radius: 1.25rem;
    background: #fff;
    border: 1px solid var(--brand-gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.feature-card:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(96, 89, 195, 0.2);
    transform: translateY(-6px);
}
.feature-card:hover::after { transform: scaleX(1); }

.feature-icon {
    width: 60px; height: 60px;
    border-radius: 1rem;
    background: var(--light-purple);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}
.feature-card:hover .feature-icon {
    background: rgba(96, 89, 195, 0.15);
    transform: scale(1.08) rotate(-3deg);
}
.feature-icon i { font-size: 1.5rem; color: var(--brand-purple); }
.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--brand-gray-900);
}
.feature-description {
    color: var(--brand-gray-600);
    line-height: 1.8;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* =====================================================
   CTA Section
   ===================================================== */
.cta-section {
    padding: 5rem 0;
    background: var(--light-purple);
}
@media (min-width: 992px) { .cta-section { padding: 7rem 0; } }

.cta-card {
    position: relative;
    padding: 3.5rem 2rem;
    border-radius: 1.5rem;
    background: var(--gradient-primary);
    overflow: hidden;
    text-align: center;
    box-shadow: 0 20px 60px -15px rgba(96, 89, 195, 0.5);
}
@media (min-width: 992px) { .cta-card { padding: 4.5rem 3rem; } }

.cta-bg-decoration { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cta-blob { position: absolute; border-radius: 50%; filter: blur(60px); }
.cta-blob-1 {
    top: -5rem; right: 15%;
    width: 18rem; height: 18rem;
    background: rgba(255, 255, 255, 0.1);
    animation: blobFloat 12s ease-in-out infinite;
}
.cta-blob-2 {
    bottom: -5rem; left: 20%;
    width: 14rem; height: 14rem;
    background: rgba(255, 255, 255, 0.08);
    animation: blobFloat 10s ease-in-out infinite reverse;
}
.cta-content { position: relative; z-index: 1; }
.cta-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}
@media (min-width: 576px) { .cta-title { font-size: 2.25rem; } }
@media (min-width: 992px) { .cta-title { font-size: 2.75rem; } }

.cta-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 32rem;
    margin: 0 auto 2rem;
    line-height: 1.9;
}
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
}
.cta-button i { transition: transform 0.3s ease; }
.cta-button:hover i:last-child { transform: translateX(-4px); }

/* =====================================================
   Footer
   ===================================================== */
.footer-section {
    background: var(--brand-gray-900);
    color: #fff;
    padding: 4rem 0 2rem;
}
.footer-brand .brand-name { color: #fff; }
.footer-description {
    color: rgba(255, 255, 255, 0.65);
    max-width: 22rem;
    line-height: 2;
    font-size: 0.9rem;
}
.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    position: relative;
}
.footer-heading::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--brand-purple-light);
    margin-top: 0.5rem;
    border-radius: 2px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.footer-links a:hover { color: #fff; padding-right: 4px; }

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.social-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}
.social-link i { font-size: 1.25rem; }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin: 0;
}

/* =====================================================
   Animations
   ===================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease-out forwards;
}
.animate-fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.animate-fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.animate-fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.animate-fade-in-up:nth-child(4) { animation-delay: 0.4s; }

.animate-scale-in {
    animation: scaleIn 0.7s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

/* Scroll-triggered animations (via IntersectionObserver fallback) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   Error Page
   ===================================================== */
.error-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
}

/* =====================================================
   Utilities
   ===================================================== */
.text-brand { color: var(--brand-purple); }
.bg-brand { background: var(--brand-purple); }
.bg-brand-light { background: var(--light-purple); }

/* =====================================================
   Responsive Tweaks
   ===================================================== */
@media (max-width: 575.98px) {
    .hero-section { padding: 3rem 0 3rem; }
    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-stats { padding: 1.5rem 1rem; }
    .stat-value { font-size: 1.5rem; }
    .section-title { font-size: 1.5rem; }
    .step-card { padding: 2rem 1.5rem; }
    .feature-card { padding: 1.5rem; }
    .cta-title { font-size: 1.5rem; }
    .cta-card { padding: 2.5rem 1.5rem; }
    .social-link { display: flex; }
}
