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

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --background-color: #f4f7f6;
    --text-color: #333;
    --font-family: 'Tajawal', sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--background-color);
    direction: rtl;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #fff;
    color: var(--dark-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo img {
    display: none;
}

header .logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Hero section */
.hero {
    background: #fff;
    color: #333;
    padding: 220px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    background: url('assets/logo.png') no-repeat center;
    background-size: contain;
    animation: logoPulse 2s infinite;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.5s;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.3s;
    animation: fadeInUp 1s ease 1s;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    border-radius: 2px;
}

#about {
    background-color: #fff;
}

#about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

#services {
    background-color: var(--background-color);
}

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

.service-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.service-item h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.service-item h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.service-item h3 a:hover {
    color: #0056b3;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.feature-item h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

#contact {
    background-color: #fff;
    text-align: center;
}

#contact form {
    max-width: 600px;
    margin: 20px auto;
    text-align: right;
}

#contact form label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

#contact form input,
#contact form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
}

#contact form textarea {
    height: 100px;
    resize: vertical;
}

#contact form button {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

#contact form button:hover {
    background-color: #0056b3;
}

#contact p {
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

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

    nav ul {
        margin-top: 1rem;
    }

    nav ul li {
        margin: 0 10px;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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