/* ================================================
   Single Articles Template Styles
   RTL-aware styling for article layout
   ================================================ */

/* Main Articles Wrapper */
.single-articles-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 15px;
}

.single-articles-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Article Header / Title */
.articles-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #31B978;
}

.articles-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Featured Image */
.articles-featured-image {
    margin-bottom: 35px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
    height: auto;
}

.articles-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 600px;
    margin: 0 auto;
}

/* Metadata Grid Section */
.articles-metadata {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 35px;
    border-right: 4px solid #31B978;
}

.articles-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 0;
}

.articles-meta-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-right: 3px solid #B19D67;
    transition: all 0.3s ease;
}

.articles-meta-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.articles-meta-item .meta-label {
    font-size: 12px;
    font-weight: 700;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.articles-meta-item .meta-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Excerpt Section */
.articles-excerpt-section {
    background: #f0fdf8;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 35px;
    border-right: 4px solid #31B978;
}

.articles-excerpt-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
}

.articles-excerpt-title::before {
    content: "📄";
    margin-left: 10px;
    font-size: 20px;
}

.articles-excerpt {
    font-size: 15px;
    line-height: 1.8;
    color: #4a4a4a;
    margin: 0;
    text-align: justify;
}

.articles-excerpt p {
    margin: 0 0 10px 0;
}

.articles-excerpt p:last-child {
    margin-bottom: 0;
}

/* Main Content Area */
.articles-content {
    font-size: 15px;
    line-height: 1.8;
    color: #4a4a4a;
    text-align: justify;
    margin-bottom: 35px;
}

.articles-content p {
    margin-bottom: 15px;
}

.articles-content p:last-child {
    margin-bottom: 0;
}

.articles-content h2,
.articles-content h3,
.articles-content h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #1a1a1a;
    font-weight: 700;
}

.articles-content h2 {
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid #31B978;
}

.articles-content h3 {
    font-size: 18px;
}

.articles-content h4 {
    font-size: 16px;
}

.articles-content ul,
.articles-content ol {
    margin: 15px 0;
    padding-right: 20px;
}

.articles-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.articles-content blockquote {
    background: #f0fdf8;
    padding: 20px;
    border-right: 4px solid #31B978;
    margin: 20px 0;
    border-radius: 4px;
    font-style: italic;
    color: #666666;
}

/* Download Button Section */
.articles-download-section {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.articles-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #31B978 0%, #1AB69D 100%);
    color: #ffffff;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(49, 185, 120, 0.3);
    border: none;
    cursor: pointer;
    min-width: 200px;
}

.articles-download-btn:hover {
    background: linear-gradient(135deg, #1AB69D 0%, #158a7a 100%);
    box-shadow: 0 6px 20px rgba(49, 185, 120, 0.4);
    transform: translateY(-3px);
    color: #ffffff;
    text-decoration: none;
}

.articles-download-btn:active {
    transform: translateY(-1px);
}

.articles-download-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.articles-download-btn .btn-text {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .single-articles-content {
        padding: 25px;
    }

    .articles-title {
        font-size: 24px;
    }

    .articles-meta-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .articles-meta-item {
        padding: 12px;
    }

    .articles-excerpt-section,
    .articles-metadata {
        padding: 18px;
    }

    .articles-excerpt-title::before {
        margin-left: 5px;
    }

    .articles-download-btn {
        width: 100%;
        min-width: unset;
    }

    .articles-content {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .single-articles-wrapper {
        margin: 20px auto;
        padding: 0 10px;
    }

    .single-articles-content {
        padding: 18px;
        border-radius: 6px;
    }

    .articles-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .articles-title {
        font-size: 18px;
    }

    .articles-featured-image {
        margin-bottom: 25px;
        border-radius: 6px;
    }

    .articles-featured-image img {
        max-width: 450px;
    }

    .articles-metadata,
    .articles-excerpt-section {
        padding: 15px;
        margin-bottom: 25px;
    }

    .articles-meta-grid {
        gap: 10px;
    }

    .articles-meta-item {
        padding: 10px;
        border-right-width: 3px;
    }

    .articles-content h2 {
        font-size: 18px;
    }

    .articles-content h3 {
        font-size: 16px;
    }

    .articles-download-section {
        margin-top: 30px;
        padding-top: 20px;
    }

    .articles-download-btn {
        padding: 12px 25px;
        font-size: 14px;
        flex-direction: column;
    }
}

/* RTL Support (Farsi/Persian) */
[dir="rtl"] .articles-meta-item,
html[lang*="fa"] .articles-meta-item {
    border-right: 3px solid #f7b33d;
    border-left: none;
}

[dir="rtl"] .articles-meta-item,
html[lang*="fa"] .articles-meta-item {
    border-right: 3px solid #B19D67;
    border-left: none;
}

[dir="rtl"] .articles-metadata,
html[lang*="fa"] .articles-metadata {
    border-right: 4px solid #31B978;
    border-left: none;
}

[dir="rtl"] .articles-excerpt-section,
html[lang*="fa"] .articles-excerpt-section {
    border-right: 4px solid #31B978;
    border-left: none;
}

[dir="rtl"] .articles-content blockquote,
html[lang*="fa"] .articles-content blockquote {
    border-right: 4px solid #31B978;
    border-left: none;
}

[dir="rtl"] .articles-excerpt-title::before,
html[lang*="fa"] .articles-excerpt-title::before {
    margin-left: 10px;
    margin-right: 0;
}

/* Page Links Styling */
.page-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-number {
    display: inline-block;
    margin: 0 5px;
}

.page-number a {
    padding: 8px 12px;
    background: #31B978;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-number a:hover {
    background: #1AB69D;
}

.page-number.current {
    font-weight: 700;
    padding: 8px 12px;
    background: #31B978;
    color: #ffffff;
    border-radius: 4px;
    display: inline-block;
}
