/* ============================================
   SmartWebApi - Landing Page Styles
   ============================================ */

:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #11111d;
    --bg-card: #1a1a2e;
    --bg-card-hover: #22223e;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #a78bfa;
    --accent-hover: #8b5cf6;
    --accent-glow: rgba(167, 139, 250, 0.4);
    --gradient-1: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #fb923c 100%);
    --gradient-2: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    margin: 0;
}

/* ============ Navbar ============ */
.navbar-modern {
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    transition: all 0.3s;
}

.navbar-modern.scrolled {
    background: rgba(10, 10, 20, 0.95);
    padding: 0.7rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.text-accent { color: var(--accent) !important; }
.bg-accent { background: var(--accent) !important; }

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.05);
}

.btn-accent {
    background: var(--gradient-1);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    color: white;
}

.btn-outline-light {
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    background: transparent;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* ============ Hero Section ============ */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(167, 139, 250, 0.15), transparent 50%),
                radial-gradient(ellipse at bottom left, rgba(236, 72, 153, 0.1), transparent 50%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb-1 { width: 500px; height: 500px; background: #a78bfa; top: -150px; left: -100px; }
.orb-2 { width: 400px; height: 400px; background: #ec4899; bottom: -100px; right: -50px; animation-delay: -5s; }
.orb-3 { width: 350px; height: 350px; background: #fb923c; top: 40%; left: 30%; animation-delay: -10s; opacity: 0.3; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

.badge-pill-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7); }
    50% { box-shadow: 0 0 0 12px rgba(167, 139, 250, 0); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 0 2.5rem auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 992px) {
    .hero-actions { justify-content: flex-end; }
}

.btn-lg {
    padding: 0.9rem 2rem !important;
    font-size: 1.05rem !important;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 992px) {
    .hero-stats { justify-content: flex-end; }
}

.stat-item { text-align: center; }

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-light);
}

/* ============ Mockup ============ */
.hero-mockup {
    position: relative;
    perspective: 1000px;
}

.mockup-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(167, 139, 250, 0.15);
    transform: rotateY(-8deg) rotateX(5deg);
    transition: transform 0.5s;
}

.mockup-window:hover { transform: rotateY(-3deg) rotateX(2deg); }

.mockup-header {
    background: var(--bg-secondary);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.mockup-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-url {
    margin-right: auto;
    margin-left: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'Space Grotesk', monospace;
}

.mockup-body {
    padding: 1.5rem;
    font-family: 'Space Grotesk', 'Courier New', monospace;
    font-size: 0.95rem;
    direction: ltr;
    text-align: left;
}

.code-line { margin-bottom: 0.8rem; color: var(--text-secondary); }
.code-keyword { color: #34d399; font-weight: bold; }
.code-string { color: #fbbf24; }
.code-key { color: #60a5fa; }
.code-num { color: #f472b6; }
.code-bracket { color: var(--text-primary); }
.code-success { color: #10b981; }

.code-response {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    margin-top: 0.5rem;
    line-height: 1.8;
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: floatCard 4s ease-in-out infinite;
}

.floating-card i { font-size: 1.3rem; }

.card-1 {
    top: 15%;
    right: -30px;
    color: #10b981;
}
.card-1 i { color: #10b981; }

.card-2 {
    bottom: 20%;
    left: -30px;
    color: #fbbf24;
    animation-delay: -2s;
}
.card-2 i { color: #fbbf24; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ============ Features Section ============ */
.features-section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
}

.icon-purple { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.icon-orange { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.icon-green  { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.icon-blue   { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.icon-pink   { background: rgba(244, 114, 182, 0.15); color: #f472b6; }
.icon-cyan   { background: rgba(34, 211, 238, 0.15); color: #22d3ee; }

.feature-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.feature-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* ============ CTA Section ============ */
.cta-section {
    padding: 4rem 0;
}

.cta-box {
    background: var(--gradient-2);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.cta-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1), transparent 40%);
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem;
}

.cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

/* ============ Page Hero (للصفحات الفرعية) ============ */
.page-hero {
    padding: 10rem 0 4rem;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(167, 139, 250, 0.15), transparent 60%);
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.content-section { padding: 4rem 0; }

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
}

.stat-box h3 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.3rem; }
.stat-box p { color: var(--text-secondary); margin: 0; }

/* ============ Footer ============ */
.footer-modern {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-logo { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }
.footer-title { font-weight: 700; margin-bottom: 1rem; color: var(--text-primary); }

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li { margin-bottom: 0.6rem; }

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-3px);
}

.newsletter-input .form-control {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.newsletter-input .form-control:focus {
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    color: var(--text-primary);
}

.footer-divider {
    border-color: var(--border);
    margin: 2rem 0 1.5rem;
}

/* ============ Animations ============ */
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

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

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-card-hover); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
