/* =========================================================
   NEWS PAGES (listing + article detail)
   Prefix: .news-page-  (kept distinct from homepage classes
   in style.css; the shared header/nav/footer/widget classes
   there are reused as-is on these pages)
   ========================================================= */

/* =========================================================
   PAGE HEADER BAND
   ========================================================= */
.news-page-head{background:#fff; border-bottom:1px solid var(--line); padding:22px 0;}
.news-page-head h1{font-size:1.4rem; font-weight:800; color:var(--navy); margin:0;}
.news-page-head p{font-size:.85rem; color:var(--ink-soft); margin:4px 0 0;}

/* =========================================================
   FILTER BAR: category tabs + search
   ========================================================= */
.news-filter-bar{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap; background:#fff;
  border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); padding:10px 16px; margin:0 0 20px;
}
.news-tabs-pill{display:flex; gap:6px; flex-wrap:wrap;}
.news-tabs-pill button{
  border:none; background:var(--bg); color:var(--ink-soft); font-weight:700; font-size:.8rem;
  padding:8px 16px; border-radius:100px; transition:.15s ease;
}
.news-tabs-pill button.active,
.news-tabs-pill button:hover{background:var(--navy); color:#fff;}
.news-search{margin-left:auto; position:relative; max-width:240px; flex:1 1 auto;}
.news-search input{width:100%; border:1px solid var(--line); border-radius:100px; padding:8px 38px 8px 14px; font-size:.82rem; background:var(--bg);}
.news-search i{position:absolute; right:14px; top:50%; transform:translateY(-50%); color:var(--ink-soft);}

/* =========================================================
   NEWS GRID CARD
   ========================================================= */
.news-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
.news-grid-card{background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); overflow:hidden; transition:.15s ease;}
.news-grid-card:hover{box-shadow:var(--shadow-md); transform:translateY(-4px);}
.news-grid-card__img{height:150px; background-size:cover; background-position:center; position:relative;}
.news-grid-card__body{padding:14px;}
.news-grid-card__title{font-size:.9rem; font-weight:800; color:var(--ink); display:block; line-height:1.4; margin-bottom:8px; min-height:2.8em;}
.news-grid-card__title:hover{color:var(--navy);}
.news-grid-card__excerpt{font-size:.78rem; color:var(--ink-soft); margin-bottom:10px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.news-grid-card__meta{font-size:.7rem; color:var(--ink-soft); display:flex; justify-content:space-between; border-top:1px dashed var(--line); padding-top:8px;}

/* =========================================================
   PAGINATION
   ========================================================= */
.news-pagination{display:flex; justify-content:center; align-items:center; gap:6px; margin:30px 0 6px;}
.news-pagination button{
  width:36px; height:36px; border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--ink-soft);
  font-weight:700; font-size:.82rem; display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
.news-pagination button.active{background:var(--navy); color:#fff; border-color:var(--navy);}
.news-pagination button:hover:not(.active){background:var(--bg);}
.news-pagination button.nav{width:auto; padding:0 12px; gap:4px; font-size:.78rem;}

/* =========================================================
   ARTICLE DETAIL PAGE
   ========================================================= */
.article-wrap{background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); padding:26px;}
.article-category{display:inline-block; background:var(--teal); color:#fff; font-size:.68rem; font-weight:800; letter-spacing:.03em; padding:5px 12px; border-radius:100px; margin-bottom:14px;}
.article-title{font-size:1.55rem; font-weight:800; color:var(--ink); line-height:1.4; margin-bottom:12px;}
.article-meta{display:flex; flex-wrap:wrap; gap:16px; font-size:.8rem; color:var(--ink-soft); border-bottom:1px solid var(--line); padding-bottom:16px; margin-bottom:20px;}
.article-meta span{display:flex; align-items:center; gap:6px;}
.article-cover{width:100%; border-radius:var(--radius); margin-bottom:20px; height:340px; background-size:cover; background-position:center;}
.article-body{font-size:.94rem; color:var(--ink); line-height:1.85;}
.article-body p{margin-bottom:16px;}
.article-body h3{font-size:1.05rem; margin:22px 0 10px; color:var(--navy);}
.article-body blockquote{
  border-left:4px solid var(--teal); background:var(--bg); padding:14px 18px; font-style:italic; color:var(--ink-soft);
  border-radius:0 8px 8px 0; margin:18px 0;
}
.article-tags{display:flex; flex-wrap:wrap; gap:8px; margin-top:22px;}
.article-tags a{font-size:.74rem; font-weight:600; color:var(--navy); background:var(--bg); border-radius:100px; padding:6px 13px;}
.article-tags a:hover{background:var(--navy); color:#fff;}
.article-share{display:flex; align-items:center; gap:10px; margin-top:22px; padding-top:18px; border-top:1px solid var(--line);}
.article-share__label{font-size:.78rem; font-weight:700; color:var(--ink-soft);}
.article-share a{width:34px; height:34px; border-radius:50%; background:var(--bg); color:var(--ink-soft); display:flex; align-items:center; justify-content:center;}
.article-share a:hover{background:var(--navy); color:#fff;}

.related-item{display:flex; gap:12px; padding:12px 0; border-bottom:1px dashed var(--line);}
.related-item:last-child{border-bottom:none;}
.related-item__img{width:76px; height:58px; border-radius:8px; flex:0 0 auto; background-size:cover; background-position:center;}
.related-item__title{font-size:.82rem; font-weight:700; color:var(--ink); display:block; line-height:1.35;}
.related-item__title:hover{color:var(--navy);}
.related-item__date{font-size:.7rem; color:var(--ink-soft); margin-top:3px;}

/* =========================================================
   WIDGETS (Sidebar)
   ========================================================= */
.widget{background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); padding:20px; margin-bottom:22px;}
.widget__title{
  font-family:var(--font-display); font-weight:800; font-size:.95rem; color:var(--navy);
  border-bottom:2px solid var(--line); padding-bottom:12px; margin-bottom:14px;
  text-transform:uppercase; letter-spacing:.02em; display:flex; align-items:center; gap:8px;
}
.widget__title .ico{color:var(--orange);}

.cal-row{
  padding:12px 0; border-bottom:1px dashed var(--line);
  font-size:.85rem; color:var(--ink-soft); line-height:1.5;
}
.cal-row:last-child{border-bottom:none; padding-bottom:0;}
.cal-row b{color:var(--ink); font-weight:700; display:block; margin-bottom:2px;}

.contact-list{margin:0;}
.contact-list li{
  display:flex; align-items:flex-start; gap:12px; padding:12px 0; border-bottom:1px dashed var(--line);
  font-size:.85rem; color:var(--ink); line-height:1.4;
}
.contact-list li:last-child{border-bottom:none; padding-bottom:0;}
.contact-list i{color:var(--red); font-size:1.1rem; margin-top:-2px; flex:0 0 auto;}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:991.98px){
  .news-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:767.98px){
  .news-grid{grid-template-columns:1fr;}
  .news-search{max-width:100%; order:3;}
  .article-title{font-size:1.2rem;}
  .article-cover{height:200px;}
  .article-wrap{padding:18px;}
}

/* =========================================================
   COMMENTS (article detail page)
   ========================================================= */
.comments-block {
  margin-top: 30px;
  background: #fff;
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
  padding: 26px;
}

.comments-block__title-area {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.comments-block__icon {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.comments-block__heading {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comments-block__heading .count {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 12px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 700;
}

.comments-block__subtitle {
  font-size: .9rem;
  color: #64748b;
  margin: 0;
}

/* composer */
.comment-form {
  background: #f4f8ff;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
  border: 1px solid #e1effe;
}

.comment-form__heading {
  font-weight: 700;
  color: var(--navy, #1e3a8a);
  margin-bottom: 12px;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-form__heading i {
  color: #2361cf;
}

.comment-form__row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
@media (max-width: 768px) {
  .comment-form__row {
    flex-direction: column;
  }
}

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #94a3b8;
}
.input-icon-wrap .form-control {
  padding-right: 36px;
}

.comment-form .form-control {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: .88rem;
  background: #fff;
  padding: 9px 14px;
  transition: all 0.2s ease;
  width: 100%;
}

.comment-form .form-control:focus {
  border-color: #2361cf;
  box-shadow: 0 0 0 3px rgba(35, 97, 207, 0.15);
  outline: none;
}

.comment-form textarea.form-control {
  resize: vertical;
  min-height: 70px;
}
.comment-form__row .input-icon-wrap textarea ~ i {
  top: 20px;
  transform: none;
}

.comment-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.comment-form__agree {
  font-size: .85rem;
  color: var(--ink-soft, #475569);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.comment-form__agree input {
  width: 16px;
  height: 16px;
  accent-color: #2361cf;
}

.comment-form__submit {
  border: none;
  background: #2361cf;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  border-radius: 8px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.comment-form__submit:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* comment list */
.comment-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  margin-bottom: 12px;
}

.comment-item.is-reply {
  margin-left: 56px;
  background: #fdf2f2;
  border: 1px solid #fecaca;
  position: relative;
}
@media (max-width: 768px) {
  .comment-item.is-reply {
    margin-left: 20px;
  }
}

.comment-item.is-reply::before {
  content: "";
  position: absolute;
  top: -24px;
  left: -28px;
  width: 20px;
  height: 48px;
  border-left: 2px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
  border-bottom-left-radius: 8px;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 1rem;
  font-weight: 700;
  color: #2361cf;
}
.comment-item.is-official .comment-author {
  color: #b91c1c;
}

.comment-role {
  font-size: .75rem;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 600;
}
.comment-role.official {
  background: #eff6ff;
  color: #1d4ed8;
}

.comment-date {
  font-size: .75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-text {
  font-size: .95rem;
  color: var(--ink, #1e293b);
  margin: 10px 0 14px;
  line-height: 1.6;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-actions {
  display: flex;
  gap: 20px;
}

.comment-actions button {
  background: none;
  border: none;
  padding: 0;
  color: #64748b;
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.comment-actions button:hover {
  color: #2361cf;
}

.comment-actions button.liked {
  color: #2361cf;
}

.more-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
}
.more-btn:hover {
  color: var(--ink, #1e293b);
}

.comment-reply-form {
  display: none;
  margin-top: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.comment-reply-form::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #e2e8f0 transparent;
}
.comment-reply-form::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
}

.comment-reply-form.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-reply-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: .85rem;
  padding: 12px 16px;
  min-height: 70px;
  transition: all 0.2s ease;
  background: #f8fafc;
  display: block;
}
.comment-reply-form textarea:focus {
  border-color: #2361cf;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(35, 97, 207, 0.15);
  outline: none;
}

.comment-reply-form .btn-mini {
  border: none;
  background: #2361cf;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 20px;
  margin-top: 12px;
  margin-left: auto;
  display: block;
  transition: all 0.2s ease;
  cursor: pointer;
}
.comment-reply-form .btn-mini:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.comments-loadmore {
  display: inline-block;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #2361cf;
  font-weight: 600;
  font-size: .85rem;
  border-radius: 100px;
  padding: 8px 24px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.comments-loadmore:hover {
  border-color: #2361cf;
  background: #f8fafc;
}

/* AI Suggestion Block */
.ai-suggest-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
}

.ai-suggest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-title-left {
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
}
.ai-title-left i {
  color: #2563eb;
  font-size: 1.2rem;
}
.badge-beta {
  background: #fef3c7;
  color: #d97706;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 100px;
}

.ai-refresh {
  background: none;
  border: none;
  color: #2563eb;
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ai-suggest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ai-chip {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: .85rem;
  color: #334155;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ai-chip i {
  color: #2563eb;
  font-size: 1.1rem;
}
.ai-chip:hover {
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}
