/* =========================================================
   GOparts.mn — Мэдээ (news.html, news-detail.html)
   Хамааралтай: style.css, pages.css
   ========================================================= */

/* ---------- Шүүлтүүр ---------- */
.filterbar {
  position: sticky; top: var(--header-h); z-index: 40;
  margin-top: clamp(28px, 4vw, 44px);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-block: 1px solid var(--line);
}
.filters {
  display: flex; gap: 8px; padding-block: 12px;
  overflow-x: auto; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--gray-200); border-radius: 999px;
  background: var(--white); color: var(--gray-600);
  font-size: 14px; font-weight: 500;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { color: var(--black); border-color: var(--gray-400); }
.chip.is-active { background: var(--black); border-color: var(--black); color: var(--white); font-weight: 600; }
.chip-n {
  min-width: 22px; padding: 1px 6px; border-radius: 999px;
  background: var(--gray-100); color: var(--gray-600);
  font-size: 12px; font-weight: 600; text-align: center;
}
.chip-n:empty { display: none; }
.chip.is-active .chip-n { background: var(--yellow); color: var(--black); }

/* ---------- Хэсгүүд ---------- */
.news-sec { padding-top: clamp(40px, 5vw, 64px); scroll-margin-top: calc(var(--header-h) + 70px); }
.news-sec:last-child { padding-bottom: var(--section-y); }
.news-sec > .container > .section-title { margin-bottom: 24px; }
.news-sec[hidden] { display: none; }
.news-sec.is-entering { animation: newsIn .5s var(--ease) both; }
@keyframes newsIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.news-sec.showroom { padding-bottom: var(--section-y); }

/* Мета: төрөл · огноо */
.a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--gray-600); }
.a-type {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--black); text-transform: uppercase; letter-spacing: 1px; font-size: 12px;
}
.a-type::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow); }

/* ---------- Онцлох мэдээ ---------- */
.feat {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  border-radius: var(--radius); overflow: hidden;
  background: var(--black); color: var(--white);
}
.feat-media { position: relative; display: block; min-height: 100%; overflow: hidden; }
.feat-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; transition: transform .8s var(--ease); }
.feat-body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(24px, 4vw, 48px); }
.feat .a-meta { color: rgba(255, 255, 255, .7); }
.feat .a-type { color: var(--yellow); }
.feat-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 3vw, 38px); line-height: 1.05; letter-spacing: .3px;
}
.feat-excerpt { color: rgba(255, 255, 255, .78); line-height: 1.6; }
.feat .btn { margin-top: auto; }
.feat .btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .feat:hover .feat-media img { transform: scale(1.04); }
  .feat:hover .btn svg { transform: translateX(4px); }
}

/* ---------- Нийтлэлийн карт ---------- */
.a-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.a-card a {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--white);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease), border-color .35s var(--ease);
}
.a-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--gray-100); }
.a-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.a-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.a-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; text-transform: uppercase; }
.a-excerpt { font-size: 14px; color: var(--gray-600); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.a-more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.a-more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .a-card a:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: transparent; }
  .a-card a:hover .a-media img { transform: scale(1.05); }
  .a-card a:hover .a-more { color: var(--yellow-dark); }
  .a-card a:hover .a-more svg { transform: translateX(4px); }
}

/* ---------- Vlog ---------- */
.vlog-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.vlog-list { display: grid; gap: 24px; }
.vlog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vlog-list--big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vlog-list--big .v-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; text-transform: uppercase; }
.vlog-list--big .v-play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
.v-card a { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.v-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: var(--black);
}
.v-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .4s var(--ease); }
.v-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35)); pointer-events: none; }
.v-play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: var(--yellow); color: var(--black);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform .35s var(--ease);
}
.v-play svg { width: 22px; height: 22px; margin-left: 3px; }
.v-body { display: flex; flex-direction: column; gap: 6px; }
.v-tag { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--gray-600); }
.v-title { font-weight: 600; line-height: 1.4; }
@media (hover: hover) and (pointer: fine) {
  .v-card a:hover .v-thumb img { transform: scale(1.05); opacity: .9; }
  .v-card a:hover .v-play { transform: scale(1.12); }
  .v-card a:hover .v-title { color: var(--yellow-dark); }
}
/* Онцлох видео: хажуу талдаа текст */
.v-card--big a { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0; background: var(--gray-100); border-radius: var(--radius); overflow: hidden; }
.v-card--big .v-thumb { border-radius: 0; }
.v-card--big .v-play { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.v-card--big .v-play svg { width: 30px; height: 30px; }
.v-card--big .v-body { justify-content: center; gap: 10px; padding: clamp(20px, 3vw, 40px); }
.v-card--big .v-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; text-transform: uppercase; }

/* =========================================================
   Дэлгэрэнгүй (news-detail.html)
   ========================================================= */
.art-wrap { padding-top: clamp(20px, 3vw, 36px); }
.article { max-width: 820px; margin-inline: auto; padding-block: clamp(24px, 4vw, 40px) var(--section-y); outline: none; }
.article.is-entering { animation: newsIn .5s var(--ease) both; }
.art-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.art-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(32px, 4.6vw, 54px); line-height: 1.02; letter-spacing: .3px;
}
.art-lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--gray-700); }
.art-cover { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); }
.art-cover img { width: 100%; height: auto; }
.art-body { font-size: 17px; line-height: 1.75; color: var(--gray-700); }
.art-body > * + * { margin-top: 1.1em; }
.art-body h2, .art-h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 26px; line-height: 1.1; color: var(--black);
}
.art-body h2 { margin-top: 1.6em; }
.art-list { display: grid; gap: 8px; padding-left: 0; }
.art-list li { position: relative; padding-left: 22px; }
.art-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow); }
.art-source { font-size: 14px; color: var(--gray-600); padding-top: 16px; border-top: 1px solid var(--line); }
.art-source a { display: inline-flex; align-items: center; gap: 6px; color: var(--black); font-weight: 600; text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.art-source svg { width: 14px; height: 14px; }
.art-section { margin-top: clamp(36px, 5vw, 56px); }
.art-h2 { margin-bottom: 18px; }
.gallery--article { grid-auto-rows: clamp(140px, 16vw, 200px); }
.art-section .vlog-list { grid-template-columns: minmax(0, 1fr); }
.art-share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: clamp(36px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--gray-600);
}
.share-btn {
  min-height: 40px; padding: 8px 16px; border: 1px solid var(--gray-200); border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--black); background: var(--white);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.share-btn:hover { border-color: var(--black); }
.share-msg { color: var(--black); font-weight: 600; }
.art-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 40px; }

.related { background: var(--gray-100); padding-block: var(--section-y); }
.related:has([data-related]:empty) { display: none; }
.related .section-title { margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .feat { grid-template-columns: minmax(0, 1fr); }
  .a-grid, .vlog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-card--big a { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .a-grid, .vlog-grid, .vlog-list--big { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .news-sec .section-head { flex-direction: column; align-items: flex-start; }
  .feat-body { gap: 12px; }
  .art-body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-sec.is-entering, .article.is-entering { animation: none; }
}
.a-grid--more { margin-top: 24px; }
