/* ============================================================
   APCC News — styles
   ------------------------------------------------------------
   All rules are scoped under .apcc-news and prefixed apcc-news-*
   so they cannot collide with the live APCC theme.

   SECTION 1 (always used): styles the post CONTENT — tags, chip,
   key-facts panel, buttons. Use this on the single-post view.

   SECTION 2 (optional): the expandable-card layout, only needed
   if you build a FULL-CONTENT news listing (Option B in
   OPTIONAL-TEMPLATE-NOTES/news-page-rendering-options.md).
   If you don't do Option B, you can ignore Section 2 and skip
   loading apcc-news.js entirely.

   Tokens match the canonical APCC brand set.
   ============================================================ */

.apcc-news{
  --apcc-green-dark:#0B4D24;
  --apcc-green:#1F8E3D;
  --apcc-gold:#F2B705;
  --apcc-gold-dark:#E0A800;
  --apcc-mint:#EEF7F2;
  --apcc-line:#e4ede7;
  --apcc-grey-soft:#7A7A7A;
}

/* ============================================================
   SECTION 1 — post content (always used)
   ============================================================ */

.apcc-news{color:inherit}

.apcc-news-tags{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}
.apcc-news-tag{
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;
  padding:4px 10px;border-radius:999px;line-height:1.5;display:inline-block;
}
.apcc-news-tag--funding{background:var(--apcc-gold);color:var(--apcc-green-dark)}
.apcc-news-tag--conference{background:var(--apcc-green);color:#fff}

.apcc-news-chip{
  display:inline-flex;align-items:center;gap:6px;
  background:var(--apcc-mint);color:var(--apcc-green-dark);
  border:1px solid #cfe6d8;border-radius:8px;
  font-size:13px;font-weight:600;padding:7px 12px;margin:0 0 20px;
}

.apcc-news-lead{font-size:17px;line-height:1.6}
.apcc-news p{margin:0 0 16px}

.apcc-news-keyfacts{
  background:var(--apcc-mint);
  border:1px solid #cfe6d8;
  border-left:4px solid var(--apcc-green);
  border-radius:12px;
  padding:22px 26px;
  margin:28px 0;
  box-shadow:0 6px 18px rgba(11,77,36,.05);
}
.apcc-news-keyfacts h3{
  margin:0 0 16px;
  color:var(--apcc-green-dark);
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:800;
}

/* Table-like layout: labels get a fixed width so the values line up
   as two clean columns. */
.apcc-news-keyfacts__list{
  margin:0;
  display:flex;
  flex-direction:column;
}
.apcc-news-keyfacts__row{
  display:flex;
  align-items:baseline;
  gap:16px;
  padding:11px 0;
  border-top:1px solid #d8e8df;
}
.apcc-news-keyfacts__row:first-child{border-top:none;padding-top:4px}
.apcc-news-keyfacts__row:last-child{padding-bottom:0}
.apcc-news-keyfacts dt{
  flex:0 0 180px;
  width:180px;
  color:var(--apcc-green-dark);
  font-weight:700;
  font-size:14px;
  letter-spacing:.01em;
}
.apcc-news-keyfacts dd{
  margin:0;
  flex:1 1 auto;
  color:#2f3b34;
  font-size:15px;
  line-height:1.55;
  word-break:break-word;
}
.apcc-news-keyfacts dd a{color:var(--apcc-green);font-weight:600;text-decoration:none}
.apcc-news-keyfacts dd a:hover{text-decoration:underline}

.apcc-news-cta{display:flex;gap:14px;flex-wrap:wrap;margin:26px 0 8px}
.apcc-news-btn{
  display:inline-block;padding:12px 22px;border-radius:999px;
  font-weight:700;font-size:15px;text-decoration:none;line-height:1.2;
}
.apcc-news-btn--primary{background:var(--apcc-green);color:#fff}
.apcc-news-btn--primary:hover{background:var(--apcc-green-dark);color:#fff}
.apcc-news-btn--gold{background:var(--apcc-gold);color:var(--apcc-green-dark)}
.apcc-news-btn--gold:hover{background:var(--apcc-gold-dark);color:var(--apcc-green-dark)}
.apcc-news-btn--ghost{border:2px solid var(--apcc-green);color:var(--apcc-green);padding:10px 20px;background:none}
.apcc-news-btn--ghost:hover{background:var(--apcc-green);color:#fff}
/* disabled / not-yet-live action */
.apcc-news-btn--pending{
  background:#eef1ef;color:#8ea497;border:1px solid #dce5df;
  cursor:default;pointer-events:none;
}
.apcc-news-note{font-size:13.5px;color:var(--apcc-grey-soft);margin-top:8px}

/* ------------------------------------------------------------
   Magazine layout (single column): facts strip -> narrative ->
   closing CTA banner. No sidebar.
   ------------------------------------------------------------ */
.apcc-news-facts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin:0 0 34px;
}
.apcc-news-fact{
  background:var(--apcc-mint);
  border:1px solid #cfe6d8;
  border-radius:14px;
  padding:18px 20px;
}
.apcc-news-fact--primary{
  background:linear-gradient(135deg,var(--apcc-green-dark),var(--apcc-green));
  border:none;
  color:#fff;
}
.apcc-news-fact__label{
  display:block;
  font-size:11.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.07em;
  color:var(--apcc-green-dark);
  margin:0 0 6px;
}
.apcc-news-fact--primary .apcc-news-fact__label{color:rgba(255,255,255,.85)}
.apcc-news-fact__value{
  display:block;
  font-size:19px;
  font-weight:800;
  line-height:1.25;
  color:#1c2b23;
}
.apcc-news-fact--primary .apcc-news-fact__value{color:#fff}
.apcc-news-fact__value a{text-decoration:none;font-weight:800}
.apcc-news-fact__sub{
  display:block;
  font-size:13px;
  color:#5c6f64;
  margin-top:3px;
}
.apcc-news-fact--primary .apcc-news-fact__sub{color:rgba(255,255,255,.85)}

.apcc-news-body{max-width:860px}
.apcc-news .apcc-news-body h3{
  margin:30px 0 10px;
  padding:0;
  font-size:19px;
  color:var(--apcc-green-dark);
  text-align:left;
}

.apcc-news-banner{
  background:linear-gradient(135deg,var(--apcc-green-dark),var(--apcc-green));
  border-radius:16px;
  padding:30px 34px;
  margin:38px 0 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px 32px;
  flex-wrap:wrap;
  color:#fff;
}
.apcc-news-banner__text{flex:1 1 320px;min-width:0}
.apcc-news .apcc-news-banner h3{
  margin:0 0 6px;
  padding:0;
  font-size:22px;
  color:#fff;
  text-align:left;
}
.apcc-news-banner__text p{margin:0;font-size:15px;color:rgba(255,255,255,.88);line-height:1.6}
.apcc-news-banner__text a{color:#ffd75e;font-weight:600;text-decoration:none}
.apcc-news-banner__text a:hover{text-decoration:underline}
.apcc-news-banner__actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:0 0 auto;
}
/* translucent-outline button for use on the dark banner */
.news-article__content .apcc-news-btn--frost{
  background:rgba(255,255,255,.10);
  color:#ffffff !important;
  border:1.5px solid rgba(255,255,255,.55);
  box-shadow:none;
}
.news-article__content .apcc-news-btn--frost:hover{
  background:#ffffff;
  color:#0b4d24 !important;
  border-color:#ffffff;
}

/* ------------------------------------------------------------
   Funding-call notice layout: at-a-glance table, paired sections,
   numbered application steps, single closing action.
   ------------------------------------------------------------ */
/* Catch-all for section headings inside the article: the sitewide
   non-homepage rules centre h3s and pile on vertical margins, so pin
   every no-underline h3 here (two classes + element wins). */
.apcc-news h3.no-underline{
  margin:0 0 14px;
  padding:0;
  font-size:19px;
  color:var(--apcc-green-dark);
  text-align:left;
}

.apcc-reoi-cols{margin-top:6px}
/* the theme styles bare <section> with padding:8rem 0 — neutralize it */
.apcc-reoi-cols section{padding:24px 0 0}

.apcc-reoi-glance{margin:34px 0 0}
.apcc-reoi-glance__list{margin:0;border-top:1px solid #e4ede7}
.apcc-reoi-glance__row{
  display:flex;
  align-items:baseline;
  gap:24px;
  padding:13px 4px;
  border-bottom:1px solid #e4ede7;
}
.apcc-reoi-glance__row dt{
  flex:0 0 220px;
  font-size:12.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#5c6f64;
}
.apcc-reoi-glance__row dd{
  margin:0;
  flex:1;
  font-size:15.5px;
  color:#22302a;
  line-height:1.55;
}
.apcc-reoi-glance__row dd a{color:var(--apcc-green);font-weight:600;text-decoration:none}
.apcc-reoi-glance__row dd a:hover{text-decoration:underline}
.apcc-reoi-cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 44px;
}
.apcc-reoi-cols section{min-width:0}
.apcc-reoi-cols section p{margin-bottom:14px}
.apcc-reoi-cols section p:last-child{margin-bottom:0}

.apcc-reoi-steps{margin:40px 0 0}
.apcc-reoi-steps ol{
  list-style:none;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin:0;
  padding:0;
}
.apcc-reoi-step{
  background:var(--apcc-mint);
  border:1px solid #cfe6d8;
  border-radius:14px;
  padding:20px 22px;
}
.apcc-reoi-step__num{
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--apcc-green);
  color:#fff;
  font-weight:800;
  font-size:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 12px;
}
.apcc-reoi-step b{display:block;font-size:15.5px;color:var(--apcc-green-dark);margin:0 0 5px}
.apcc-reoi-step p{margin:0;font-size:14px;line-height:1.6;color:#3f4a44}
.apcc-reoi-step a{color:var(--apcc-green);font-weight:600;text-decoration:none}
.apcc-reoi-step a:hover{text-decoration:underline}

.apcc-reoi-finale{margin:40px 0 6px;text-align:center}
.apcc-reoi-finale .apcc-news-btn{min-width:320px}
.apcc-reoi-finale p{
  margin:12px 0 0;
  font-size:13.5px;
  color:var(--apcc-grey-soft);
}

@media(max-width:860px){
  .apcc-reoi-glance__row{flex-direction:column;gap:3px}
  .apcc-reoi-glance__row dt{flex-basis:auto}
  .apcc-reoi-cols{grid-template-columns:1fr}
  .apcc-reoi-steps ol{grid-template-columns:1fr}
  .apcc-reoi-finale .apcc-news-btn{min-width:0;width:100%}
}

@media(max-width:860px){
  .apcc-news-facts{grid-template-columns:1fr}
  .apcc-news-banner{padding:24px 20px}
  .apcc-news-banner__actions{width:100%}
  .apcc-news-banner__actions .apcc-news-btn{width:100%;text-align:center}
}

/* Two-column layout: narrative on the left, key facts + actions pinned
   in a sticky rail on the right so readers can act without hunting for
   the details at the bottom of a long post. Collapses to a single
   column (in source order) below 860px. */
.apcc-news-layout{
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:44px;
  align-items:start;
  margin-top:4px;
}
.apcc-news-main{min-width:0}
/* rail renders on the left; markup keeps the narrative first */
.apcc-news-aside{order:-1}
.apcc-news-aside{
  position:sticky;
  top:96px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.apcc-news-aside .apcc-news-keyfacts{
  margin:0;
  padding:20px 22px;
  border-left:1px solid #cfe6d8;
}

/* Deadline callout — the single most important fact, pinned at the
   top of the rail. */
.apcc-news-deadline{
  background:linear-gradient(135deg,var(--apcc-green-dark),var(--apcc-green));
  color:#fff;
  border-radius:12px;
  padding:20px 22px;
  text-align:center;
}
.apcc-news-deadline__label{
  display:block;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.85;
  margin:0 0 6px;
}
.apcc-news-deadline__date{
  display:block;
  font-size:24px;
  font-weight:800;
  line-height:1.2;
}
.apcc-news-deadline__time{
  display:block;
  font-size:14px;
  opacity:.9;
  margin-top:4px;
}

/* Subheadings inside the narrative column. Doubled scope so they beat
   the sitewide centered-heading rules for non-homepage templates. */
.apcc-news .apcc-news-main h3{
  margin:30px 0 10px;
  padding:0;
  font-size:19px;
  color:var(--apcc-green-dark);
  text-align:left;
}

/* Gold-edged note box for the membership call-out. */
.apcc-news-note-box{
  background:#fdf6e3;
  border:1px solid #f0e2b6;
  border-radius:12px;
  padding:16px 20px;
  margin:26px 0 0;
}
.apcc-news-note-box p{margin:0;font-size:15px;line-height:1.65}
/* In the narrow rail the two-column label/value rows don't fit —
   stack the label above its value instead. */
.apcc-news-aside .apcc-news-keyfacts__row{
  flex-direction:column;
  gap:3px;
  padding:10px 0;
}
.apcc-news-aside .apcc-news-keyfacts dt{
  flex-basis:auto;
  width:auto;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.apcc-news-aside .apcc-news-keyfacts dd{
  font-size:14.5px;
}
.apcc-news-cta--stacked{
  flex-direction:column;
  gap:10px;
  margin:0;
}
/* Section 3's .news-article__content .apcc-news-cta sets margin-top:32px
   and wins on source order at equal specificity, so this override needs
   the doubled class to keep the stacked rail flush under the panel. */
.news-article__content .apcc-news-cta.apcc-news-cta--stacked{margin-top:0}
.apcc-news-cta--stacked .apcc-news-btn{
  width:100%;
  text-align:center;
}

@media(max-width:860px){
  .apcc-news-keyfacts__row{flex-direction:column;gap:3px}
  .apcc-news-keyfacts dt{flex-basis:auto;width:auto}
  .apcc-news-keyfacts li{flex-direction:column;gap:2px}
  .apcc-news-keyfacts li b{min-width:0}

  .apcc-news-layout{
    grid-template-columns:1fr;
    gap:28px;
  }
  .apcc-news-aside{
    position:static;
    order:0; /* narrative first on small screens */
  }
}

/* ============================================================
   SECTION 2 — expandable card layout (OPTIONAL, Option B only)
   Only needed for a full-content news LISTING with cards that
   expand in place. Requires apcc-news.js.
   ============================================================ */

.apcc-news-card{
  background:#fff;border:1px solid var(--apcc-line);
  border-radius:14px;overflow:hidden;margin:0 0 26px;
}
.apcc-news-card__accent{height:6px;background:var(--apcc-green)}
.apcc-news-card__accent--gold{background:var(--apcc-gold)}
.apcc-news-card__body{padding:24px 26px 26px}
.apcc-news-card__title{font-size:22px;line-height:1.3;margin:0 0 10px;color:var(--apcc-green-dark)}
.apcc-news-card__excerpt{font-size:15.5px;color:#3f4a44;margin:0 0 16px}

.apcc-news-detail{max-height:0;overflow:hidden;transition:max-height .45s ease}
.apcc-news-detail.is-open{max-height:4000px}
.apcc-news-detail__inner{padding-top:22px;margin-top:20px;border-top:1px solid var(--apcc-line)}

.apcc-news-toggle-row{margin-top:20px}
.apcc-news-toggle{
  font-weight:700;font-size:14.5px;color:var(--apcc-green);
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  background:none;border:none;padding:8px 0;font-family:inherit;
}
.apcc-news-toggle:hover{color:var(--apcc-green-dark)}
.apcc-news-toggle:focus-visible{outline:2px solid var(--apcc-green);outline-offset:3px;border-radius:3px}
.apcc-news-toggle__arrow{transition:transform .25s ease}
.apcc-news-toggle.is-open .apcc-news-toggle__arrow{transform:rotate(90deg)}

@media (prefers-reduced-motion: reduce){
  .apcc-news-detail,.apcc-news-toggle__arrow{transition:none}
}

/* ============================================================
   SECTION 3 — generic single-news template shell
   ============================================================ */

.news-article-page{
  background:#f4f7f4;
}

.news-article__header{
  background:linear-gradient(135deg,#0b4d24 0%,#1f8e3d 100%);
  /* Proportional top gap that clears the fixed glass site header while
     scaling with the viewport. Bottom padding scales too. */
  padding:clamp(6.5rem,9vw,9.5rem) 0 clamp(3.5rem,5vw,5.5rem) !important;
}

.news-article__header .page-title{
  color:#fff;
  max-width:980px;
  margin:0;
}

.news-article__eyebrow{
  display:inline-block;
  margin:0 0 12px;
  padding:6px 12px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.news-article__back{
  margin:18px 0 0;
}

.news-article__back a{
  color:rgba(255,255,255,.92);
  text-decoration:none;
  font-weight:600;
}

.news-article__back a:hover{
  color:#fff;
  text-decoration:underline;
}

.news-article__section{
  padding:0 0 72px !important;
}

.news-article__shell{
  width:100%;
  max-width:none;
  margin:-56px 0 0;
  padding:clamp(24px,4vw,48px);
  background:#fff;
  border-radius:var(--radius);
  box-shadow:0 2px 8px rgba(0,0,0,.08);
  position:relative;
  z-index:2;
}

.news-article__meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 18px;
  margin:0 0 20px;
}

.news-article__category{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(31,142,61,.10);
  color:#0b4d24;
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.news-article__meta-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:#486056;
  font-size:14px;
  font-weight:600;
}

.news-article__meta-item i{
  color:#1f8e3d;
}

.news-article__excerpt{
  max-width:960px;
  margin:0 0 24px;
  color:#34443d;
  font-size:1.05rem;
  line-height:1.8;
}

.news-article__featured-image{
  margin:0 0 28px;
}

.news-article__featured-image img{
  display:block;
  width:100%;
  height:auto;
  border-radius:12px;
}

.news-article__content{
  padding:0;
  background:transparent;
  box-shadow:none;
  border-radius:0;
}

.news-article__content > :last-child{
  margin-bottom:0;
}

.news-article__content .apcc-news{
  max-width:none;
}

.news-article__content .apcc-news-cta,
.news-article__content .wp-block-buttons{
  margin-top:32px;
  align-items:stretch;
}

.news-article__content .apcc-news-cta br{
  display:none;
}

.news-article__content .apcc-news-btn,
.news-article__content .wp-block-button__link,
.news-article__content .wp-element-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:12px 22px;
  text-align:center;
  border-radius:12px;
  box-shadow:0 10px 24px rgba(11,77,36,.10);
  text-decoration:none !important;
  font-weight:700;
  font-size:15px;
  line-height:1.2;
}

/* ---- Force readable, high-contrast button text in all states ----
   The generic `.entry-content a` rule in style.css sets link colour to
   the brand green and underlines links; combined with scoped CSS vars
   this made button labels hard to read. These rules are specific enough
   (two classes) to win and pin explicit colours per variant. */
.news-article__content .apcc-news-btn--primary{background:#1f8e3d;color:#ffffff !important;}
.news-article__content .apcc-news-btn--primary:hover{background:#0b4d24;color:#ffffff !important;}
.news-article__content .apcc-news-btn--gold{background:#f2b705;color:#0b4d24 !important;}
.news-article__content .apcc-news-btn--gold:hover{background:#e0a800;color:#0b4d24 !important;}
.news-article__content .apcc-news-btn--ghost{background:#ffffff;color:#1f8e3d !important;border:2px solid #1f8e3d;}
.news-article__content .apcc-news-btn--ghost:hover{background:#1f8e3d;color:#ffffff !important;}
.news-article__content .apcc-news-btn--pending{background:#eef1ef;color:#8ea497 !important;}

.news-article__content .apcc-news-btn:hover,
.news-article__content .wp-block-button__link:hover,
.news-article__content .wp-element-button:hover{
  transform:translateY(-1px);
}

.news-article__content .apcc-news-btn--ghost,
.news-article__content .wp-block-button.is-style-outline .wp-block-button__link{
  background:#fff;
}

.news-article__content a{
  overflow-wrap:anywhere;
}

.news-article__tags{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:26px;
  padding-top:22px;
  border-top:1px solid #e5ece7;
}

.news-article__tag{
  display:inline-flex;
  align-items:center;
  padding:8px 14px;
  border-radius:999px;
  background:#eef7f2;
  color:#0b4d24;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
}

.news-article__tag:hover{
  background:#e1f0e7;
  color:#0b4d24;
}

@media(max-width:860px){
  .news-article__header{
    padding:clamp(5.5rem,12vw,7.5rem) 0 clamp(3rem,7vw,4.75rem) !important;
  }

  .news-article__shell{
    margin:-36px 0 0;
    padding:24px 18px;
  }

  .news-article__meta{
    gap:8px 14px;
  }
}

