/* =========================================================
   News article (single-post.php) -- `nd-` additions only.
   Layout, sidebar boxes and carousels come from the shared
   page-components.css (`tp-`) and project-detail.css (`pd-`),
   so the news page matches the other detail pages.
   ========================================================= */

/* Article column */
.nd-main {
  min-width: 0;
}
.nd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 22px;
}
.nd-meta-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--grey-500, #6b7480);
  font-size: 14px;
}
.nd-meta-date svg {
  color: var(--green, #00a551);
}
.nd-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e6f7ee;
  color: var(--green-dark, #008a44);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
}
.nd-badge:hover {
  background: #d3f0e1;
}
.nd-lead {
  margin: 0 0 28px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--grey-100, #eceef1);
  color: #121417;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.55;
}
.nd-content {
  color: #333;
  font-size: 16px;
  line-height: 1.75;
}
.nd-content > *:first-child {
  margin-top: 0;
}
.nd-content > * + * {
  margin-top: 1.1em;
}
.nd-content h2,
.nd-content h3 {
  margin-top: 1.6em;
  color: #121417;
  line-height: 1.25;
}
.nd-content a {
  color: var(--green-dark, #008a44);
}
.nd-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md, 10px);
}
.nd-content blockquote {
  margin-left: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--green, #00a551);
  color: #121417;
  font-style: italic;
}


/* Tags */
.nd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--grey-100, #eceef1);
}
.nd-tags a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--grey-300, #d7dce1);
  border-radius: 999px;
  color: #333;
  font-size: 13px;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.nd-tags a:hover {
  border-color: var(--green, #00a551);
  color: var(--green, #00a551);
}

/* Sidebar info box */
.nd-facts {
  margin: 0 0 28px;
}
.nd-facts > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--grey-100, #eceef1);
}
.nd-facts > div:first-child {
  padding-top: 0;
}
.nd-facts dt {
  margin: 0 0 4px;
  color: var(--grey-500, #6b7480);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nd-facts dd {
  margin: 0;
  color: #121417;
  font-size: 15px;
}
.nd-facts dd a {
  color: #121417;
  text-decoration: none;
}
.nd-facts dd a:hover {
  color: var(--green, #00a551);
}


@media (max-width: 768px) {
  .nd-lead {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nd-tags a {
    transition: none;
  }
}

/* Links inside the info box are plain inline text (pd-toc styles its
   links as rows for the project table of contents). */
.nd-info .nd-facts a {
  display: inline;
  font-size: inherit;
}

/* Tags use the same badge style as the categories (.nd-badge). */
.nd-tags li.nd-badge {
  border: 0;
}


/* Full-screen image viewer. */
html.nd-lb-open {
  overflow: hidden;
}
.nd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 19, .94);
}
.nd-lightbox[hidden] {
  display: none;
}
.nd-lb-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 88px;
  overflow: hidden;
}
.nd-lb-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  cursor: zoom-in;
  user-select: none;
  transition: transform .25s ease;
}
.nd-lightbox.is-zoomed .nd-lb-img {
  cursor: zoom-out;
}
.nd-lb-btn {
  position: absolute;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  transition: background-color .15s ease;
}
.nd-lb-btn:hover {
  background: rgba(255, 255, 255, .24);
}
.nd-lb-btn:focus-visible {
  outline: 3px solid var(--green, #00a551);
  outline-offset: 2px;
}
.nd-lb-btn[hidden] {
  display: none;
}
.nd-lb-close {
  top: 16px;
  right: 16px;
}
.nd-lb-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.nd-lb-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.nd-lb-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .75);
  font-size: 14px;
}
@media (max-width: 768px) {
  .nd-lb-stage {
    padding: 64px 12px;
  }
  .nd-lb-prev,
  .nd-lb-next {
    top: auto;
    bottom: 10px;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nd-media-main img,
  .nd-lb-img {
    transition: none;
  }
}

/* Main image + gallery thumbnails at the top of the article -- same look
   as the product page (product-family.css .pf-hero-media / .pf-thumbs). */
.nd-media {
  margin: 0 0 32px;
}
.nd-media-main {
  position: relative;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  background: var(--grey-50, #f4f5f7);
  box-shadow: var(--shadow-card, 0 1px 2px rgba(10, 14, 19, .05), 0 8px 24px rgba(10, 14, 19, .06));
  cursor: zoom-in;
}
.nd-media-main img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform-origin: center center;
  transition: transform .2s ease;
}
.nd-media-main.is-zoomed img {
  transform: scale(2);
}
.nd-media-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #121417;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  pointer-events: none;
  transition: opacity .15s ease;
}
.nd-media-main.is-zoomed .nd-media-zoom {
  opacity: 0;
}
@media (hover: none) {
  .nd-media-main {
    cursor: pointer;
  }
}
.nd-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.nd-thumb {
  flex: 0 0 84px;
  width: 84px;
  aspect-ratio: 1;
  padding: 0;
  line-height: 0;
  border: 2px solid var(--grey-300, #d7dce1);
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease;
}
.nd-thumb:hover,
.nd-thumb.is-active {
  border-color: var(--green, #00a551);
}
.nd-thumb:focus-visible {
  outline: 2px solid var(--green, #00a551);
  outline-offset: 2px;
}
.nd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 768px) {
  .nd-thumb {
    flex-basis: 64px;
    width: 64px;
  }
}

/* Top of the article: smaller image (left) + date, categories and the
   short description (right). Stacks on small screens. */
.nd-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin: 0 0 36px;
  padding: 0 0 36px;
  border-bottom: 1px solid var(--grey-100, #eceef1);
}
.nd-intro--text-only {
  grid-template-columns: minmax(0, 1fr);
}
.nd-intro .nd-media {
  margin: 0;
}
.nd-intro .nd-thumb {
  flex-basis: 64px;
  width: 64px;
}
.nd-intro .nd-meta {
  margin-bottom: 18px;
}
.nd-intro .nd-lead {
  margin: 0;
  padding: 0;
  border-bottom: 0;
  font-size: 19px;
}
@media (max-width: 768px) {
  .nd-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .nd-intro .nd-lead {
    font-size: 17px;
  }
}

/* Full-width, compact layout (no sidebar). */
.nd-page.pd-page {
  padding-bottom: 56px;
}
.nd-layout {
  padding-top: 32px;
}
.nd-intro {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 36px;
  margin-bottom: 28px;
  padding-bottom: 28px;
}
.nd-intro--text-only {
  grid-template-columns: minmax(0, 1fr);
}
.nd-content > * + * {
  margin-top: .9em;
}
.nd-tags {
  margin-top: 28px;
  padding-top: 20px;
}
@media (max-width: 768px) {
  .nd-layout {
    padding-top: 20px;
  }
  .nd-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 22px;
    padding-bottom: 22px;
  }
}

/* No empty space beside the image: the image (with its thumbnails) floats
   left and the date, short description and the full description flow to
   its right, then continue underneath -- like a printed news article. */
.nd-intro,
.nd-intro--text-only {
  display: block;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}
.nd-intro .nd-media {
  float: left;
  width: 42%;
  margin: 4px 36px 20px 0;
}
.nd-intro .nd-meta {
  margin-bottom: 14px;
}
.nd-intro .nd-lead {
  margin: 0 0 20px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--grey-100, #eceef1);
}
.nd-main .nd-tags {
  clear: both;
}
.nd-main::after {
  content: "";
  display: block;
  clear: both;
}
@media (max-width: 768px) {
  .nd-intro .nd-media {
    float: none;
    width: auto;
    margin: 0 0 20px;
  }
}

/* "More News" = the homepage news slider; just space it from the article. */
/* The slider closes the page: the article keeps its own bottom space, the
   slider sits directly above the footer (no double gap). */
.nd-page.pd-page {
  padding-bottom: 0;
}
.nd-layout {
  padding-bottom: 48px;
}
