/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(0, 0%, 0%);
    --card: hsl(0, 0%, 96.47%);
    --card-foreground: hsl(0, 0%, 0%);
    --primary: hsl(96, 85.19%, 73.53%);
    --primary-foreground: hsl(0, 0%, 0%);
    --secondary: hsl(0, 0%, 0%);
    --secondary-foreground: hsl(0, 0%, 100%);
    --muted: hsl(0, 0%, 96.08%);
    --muted-foreground: hsl(0, 0%, 52.94%);
    --accent: hsl(254.21, 100%, 92.55%);
    --accent-foreground: hsl(0, 0%, 0%);
    --border: hsl(0, 0%, 96.47%);
    --chart-1: hsl(203.8863, 88.2845%, 53.1373%);
    --chart-2: hsl(159.7826, 100%, 36.0784%);
    --chart-3: hsl(42.0290, 92.8251%, 56.2745%);
    --sidebar: hsl(180, 6.6667%, 97.0588%);
    --sidebar-foreground: hsl(210, 25%, 7.8431%);
    --sidebar-primary: hsl(203.8863, 88.2845%, 53.1373%);
    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-ar: 'Cairo', 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 0rem;
}

.dark {
    --background: hsl(0, 0%, 0%);
    --foreground: hsl(200, 6.6667%, 91.1765%);
    --card: hsl(228, 9.8039%, 10%);
    --card-foreground: hsl(0, 0%, 85.0980%);
    --primary: hsl(203.7736, 87.6033%, 52.5490%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(195.0000, 15.3846%, 94.9020%);
    --secondary-foreground: hsl(210, 25%, 7.8431%);
    --muted: hsl(0, 0%, 9.4118%);
    --muted-foreground: hsl(210, 3.3898%, 46.2745%);
    --accent: hsl(205.7143, 70%, 7.8431%);
    --accent-foreground: hsl(203.7736, 87.6033%, 52.5490%);
    --border: hsl(210, 5.2632%, 14.9020%);
    --sidebar: hsl(228, 9.8039%, 10%);
    --sidebar-foreground: hsl(0, 0%, 85.0980%);
    --font-sans: 'Open Sans', sans-serif;
    --radius: 1.3rem;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    antialiased: true;
}

/* Arabic / RTL support */
html[dir="rtl"] body {
    font-family: var(--font-ar);
}

html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .nav-container,
html[dir="rtl"] .hero-container,
html[dir="rtl"] .about-content,
html[dir="rtl"] .cta-buttons,
html[dir="rtl"] .footer-links {
    direction: rtl;
}

html[dir="rtl"] .nav-menu {
    gap: 1rem;
}

html[dir="rtl"] .preview-sidebar {
    order: 2;
}

html[dir="rtl"] .preview-main {
    order: 1;
}

@media (max-width: 768px) {
    html[dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
    }
    html[dir="rtl"] .nav-menu.active {
        right: 0;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e1e5e9;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--muted-foreground);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-cta {
    background: var(--primary);
    color: var(--primary-foreground) !important;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    transition: background 0.3s ease;
}

.nav-cta:hover {
    background: var(--primary);
    opacity: 0.9 !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--foreground);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary);
    opacity: 0.9;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--primary-foreground);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--secondary-foreground);
    color: var(--secondary);
    transform: translateY(-2px);
}

/* Dashboard Preview */
.dashboard-preview {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    border: 1px solid var(--border);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.dashboard-preview:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-header {
    background: var(--muted);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.preview-dots {
    display: flex;
    gap: 0.5rem;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--muted-foreground);
}

.preview-dots span:first-child {
    background: var(--chart-1);
}

.preview-dots span:nth-child(2) {
    background: var(--chart-3);
}

.preview-dots span:nth-child(3) {
    background: var(--chart-2);
}

.preview-content {
    display: flex;
    min-height: 300px;
}

.preview-sidebar {
    width: 80px;
    background: var(--sidebar);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    height: 40px;
    background: var(--border);
    border-radius: var(--radius);
    transition: background 0.3s ease;
}

.sidebar-item.active {
    background: var(--primary);
}

.preview-main {
    flex: 1;
    padding: 1rem;
}

.chart-area {
    height: 150px;
    background: linear-gradient(135deg, var(--chart-1), var(--primary));
    border-radius: var(--radius);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.chart-area::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 0px,
        rgba(255, 255, 255, 0.1) 20px,
        transparent 20px,
        transparent 40px
    );
}

.stats-row {
    display: flex;
    gap: 0.5rem;
}

.stat-card {
    flex: 1;
    height: 80px;
    background: var(--muted);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 30px;
    height: 8px;
    background: var(--primary);
    border-radius: var(--radius);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--background);
}

/* Contact form */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

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

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

.form-field label {
    font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
}

.form-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    html[dir="rtl"] .form-actions {
        justify-content: flex-start;
    }
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: var(--primary-foreground);
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--muted);
}

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

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.about-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    margin: 0;
}

.about-graphic {
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.graphic-circle {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.graphic-circle.primary {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--chart-1), var(--primary));
    animation-delay: 0s;
}

.graphic-circle.secondary {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--chart-3), var(--accent));
    top: 20%;
    right: 10%;
    animation-delay: -2s;
}

.graphic-circle.tertiary {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--chart-2), var(--chart-1));
    bottom: 20%;
    left: 10%;
    animation-delay: -4s;
}

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

/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--secondary);
    color: var(--secondary-foreground);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 60px 0 20px;
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-foreground);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--muted-foreground);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-stats {
        justify-content: space-around;
    }
    
    .stat h3 {
        font-size: 1.5rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }
}
.form-inline-status {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}
.form-inline-status.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.form-inline-status.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
