:root {
    --primary-color: #8B4513; /* بني داكن */
    --secondary-color: #DAA520; /* ذهبي/أصفر غامق */
    --accent-color: #CD853F; /* برتقالي محمر/بني فاتح */
    --light-color: #FFF8DC; /* أبيض كريمي / Cornsilk */
    --dark-color: #5D4037; /* بني غامق جدا */
    --text-color: #4a4a4a; /* لون نص عام أغمق قليلاً للقراءة */
    --white: #fff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.8; /* زيادة مسافة الأسطر لتحسين القراءة */
    color: var(--text-color); /* استخدام لون نص أغمق */
    background: linear-gradient(to bottom, #f9f5eb, #f0e6d2);
    direction: rtl;
    font-size: 16px; /* حجم الخط الأساسي */
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-left: 10px;
}

.logo h1 {
    color: var(--white);
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--white);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

nav ul li a:hover {
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1574282414209-967d5ad0c8cc?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80') no-repeat center center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 70px;
    margin-bottom: 60px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Content Styles */
.content-section {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 50px;
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.content-section h3 {
    color: var(--primary-color); /* التأكد من لون العنوان */
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
}

.content-section p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.1rem; /* حجم خط الفقرات */
    color: var(--text-color); /* التأكد من لون الفقرات */
}

.content-section ul {
    list-style: disc; /* التأكد من ظهور النقاط للقوائم */
    padding-right: 20px; /* مسافة بادئة للقائمة */
    margin-bottom: 20px;
}

.content-section ul li {
    margin-bottom: 10px;
    font-size: 1.1rem; /* حجم خط عناصر القائمة */
    color: var(--text-color); /* لون خط عناصر القائمة */
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.benefit-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(139, 69, 19, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-size: 2.5rem;
    padding: 20px;
    text-align: center;
}

.benefit-content {
    padding: 25px;
    flex-grow: 1;
}

.benefit-content h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--accent-color); /* حدود خارجية للجدول */
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(139, 69, 19, 0.2); /* حدود خلايا أغمق قليلاً */
    font-size: 1rem; /* حجم خط خلايا الجدول */
    color: var(--text-color); /* لون خط الخلايا */
}

.comparison-table th {
    background-color: var(--primary-color);
    color: var(--white); /* لون نص رأس الجدول */
    font-weight: 600;
    font-size: 1.1rem;
}

.comparison-table tr:nth-child(even) {
    background-color: rgba(218, 165, 32, 0.1); /* صفوف زوجية بلون فاتح */
}

.comparison-table tr:hover {
    background-color: rgba(205, 133, 63, 0.2); /* تأثير عند المرور على الصفوف */
}

/* Usage Section */
.usage-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.usage-step {
    flex: 1;
    min-width: 250px;
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.usage-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 15px;
}

.usage-step h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Footer */
footer {
    background: linear-gradient(to bottom, var(--primary-color), #5a2d0c);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-about {
    flex: 2;
    min-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-left: 10px;
}

.footer-logo h3 {
    color: var(--white);
    font-size: 1.8rem;
}

.footer-about p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.8);
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    margin-left: 15px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary-color);
}

.footer-links {
    flex: 1;
    min-width: 150px;
}

.footer-links h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-right: 5px;
}

.partner-sites {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.partner-sites h4 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    display: inline-block; /* لجعل الخط تحت العنوان فقط */
}

.partner-links {
    display: flex;
    flex-wrap: wrap; /* للسماح بالالتفاف على أسطر متعددة */
    justify-content: center;
    gap: 15px; /* المسافة بين الروابط */
}

.partner-links a {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block; /* اجعلها كتلًا مضمنة للحفاظ على المساحة */
    margin: 5px; /* إضافة هامش خفيف حول كل رابط */
}

.partner-links a:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-about,
    .footer-links {
        min-width: unset;
        width: 100%;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-links ul {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 15px;
        justify-content: center;
    }
    
    nav ul {
        margin-top: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 25px;
    }
    
    .benefits-grid,
    .usage-steps {
        grid-template-columns: 1fr; /* عمود واحد في الشاشات الصغيرة جداً */
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px; /* تقليل التباعد في الجدول للشاشات الصغيرة */
        font-size: 0.9rem;
    }
    
    .partner-links {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .comparison-table {
        overflow-x: auto; /* إضافة شريط تمرير أفقي للجدول إذا كان عريضاً جداً */
        display: block;
        white-space: nowrap; /* منع الخلايا من الالتفاف */
    }

    /* قد تحتاج لتعديل عرض TH/TD هنا إذا أصبح الجدول صغيراً جداً */
    .comparison-table thead, .comparison-table tbody, .comparison-table tr {
        display: block;
    }
    .comparison-table td {
        display: inline-block; /* أو block لتجعل كل خلية في سطر */
        width: 100%; /* اجعل الخلية تأخذ عرض 100% إذا كانت بلوك */
        box-sizing: border-box;
    }
}