/* MHSI CMS — public styles for CMS-driven blocks (uses the site's own colour tokens) */

/* ── News cards ───────────────────────────── */
.news-section { background: var(--light); }
.news-card { display: block; color: inherit; }
.news-thumb--empty {
  background: linear-gradient(135deg, var(--primary-d), var(--primary) 60%, var(--accent));
  display: flex; align-items: center; justify-content: center;
}
.news-thumb--empty > i { font-size: 3rem; color: rgba(255,255,255,.28); }
.news-badge--event { background: var(--gold-d); }
.news-badge--admission { background: var(--gold); color: var(--dark); }
.news-badge--vacancy { background: var(--mid); }
.news-pin {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--dark); display: flex; align-items: center; justify-content: center; font-size: .72rem;
}
.news-more { margin-left: auto; color: var(--primary); font-weight: 600; }
.news-card .course-desc { min-height: 3.4em; }
.news-filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.news-filters .filter-btn {
  padding: 7px 18px; border-radius: 50px; border: 2px solid var(--border); background: var(--white);
  color: var(--muted); font-size: .8rem; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; transition: all .2s;
}
.news-filters .filter-btn:hover, .news-filters .filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.news-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.news-empty i { font-size: 2.6rem; color: var(--gold); margin-bottom: 14px; display: block; }
.news-empty p { margin-bottom: 18px; }
.news-pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.news-pager a {
  min-width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border); color: var(--muted); font-weight: 600; font-size: .85rem;
}
.news-pager a.active, .news-pager a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.news-section .fade-up, .post-section .fade-up { opacity: 1; transform: none; }

/* ── Single post ───────────────────────────── */
.post-hero-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem !important; }
.post-hero-meta i { color: var(--gold-l); margin-right: 4px; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.post-article { background: var(--white); }
.post-cover { width: 100%; border-radius: 16px; margin-bottom: 28px; box-shadow: var(--shadow); max-height: 480px; object-fit: cover; }
.post-lead { font-size: 1.12rem; line-height: 1.75; color: var(--mid); margin-bottom: 22px; font-weight: 500; }
.post-body { font-size: .98rem; line-height: 1.85; color: var(--text); }
.post-body p, .post-body ul, .post-body ol, .post-body blockquote, .post-body table, .post-body figure { margin-bottom: 18px; }
.post-body h2, .post-body h3, .post-body h4 { color: var(--dark); margin: 30px 0 12px; }
.post-body h2 { font-size: 1.7rem; } .post-body h3 { font-size: 1.4rem; }
.post-body ul { list-style: disc; padding-left: 22px; } .post-body ol { padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body a { color: var(--primary); text-decoration: underline; }
.post-body img { border-radius: 12px; margin: 10px 0; height: auto; }
.post-body blockquote { border-left: 4px solid var(--gold); padding: 10px 18px; background: var(--cream); border-radius: 0 8px 8px 0; font-style: italic; }
.post-body table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.post-body th { background: var(--light); }
.post-body iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 12px; }
.post-preview-note { background: #FFF6E0; border: 1px solid var(--gold); color: var(--gold-d); padding: 12px 16px; border-radius: 10px; margin-bottom: 22px; font-size: .88rem; }
.post-share { display: flex; align-items: center; gap: 10px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.post-share a { width: 36px; height: 36px; border-radius: 50%; background: var(--light); color: var(--primary); display: flex; align-items: center; justify-content: center; transition: all .2s; }
.post-share a:hover { background: var(--primary); color: #fff; }
.post-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; }
.post-box { background: var(--light); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.post-box--gold { background: #FFF8EA; border-color: rgba(201,148,58,.35); }
.post-box h4 { font-size: 1.15rem; color: var(--dark); margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.post-box h4 i { color: var(--primary); font-size: .9rem; }
.post-box p { font-size: .88rem; color: var(--text); line-height: 1.7; margin-bottom: 8px; }
.post-box p strong { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.post-box a { color: var(--primary); }
.post-more li { border-bottom: 1px solid var(--border); }
.post-more li:last-child { border-bottom: 0; }
.post-more a { display: block; padding: 10px 0; font-size: .86rem; color: var(--dark); font-weight: 500; line-height: 1.4; }
.post-more a:hover { color: var(--primary); }
.post-more span { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; gap: 32px; }
  .post-aside { position: static; }
}
@media (max-width: 1024px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .news-grid { grid-template-columns: 1fr; } }

/* ── Announcement ribbon ───────────────────── */
.cms-announce {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 900;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px;
  border-radius: 50px; box-shadow: 0 12px 40px rgba(28,5,5,.28); font-size: .86rem;
  width: max-content; max-width: calc(100% - 32px); animation: cmsAnnIn .5s ease both;
}
.cms-announce[hidden] { display: none; }
.cms-announce--gold { background: var(--gold); color: var(--dark); }
.cms-announce--red { background: var(--primary); color: #fff; }
.cms-announce--dark { background: var(--dark); color: #fff; }
.cms-announce-icon { opacity: .8; }
.cms-announce-text { font-weight: 500; line-height: 1.35; }
.cms-announce-btn {
  white-space: nowrap; font-weight: 700; font-size: .78rem; padding: 7px 14px; border-radius: 50px;
  background: rgba(0,0,0,.14); color: inherit; display: inline-flex; gap: 6px; align-items: center;
}
.cms-announce--gold .cms-announce-btn { background: var(--dark); color: #fff; }
.cms-announce-close { background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; font-size: .9rem; }
.cms-announce-close:hover { opacity: 1; background: rgba(0,0,0,.1); }
@keyframes cmsAnnIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) {
  .cms-announce { border-radius: 14px; flex-wrap: wrap; bottom: 12px; padding: 12px 14px; gap: 8px 10px; }
  .cms-announce-text { flex: 1 1 70%; }
  .cms-announce-close { position: absolute; top: 4px; right: 4px; }
}
