/* ==========================================================================
   AdviseCore — news.css
   News & Insights: index (filters, lead card, grid, pagination) and article
   pages (hero, cover, body typography, share, related). Tokens in main.css.
   ========================================================================== */

/* ---- Index --------------------------------------------------------------- */
.news-index { padding-top: 64px !important; }
.news-intro { margin-bottom: 36px; }

.news-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 44px; }
.news-chip {
  display: inline-flex; align-items: center;
  padding: 9px 20px; border-radius: 50px;
  border: 1px solid rgba(55,66,59,.18); background: #fff;
  font: 500 14px/1 var(--nav-font); color: var(--color-secondary);
  transition: background .25s, color .25s, border-color .25s;
}
.news-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.news-chip.is-active, .news-chip.is-active:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---- Cards --------------------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-grid > div { min-width: 0; }

.news-card {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid rgba(55,66,59,.1); border-radius: 16px; overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(55,66,59,.13); border-color: rgba(184,134,11,.45); }

.news-card-media { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-dark); }
.news-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.news-card:hover .news-card-media img { transform: scale(1.04); }

/* No cover image: branded dark tile with the category name */
.news-card-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(184,134,11,.28), rgba(184,134,11,0) 55%),
    var(--color-dark);
}
.news-card-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(184,134,11,.22) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .55;
}
.news-card-placeholder span {
  position: relative;
  font: 600 12px/1 var(--nav-font); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light);
  padding: 10px 18px; border: 1px solid rgba(217,184,90,.35); border-radius: 50px; background: rgba(18,23,20,.5);
}

.news-card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 26px; }
.news-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 12px;
  font: 600 12px/1.2 var(--nav-font); letter-spacing: .08em; text-transform: uppercase; color: #8A9089;
}
.news-meta .news-cat { color: var(--color-primary); }
.news-meta time { position: relative; padding-left: 14px; }
.news-meta time::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: currentColor; opacity: .6; }
.news-badge { padding: 4px 10px; border-radius: 50px; background: rgba(184,134,11,.12); color: var(--color-primary); letter-spacing: .06em; }

.news-card h2, .news-card h3 { margin: 0 0 12px; font-family: var(--heading-font); font-weight: 700; color: var(--color-secondary); }
.news-card h3 { font-size: 19px; line-height: 1.35; }
.news-card h2 a, .news-card h3 a { color: inherit; }
.news-card h2 a:hover, .news-card h3 a:hover { color: var(--color-primary); }
.news-card p {
  flex: 1; margin: 0 0 20px;
  font: 400 14.5px/1.6 var(--default-font); color: var(--color-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .read-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font: 600 14px/1 var(--nav-font); color: var(--color-primary); }
.news-card .read-more i { font-size: 16px; transition: transform .3s; }
.news-card:hover .read-more i { transform: translateX(4px); }

/* Lead card — first article on page one */
.news-card--lead { display: grid; grid-template-columns: 1.2fr 1fr; margin-bottom: 36px; box-shadow: 0 24px 60px rgba(55,66,59,.08); }
.news-card--lead:hover { transform: translateY(-4px); }
.news-card--lead .news-card-media { aspect-ratio: auto; min-height: 380px; }
.news-card--lead .news-card-body { justify-content: center; padding: 44px 44px 46px; }
.news-card--lead h2 { font-size: 30px; line-height: 1.22; letter-spacing: -.01em; margin-bottom: 16px; }
.news-card--lead p { font-size: 16px; line-height: 1.7; flex: 0 1 auto; margin-bottom: 26px; -webkit-line-clamp: 5; }

/* ---- Empty state --------------------------------------------------------- */
.news-empty { max-width: 540px; margin: 10px auto 0; text-align: center; padding: 48px 36px; background: #fff; border: 1px dashed rgba(55,66,59,.2); border-radius: 18px; }
.news-empty > i { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(184,134,11,.1); color: var(--color-primary); font-size: 28px; margin-bottom: 18px; }
.news-empty h2 { margin: 0 0 10px; font: 700 22px/1.3 var(--heading-font); color: var(--color-secondary); }
.news-empty p { margin: 0 0 24px; font: 400 15px/1.65 var(--default-font); color: var(--color-muted); }

/* ---- Pagination ---------------------------------------------------------- */
.news-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 56px; }
.news-page {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 50px;
  border: 1px solid rgba(55,66,59,.16); background: #fff;
  font: 500 14px/1 var(--nav-font); color: var(--color-secondary);
  transition: background .25s, color .25s, border-color .25s;
}
a.news-page:hover { border-color: var(--color-primary); color: var(--color-primary); }
.news-page.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.news-page--nav { padding: 0 20px; }
.news-page--gap { border-color: transparent; background: none; }

/* ---- Article hero (re-uses the .breadcrumbs dark band) -------------------- */
.breadcrumbs.article-hero { padding: 150px 0 64px; }
.breadcrumbs.article-hero ol.article-crumbs { margin: 0 0 22px; }
.breadcrumbs.article-hero h1 { max-width: 900px; font: 700 44px/1.16 var(--heading-font); letter-spacing: -.015em; }
.article-byline { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 24px; font: 500 14.5px/1.3 var(--nav-font); color: #AEB3AC; }
.article-byline span { display: inline-flex; align-items: center; gap: 8px; }
.article-byline i { color: var(--gold-light); font-size: 15px; }

.article-preview-bar { background: #FFF5D9; border-bottom: 1px solid rgba(184,134,11,.3); padding: 12px 0; font: 400 14px/1.5 var(--default-font); color: #5B4A14; }
.article-preview-bar i { margin-right: 6px; color: var(--color-primary); }
.article-preview-bar a { margin-left: 10px; font-weight: 600; text-decoration: underline; }

/* ---- Article body -------------------------------------------------------- */
.article { padding: 56px 0 24px; }
.article-cover { max-width: 1040px; margin: 0 auto 52px; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px rgba(55,66,59,.16); }
.article-cover img { display: block; width: 100%; height: auto; }
.article-layout { max-width: 760px; margin: 0 auto; }

.article-body .article-standfirst { margin: 0 0 32px; padding-bottom: 28px; border-bottom: 1px solid rgba(55,66,59,.12); font: 500 20px/1.6 var(--default-font); color: var(--color-secondary); }

.article-body { font: 400 17px/1.8 var(--default-font); color: #3A403B; overflow-wrap: break-word; }
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.35em; }
.article-body h2 { margin: 2em 0 .7em; font: 700 28px/1.3 var(--heading-font); color: var(--color-secondary); letter-spacing: -.01em; }
.article-body h3 { margin: 1.8em 0 .6em; font: 700 22px/1.35 var(--heading-font); color: var(--color-secondary); }
.article-body h4 { margin: 1.6em 0 .5em; font: 700 18px/1.4 var(--heading-font); color: var(--color-secondary); }
.article-body a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body strong { color: var(--color-default); }
.article-body ul, .article-body ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.article-body li { margin-bottom: .5em; }
.article-body li::marker { color: var(--color-primary); }
.article-body blockquote {
  margin: 2em 0; padding: 22px 28px; border-left: 4px solid var(--color-primary); border-radius: 0 12px 12px 0;
  background: #F6F2E9; font-size: 19px; font-style: italic; color: var(--color-secondary);
}
.article-body blockquote > :last-child { margin-bottom: 0; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; }
.article-body figure { margin: 2em 0; }
.article-body figure img { display: block; margin: 0 auto; }
.article-body figcaption { margin-top: 10px; text-align: center; font: 400 14px/1.5 var(--default-font); color: var(--color-muted); }
.article-body iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin: 2em 0; }
.article-body hr { margin: 2.5em 0; border: 0; border-top: 1px solid rgba(55,66,59,.15); opacity: 1; }
.article-body table { width: 100%; margin: 2em 0; border-collapse: collapse; font-size: 15px; }
.article-body th, .article-body td { padding: 10px 14px; border: 1px solid rgba(55,66,59,.15); text-align: left; vertical-align: top; }
.article-body th { background: #F6F2E9; font-weight: 600; color: var(--color-secondary); }

.article-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(55,66,59,.12); }
.article-share { display: flex; align-items: center; gap: 10px; }
.article-share span { margin-right: 4px; font: 600 13px/1 var(--nav-font); letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); }
.article-share a {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(184,134,11,.35); color: var(--color-primary); font-size: 16px;
  transition: background .3s, color .3s, border-color .3s;
}
.article-share a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.article-back { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--nav-font); }
.article-back i { transition: transform .3s; }
.article-back:hover i { transform: translateX(-4px); }

/* Staff-only shortcut to the Studio editor */
.article-staff-edit {
  position: fixed; left: 18px; bottom: 18px; z-index: 996;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 50px;
  background: var(--color-dark); color: #F4EFE4; font: 500 14px/1 var(--nav-font);
  box-shadow: 0 10px 26px rgba(18,23,20,.3);
}
.article-staff-edit:hover { background: var(--color-primary); color: #fff; }

/* ---- Related ------------------------------------------------------------- */
.news-related { background: linear-gradient(180deg, #F6F2E9, var(--background-color)); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 991px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .news-card--lead { grid-template-columns: 1fr; }
  .news-card--lead .news-card-media { min-height: 0; aspect-ratio: 16 / 9; }
  .news-card--lead .news-card-body { padding: 30px 30px 32px; }
  .news-card--lead h2 { font-size: 26px; }
  .breadcrumbs.article-hero h1 { font-size: 34px; }
  .article-cover { margin-bottom: 40px; }
}
@media (max-width: 575px) {
  .news-index { padding-top: 44px !important; }
  .news-grid { grid-template-columns: 1fr; }
  .news-filters { justify-content: flex-start; }
  .news-card--lead .news-card-body { padding: 24px 22px 26px; }
  .news-card--lead h2 { font-size: 23px; }
  .breadcrumbs.article-hero { padding: 124px 0 44px; }
  .breadcrumbs.article-hero h1 { font-size: 28px; }
  .article { padding-top: 36px; }
  .article-cover { border-radius: 12px; margin-bottom: 32px; }
  .article-body .article-standfirst { font-size: 18px; }
  .article-body { font-size: 16.5px; }
  .article-body h2 { font-size: 24px; }
  .article-body h3 { font-size: 20px; }
  .article-body table { display: block; overflow-x: auto; font-size: 14px; }
  .article-footer { flex-direction: column; align-items: flex-start; }
}
