/* ============================================
   استایل صفحات وبلاگ (blog.css)
   ============================================ */

/* ---------- هدر صفحه وبلاگ ---------- */
.blog-header {
    text-align: center;
    margin-bottom: 2rem;
}

.blog-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- کارت مقاله (لیست مقالات) ---------- */
.blog-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(107, 219, 60, 0.2);
}

.blog-card:hover {
    transform: translateY(-3px);
    background: rgba(107, 219, 60, 0.1);
    border-color: #6bdb3c;
}

.blog-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
}

.blog-title {
    color: #6bdb3c;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.blog-title a {
    color: #6bdb3c;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-title a:hover {
    color: #5bbd30;
    text-decoration: underline;
}

.blog-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.blog-meta span {
    margin-left: 1rem;
}

.blog-category {
    background: rgba(107, 219, 60, 0.2);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #6bdb3c;
    text-decoration: none;
}

.blog-category:hover {
    background: #6bdb3c;
    color: #000;
}

.blog-excerpt {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.read-more {
    color: #6bdb3c;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: #5bbd30;
    transform: translateX(-4px);
}

/* ---------- سایدبار ---------- */
.sidebar-widget {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(107, 219, 60, 0.2);
}

.sidebar-widget h4 {
    color: #6bdb3c;
    font-size: 1rem;
    margin-bottom: 1rem;
    border-right: 3px solid #6bdb3c;
    padding-right: 10px;
}

/* جستجو */
.search-form {
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(107, 219, 60, 0.3);
    border-radius: 40px;
    color: white;
    font-size: 0.85rem;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-form input:focus {
    outline: none;
    border-color: #6bdb3c;
}

.search-form button {
    background: #6bdb3c;
    border: none;
    border-radius: 40px;
    padding: 0.3rem 0.8rem;
    margin-right: 0.5rem;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.search-form button:hover {
    background: #5bbd30;
    transform: scale(1.02);
}

/* دکمه‌های لندینگ */
.landing-buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.landing-btn {
    flex: 1;
    background: rgba(107, 219, 60, 0.15);
    border: 1px solid #6bdb3c;
    border-radius: 40px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s;
}

.landing-btn a {
    color: #6bdb3c;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: bold;
    display: block;
}

.landing-btn:hover {
    background: #6bdb3c;
    transform: translateY(-2px);
}

.landing-btn:hover a {
    color: #000;
}

/* دسته‌بندی */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list a:hover {
    color: #6bdb3c;
    transform: translateX(-3px);
}

.category-count {
    color: #6bdb3c;
    font-size: 0.7rem;
    background: rgba(107, 219, 60, 0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
}

/* نوشته‌های تازه */
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.recent-posts a:hover {
    color: #6bdb3c;
}

.recent-date {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-top: 0.2rem;
}

/* برچسب‌ها */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(107, 219, 60, 0.2);
    border: 1px solid rgba(107, 219, 60, 0.3);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background: #6bdb3c;
    color: #000;
}

/* ---------- صفحه‌بندی ---------- */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(107, 219, 60, 0.3);
    color: white;
    margin: 0 0.2rem;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background: #6bdb3c;
    color: #000;
}

.pagination .active .page-link {
    background: #6bdb3c;
    color: #000;
    border-color: #6bdb3c;
}

.pagination .disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- صفحه نمایش مقاله (post_detail) ---------- */
.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-title {
    color: #6bdb3c;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.post-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.post-content {
    background: rgba(24, 45, 97, 0.75) !important;
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content h2, 
.post-content h3, 
.post-content h4 {
    color: #6bdb3c;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.post-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* مقالات مرتبط */
.related-posts {
    margin-top: 3rem;
}

.related-title {
    color: #6bdb3c;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.related-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 0.8rem;
    transition: all 0.3s;
    height: 100%;
}

.related-card:hover {
    background: rgba(107, 219, 60, 0.1);
    transform: translateY(-3px);
}

.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.related-card a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    text-align: center;
}

.related-card a:hover {
    color: #6bdb3c;
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 768px) {
    .blog-card .row {
        flex-direction: column;
    }
    
    .blog-image {
        margin-bottom: 0.8rem;
        height: 140px;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .landing-buttons {
        flex-direction: column;
    }
}