/* ملف single-article.css */

/* تنسيق رأس المقال */
.article-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 7rem 0 3rem;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.article-meta a, .article-meta span {
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-articles {
    text-decoration: none;
    transition: 0.3s;
}

.back-to-articles:hover {
    color: #fff;
    text-decoration: underline;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    max-width: 800px;
}

/* هيكل مساحة المقال */
.article-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

/* تنسيق محتوى المقال الرئيسي */
.article-main {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.article-main-image {
    margin: -2.5rem -2.5rem 2rem;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.article-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-intro {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.7;
    border-right: 3px solid var(--primary-color);
    padding-right: 1.5rem;
}

.article-main h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 2.5rem 0 1.2rem;
    position: relative;
}

.article-main h3 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
}

.article-main p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-image {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-image figcaption {
    background: #f5f5f5;
    padding: 1rem;
    text-align: center;
    font-style: italic;
    color: #666;
}

/* تنسيق مربعات خاصة */
.highlight-box {
    background: #f8f9fa;
    border-right: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
}

.highlight-box h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.highlight-box ul {
    margin: 1rem 0 0 1.5rem;
}

blockquote {
    font-style: italic;
    border-right: 3px solid var(--secondary-color);
    padding-right: 1.5rem;
    margin: 2rem 0;
    color: #555;
    font-size: 1.1rem;
}

.data-visualization {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.chart {
    margin-top: 1.5rem;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.bar-label {
    width: 180px;
    font-weight: bold;
}

.bar-value {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
    border-radius: 5px;
    text-align: left;
    min-width: 40px;
}

.article-list {
    margin: 1.5rem 0 1.5rem 1.5rem;
}

.article-list li {
    margin-bottom: 1rem;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin: 2.5rem 0;
    text-align: center;
}

.cta-box h3 {
    color: white;
    margin-top: 0;
}

.cta-box .cta-btn {
    display: inline-block;
    margin-top: 1rem;
    background: white;
    color: var(--primary-color);
    font-weight: bold;
}

.article-tags {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
}

.article-tags span {
    font-weight: bold;
}

.article-tags a {
    background: #f5f5f5;
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.article-tags a:hover {
    background: var(--primary-color);
    color: white;
}

/* تنسيق الشريط الجانبي */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-block {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sidebar-block h3 {
    margin-top: 0;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    border-bottom: 2px solid #f5f5f5;
    padding-bottom: 0.8rem;
}

.author-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h4 {
    margin: 0 0 0.5rem;
    color: var(--secondary-color);
}

.author-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-articles li {
    margin-bottom: 1.2rem;
}

.related-articles li:last-child {
    margin-bottom: 0;
}

.related-articles a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: 0.3s;
}

.related-articles a:hover {
    color: var(--primary-color);
}

.related-articles img {
    width: 80px;
    height: 60px;
    border-radius: 5px;
    object-fit: cover;
}

.related-articles span {
    font-size: 0.95rem;
    line-height: 1.4;
}

.cta-widget {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.cta-widget h3, .cta-widget p {
    color: white;
}

.cta-widget .cta-btn {
    background: white;
    color: var(--primary-color);
    margin-top: 1rem;
    font-weight: bold;
}

/* تنسيق تنقل المقالات */
.article-navigation {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.nav-btn {
    background: white;
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* تنسيق قسم النشرة البريدية */
.article-newsletter {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.newsletter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

.newsletter-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.newsletter-content .form-row {
    display: flex;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.newsletter-content input {
    flex: 1;
    border: none;
    font-size: 1rem;
}

.subscribe-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.subscribe-btn:hover {
    background: #6d1010;
}

/* التصميم المتجاوب */
@media (max-width: 992px) {
    .article-wrapper {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        order: -1;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .article-main {
        padding: 1.5rem;
    }
    
    .article-main-image {
        margin: -1.5rem -1.5rem 1.5rem;
    }
    
    .article-header {
        padding: 6rem 0 2rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .bar-label {
        width: 140px;
    }
    
    .newsletter-content .form-row {
        flex-direction: column;
    }
    
    .newsletter-content input,
    .subscribe-btn {
        width: 100%;
    }
}