/* ============================================
   BASE STYLES
   ============================================ */
body {
    margin: 0;
    font-family: Vazir, Arial, sans-serif;
    background: #f5f5f0;
    color: #2a2a2a;
}

/* ============================================
   ARTICLE HEADER
   ============================================ */
.article-header {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.8rem 1.5rem 0;
}

.article-title {
    font-family: 'A Rezvan', Vazir, sans-serif;
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    font-weight: bold;
    color: #111;
    margin: 0 0 1.3rem;
    line-height: 1.4;
    text-align: center;
}

.article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
}

.article-meta-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.meta-pill {
    font-family: Vazir, sans-serif;
    font-size: 0.92rem;
    color: #666;
    border-radius: 50px;
}

.meta-dot {
    color: #bbb;
    font-size: 0.8rem;
}

/* Share Button */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'A Rezvan', Vazir, sans-serif;
    font-size: 0.95rem;
    color: #1D9E75;
    background: #E1F5EE;
    border: none;
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.share-btn:hover {
    background: #085041;
    color: #fff;
}

/* Article Lead */
.article-lead {
    font-family: Vazir, sans-serif;
    font-size: 1.12rem;
    line-height: 1.95;
    color: #1D9E75;
    margin: 0 0 2rem;
    text-align: justify;
}

/* Hero Image */
.article-hero-img-wrap {
    max-width: 820px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}

.article-hero-img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.article-hero-img.blur {
    filter: blur(3px);
}

.no-image-spacer {
    height: 1.5rem;
}


/* ============================================
   ARTICLE CONTENT WRAPPER
   ============================================ */
.article-card {
    max-width: 820px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

/* Content Wrapper (alternative container) */
.content-wrapper {
    max-width: 820px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}


/* ============================================
   ARTICLE BODY
   ============================================ */
.article-body {
    font-family: Vazir, sans-serif;
    font-size: 1.08rem;
    line-height: 2.1;
    color: #2a2a2a;
    text-align: justify;
    text-justify: inter-word;
}

.article-body p {
    margin: 0 0 1.2rem;
}

/* Legacy body class (for compatibility) */
.body {
    font-size: 1.08rem;
    line-height: 2.1;
    font-family: Vazir, sans-serif;
    text-align: justify;
}

/* ============================================
   MARKDOWN CONTENT TYPOGRAPHY
   ============================================ */
.article-body h1,
.article-body h2,
.article-body h3 {
    font-family: 'A Rezvan', Vazir, sans-serif;
    color: #085041;
    line-height: 1.5;
    margin: 1.6rem 0 0.8rem;
}

.article-body h1 { font-size: 1.6rem; }
.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.2rem; }

.article-body strong,
.article-body b {
    color: #085041;
}

.article-body a {
    color: #1D9E75;
    text-decoration: underline;
}

.article-body ul,
.article-body ol {
    padding-right: 1.4rem;
    margin: 0 0 1.2rem;
}

.article-body li {
    margin-bottom: 0.4rem;
}

.article-body blockquote {
    border-right: 4px solid #1D9E75;
    background: #f5faf8;
    margin: 0 0 1.2rem;
    padding: 0.8rem 1.2rem;
    color: #444;
    border-radius: 0 8px 8px 0;
}

.article-body code {
    background: #f0efea;
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    font-size: 0.9em;
    direction: ltr;
    display: inline-block;
}

.article-body img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1rem 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.2rem;
    font-size: 0.95rem;
}

.article-body th,
.article-body td {
    border: 1px solid #e0e0d8;
    padding: 0.5rem 0.8rem;
    text-align: right;
}

.article-body th {
    background: #f5faf8;
    color: #085041;
}


/* ============================================
   BACK BUTTON
   ============================================ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2rem;
    font-family: 'A Rezvan', Vazir, sans-serif;
    font-size: 0.95rem;
    color: #085041;
    background: #E1F5EE;
    border: 2px solid #1D9E75;
    text-decoration: none;
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.back-btn:hover {
    background: #1D9E75;
    color: white;
    transform: translateY(-2px);
}


/* ============================================
   COMMENTS SECTION
   ============================================ */
.comments-section {
    margin-top: 2.5rem;
    padding-top: 2.2rem;
    border-top: 2px solid #E1F5EE;
}

.comments-heading {
    font-family: 'A Rezvan', Vazir, sans-serif;
    font-size: 1.3rem;
    color: #085041;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-count-badge {
    background: #E1F5EE;
    color: #085041;
    font-size: 0.85rem;
    font-family: Vazir, sans-serif;
    padding: 0.15rem 0.7rem;
    border-radius: 50px;
}

/* Comment List */
.comment-list {
    margin-bottom: 30px;
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.comment-card, .comment-item {
    background: #f9f9f5;
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    border: 1px solid #ececdf;
    list-style: none;
}

.comment-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.comment-author {
    font-family: 'A Rezvan', Vazir, sans-serif;
    font-size: 0.95rem;
    color: #085041;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1D9E75;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'A Rezvan', sans-serif;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }

.comment-date {
    font-family: Vazir, sans-serif;
    font-size: 0.78rem;
    color: #999;
}

.comment-body {
    font-family: Vazir, sans-serif;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.8;
    margin: 0;
}

.no-comments {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
    font-family: Vazir, sans-serif;
    font-size: 0.95rem;
    background: #f9f9f5;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}


/* ============================================
   COMMENT FORM
   ============================================ */
.comment-form-wrap, .comment-form {
    margin-top: 1.8rem;
    background: #fff;
    border: 1.5px solid #E1F5EE;
    border-radius: 14px;
    padding: 1.5rem;
}

.comment-form-title {
    font-family: 'A Rezvan', Vazir, sans-serif;
    font-size: 1.05rem;
    color: #085041;
    margin: 0 0 1rem;
}

.form-group {
    margin-bottom: 0.9rem;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    font-family: Vazir, sans-serif;
    font-size: 0.95rem;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.2s;
    margin-bottom: 0.9rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #1D9E75;
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
}

.comment-form textarea {
    min-height: 100px;
}

.comment-form button,
.comment-form input[type="submit"],
.submit-comment {
    font-family: 'A Rezvan', Vazir, sans-serif;
    font-size: 1rem;
    background: #085041;
    color: #fff;
    border: none;
    padding: 0.65rem 1.8rem;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form button:hover,
.comment-form input[type="submit"]:hover,
.submit-comment:hover {
    background: #1D9E75;
}


/* ============================================
   ALERT MESSAGES
   ============================================ */
.form-message {
    font-family: Vazir, sans-serif;
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.form-message.success {
    background: #E1F5EE;
    color: #085041;
}

.form-message.error {
    background: #fdeaea;
    color: #b3261e;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .article-header { padding: 2rem 1rem 0; }
    .article-card { padding: 0 1rem; }
    .content-wrapper { max-width: 95%; padding: 20px; margin: 20px auto; }
    .article-title { font-size: clamp(1.4rem, 5vw, 2rem); }
    .article-body { font-size: 0.98rem; line-height: 1.9; }
    .article-lead { font-size: 1rem; }
    .article-hero-img { max-height: 260px; border-radius: 12px; }
    .article-meta-row { flex-direction: column; align-items: flex-start; }
    .comment-form-wrap, .comment-form { padding: 1.1rem; }
    .comment-card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .comments-heading { font-size: 1.1rem; }
    .back-btn { font-size: 0.9rem; padding: 0.5rem 1.4rem; }
}

@media (max-width: 480px) {
    .article-title { font-size: 1.3rem; }
    .article-body { font-size: 0.9rem; }
    .article-hero-img { max-height: 200px; }
    .content-wrapper { padding: 15px; }
    .comment-form input, .comment-form textarea { font-size: 0.85rem; padding: 0.6rem 0.8rem; }
    .comment-form button, .submit-comment { width: 100%; justify-content: center; }
}
