/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables */
:root {
    --primary-color: #3498db; /* Blue */
    --secondary-color: #899fc1; /* Green */
    --accent-color: #e74c3c; /* Red */
    --text-color: #333;
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --gray: #7f8c8d;
    --dark-gray: #2c3e50;
    --border-color: #ecf0f1;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smoother transition */
}

/* General Body Styles */
body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    direction: rtl; /* Right-to-left for Arabic */
    text-align: right;
    background-color: var(--light-bg);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Reusable Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-left: 10px;
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-gray);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
}

.hero .overlay {
    background-color: rgba(0, 0, 0, 0.3); /* طبقة شفافة لتوضيح النص */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-delay: 0.5s;
    opacity: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: #d63d2c;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.7s ease;
    transform: translate(-50%, -50%) scale(0);
}

.btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 50px;
    color: var(--dark-gray);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: var(--primary-color);
    border-radius: 5px;
    animation: pulse 2s infinite ease-in-out;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    padding: 0;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.service-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 20px;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.service-content p {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 20px;
}

/* Clients Section */
.clients-section {
    background-color: #f7f9fc;
    padding: 60px 0;
    text-align: center;
}

.client-logos-container {
    overflow: hidden;
    white-space: nowrap;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.client-logos-wrapper {
    display: inline-block;
    animation: scroll-logos 30s linear infinite;
}

.client-logo {
    display: inline-block;
    width: 150px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    margin: 0 30px;
    transition: transform 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.7;
    vertical-align: middle;
}

.client-logo:hover {
    transform: scale(1.1);
    filter: grayscale(0%);
    opacity: 1;
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
}

/* About Section */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 25px;
}

.about-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Select Styling */
.form-group label {
    color: #0d47a1;
    margin-bottom: 10px;
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="%230d47a1" d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

select:focus {
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.2);
    outline: none;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 1.8;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section .social-icons a {
    font-size: 1.5rem;
    margin-left: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}
/* Responsive */
@media (max-width: 992px) {
    .nav-menu {
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1; /* Image on top for mobile */
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 20px;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 2.5rem !important; /* استخدام !important لضمان تطبيق النمط */
    }

    .hero p {
        font-size: 1rem !important; /* استخدام !important لضمان تطبيق النمط */
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-card {
        padding: 25px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem !important; /* استخدام !important لضمان تطبيق النمط */
    }

    .hero p {
        font-size: 0.9rem !important; /* استخدام !important لضمان تطبيق النمط */
    }

    .btn {
        padding: 10px 25px;
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card h3 {
        font-size: 1.5rem;
    }
}

/* Keyframes for Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scaleX(1);
    }
    50% {
        transform: translateX(-50%) scaleX(1.1);
    }
    100% {
        transform: translateX(-50%) scaleX(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}