:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --background-light: #f8fafc;
    --background-dark: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #f8fafc;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-description {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    line-height: 1.8;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.hero {
    min-height: 100vh;
    padding: 8rem 5% 5rem;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--background-light) 0%, #e2e8f0 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

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

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

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

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

#language-selector {
    padding: 0.75rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    background-color: white;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    margin-left: 1rem;
}

#language-selector:hover,
#language-selector:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

#language-selector option {
    padding: 0.5rem;
    background-color: white;
    color: var(--text-primary);
}

.mobile-language-selector {
    display: none;
    margin: 1rem 0;
    width: 100%;
}

.btn-primary[type="submit"] {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-primary[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.btn-primary[type="submit"]:active {
    transform: translateY(-1px);
}

.services {
    padding: 8rem 5%;
    background-color: white;
}

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

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card .content {
    padding: 2rem;
}

.service-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.products {
    padding: 8rem 5%;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eeff 100%);
    position: relative;
    overflow: hidden;
}

.products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%232563eb10" stroke-width="0.5"/></svg>') 0 0/50px 50px;
    opacity: 0.5;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.product-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

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

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 4px solid var(--primary-color);
}

.product-content {
    padding: 2.5rem;
}

.product-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.product-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.product-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.about {
    padding: 10rem 5%;
    background: linear-gradient(135deg, var(--background-dark) 0%, #2a3b55 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,50 Q25,0 50,50 T100,50" fill="none" stroke="%23ffffff10" stroke-width="0.5"/></svg>') 0 0/100px 100px;
    opacity: 0.1;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.about h2 {
    color: #2a3b55;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.about p {
    color: #1e293b;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.contact {
    padding: 8rem 5%;
    background: linear-gradient(135deg, var(--background-light) 0%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="45" y="45" width="10" height="10" fill="%232563eb10"/></svg>') 0 0/30px 30px;
    opacity: 0.5;
}

#contact-form {
    background: white;
    padding: 3.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

#contact-form input,
#contact-form textarea {
    background: var(--background-light);
    border: 2px solid transparent;
    padding: 1.2rem;
    font-size: 1.1rem;
    transition: var(--transition);
}

#contact-form input:focus,
#contact-form textarea:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.services h2,
.technologies h2,
.portfolio h2,
.team h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 2rem;
}

.services h2::after,
.technologies h2::after,
.portfolio h2::after,
.team h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.service-card h3,
.technology-card h3,
.portfolio-card h3,
.team-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
}

.service-card p,
.technology-card p,
.portfolio-card p,
.team-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.products, .technologies {
    padding: 8rem 5%;
    background-color: var(--background-light);
}

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

.card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card .content {
    padding: 2rem;
}

.team {
    padding: 8rem 5%;
    background-color: white;
}

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

.team-card {
    text-align: center;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.team-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.team-card .content {
    padding: 2rem;
}

.team-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact {
    padding: 8rem 5%;
    background: linear-gradient(135deg, var(--background-light) 0%, #e2e8f0 100%);
    color: #0077B5;
}

.contact h2 {
    color: #1e293b;
    text-align: center;
}

#contact-form {
    max-width: 600px;
    margin: 3rem auto 0;
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

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

#contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

footer {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 5rem 5% 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h4 {
    color: white;
    margin-bottom: 1.5rem;
}

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

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

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
}

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

.social-icon {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon.linkedin:hover {
    color: #0077B5;
}

.social-icon.instagram:hover {
    color: #E4405F;
}

.social-icon.github:hover {
    color: #fff;
}

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

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1000;
    }

    .menu-toggle span {
        width: 25px;
        height: 3px;
        background-color: var(--text-primary);
        transition: var(--transition);
    }

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

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

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

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
    }

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

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: white;
        padding: 6rem 2rem;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

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

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
        border-radius: var(--radius-md);
        transition: var(--transition);
    }

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

    #language-selector {
        display: none;
    }

    .mobile-language-selector {
        display: block;
        padding: 1rem;
        width: 100%;
        text-align: center;
        border: 2px solid var(--primary-color);
        border-radius: var(--radius-md);
        margin: 1rem 0;
        background: white;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }
}

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

html[lang='ar'] {
    direction: rtl;
}

html[lang='ar'] .nav-menu {
    right: -100%;
    left: auto;
}

html[lang='ar'] .nav-menu.active {
    right: 0;
    left: auto;
}

html[lang='ar'] #language-selector,
html[lang='ar'] .mobile-language-selector {
    margin-right: 1rem;
    margin-left: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

.portfolio, .technologies, .team, .about {
    padding: 8rem 5%;
    background: var(--background-light);
}

.portfolio-grid, .technologies-grid, .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-card, .technology-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.portfolio-card img, .technology-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    color: white;
}

.portfolio-card:hover .card-overlay,
.technology-card:hover .card-overlay {
    opacity: 1;
}

html[lang='ar'] .nav-menu {
    right: auto;
    left: -100%;
}

html[lang='ar'] .nav-menu.active {
    right: auto;
    left: 0;
}

html[lang='ar'] #language-selector,
html[lang='ar'] .mobile-language-selector {
    margin-right: 1rem;
    margin-left: 0;
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    z-index: 1002;
    transition: width 0.3s ease;
}

.footer-language-selector{
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    background-color: white;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    margin-left: 1rem;
}