/* =====================================================================
   NEWSROOM — featured story, picture-first cards, year timeline and a
   story reader. Builds on site.css (TENA light theme); class prefix nw-.
   ===================================================================== */

/* ---- per-topic colours ---- */
.nw-t-corporate { --t: #177a48; --t-2: #2ea86a; --t-soft: #e9f5ee; }
.nw-t-pv-as-a-service      { --t: #2f6b55; --t-2: #4f9a7e; --t-soft: #e8f2ee; }
.nw-t-elpida    { --t: #4d7a50; --t-2: #7fae76; --t-soft: #edf4ec; }
.nw-t-tena      { --t: #9c6512; --t-2: #d99a35; --t-soft: #fbf3e6; }

.nw-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.nw-head .lead { margin-bottom: 0; }
.nw-counts { display: flex; gap: 1.6rem; margin: 0; }
.nw-counts div { display: flex; flex-direction: column; }
.nw-counts b { font-family: var(--font-head); font-size: 1.9rem; line-height: 1; color: var(--text-hi); }
.nw-counts span { font-size: .78rem; color: var(--text-low); margin-top: .3rem; }

/* ---- filters ---- */
.news-filters { position: sticky; top: 64px; z-index: 5; padding: .6rem 0; margin-bottom: 1.4rem;
  background: linear-gradient(180deg, rgba(255,255,255,.95) 70%, rgba(255,255,255,0)); }
.filter-btn { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-body); font-weight: 600; }
.filter-btn .n { font-family: var(--mono); font-size: .72rem; padding: .05rem .4rem; border-radius: 999px; background: var(--band); color: var(--text-mid); }
.filter-btn.active .n { background: rgba(255,255,255,.22); color: #fff; }

/* ---- featured story ---- */
.nw-feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; margin-bottom: 2.6rem;
  border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--sh-2);
  text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.nw-feature:hover { box-shadow: var(--sh-3); transform: translateY(-3px); border-color: var(--accent-border); }
.nw-feature .nw-cover { aspect-ratio: auto; min-height: 380px; height: 100%; border-radius: 0; }
.nw-feature .nw-cover img { position: absolute; inset: 0; }
.nw-feature-body { padding: clamp(1.4rem, 3vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; }
.nw-feature-kicker { display: inline-flex; align-items: center; gap: .5rem; font: 700 .7rem/1 var(--font-body); letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.nw-feature-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); animation: nw-pulse 1.8s ease-in-out infinite; }
.nw-feature h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; margin: .5rem 0 .8rem; }
.nw-feature p { color: var(--text-mid); margin: 0 0 1.3rem; }
.nw-feature .btn { align-self: flex-start; }
@keyframes nw-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); } 50% { box-shadow: 0 0 0 7px rgba(46,168,106,0); } }

/* ---- covers: photo, or a branded tile with a big number ---- */
.nw-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--t-soft); border-radius: 14px 14px 0 0; }
.nw-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform .5s ease; }
.nw-card:hover .nw-cover img, .nw-feature:hover .nw-cover img { transform: scale(1.04); }
.nw-cover.art { background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--t-2) 40%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, var(--t) 0%, color-mix(in srgb, var(--t) 70%, #0b1c14) 100%); color: #fff; }
.nw-cover.art::before { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(200deg, #000 10%, transparent 75%); -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 75%); }
.nw-cover.art svg.nw-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; opacity: .25; }
.nw-cover-icon { position: absolute; top: 1rem; left: 1rem; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.nw-cover-icon svg { width: 20px; height: 20px; }
.nw-cover-name { position: absolute; top: 1.3rem; right: 1.1rem; font: 700 .72rem/1 var(--mono); letter-spacing: .14em; opacity: .85; }
.nw-cover-stat { position: absolute; left: 1.1rem; bottom: .95rem; right: 1.1rem; }
.nw-cover-stat b { display: block; font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.03em; }
.nw-cover-stat span { font-size: .82rem; opacity: .85; }
.nw-cover-mark { position: absolute; left: 1rem; bottom: .55rem; font-family: var(--font-head); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1; letter-spacing: -.03em; color: rgba(255,255,255,.9); }
.nw-cover-title { position: absolute; left: 1.1rem; right: 1.1rem; bottom: 1rem; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* stat chip on photo covers */
.nw-chip { position: absolute; left: .8rem; bottom: .8rem; display: inline-flex; align-items: baseline; gap: .4rem; padding: .35rem .7rem; border-radius: 999px;
  background: rgba(11,28,20,.82); color: #fff; font-size: .78rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nw-chip b { font-family: var(--font-head); font-size: 1.05rem; }
.nw-gal-count { position: absolute; right: .8rem; top: .8rem; padding: .2rem .55rem; border-radius: 999px; background: rgba(11,28,20,.75); color: #fff; font: 600 .72rem/1.4 var(--mono); }

/* ---- year timeline ---- */
.nw-year { display: flex; align-items: center; gap: 1rem; margin: 2.2rem 0 1.1rem; }
.nw-year:first-child { margin-top: 0; }
.nw-year h2 { margin: 0; font-size: 1.5rem; }
.nw-year span { font: 500 .78rem/1 var(--mono); color: var(--text-low); white-space: nowrap; }
.nw-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- cards ---- */
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.nw-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--sh-1); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.nw-card:hover, .nw-card:focus-visible { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--accent-border); outline: none; }
.nw-card-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.nw-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .55rem; }
.nw-meta .news-tag { margin: 0; border-width: 1px; border-style: solid; }
.nw-date { font: 500 .76rem/1 var(--mono); color: var(--text-low); }
.nw-card h3 { font-size: 1.04rem; line-height: 1.35; margin: 0 0 .45rem; }
.nw-card p { font-size: .88rem; color: var(--text-mid); margin: 0 0 .8rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-more { margin-top: auto; font: 600 .84rem/1 var(--font-body); color: var(--accent); display: inline-flex; gap: .35rem; align-items: center; }
.nw-more i { font-style: normal; transition: transform .2s ease; }
.nw-card:hover .nw-more i { transform: translateX(4px); }
.nw-new { font: 700 .62rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--accent); padding: .28rem .45rem; border-radius: 6px; }

.nw-empty { text-align: center; color: var(--text-low); padding: 3rem 0; }

/* ---- entrance animation ---- */
.nw-in { opacity: 0; transform: translateY(18px); }
.nw-in.nw-shown { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; transition-delay: var(--d, 0s); }

/* ---- reader (dialog) ---- */
.nw-reader { width: min(920px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--text-body);
  box-shadow: 0 30px 80px rgba(11,28,20,.35); overflow: hidden; }
.nw-reader::backdrop { background: rgba(11,28,20,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.nw-reader[open] { animation: nw-pop .28s ease-out; }
@keyframes nw-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.nw-reader-scroll { max-height: 92vh; overflow-y: auto; }
.nw-reader-media { position: relative; background: var(--band); }
.nw-reader-media .nw-cover { aspect-ratio: 21 / 9; border-radius: 0; }
.nw-reader-media > a { display: block; cursor: zoom-in; }
.nw-reader-media > a img { width: 100%; max-height: 46vh; object-fit: contain; display: block; background: #f6f8f7; }
.nw-zoom { position: absolute; right: .8rem; bottom: .8rem; padding: .3rem .65rem; border-radius: 999px; background: rgba(11,28,20,.78); color: #fff; font-size: .75rem; pointer-events: none; }
.nw-caption { font-size: .8rem; color: var(--text-low); padding: .55rem 1.6rem 0; margin: 0; }
.nw-thumbs { display: flex; gap: .5rem; padding: .7rem 1.6rem 0; flex-wrap: wrap; }
.nw-thumbs button { width: 72px; height: 54px; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.nw-thumbs button.on { border-color: var(--accent); }
.nw-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.nw-reader-body { padding: 1.3rem 1.6rem 1.6rem; }
.nw-reader-body h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.2; margin: .3rem 0 .9rem; }
.nw-reader-body p { color: var(--text-body); font-size: 1rem; line-height: 1.7; margin: 0 0 1.2rem; }
.nw-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.nw-actions .btn { padding: .55rem 1rem; font-size: .86rem; }
.nw-copied { font-size: .8rem; color: var(--accent); opacity: 0; transition: opacity .2s; }
.nw-copied.on { opacity: 1; }
.nw-reader-nav { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: .9rem 1.6rem; background: #fbfdfb; }
.nw-reader-nav button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--text-mid); font: 500 .82rem/1.4 var(--font-body); max-width: 48%; }
.nw-reader-nav button:last-child { text-align: right; margin-left: auto; }
.nw-reader-nav button small { display: block; font: 600 .68rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-low); }
.nw-reader-nav button:hover { color: var(--accent); }
.nw-reader-nav button[hidden] { display: none; }
.nw-close { position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--text-hi); font-size: 1.3rem; line-height: 1; box-shadow: var(--sh-2); }
.nw-close:hover { background: #fff; color: var(--accent); }
body.nw-lock { overflow: hidden; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .nw-feature { grid-template-columns: 1fr; }
  .nw-feature .nw-cover { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  .news-filters { top: 56px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .news-filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex: none; }
  .nw-counts { gap: 1.2rem; }
  .nw-reader { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .nw-reader-scroll { max-height: 100dvh; }
  .nw-reader-body, .nw-reader-nav { padding-left: 1.1rem; padding-right: 1.1rem; }
  .nw-caption, .nw-thumbs { padding-left: 1.1rem; padding-right: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nw-in { opacity: 1; transform: none; }
  .nw-card, .nw-feature, .nw-cover img, .nw-reader[open] { transition: none; animation: none; }
  .nw-feature-kicker::before { animation: none; }
}
