/*
 * page-news.css
 * Scope:  body.tmpl-news  (Latest News page — template-news.php)
 * Load:   enqueued only for template-news.php via inc/enqueue.php
 *         map entry: 'template-news.php' => ['psp-page-news', 'page-news.css']
 *
 * Body class setup — add to functions.php:
 *   add_filter('body_class', function($c) {
 *     if (is_page_template('page-templates/template-news.php')) $c[] = 'tmpl-news';
 *     return $c;
 *   });
 *
 * Omitted (covered by main.css):
 *   CSS variables, resets, body/html base, .container,
 *   .seo-h1 visually-hidden rule, .hero-headline base,
 *   .eyebrow base typography, nav, breadcrumb, footer.
 *
 * @package psi-sigma-phi
 */


/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HERO
   ═══════════════════════════════════════════════════════════════════════════ */

body.tmpl-news .page-hero {
  padding: 88px 0 72px;
  /* border-bottom: 1px solid rgba(184, 184, 184, 0.1); */
  position: relative;
  overflow: hidden;
}

/* Large decorative watermark behind hero content */
body.tmpl-news .page-hero::before {
  content: "News";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(184, 184, 184, 0.05);
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}

/* Eyebrow line-prefix within hero context */
body.tmpl-news .page-hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

body.tmpl-news .page-hero .eyebrow::before {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--silver);
  display: inline-block;
  flex-shrink: 0;
}

/* Lead paragraph below display headline */
body.tmpl-news .page-hero .lead {
  font-size: 17px;
  color: var(--silver-light);
  max-width: 540px;
  line-height: 1.65;
  font-weight: 300;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════════════════════════════ */

body.tmpl-news .filter-bar {
  border-bottom: 1px solid rgba(184, 184, 184, 0.1);
  background: var(--black-2);
  position: sticky;
  top: 96px;          /* matches desktop nav height */
  z-index: 50;
}

body.tmpl-news .filter-bar-inner {
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.tmpl-news .filter-bar-inner::-webkit-scrollbar {
  display: none;
}

body.tmpl-news .filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver-dark);
  white-space: nowrap;
  position: relative;
  top: 1px;           /* aligns bottom border flush with container border */
  transition: color 0.2s, border-color 0.2s;
}

body.tmpl-news .filter-btn:hover {
  color: var(--silver-light);
}

body.tmpl-news .filter-btn.is-active {
  color: var(--white);
  border-bottom-color: var(--white);
}

body.tmpl-news .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(184, 184, 184, 0.15);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 2px;
  color: var(--silver-dark);
  transition: background 0.2s, color 0.2s;
}

body.tmpl-news .filter-btn.is-active .filter-count {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}


/* ═══════════════════════════════════════════════════════════════════════════
   NEWS BODY  (two-column: article list + sticky sidebar)
   ═══════════════════════════════════════════════════════════════════════════ */

body.tmpl-news .news-body {
  padding: 0 0 96px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  align-items: start;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE LIST
   ═══════════════════════════════════════════════════════════════════════════ */

body.tmpl-news .article-list {
  border-right: 1px solid rgba(184, 184, 184, 0.1);
}


/* ─── Article item (link wrapper) ──────────────────────────────────────────── */

body.tmpl-news .article-item {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  border-bottom: 1px solid rgba(184, 184, 184, 0.1);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 0.2s;
}

/* Left-edge accent bar on hover */
body.tmpl-news .article-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: rgba(184, 184, 184, 0.04);
  transition: width 0.25s;
}

body.tmpl-news .article-item:hover {
  background: rgba(255, 255, 255, 0.015);
}

body.tmpl-news .article-item:hover::before {
  width: 3px;
  background: var(--white);
  opacity: 0.3;
}

/* No-image variant: collapse to single column */
body.tmpl-news .article-item.no-image {
  grid-template-columns: 1fr;
}

body.tmpl-news .article-item.no-image .article-content {
  padding: 40px;
}

/* Hidden state (JS filter) */
body.tmpl-news .article-item.is-hidden {
  display: none;
}


/* ─── Per-category label colour ─────────────────────────────────────────────── */

body.tmpl-news .article-item[data-category="brotherhood"]   .article-category { color: var(--white); }
body.tmpl-news .article-item[data-category="announcements"] .article-category { color: var(--silver-light); }
body.tmpl-news .article-item[data-category="community"]     .article-category { color: var(--silver); }
body.tmpl-news .article-item[data-category="recap"]         .article-category { color: var(--silver-dark); }


/* ─── Article content (left column) ─────────────────────────────────────────── */

body.tmpl-news .article-content {
  padding: 40px 40px 40px 0;
}

body.tmpl-news .article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

body.tmpl-news .article-category {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
}

body.tmpl-news .article-date {
  font-size: 11px;
  color: var(--silver-dark);
  letter-spacing: 0.08em;
  font-weight: 400;
}

body.tmpl-news .article-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 14px;
  transition: background 0.2s, -webkit-text-fill-color 0.2s;
}

/* Gradient title on hover — matches brand pattern from homepage news cards */
body.tmpl-news .article-item:hover .article-title {
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.tmpl-news .article-excerpt {
  font-size: 14px;
  color: var(--silver-dark);
  line-height: 1.7;
  font-weight: 300;
  max-width: 580px;
  margin-bottom: 20px;
}

body.tmpl-news .article-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-dark);
  transition: color 0.2s;
}

body.tmpl-news .article-item:hover .article-read-more {
  color: var(--white);
}

body.tmpl-news .article-read-more svg {
  transition: transform 0.2s;
  flex-shrink: 0;
}

body.tmpl-news .article-item:hover .article-read-more svg {
  transform: translateX(4px);
}


/* ─── Article image (right column) ──────────────────────────────────────────── */

body.tmpl-news .article-image {
  overflow: hidden;
  border-left: 1px solid rgba(184, 184, 184, 0.08);
}

body.tmpl-news .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.4s, transform 0.4s;
}

body.tmpl-news .article-item:hover .article-image img {
  filter: grayscale(60%) contrast(1.05);
  transform: scale(1.03);
}


/* ─── Empty state ──────────────────────────────────────────────────────────── */

body.tmpl-news .news-empty {
  color: var(--silver-dark);
  text-align: center;
  padding: 64px 0;
  font-size: 14px;
  letter-spacing: 0.05em;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

body.tmpl-news .news-sidebar {
  position: sticky;
  top: calc(96px + 57px);   /* nav height + filter bar height */
  padding: 40px 0 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

body.tmpl-news .sidebar-block {
  background: var(--black-2);
  border: 1px solid rgba(184, 184, 184, 0.1);
  padding: 28px 24px;
  margin-bottom: 1px;
}

body.tmpl-news .sidebar-block-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver-dark);
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.tmpl-news .sidebar-block-label::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--silver-dark);
  flex-shrink: 0;
}

body.tmpl-news .sidebar-block h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

body.tmpl-news .sidebar-block p {
  font-size: 13px;
  color: var(--silver-dark);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 18px;
}


/* ─── Archive list (month + related) ────────────────────────────────────────── */

body.tmpl-news .archive-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

body.tmpl-news .archive-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--black-3);
  font-size: 13px;
  color: var(--silver);
  font-weight: 400;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
}

body.tmpl-news .archive-list a:hover {
  background: #222;
  color: var(--white);
  padding-left: 18px;
}

body.tmpl-news .archive-count {
  font-size: 10px;
  color: var(--silver-dark);
  background: rgba(184, 184, 184, 0.08);
  padding: 2px 7px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}


/* ─── Social link CTAs ───────────────────────────────────────────────────────── */

body.tmpl-news .sidebar-social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.tmpl-news .sidebar-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(184, 184, 184, 0.3);
  color: var(--silver);
  transition: border-color 0.2s, color 0.2s;
}

body.tmpl-news .sidebar-cta:hover {
  border-color: var(--white);
  color: var(--white);
}

body.tmpl-news .sidebar-cta svg {
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tablet: stack sidebar below article list ─────────────────────────────── */

@media (max-width: 1100px) {
  body.tmpl-news .news-body {
    grid-template-columns: 1fr;
  }

  body.tmpl-news .article-list {
    border-right: none;
  }

  body.tmpl-news .news-sidebar {
    position: static;
    padding: 40px 0 0;
    border-top: 1px solid rgba(184, 184, 184, 0.1);
  }
}

/* ─── Mobile: collapse article image, reduce padding ──────────────────────── */

@media (max-width: 900px) {
  body.tmpl-news .filter-bar {
    top: 72px;  /* mobile nav height (header min-height: 72px) */
  }

  body.tmpl-news .page-hero {
    padding: 56px 0 48px;
  }

  body.tmpl-news .page-hero::before {
    display: none;  /* watermark too large on mobile */
  }

  /* Articles become single-column — hide image */
  body.tmpl-news .article-item {
    grid-template-columns: 1fr;
  }

  body.tmpl-news .article-image {
    display: none;
  }

  body.tmpl-news .article-content {
    padding: 32px 20px;
  }

  body.tmpl-news .article-item.no-image .article-content {
    padding: 32px 20px;
  }

  body.tmpl-news .news-sidebar {
    padding: 32px 20px 0;
  }

  body.tmpl-news .filter-bar-inner {
    padding: 0 20px;
  }
}