/* Base Styles */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; 
    line-height: 1.6; 
    color: #333; 
    background: #f8f9fa; 
}
.rtl {
    direction: rtl !important;
}
.right {
    text-align: right !important    ;
}
/* Header */
header { 
    background: linear-gradient(135deg, #2c3e50, #3498db); 
    color: white; 
    padding: 2rem 0; 
    text-align: center; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 { 
    font-size: 2.5rem; 
    margin-bottom: 0.5rem; 
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation */
nav { 
    padding: 1rem 0; 
    background: #34495e; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

nav a { 
    color: white; 
    text-decoration: none; 
    padding: 0.5rem 1rem; 
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover { 
    background: #2c3e50; 
}

/* Main Content */
main { 
    max-width: 1200px; 
    margin: 2rem auto; 
    padding: 0 1rem; 
}

/* Posts Grid */
.posts-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 2rem; 
}

.post-card { 
    background: white; 
    padding: 1.5rem; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.post-card h2 { 
    margin-bottom: 0.5rem; 
    font-size: 1.2rem;
    line-height: 1.4;
}

.post-card a { 
    color: #2c3e50; 
    text-decoration: none; 
    display: block;
}

.post-card a:hover { 
    color: #3498db; 
}

.post-card time { 
    color: #7f8c8d; 
    font-size: 0.9rem; 
    font-weight: 500;
}

.post-card p { 
    margin: 1rem 0; 
    color: #555; 
    line-height: 1.5;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
}

.post-meta span {
    color: #7f8c8d;
}

/* Post Detail Page */
.post-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.post-header {
    background: #f8f9fa;
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.post-header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-header .post-meta {
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 0;
    margin: 0;
}

.post-stats {
    display: flex;
    gap: 1.5rem;
}

/* Content Area */
.content { 
    padding: 2rem;
    line-height: 1.8;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.content p {
    margin-bottom: 1rem;
}

.content h1, .content h2, .content h3 {
    color: #2c3e50;
    margin: 1.5rem 0 1rem 0;
}

.content strong {
    color: #2c3e50;
}

/* Footer */
footer { 
    text-align: center; 
    padding: 2rem; 
    color: #7f8c8d; 
    background: white;
    margin-top: 2rem;
    border-top: 1px solid #e9ecef;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-stats {
        gap: 1rem;
    }
    
    .post-header {
        padding: 1.5rem;
    }
    
    .content {
        padding: 1.5rem;
    }
}
