/* ========================
   CSS Variables & Settings
   ======================== */
:root {
    --primary: #4338ca;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --bg-main: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --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 -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

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

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-white { color: #fff !important; }
.text-green { color: var(--secondary) !important; }
.text-muted { color: var(--text-muted) !important; }

/* ========================
   Buttons
   ======================== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-main);
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.shadow-btn {
    box-shadow: var(--shadow-glow);
}

/* ========================
   Navigation
   ======================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-main);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    right: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* ========================
   Hero Section
   ======================== */
.hero {
    position: relative;
    padding: 160px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

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

/* UI Mockup Graphic (Pure CSS) */
.hero-image {
    position: relative;
    perspective: 1000px;
}

.mockup-window {
    width: 100%;
    height: 400px;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(67, 56, 202, 0.25);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

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

.mockup-header {
    height: 40px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.mockup-body {
    display: flex;
    flex: 1;
}

.mockup-sidebar {
    width: 25%;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
}

.mockup-main {
    width: 75%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mockup-chart {
    height: 40%;
    background: linear-gradient(to top right, rgba(99,102,241,0.1), rgba(16,185,129,0.1));
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(99,102,241,0.3);
}

.mockup-cards {
    display: flex;
    gap: 15px;
    height: 25%;
}

.m-card {
    flex: 1;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
}

.mockup-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.m-item {
    height: 15px;
    background: #e2e8f0;
    border-radius: 4px;
    width: 100%;
}

.m-item:last-child { width: 70%; }

/* ========================
   Clients Marquee
   ======================== */
.clients {
    padding: 40px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
    background: #fafafa;
}

.clients-title {
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.clients-title span {
    color: var(--text-main);
    font-weight: 700;
}

.marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

/* Mask for smooth fade at edges */
.marquee-wrapper::before,
.marquee-wrapper::after {
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    content: "";
    z-index: 2;
}
.marquee-wrapper::before {
    right: 0;
    background: linear-gradient(to left, #fafafa, transparent);
}
.marquee-wrapper::after {
    left: 0;
    background: linear-gradient(to right, #fafafa, transparent);
}

.marquee {
    display: inline-block;
    animation: marquee 25s linear infinite;
}

.marquee:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: inline-block;
    margin: 0 40px;
    font-size: 2.5rem;
    color: #94a3b8;
    transition: var(--transition);
}

.marquee-item:hover {
    color: var(--primary);
    transform: scale(1.1);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Negative translates go left in LTR, but in RTL layout it might differ. Assuming inline-block shifts correctly */
}

/* ========================
   Sections Common
   ======================== */
.section-header {
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

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

/* ========================
   Features
   ======================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-main);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(67,56,202,0.05) 0%, rgba(16,185,129,0.05) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: #e2e8f0;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
    transform: rotate(10deg);
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-text {
    color: var(--text-muted);
}

/* ========================
   How it Works
   ======================== */
.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.step-num {
    font-size: 4rem;
    font-weight: 800;
    color: #e2e8f0;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    opacity: 0.5;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-md);
}

.step-title {
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

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

.step-line {
    flex: 0.5;
    height: 2px;
    background: #cbd5e1;
    margin-top: 40px;
    position: relative;
}

.step-line::after {
    content: '';
    position: absolute;
    top: -4px;
    right: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

/* ========================
   Pricing
   ======================== */
.pricing-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.price-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    width: 350px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.price-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.price-card.popular {
    transform: scale(1.05);
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.price-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.plan-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 30px;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.plan-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.plan-price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    color: var(--text-main);
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
}

.amount {
    font-size: 3.5rem;
    font-weight: 800;
}

.period {
    color: var(--text-muted);
    margin-right: 5px;
}

.plan-features li {
    margin-bottom: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li.disabled {
    color: var(--text-muted);
    text-decoration: line-through;
}

.plan-footer {
    margin-top: 30px;
}

/* ========================
   FAQ
   ======================== */
.faq-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
}

.accordion-item {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.accordion-header {
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: var(--transition);
}

.accordion-header:hover {
    color: var(--primary);
}

.accordion-header .icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.accordion-item.active .icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content p {
    padding-bottom: 15px;
    color: var(--text-muted);
}

/* ========================
   Contact
   ======================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-list {
    margin-top: 40px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.info-text p {
    color: var(--text-muted);
}

.contact-form-container {
    background: white;
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

/* ========================
   Footer
   ======================== */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-text {
    color: #94a3b8;
    margin: 20px 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #94a3b8;
}

.footer-links ul li a:hover {
    color: white;
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
}

.footer-badges {
    display: flex;
    gap: 15px;
    font-size: 1.5rem;
}

/* ========================
   Animations & Reveals
   ======================== */
.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

.fade-in-left {
    animation: fadeInLeft 1s ease forwards;
    opacity: 0;
}

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

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(30px); } /* Flipped for RTL */
    to { opacity: 1; transform: translateX(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================
   Responsive Media Queries
   ======================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { margin: 0 auto 30px; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; margin-top: 40px; }
    
    .faq-wrapper, .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    
    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    .step-line {
        display: none;
    }
    
    .pricing-grid {
        flex-direction: column;
    }
    .price-card {
        width: 100%;
    }
    .price-card.popular {
        transform: scale(1);
    }
    .price-card.popular:hover {
        transform: translateY(-5px);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
