/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #0f172a;
    --accent-color: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-bottom-color: var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switch {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.lang-switch:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0.4;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    animation: float 20s ease-in-out infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-medium);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-medium);
    font-size: 0.875rem;
    font-weight: 500;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: var(--transition);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-indicator:hover {
    color: var(--primary-color);
    transform: translateX(-50%) translateY(-5px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin: 0 auto;
    transition: var(--transition);
}

.scroll-indicator:hover .arrow {
    transform: rotate(45deg) translateY(5px);
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

/* About Section */
.about {
    background: var(--bg-white);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    margin-top: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-medium);
    margin-bottom: 1.75rem;
    line-height: 1.8;
    font-size: 1.0625rem;
}

.features-list {
    list-style: none;
    padding-left: 0;
}

.features-list li {
    padding: 1rem 0;
    padding-left: 2.5rem;
    position: relative;
    color: var(--text-medium);
    line-height: 1.8;
    font-size: 1.0625rem;
    transition: var(--transition);
}

.features-list li:hover {
    color: var(--text-dark);
    padding-left: 3rem;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.5rem;
    transition: var(--transition);
}

.features-list li:hover::before {
    transform: scale(1.2);
}

body[dir="rtl"] .features-list li {
    padding-left: 0;
    padding-right: 2rem;
}

body[dir="rtl"] .features-list li::before {
    left: auto;
    right: 0;
}

/* Services Section */
.services {
    background: var(--bg-light);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--bg-white);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.75rem;
    display: inline-block;
    transition: var(--transition);
    color: var(--primary-color);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 20px;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-medium);
    line-height: 1.8;
    font-size: 1rem;
}

/* Contact Section */
.contact {
    background: var(--bg-white);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
    transition: var(--transition);
    color: var(--primary-color);
}

.info-item:hover .info-icon {
    background: var(--accent-gradient);
    color: white;
    transform: scale(1.1);
}

.info-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.info-item p {
    color: var(--text-light);
}

.contact-form {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.125rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group label {
    position: absolute;
    top: 1.125rem;
    left: 1rem;
    color: var(--text-light);
    transition: var(--transition);
    pointer-events: none;
    background: var(--bg-light);
    padding: 0 0.5rem;
    font-weight: 500;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.8125rem;
    color: var(--primary-color);
    background: var(--bg-white);
    font-weight: 600;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 4rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.25rem;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.footer-section h3 .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    margin-bottom: 1.25rem;
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-light);
    padding-left: 8px;
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.125rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: var(--accent-gradient);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

body[dir="rtl"] .footer-section ul li a:hover {
    padding-left: 0;
    padding-right: 8px;
    transform: translateX(-4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 4rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-actions {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .contact-form {
        padding: 2rem;
    }
}

/* RTL Support */
body[dir="rtl"] {
    direction: rtl;
}

body[dir="rtl"] .nav-menu a::after {
    left: auto;
    right: 0;
}

body[dir="rtl"] .form-group label {
    left: auto;
    right: 1rem;
}

body[dir="rtl"] .form-group input:focus + label,
body[dir="rtl"] .form-group input:valid + label,
body[dir="rtl"] .form-group textarea:focus + label,
body[dir="rtl"] .form-group textarea:valid + label {
    left: auto;
    right: 0.75rem;
}

body[dir="rtl"] .info-item {
    flex-direction: row-reverse;
}

body[dir="rtl"] .scroll-indicator {
    transform: translateX(50%);
}

body[dir="rtl"] .scroll-indicator:hover {
    transform: translateX(50%) translateY(-5px);
}

body[dir="rtl"] .scroll-indicator:hover .arrow {
    transform: rotate(-135deg) translateY(5px);
}

body[dir="rtl"] .arrow {
    transform: rotate(-135deg);
}

