/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    text-align: right;
}

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

/* الهيدر */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
    padding: 15px 0;
}

.header.hidden {
    transform: translateY(-100%);
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.header.scrolled .header-background {
    opacity: 0.1;
}

.header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* قسم الشعار */
.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0;
}

/* التنقل */
.navigation {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid transparent;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nav-link i {
    font-size: 1.2rem;
}

.nav-link span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* أزرار التواصل في الهيدر */
.contact-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.call-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.call-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.whatsapp-btn {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
}

.whatsapp-btn:hover {
    background: linear-gradient(45deg, #128C7E, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* القسم الرئيسي */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 350px 0 100px; /* زيادة المساحة العلوية لتجنب تداخل الهيدر */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* الأقسام العامة */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* قسم من نحن */
.about-section {
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

.about-features {
    display: grid;
    gap: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2.5rem;
    color: #667eea;
    min-width: 60px;
}

.feature h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.feature p {
    color: #666;
    margin: 0;
}

/* قسم الخدمات */
.services-section {
    background: white;
}

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

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.service-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* قسم المنتجات */
.products-section {
    background: #f8f9fa;
}

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

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    padding: 20px 20px 10px;
    margin: 0;
}

.product-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    padding: 15px 20px;
    margin: 0 20px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-order-btn:hover {
    background: linear-gradient(45deg, #128C7E, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* قسم اتصل بنا */
.contact-section {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: grid;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #667eea;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.contact-item i {
    font-size: 2rem;
    color: #667eea;
    min-width: 50px;
}

.contact-item:hover i {
    color: white;
}

.contact-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-item p {
    margin: 0;
    opacity: 0.8;
}

.contact-buttons-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-decoration: none;
    padding: 20px 30px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.call-main-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.call-main-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.whatsapp-main-btn {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
}

.whatsapp-main-btn:hover {
    background: linear-gradient(45deg, #128C7E, #25D366);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

/* الفوتر */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.8;
}

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

.footer-section ul li {
    padding: 5px 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section ul li:hover {
    opacity: 1;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* الأزرار العائمة */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.call-floating-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.whatsapp-floating-btn {
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* التجاوب للشاشات المتوسطة */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .navigation {
        order: 3;
        width: 100%;
        justify-content: space-around;
    }
    
    .nav-link {
        flex: 1;
        min-width: 0;
    }
    
    .nav-link span {
        font-size: 0.8rem;
    }
    
    .contact-buttons {
        order: 2;
        justify-content: center;
    }
    
    .hero-section {
        padding: 320px 0 80px; /* تقليل المساحة قليلاً للشاشات المتوسطة */
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-buttons {
        left: 20px;
        bottom: 20px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* التجاوب للشاشات الصغيرة */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .company-name {
        font-size: 1.2rem;
    }
    
    .hero-section {
        padding: 280px 0 80px; /* مساحة مناسبة للشاشات الصغيرة */
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .service-card,
    .product-card {
        margin: 0 10px;
    }
    
    .contact-main-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
}

/* تحسينات إضافية للأداء */
.product-image,
.logo {
    will-change: transform;
}

.floating-btn {
    will-change: transform, box-shadow;
}

/* تأثيرات التحميل */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تحسين الطباعة */
@media print {
    .header,
    .floating-buttons {
        display: none;
    }
    
    .hero-section {
        background: none;
        color: #333;
    }
    
    .btn {
        border: 2px solid #333;
        color: #333;
        background: none;
    }
}

