/* ==================== صفحه اخبار ==================== */
.news-wrap { max-width: 1000px; margin-inline: auto; padding: 10px 0 30px; }

/* ---- سرعت‌سنج ENSO ---- */
.enso-panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 30px 20px 26px; text-align: center; margin-bottom: 30px; box-shadow: var(--shadow-sm);
}
.enso-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 4px; }
.enso-sub { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 18px; }

.gauge { position: relative; width: 320px; max-width: 100%; margin: 0 auto; }
.gauge svg { width: 100%; height: auto; overflow: visible; display: block; }

/* عقربه */
.gauge-needle {
    transform-origin: 160px 160px;
    transition: transform 1.6s cubic-bezier(.34, 1.56, .64, 1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.gauge-needle.jitter { animation: needle-jitter 2.6s ease-in-out infinite; }
@keyframes needle-jitter {
    0%, 100% { transform: rotate(var(--angle)); }
    25%      { transform: rotate(calc(var(--angle) + 0.7deg)); }
    50%      { transform: rotate(calc(var(--angle) - 0.5deg)); }
    75%      { transform: rotate(calc(var(--angle) + 0.4deg)); }
}
.gauge-hub { fill: var(--text); }
.gauge-hub-ring { fill: none; stroke: var(--accent); stroke-width: 3; }

/* عدد وسط */
.enso-value {
    display: inline-block; margin-top: -18px;
    font-size: 1.3rem; font-weight: 700; line-height: 1; letter-spacing: 1px; direction: ltr;
    background: #0b1220; color: #fff;
    padding: 8px 15px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 6px 18px rgba(0,0,0,0.4), inset 0 0 12px rgba(255,255,255,0.05);
}
.enso-state { margin-top: 8px; font-size: 1rem; font-weight: 700; }
.enso-tick { font-size: 0.7rem; fill: var(--text-muted); }




/* ---- نقطه نورانی پشت شاخص آنسو / النینو قرمز و لانینا آبی بذار دستی ---- */
.enso-title { display: inline-flex; align-items: center; gap: 9px; }
.enso-title .live-dot {
    width: 11px; height: 11px; border-radius: 50%; background: #dc2626; flex-shrink: 0;
    animation: enso-live 1.6s ease-in-out infinite;
}
@keyframes enso-live {
    0%, 100% { box-shadow: 0 0 4px 1px rgba(220,38,38,0.5); opacity: 0.65; }
    50%      { box-shadow: 0 0 13px 4px rgba(220,38,38,0.9); opacity: 1; }
}








/* ---- اخبار ---- */
.news-section-title { display: flex; align-items: center; gap: 9px; font-size: 1.25rem; margin: 6px 0 27px; }
.news-section-title .live-dot { width: 11px; height: 11px; border-radius: 50%; background: #dc2626; animation: enso-live 1.6s ease-in-out infinite; }

.news-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }

.news-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.news-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card-text { line-height: 2; color: var(--text); margin: 0; white-space: pre-wrap; }
.news-card-date {
    margin-top: auto; font-size: 0.82rem; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border);
}
.news-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* صفحه‌بندی */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font-size: 0.9rem; font-weight: 600; transition: all 0.15s ease;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }





.news-block {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px 22px; box-shadow: var(--shadow-sm);
}
.live-dot-green {
    width: 11px; height: 11px; border-radius: 50%; background: #fabc02; flex-shrink: 0;
    animation: enso-live-green 1.6s ease-in-out infinite;
}
@keyframes enso-live-green {
    0%, 100% { box-shadow: 0 0 4px 1px rgb(176, 134, 6); opacity: 0.65; }
    50%      { box-shadow: 0 0 13px 4px rgb(250, 188, 2); opacity: 1; }
}

.date-ago { color: var(--text-muted); font-weight: 600; }






/* ---- نظرات ---- */
.comments-block {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px 22px; box-shadow: var(--shadow-sm); margin-top: 26px;
}
.comments-title { display: flex; align-items: center; gap: 9px; font-size: 1.25rem; margin: 0 0 18px; }
.comments-title .live-dot-green { width: 11px; height: 11px; border-radius: 50%; background: #e7efe5; animation: enso-live-green 1.6s ease-in-out infinite; }

/* فرم ثبت نظر */
.comment-form { margin-bottom: 22px; }
.comment-form textarea {
    width: 100%; min-height: 90px; padding: 12px 14px; resize: vertical;
    font-family: inherit; font-size: 0.95rem; color: var(--text); line-height: 1.9;
    background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius);
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.comment-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.comment-form-msg { font-size: 0.85rem; }
.comment-form-msg.ok { color: #16a34a; }
.comment-form-msg.err { color: #dc2626; }
.comment-login-note {
    background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius);
    padding: 16px; text-align: center; color: var(--text-muted); margin-bottom: 22px;
}
.comment-login-note a { color: var(--accent); font-weight: 700; }

/* آیتم نظر */
.comment-item { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); }
.comment-item:first-child { border-top: none; }
.comment-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    background: var(--surface-2); border: 1px solid var(--border);
    display: grid; place-items: center; color: var(--text-muted);
}
.comment-avatar svg { width: 22px; height: 22px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.comment-name { font-weight: 700; }
.comment-time { font-size: 0.8rem; color: var(--text-muted); }
.comment-text { margin: 0; line-height: 2; white-space: pre-wrap; word-break: break-word; }
.comment-react { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.react-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px;
    color: var(--text-muted); font-size: 0.8rem; cursor: pointer; transition: all 0.15s ease;
}
.react-btn:hover { border-color: var(--accent); }
.like-btn.active { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; border-color: #16a34a; }
.dislike-btn.active { background: color-mix(in srgb, #dc2626 15%, transparent); color: #dc2626; border-color: #dc2626; }

.load-more-wrap { text-align: center; margin-top: 18px; }


.comment-name-input {
    width: 100%; min-height: 46px; padding: 0 14px; margin-bottom: 10px;
    font-family: inherit; font-size: 0.95rem; color: var(--text);
    background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius);
}
.comment-name-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }







/* ---- پنل مدیریت ---- */
.panel-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.panel-box-title { font-size: 1.1rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.panel-badge { background: #dc2626; color: #fff; font-size: 0.78rem; font-weight: 700; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; }
.panel-hint { color: var(--text-muted); font-size: 0.85rem; line-height: 1.9; margin: 8px 0; }
.panel-row { margin-bottom: 12px; }
.panel-row label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-muted); }
.panel-row input, .panel-row select, .panel-row textarea { width: 100%; padding: 10px 12px; font-family: inherit; color: var(--text); background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius); }
.panel-check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.panel-msg { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; font-size: 0.9rem; }
.panel-msg.success { background: color-mix(in srgb, #16a34a 12%, transparent); color: #16a34a; border: 1px solid color-mix(in srgb, #16a34a 30%, var(--border)); }
.panel-msg.error { background: color-mix(in srgb, #dc2626 12%, transparent); color: #dc2626; border: 1px solid color-mix(in srgb, #dc2626 30%, var(--border)); }
.panel-comment { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.panel-comment:first-of-type { border-top: none; }
.panel-comment-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: flex-start; }
.btn-mini { padding: 6px 14px; border-radius: 8px; border: none; font-family: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.btn-approve { background: #16a34a; color: #fff; }
.btn-delete { background: #dc2626; color: #fff; }



.comments-title { flex-wrap: wrap; }
.comments-tg-sep { color: var(--text-muted); }
.comments-tg-link { font-size: 0.9rem; font-weight: 600; color: #2782ad; }   /* آبی تلگرام */
.comments-tg-link:hover { text-decoration: underline; }
