/* =========================================
   🏆 تصميم قسم المقارنة (Comparison Section)
   ========================================= */

/* =========================================
   1. إطار القسم العام
   ========================================= */
.why-us-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fd 100%);
    position: relative;
    overflow: hidden;
}

/* خلفية زخرفية خفيفة */
.why-us-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 86, 145, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 174, 239, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.why-us-section .container {
    position: relative;
    z-index: 1;
}

/* =========================================
   2. ترويسة القسم
   ========================================= */
.why-us-section .section-header {
    margin-bottom: 50px;
}

.why-us-section .section-subtitle {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.why-us-section .section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 86, 145, 0.1);
}

.why-us-section .section-header p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-light);
}

/* =========================================
   3. حاوية جدول المقارنة
   ========================================= */
.comparison-table-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 86, 145, 0.15);
    border: 2px solid rgba(0, 86, 145, 0.1);
    position: relative;
    overflow: hidden;
}

/* تأثير الزخرفة */
.comparison-table-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================
   4. جدول المقارنة المخصص
   ========================================= */
.comparison-table-wrapper table.comparison {
    box-shadow: none;
    border: none;
    border-radius: 0;
    margin: 0;
}

.comparison-table-wrapper thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px 12px 0 0;
}

.comparison-table-wrapper th {
    padding: 20px;
    font-size: 18px;
    font-weight: 800;
    border-bottom: none;
}

.comparison-table-wrapper th:first-child {
    border-radius: 12px 0 0 0;
}

.comparison-table-wrapper th:last-child {
    border-radius: 0 12px 0 0;
}

/* تمييز عمود عنادل الخير */
.comparison-table-wrapper th:nth-child(2) {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    position: relative;
}

.comparison-table-wrapper th:nth-child(2)::after {
    content: '🏆';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 24px;
    animation: bounce 2s ease infinite;
}

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

.comparison-table-wrapper tbody tr {
    border-bottom: 1px solid #e8eef4;
    transition: all 0.3s ease;
}

.comparison-table-wrapper tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.01);
}

.comparison-table-wrapper td {
    padding: 18px 20px;
    font-size: 16px;
    border-right: 1px solid #e8eef4;
}

.comparison-table-wrapper td:last-child {
    border-right: none;
}

/* تمييز عمود عنادل الخير */
.comparison-table-wrapper td:nth-child(2) {
    background: linear-gradient(135deg, rgba(0, 174, 239, 0.05) 0%, rgba(0, 119, 163, 0.05) 100%);
    font-weight: 700;
    color: var(--primary-dark);
    position: relative;
}

.comparison-table-wrapper td:nth-child(2)::before {
    content: '✓';
    position: absolute;
    left: 10px;
    color: #2ecc71;
    font-weight: 900;
    font-size: 18px;
}

/* تقليل جودة المنافسين */
.comparison-table-wrapper td:nth-child(3) {
    color: var(--text-light);
    font-style: italic;
}

.comparison-table-wrapper td:nth-child(3)::before {
    content: '✗';
    position: absolute;
    left: 10px;
    color: #e74c3c;
    font-weight: 900;
    font-size: 18px;
}

/* =========================================
   5. رسالة CTA
   ========================================= */
.comparison-cta {
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 15px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 86, 145, 0.2);
    position: relative;
    overflow: hidden;
}

.comparison-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.comparison-cta p {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.comparison-cta .btn-main {
    background: #fff;
    color: var(--primary-dark);
    border: none;
    position: relative;
    z-index: 1;
}

.comparison-cta .btn-main:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* =========================================
   6. Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .why-us-section .section-title {
        font-size: 28px;
    }
    
    .why-us-section .section-header p {
        font-size: 16px;
    }
    
    .comparison-table-wrapper {
        padding: 20px;
        border-radius: 15px;
    }
    
    .comparison-table-wrapper th {
        padding: 15px;
        font-size: 14px;
    }
    
    .comparison-table-wrapper td {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .comparison-cta {
        padding: 20px;
    }
    
    .comparison-cta p {
        font-size: 16px;
    }
}

/* =========================================
   7. تحسينات للطباعة
   ========================================= */
@media print {
    .why-us-section {
        background: #fff !important;
    }
    
    .why-us-section::before {
        display: none;
    }
    
    .comparison-table-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .comparison-table-wrapper thead {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .comparison-table-wrapper th:nth-child(2) {
        background: #e8f4fd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* =========================================
   📚 تصميم قسم الأرشيف المختصر (Archive Preview)
   ========================================= */
.archive-preview-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fd 100%);
    position: relative;
    overflow: hidden;
}

.archive-preview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 25%, rgba(0, 86, 145, 0.02) 25%, rgba(0, 86, 145, 0.02) 50%, transparent 50%, transparent 75%, rgba(0, 86, 145, 0.02) 75%, rgba(0, 86, 145, 0.02));
    background-size: 60px 60px;
    pointer-events: none;
}

.archive-preview-section .container {
    position: relative;
    z-index: 1;
}

.archive-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.preview-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 86, 145, 0.08);
    border: 1px solid rgba(0, 86, 145, 0.1);
    transition: all 0.3s ease;
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 86, 145, 0.15);
}

.preview-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.preview-item:hover .preview-image img {
    transform: scale(1.1);
}

.preview-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 86, 145, 0.3);
}

.preview-item.type-post .preview-type-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.preview-item.type-services .preview-type-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.preview-item.type-coverage .preview-type-badge {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.preview-item.type-offer .preview-type-badge {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.preview-content {
    padding: 20px;
}

.preview-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.preview-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.preview-title a:hover {
    color: var(--secondary-color);
}

.preview-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 48px;
}

.preview-meta {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e8eef4;
}

.preview-date {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.preview-date .dashicons {
    font-size: 14px;
}

@media (max-width: 768px) {
    .archive-preview-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .preview-image {
        height: 160px;
    }
}
