/* blog/blog.css */

/* Blog Home Page Specific Styles */
.blog-home-page {
    padding: 20px 0;
}

.welcome-box {
    background-color: #f8f8f8; /* Will be overridden by gradient */
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
    background: linear-gradient(to right, #e0f7fa, #e8f5e9);
}

.welcome-box h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.welcome-box p {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.articles-list h3 {
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.article-card {
    background-color: var(--background-white);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed); /* Added shadow transition */
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: block;
}

.no-image-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Ensure placeholder image is contained */
}

.no-image-placeholder img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: block;
    opacity: 0.7;
}

.article-card h4 {
    margin: 15px;
    font-size: 1.2em;
    line-height: 1.4;
    flex-grow: 1;
    color: var(--primary-color);
}

.article-card .article-summary {
    color: var(--muted-text);
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0 15px 10px 15px;
}

.article-card .article-date {
    color: var(--muted-text);
    font-size: 0.8em;
    margin: 0 15px 15px 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    text-align: inherit; /* Inherit direction from HTML tag */
}

.no-articles {
    text-align: center;
    grid-column: 1 / -1;
    color: var(--muted-text);
    font-size: 1.1rem;
    padding: 30px;
    background-color: var(--background-white);
    border-radius: 10px;
    border: 1px dashed var(--border-color);
}

/* Article Page Specific Styles */
.article-page {
    padding-top: 20px;
}

.article-content-wrapper {
    background-color: var(--background-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-light);
    margin-bottom: 40px;
}

.article-content-wrapper h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.article-meta {
    color: var(--muted-text);
    font-size: 0.95rem;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-body h2, .article-body h3, .article-body h4 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-body p {
    margin-bottom: 1em;
}

.article-body ul, .article-body ol {
    margin-bottom: 1em;
    padding-left: 25px;
    /* Adjust for RTL */
    padding-right: initial;
}
html[dir="rtl"] .article-body ul,
html[dir="rtl"] .article-body ol {
    padding-left: initial;
    padding-right: 25px;
}


.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

.share-buttons, .related-articles-section, .comment-section {
    background-color: var(--background-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--shadow-light);
    margin-bottom: 40px;
    text-align: center;
}

.share-buttons h3, .related-articles-section h3, .comment-section h3, .comment-section h4 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: inherit; /* Inherit direction from HTML tag */
}

.share-buttons button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-buttons button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.share-buttons button svg {
    fill: white;
    width: 18px;
    height: 18px;
}

.related-articles-section ul {
    list-style: none;
    padding: 0;
}

.related-articles-section li {
    margin-bottom: 10px;
}

.related-articles-section li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    transition: color var(--transition-speed);
}

.related-articles-section li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.comment-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.comment-section textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 120px;
    font-family: var(--font-family-sans);
    font-size: 1rem;
    color: var(--text-color);
    resize: vertical;
}

.comment-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.comment-section button[type="submit"] {
    align-self: flex-end;
    padding: 12px 30px;
    font-size: 1.1rem;
}
html[dir="rtl"] .comment-section button[type="submit"] {
    align-self: flex-start; /* Align to left in RTL */
}

.comments-list {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.comment-item {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px var(--shadow-light);
    text-align: inherit; /* Inherit direction from HTML tag */
}

.comment-item .comment-text {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.comment-item .comment-date {
    font-size: 0.85rem;
    color: var(--muted-text);
    display: block;
}

.no-comments {
    text-align: center;
    color: var(--muted-text);
    font-size: 1.1rem;
    padding: 20px;
    background-color: var(--background-light);
    border-radius: 10px;
}

/* Responsive Adjustments for blog specific elements */
@media (max-width: 768px) {
    .article-card {
        padding: 15px;
    }
    .article-card h4 {
        font-size: 1.1em;
    }
    .article-card .article-summary {
        font-size: 0.9em;
    }
    .article-content-wrapper {
        padding: 20px;
    }
    .article-content-wrapper h1 {
        font-size: 2rem;
    }
    .article-body {
        font-size: 1rem;
    }
    .share-buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
}
@media (max-width: 600px) {
    .welcome-box h2 {
        font-size: 1.8rem;
    }
    .welcome-box p {
        font-size: 1rem;
    }
    .articles-list h3 {
        font-size: 1.5rem;
    }
    .article-card h4 {
        font-size: 1em;
    }
    .comment-section h3, .comment-section h4 {
        font-size: 1.5rem;
    }
    .comment-section button[type="submit"] {
        width: 100%;
        align-self: center;
    }
}
/* blog/blog.css - Pagination Styles */

.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination ul {
    list-style: none;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 8px; /* Space between pagination items */
    justify-content: center;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span.dots {
    display: block;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--background-white);
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
    font-weight: 500;
    min-width: 40px; /* Ensure consistent width */
}

.pagination li a:hover {
    background-color: var(--primary-color);
    color: var(--background-white);
    border-color: var(--primary-color);
}

.pagination li a.active {
    background-color: var(--primary-color);
    color: var(--background-white);
    border-color: var(--primary-color);
    font-weight: 700;
    cursor: default; /* Not clickable */
}

.pagination li a.active:hover {
    background-color: var(--primary-color); /* No change on hover for active */
    color: var(--background-white);
}

.pagination li a.prev-next {
    background-color: var(--accent-color);
    color: var(--background-white);
    border-color: var(--accent-color);
}

.pagination li a.prev-next:hover {
    background-color: #218838; /* Darker green on hover */
    border-color: #218838;
}

.pagination li span.dots {
    background-color: transparent;
    border-color: transparent;
    cursor: default;
    color: var(--muted-text);
}

/* Responsive adjustments for pagination */
@media (max-width: 600px) {
    .pagination ul {
        gap: 5px;
    }
    .pagination li a,
    .pagination li span.dots {
        padding: 8px 12px;
        font-size: 0.9em;
        min-width: 35px;
    }
}