/* CSS Variables */
:root {
    --color-space-gray: #1D1D1F;
    --color-dark-gray: #2C2C2E;
    --color-white: #FFFFFF;
    --color-light-gray: #F2F2F7;
    --color-blue: #007AFF;
    --color-text-dark: #1D1D1F;
    --color-text-light: rgba(255, 255, 255, 0.86);
    --color-text-secondary: rgba(255, 255, 255, 0.56);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-white);
    color: var(--color-text-dark);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(29, 29, 31, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 40px rgba(0, 0, 0, 0.08);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    order: 2;
}

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

.nav-link {
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-blue);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 1rem;
    order: 1;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--color-white);
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-space-gray) 0%, var(--color-dark-gray) 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    color: var(--color-white);
    margin-bottom: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    background-color: var(--color-blue);
    color: var(--color-white);
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
}

/* Hero Background */
.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.geometric-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #007AFF, #00C7BE);
    top: -200px;
    left: -200px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #FF2D55, #FF6000);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #5856D6, #AF52DE);
    top: 50%;
    right: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 30px;
    height: 30px;
    color: var(--color-text-light);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Stats Section */
.stats-section {
    background-color: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    padding: 60px 0;
    margin-top: auto;
}

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

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

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: var(--color-text-light);
    font-weight: 400;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--color-light-gray);
}

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

.service-card {
    background-color: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--color-blue);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
}

.service-card p {
    color: #6e6e73;
    line-height: 1.7;
}

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

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

.project-card {
    background-color: var(--color-light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--color-dark-gray), var(--color-space-gray));
    position: relative;
    overflow: hidden;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 122, 255, 0.1) 0%, transparent 70%);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.project-content p {
    color: #6e6e73;
    font-size: 0.875rem;
    line-height: 1.5;
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.project-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
    text-decoration: none;
    color: white;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 0;
    background-color: var(--color-space-gray);
    color: var(--color-white);
}

.testimonials .section-title {
    color: var(--color-white);
}

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

.testimonial-card {
    background-color: var(--color-dark-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.testimonial-content p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    font-weight: 600;
    color: var(--color-white);
}

.testimonial-author span {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: var(--color-light-gray);
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

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

.submit-button {
    background-color: var(--color-blue);
    color: var(--color-white);
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.3);
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background-color: var(--color-white);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #d2d2d7;
}

.faq-question {
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-dark);
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--color-blue);
}

.faq-icon {
    width: 20px;
    height: 20px;
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 0 1.5rem 0;
    color: #6e6e73;
    line-height: 1.7;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

.footer-contact h4,
.footer-social h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.footer-contact p {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--color-dark-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.social-links svg {
    width: 20px;
    height: 20px;
    fill: var(--color-white);
}

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

.footer-bottom p {
    color: var(--color-text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background-color: rgba(29, 29, 31, 0.98);
        backdrop-filter: saturate(180%) blur(20px);
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
    }

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

    .mobile-menu-toggle {
        display: flex;
        order: -1;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .cta-button {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .services-grid,
    .projects-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

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

    .contact-form {
        padding: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .project-card {
        margin: 0 -20px;
        border-radius: 0;
    }
}