/* ==========================================================================
   Arab Automate - Design System & Modern Futuristic Styles
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #07090e;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(56, 189, 248, 0.3);
    
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    --secondary: #818cf8;
    --accent: #c084fc;
    --success: #34d399;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Dynamic Background Glows */
.glow-bg {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -2;
    pointer-events: none;
    opacity: 0.4;
}

.glow-bg-1 {
    top: -10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.glow-bg-2 {
    top: 40%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Helpers */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header & Navbar */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    padding: 1.25rem 0;
    transition: var(--transition-fast);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 0.85rem 0;
    background: rgba(7, 9, 14, 0.85);
    border-color: var(--border-color);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary);
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    border: none;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-accent);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* Hero Section */
.hero-section {
    padding-top: 10rem;
    padding-bottom: 5rem;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--border-accent);
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 4rem;
}

/* Live Simulation Widget */
.simulation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    max-width: 950px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.sim-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sim-dots {
    display: flex;
    gap: 6px;
}

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

.sim-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sim-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--success);
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.sim-body {
    padding: 2.5rem 1.5rem 1.5rem;
}

.sim-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.flow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    transition: var(--transition-smooth);
}

.step-icon {
    width: 54px;
    height: 54px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    transition: var(--transition-smooth);
}

.flow-step.active .step-icon {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.1);
}

.flow-step.completed .step-icon {
    background: rgba(52, 211, 153, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.step-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.flow-connector {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 -10px 2rem;
    position: relative;
    z-index: 1;
}

.flow-connector.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 10px var(--primary-glow);
}

.sim-controls {
    text-align: center;
    margin-bottom: 1.5rem;
}

.sim-console {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--primary);
    text-align: right;
    direction: ltr;
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* Metrics Section */
.metrics-section {
    padding: 3rem 0;
    border-y: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.3);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
}

.metric-card {
    padding: 1.5rem;
}

.metric-value {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Section Common Styles */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem;
}

.section-tag {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Solutions Grid */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.solution-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.card-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-main);
}

.card-features i {
    color: var(--success);
    width: 16px;
}

/* ROI Calculator Styles */
.roi-section {
    background: rgba(15, 23, 42, 0.4);
    border-y: 1px solid var(--border-color);
}

.roi-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.roi-calculator {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 24px;
    padding: 2.5rem;
}

.calc-group {
    margin-bottom: 2rem;
}

.calc-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.calc-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.calc-slider {
    flex: 1;
    accent-color: var(--primary);
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
}

.calc-val-display {
    min-width: 90px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--border-accent);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.roi-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.roi-res-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.res-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 0.3rem;
}

.res-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Process Timeline */
.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    position: relative;
}

.timeline-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    position: relative;
}

.step-num {
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(56, 189, 248, 0.15);
    position: absolute;
    top: 1rem;
    left: 1.5rem;
}

.step-head {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.step-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Form & Wizard */
.wizard-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 24px;
    padding: 3rem 2.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Footer */
.footer {
    background: #040508;
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-head {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-title { font-size: 2.5rem; }
    .roi-container { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: 2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .sim-flow { flex-direction: column; gap: 1.5rem; }
    .flow-connector { width: 2px; height: 30px; margin: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}