:root {
    --primary: #27bcc4;
    --dark: #0f3a3c;
    --light-bg: #f7f9fa;
    --cta: #ff8a00;
    --gray-text: #6b7280;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--dark);
    background-color: #fff;
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

.english {
    font-family: 'Inter', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles - Fixed Logo Underline Issue */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    will-change: transform;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none; /* إزالة التحت خط من العنصر بأكمله */
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none; /* إزالة التحت خط من الرابط */
}

.logo img {
    height: 50px;
    width: auto;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: 0.5rem;
    text-decoration: none; /* التأكد من إزالة التحت خط */
    display: inline-block;
    vertical-align: middle; /* محاذاة عمودية مع العناصر الأخرى */
    line-height: normal; /* ضبط ارتفاع السطر */
}

/* تحسين محاذاة العناصر في الهيدر */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center; /* محاذاة العناصر في المنتصف */
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
    display: inline-block;
    vertical-align: middle; /* محاذاة عمودية */
}

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

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

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

.nav-menu a.active {
    color: var(--primary);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.phone-number {
    color: var(--dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle; /* محاذاة عمودية */
}

.phone-number:hover {
    color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    transform: translateY(0);
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(39, 188, 196, 0.2);
}

.btn-primary:hover {
    background-color: #1fa8af;
}

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

.btn-secondary:hover {
    background-color: var(--dark);
    color: white;
}

.btn-cta {
    background-color: var(--cta);
    color: white;
}

.btn-cta:hover {
    background-color: #e67a00;
}

.btn-block {
    width: 100%;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    width: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 58, 60, 0.7), rgba(15, 58, 60, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease;
}

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

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.slide-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.slide-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
}

.slide-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

/* Sections */
section {
    padding: 4rem 0;
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--dark);
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.bg-light {
    background-color: var(--light-bg);
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

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

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 600;
}

/* About */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

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

.project-image {
    height: 200px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 600;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tag {
    background-color: var(--light-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--dark);
}

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

.service-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

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

.service-icon {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
    font-size: 2rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 600;
}

.service-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.service-btn:hover {
    background-color: #1fa8af;
}

.view-more {
    text-align: center;
    margin-top: 3rem;
}

/* Contact Section - Mobile Improvements */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
}

.contact-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-item p, 
.contact-item a {
    color: var(--dark);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-form h2 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1rem;
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 188, 196, 0.2);
    outline: none;
}

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

select.form-control {
    cursor: pointer;
}

.map-placeholder {
    height: 300px;
    background-color: #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    color: var(--gray-text);
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

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

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-links h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: color 0.3s;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

/* Page Header */
.page-header {
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--gray-text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* CTA Content */
.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
    line-height: 1.3;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--gray-text);
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 180px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.process-step {
    padding: 2rem 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.process-step h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 600;
}

/* Social Links - Mobile Improvements */
.social-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.social-links h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-block;
    padding: 0.6rem 1rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.social-icon:hover {
    background-color: #1fa8af;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-slider {
        height: 500px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
        right: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-actions {
        display: none;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 200px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-form h2 {
        font-size: 1.3rem;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .social-icon {
        flex: 0 0 calc(50% - 0.5rem);
        min-width: auto;
    }
    
    .map-placeholder {
        height: 250px;
        margin-top: 1.5rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .features-grid,
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        min-width: auto;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .logo {
        margin-bottom: 0.5rem;
    }
    
    .hero-slider {
        height: 350px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 1.25rem;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .contact-form h2 {
        font-size: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-control {
        padding: 0.7rem;
    }
    
    .cta-content h2 {
        font-size: 1.4rem;
    }
    
    .social-icons {
        flex-direction: column;
    }
    
    .social-icon {
        flex: 1;
        width: 100%;
    }
    
    .map-placeholder {
        height: 200px;
    }
    
    .contact-item h3 {
        font-size: 1rem;
    }
    
    .contact-item p, 
    .contact-item a {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .contact-info,
    .contact-form {
        padding: 1rem;
        border-radius: 6px;
    }
    
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    .page-header p {
        font-size: 0.95rem;
    }
    
    .contact-form h2 {
        font-size: 1.2rem;
    }
    
    .cta-content h2 {
        font-size: 1.3rem;
    }
    
    .cta-buttons .btn {
        min-width: 100%;
    }
    
    .map-placeholder {
        height: 180px;
        font-size: 0.9rem;
    }
}

/* تحسينات إضافية للأجهزة ذات الشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .contact-info,
    .contact-form {
        padding: 0.75rem;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .contact-form h2 {
        font-size: 1.1rem;
    }
    
    .cta-content h2 {
        font-size: 1.2rem;
    }
    
    .social-icon {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .btn,
    .mobile-menu-btn,
    .hero-slider,
    .social-icons {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: 100%;
    }
}