* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.8;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move 20s linear infinite;
    opacity: 0.3;
}

@keyframes move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.banner h1 {
    font-size: 2.5rem;
    color: white;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease;
    max-width: 900px;
    margin: 0 auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content */
.blog-section {
    padding: 80px 20px;
    background: #f8f9fa;
}

.blog-container {
    max-width: 900px;
    margin: 0 auto;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 40px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    color: #718096;
    font-size: 0.9rem;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-text {
    font-size: 1.1rem;
    color: #4a5568;
    text-align: justify;
    line-height: 2;
}

/* Comments Section */
.comments-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 30px;
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.comment {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.comment:hover {
    background: #edf2f7;
    transform: translateX(-5px);
}

.comment-avatar-placeholder {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-author {
    font-weight: bold;
    color: #2d3748;
    font-size: 1.1rem;
}

.comment-date {
    color: #a0aec0;
    font-size: 0.9rem;
}

.comment-text {
    color: #4a5568;
    line-height: 1.8;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-size: 1.1rem;
}

/* Comment Form */
.comment-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 50px 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-item h5 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #667eea;
}

.footer-item p {
    color: #cbd5e0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .banner h1 {
        font-size: 1.8rem;
    }

    .blog-content {
        padding: 25px;
    }

    .blog-image {
        height: 250px;
    }

    .comment {
        flex-direction: column;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .comments-section,
    .comment-form {
        padding: 25px;
    }
}

/* Blog List Styles */
.blog-list-container {
    max-width: 1200px;
    margin: 0 auto;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image {
    transform: scale(1.1);
}

.post-content {
    padding: 25px;
}

.post-title {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.4;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: #718096;
    font-size: 0.85rem;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.post-excerpt {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify;
}

.read-more {
    display: inline-block;
    color: #667eea;
    font-weight: bold;
    transition: all 0.3s ease;
}

.post-card:hover .read-more {
    color: #764ba2;
    transform: translateX(-5px);
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.3rem;
    color: #718096;
}

/* Responsive for Blog List */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-image {
        height: 200px;
    }

    .post-content {
        padding: 20px;
    }

    .post-title {
        font-size: 1.3rem;
    }
}

/*------------------------*/


/* استایل پاسخ‌ها (فرزندان) با فاصله از سمت راست */
.reply-child {
    margin-right: 50px;
    border-right: 3px solid #e1e1e1;
    padding-right: 15px;
    background-color: #f9f9f9;
    border-radius: 8px 0 0 8px;
}

/* دکمه پاسخ */
.btn-reply {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-reply:hover {
    text-decoration: underline;
}

/* فرم مخفی پاسخ */
.reply-form-container {
    display: none; /* پیش‌فرض مخفی */
    margin-top: 15px;
    margin-right: 20px;
    padding: 15px;
    background: #f1f1f1;
    border-radius: 8px;
}