/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - من اللوجو */
    --primary-blue: #1e5ba8;
    --primary-blue-dark: #0d3d73;
    --primary-blue-light: #3a7bc8;
    --primary-green: #6ab54c;
    --primary-green-dark: #4a9030;
    --primary-green-light: #85c569;
    
    /* Secondary Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #343a40;
    --black: #000000;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 50%, var(--primary-green) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: var(--spacing-sm);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-blue-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-blue);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* ==========================================
   Header & Navigation
   ========================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.navbar {
    padding: 0.5rem 0; /* تقليل padding للـ navbar */
    transition: var(--transition-normal);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    padding: 0.3rem 0; /* تقليل padding حول اللوجو */
}

.logo img {
    height: 100px; /* الحجم الحالي - لم يتغير */
    width: auto;
    transition: var(--transition-normal);
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--dark-gray);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
    background: rgba(30, 91, 168, 0.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: calc(100px + var(--spacing-xl)) var(--spacing-sm) var(--spacing-xl); /* تقليل المسافة العلوية من 160px إلى 100px */
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: cover;
}

/* صورة الخلفية الحقيقية - ضع اسم الصورة هنا مثل hero-bg.jpg */
.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/hero-bg.jpg'); /* المسار الجديد للصورة */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15; /* شفافية الصورة - يمكنك تعديلها من 0.1 إلى 0.3 */
    z-index: 0;
}

/* طبقة تعتيم إضافية للتحكم في الإضاءة */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(13, 61, 115, 0.3) 0%,
        rgba(30, 91, 168, 0.2) 50%,
        rgba(106, 181, 76, 0.2) 100%
    );
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    color: var(--white);
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    color: var(--white);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hero-description {
    color: var(--white);
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: var(--radius-xl);
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0% {
        top: 10px;
        opacity: 1;
    }
    100% {
        top: 30px;
        opacity: 0;
    }
}

/* ==========================================
   Section Styles
   ========================================== */
section {
    padding: var(--spacing-xl) var(--spacing-sm);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
}

.title-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    margin: 0 auto var(--spacing-sm);
    border-radius: var(--radius-full);
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    background: var(--light-gray);
}

.about-content {
    display: grid;
    gap: var(--spacing-lg);
}

.about-text h3 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-md);
}

.about-text p {
    color: var(--gray);
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border-top: 4px solid var(--primary-green);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

.feature-card h4 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
}

.feature-card p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ==========================================
   Services Section
   ========================================== */
.services {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-card {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
    background: var(--white);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    transition: var(--transition-normal);
}

.service-card:hover .service-icon {
    background: var(--gradient-secondary);
    transform: scale(1.1) rotate(5deg);
}

.service-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.service-card h3 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ==========================================
   Why Choose Us Section
   ========================================== */
.why-choose-us {
    background: var(--gradient-hero);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.why-choose-us::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(106, 181, 76, 0.3) 0%, transparent 50%);
}

.why-choose-us .section-title {
    color: var(--white);
}

.why-choose-us .title-divider {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-normal);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    border-color: var(--white);
}

.feature-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: var(--spacing-xs);
}

.feature-item h3 {
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.feature-item p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact {
    background: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.contact-item h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
}

.contact-item p {
    color: var(--gray);
    margin-bottom: 0;
}

.contact-item a {
    color: var(--primary-green);
    font-weight: 600;
}

.contact-item a:hover {
    color: var(--primary-green-dark);
    text-decoration: underline;
}

.contact-cta {
    background: var(--gradient-hero);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-cta h3 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.contact-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-md);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: var(--spacing-sm);
    filter: brightness(0) invert(1);
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-links a,
.footer-contact li,
.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--primary-green-light);
    padding-right: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.8;
}

.footer-bottom a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-bottom a:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.footer-bottom font[color="#6ab54c"] {
    font-weight: 700;
    text-shadow: 0 0 10px rgba(106, 181, 76, 0.3);
}

/* ==========================================
   Floating Contact Buttons
   ========================================== */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    animation: pulse 2s infinite;
}

.floating-btn:hover {
    transform: scale(1.1);
    animation: none;
}

.phone-btn {
    background: var(--gradient-primary);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.floating-btn svg {
    width: 28px;
    height: 28px;
    color: var(--white);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-lg);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(30, 91, 168, 0.3);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md);
        transition: var(--transition-normal);
        gap: var(--spacing-sm);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-wrapper > .btn-primary {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .floating-buttons {
        right: 50%;
        transform: translateX(50%);
        flex-direction: row;
        bottom: 20px;
    }
}

@media (max-width: 640px) {
    :root {
        font-size: 14px;
    }
    
    .logo img {
        height: 85px; /* تكبير اللوجو في الموبايل من 70px إلى 85px */
    }
    
    .hero {
        padding: calc(100px + var(--spacing-md)) var(--spacing-sm) var(--spacing-md); /* تقليل المسافة العلوية */
    }
    
    section {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .services-grid,
    .about-features,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        margin: 0 auto var(--spacing-sm);
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .navbar,
    .floating-buttons,
    .scroll-indicator,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ==========================================
   Accessibility
   ========================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   Loading States
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* تطبيق الأنيميشن مباشرة على العناصر */
.service-card {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

.feature-card {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

.feature-item {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

.contact-item {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

/* تأخير تدريجي للعناصر */
.service-card:nth-child(1),
.feature-card:nth-child(1),
.feature-item:nth-child(1),
.contact-item:nth-child(1) { animation-delay: 0.1s; }

.service-card:nth-child(2),
.feature-card:nth-child(2),
.feature-item:nth-child(2),
.contact-item:nth-child(2) { animation-delay: 0.2s; }

.service-card:nth-child(3),
.feature-card:nth-child(3),
.feature-item:nth-child(3),
.contact-item:nth-child(3) { animation-delay: 0.3s; }

.service-card:nth-child(4),
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.service-card:nth-child(5) { animation-delay: 0.5s; }

.service-card:nth-child(6) { animation-delay: 0.6s; }
