@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    /* Colors based on Design System */
    --white: #ffffff;
    --bg-color: #f9fafb;
    --surface: #f3f4f6;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #22c55e;
    --text-main: #111827;
    --text-muted: #6b7280;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Spacing & Layout */
    --container-max: 1200px;
    --transition: all 0.3s ease;
    --section-padding: 5rem 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.125rem;
}

/* Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

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

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

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

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

/* Header & Navigation */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

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

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

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

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

/* Hero Section */
.hero {
    padding: 6rem 1rem;
    background: linear-gradient(to bottom, var(--white), var(--bg-color));
    border-bottom: 1px solid var(--border);
}

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

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

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

.hero-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(34, 197, 94, 0.1));
}

/* Services Section */
.services {
    padding: var(--section-padding);
}

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

.service-card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    width: 50px;
    height: 50px;
    background-color: var(--surface);
    color: var(--primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 24px;
    height: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-list {
    margin-right: 0;
    padding-right: 0;
}

.service-list li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.service-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Projects Section */
.projects {
    padding: var(--section-padding);
    background-color: var(--white);
}

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

.project-card {
    background-color: var(--bg-color);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-result {
    display: inline-block;
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
}

/* About Section */
.about {
    padding: var(--section-padding);
}

.about-content {
    background-color: var(--primary);
    color: var(--white);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-content p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.about-content::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
    background-color: var(--white);
}

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-color);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--white);
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background-color: var(--text-main);
    color: var(--white);
    padding: 4rem 1rem 2rem;
}

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

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: #9ca3af;
    max-width: 300px;
}

.footer-title {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

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

.footer-links a {
    color: #9ca3af;
}

.footer-links a:hover {
    color: var(--white);
    padding-right: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Legal Pages */
.legal-page {
    padding: 4rem 1rem;
    background-color: var(--white);
    min-height: 60vh;
}

.legal-content {
    background-color: var(--bg-color);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.legal-content ul {
    margin-right: 2rem;
    margin-bottom: 1.5rem;
    list-style-type: disc;
    color: var(--text-muted);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .header-cta {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Mobile Menu Active State */
    .nav-container.active {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
    }
    
    .nav-container.active .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .nav-container.active .header-cta {
        display: block;
        margin-top: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        padding: 2rem 1rem;
    }
    
    .about-content p {
        font-size: 1.2rem;
    }

    .contact-wrapper, .legal-content {
        padding: 1.5rem;
    }
}