/* Site-wide extensions — post, 404, testimonials, forms, FAQ, placeholders */

:root {
  --np-cta: #0369a1;
  --np-cta-hover: #0284c7;
}

.np-btn-glow {
  background: linear-gradient(135deg, color-mix(in srgb, var(--np-cta) 88%, #000), var(--np-cta)) !important;
  border-color: color-mix(in srgb, var(--np-cta) 35%, transparent) !important;
}

.np-btn-glow:hover {
  background: linear-gradient(135deg, var(--np-cta-hover), var(--np-cta)) !important;
}

/* Post article */
.np-post-article {
  padding-top: 5rem;
}

.np-post-article__header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--np-line);
}

.np-post-article__tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--np-accent);
  text-decoration: none;
}

.np-post-article__title {
  margin: 0.75rem 0 0;
  font-family: var(--np-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.np-post-article__lede {
  margin: 1rem 0 0;
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--np-muted) 85%, var(--np-text));
  line-height: 1.65;
}

.np-post-article__meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.88rem;
  color: var(--np-muted);
}

.np-post-article__figure {
  margin: 2rem 0;
}

.np-post-article__figure img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--np-line);
}

.np-post-article__body {
  padding: 2rem 0;
}

/* Article CTA — one block only (dedupe migration/polish leftovers) */
.np-post-article__body .np-article-cta,
.gh-content .np-article-cta {
  margin: 2rem 0 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--np-line);
  border-radius: var(--np-radius-sm);
  background: color-mix(in srgb, var(--np-bg2) 70%, transparent);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: center;
}

.np-post-article__body .np-article-cta a,
.gh-content .np-article-cta a {
  color: var(--np-cta);
  text-decoration: none;
  white-space: nowrap;
}

.np-post-article__body .np-article-cta a:hover,
.gh-content .np-article-cta a:hover {
  text-decoration: underline;
}

/* Keep only the last standard CTA block */
.np-post-article__body .gh-content p.np-article-cta,
.gh-content p.np-article-cta {
  display: none !important;
}

.np-post-article__body .gh-content p.np-article-cta:last-of-type,
.gh-content p.np-article-cta:last-of-type {
  display: block !important;
}

/* Hide legacy migration CTA when the standard block exists */
.np-post-article__body .gh-content:has(.np-article-cta) p:not(.np-article-cta):has(a[href="tel:0772080730"]),
.gh-content:has(.np-article-cta) p:not(.np-article-cta):has(a[href="tel:0772080730"]) {
  display: none !important;
}

.np-post-article__tags {
  padding-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.np-post-tag {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--np-line);
  font-size: 0.8rem;
  color: var(--np-muted);
  text-decoration: none;
}

.np-post-tag:hover {
  border-color: color-mix(in srgb, var(--np-accent) 40%, var(--np-line));
  color: var(--np-text);
}

.np-related-posts {
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--np-line);
}

/* Related projects removed site-wide (legacy markup / cache) */
.np-svc-related-head,
.np-project-grid--service,
.np-related-posts:has(.np-project-grid) {
  display: none !important;
}

.np-service-section:has(.np-svc-related-head) {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 404 */
.np-error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0 4rem;
  text-align: center;
}

.np-error-page__code {
  margin: 0;
  font-family: var(--np-display);
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: 700;
  color: var(--np-accent);
  line-height: 1;
}

.np-error-page__title {
  margin: 1rem 0 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.np-error-page__msg {
  margin: 0.75rem auto 0;
  max-width: 40ch;
  color: var(--np-muted);
}

.np-error-page__actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* Breadcrumbs */
.np-breadcrumbs {
  padding: 5.5rem 0 0;
  font-size: 0.82rem;
}

.np-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  color: var(--np-muted);
}

.np-breadcrumbs a {
  color: var(--np-muted);
  text-decoration: none;
}

.np-breadcrumbs a:hover {
  color: var(--np-accent);
}

.np-breadcrumbs li + li::before {
  content: "›";
  margin-inline-end: 0.5rem;
  opacity: 0.5;
}

/* לקוחות + טכנולוגיות — דף בית */
.np-partners-band {
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-block: 1px solid var(--np-line);
  text-align: center;
}

.np-partners-band .np-container {
  display: block;
  max-width: min(900px, 100%);
}

.np-partners-band__block {
  display: block;
  width: 100%;
  margin-bottom: 2.5rem;
}

.np-partners-band__block--tech {
  margin-bottom: 0;
  padding-top: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--np-line) 55%, transparent);
}

.np-partners-band__title {
  margin: 0 0 0.5rem;
  font-family: var(--np-display);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--np-text);
}

.np-partners-band__subtitle {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--np-text);
}

.np-partners-band__hint {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--np-muted);
  max-width: 36rem;
  margin-inline: auto;
}

.np-partners-band__logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
  max-width: min(42rem, 100%);
  margin-inline: auto;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .np-partners-band__logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.np-client-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--np-line) 85%, transparent);
  border-radius: var(--np-radius-sm);
  background: color-mix(in srgb, var(--np-bg2) 75%, transparent);
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  color: color-mix(in srgb, var(--np-muted) 55%, var(--np-text));
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.np-client-name:hover {
  border-color: color-mix(in srgb, var(--np-accent) 32%, var(--np-line));
  color: var(--np-text);
  background: color-mix(in srgb, var(--np-accent) 5%, var(--np-bg2));
}

.np-partners-band__tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.65rem;
  max-width: 40rem;
  margin-inline: auto;
}

.np-svc-list {
  margin: 0.75rem 0 0;
  padding-inline-start: 1.25rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--np-muted) 85%, var(--np-text));
}

/* Testimonials */
.np-quotes-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .np-quotes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.np-quote-card {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--np-line);
  border-radius: var(--np-radius);
  background: color-mix(in srgb, var(--np-bg2) 80%, transparent);
}

.np-quote-card__media {
  margin-bottom: 1rem;
}

.np-quote-card__avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
}

.np-quote-card__avatar--initials {
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--np-text);
  background: color-mix(in srgb, var(--np-accent) 14%, var(--np-elev));
  border: 1px solid color-mix(in srgb, var(--np-accent) 22%, var(--np-line));
}

.np-quote-card__text {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--np-muted) 80%, var(--np-text));
}

.np-quote-card__name {
  font-style: normal;
  font-weight: 600;
}

.np-quote-card__role {
  display: block;
  font-size: 0.85rem;
  color: var(--np-muted);
}

/* Contact form */
.np-contact-form-section {
  padding: 2rem 0 3rem;
}

.np-contact-form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
  margin-top: 1.25rem;
}

.np-contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.np-form-field {
  display: grid;
  gap: 0.35rem;
}

.np-form-error {
  margin: 0;
  font-size: 0.85rem;
  color: #b91c1c;
}

.np-form-error[hidden] {
  display: none;
}

.np-contact-form input[aria-invalid="true"],
.np-contact-form textarea[aria-invalid="true"] {
  border-color: #b91c1c;
  outline-color: #b91c1c;
}

.np-contact-status {
  max-width: 42rem;
  margin: 0 auto 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--np-radius-sm);
  font-weight: 600;
}

.np-contact-status--visible {
  background: color-mix(in srgb, #16a34a 12%, var(--np-bg2));
  border: 1px solid color-mix(in srgb, #16a34a 35%, transparent);
  color: var(--np-text);
}

.np-contact-status--error {
  background: color-mix(in srgb, #b91c1c 10%, var(--np-bg2));
  border: 1px solid color-mix(in srgb, #b91c1c 35%, transparent);
}

.np-contact-status:focus {
  outline: 2px solid var(--np-accent);
  outline-offset: 2px;
}

/* Legal pages (accessibility, privacy) */
.np-accessibility-page,
.np-legal-page {
  padding-top: 4.5rem;
}

.np-accessibility-hero,
.np-legal-hero {
  padding: clamp(2rem, 5vw, 3rem) 0 1rem;
}

.np-accessibility-title,
.np-legal-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
}

.np-accessibility-updated,
.np-legal-updated {
  margin: 0.75rem 0 0;
  text-align: center;
  color: var(--np-muted);
  font-size: 0.95rem;
}

.np-accessibility-body section,
.np-legal-body section {
  margin-bottom: 2rem;
}

.np-accessibility-body h2,
.np-legal-body h2 {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}

.np-accessibility-body ul,
.np-legal-body ul {
  padding-inline-start: 1.25rem;
  line-height: 1.65;
}

.np-accessibility-contact,
.np-legal-contact {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.np-accessibility-contact dt,
.np-legal-contact dt {
  font-weight: 700;
  margin: 0;
}

.np-accessibility-contact dd,
.np-legal-contact dd {
  margin: 0;
}

/* Video text alternative */
.np-hover-video__desc {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--np-muted) 75%, var(--np-text));
  text-align: center;
}

/* Improved muted text contrast (WCAG 1.4.3) */
.np-root {
  --np-muted: #475569;
}

.np-root[data-theme="dark"] {
  --np-muted: #cbd5e1;
}

.np-hero-full__kicker,
.np-kicker {
  color: color-mix(in srgb, var(--np-muted) 70%, var(--np-text));
}

.np-footer-bar a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.np-footer-bar a:focus-visible {
  outline: 2px solid var(--np-accent);
  outline-offset: 3px;
}

/* Site search modal */
body.np-search-open {
  overflow: hidden;
}

.np-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1200;
}

.np-search-panel {
  position: fixed;
  z-index: 1201;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 2rem));
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--np-radius);
  border: 1px solid var(--np-line-strong);
  background: var(--np-bg2);
  box-shadow: var(--np-shadow);
}

.np-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.np-search-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.np-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--np-line);
  border-radius: var(--np-radius-sm);
  background: var(--np-elev);
  color: var(--np-text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.np-search-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--np-line-strong);
  border-radius: var(--np-radius-sm);
  background: var(--np-bg);
  color: var(--np-text);
  font: inherit;
}

.np-search-input:focus-visible {
  outline: 2px solid var(--np-accent);
  outline-offset: 2px;
}

.np-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  max-height: min(52vh, 480px);
}

.np-search-result {
  border-top: 1px solid var(--np-line);
}

.np-search-result:first-child {
  border-top: 0;
}

.np-search-result__link {
  display: block;
  padding: 0.75rem 0.35rem;
  color: inherit;
  text-decoration: none;
}

.np-search-result__link:hover,
.np-search-result__link:focus-visible {
  color: var(--np-accent);
}

.np-search-result__title {
  display: block;
  font-weight: 600;
}

.np-search-result__meta {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--np-muted);
}

.np-search-result__excerpt {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--np-muted);
}

.np-search-empty {
  padding: 1rem 0.35rem;
  color: var(--np-muted);
}

.np-drawer-search {
  margin-bottom: 0.75rem;
}

.np-icon-btn--mob {
  flex-shrink: 0;
}

.np-contact-form input,
.np-contact-form textarea {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--np-line-strong);
  border-radius: var(--np-radius-sm);
  background: var(--np-bg2);
  color: var(--np-text);
  font: inherit;
}

.np-contact-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.np-contact-hours {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--np-muted);
}

/* FAQ */
.np-svc-faq-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.np-svc-faq-item {
  border: 1px solid var(--np-line);
  border-radius: var(--np-radius-sm);
  background: color-mix(in srgb, var(--np-bg2) 60%, transparent);
}

.np-svc-faq-item summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

.np-svc-faq-item p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--np-muted);
  line-height: 1.65;
}

/* Placeholder boxes (עברית ב-HTML — בלי SVG) */
.np-img-placeholder-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 2px dashed color-mix(in srgb, var(--np-line-strong) 90%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--np-bg2) 90%, var(--np-bg));
}

.np-img-placeholder-box__text {
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--np-muted);
  padding: 0.35rem 0.5rem;
  text-align: center;
}

.np-img-placeholder-box--logo {
  width: 6.5rem;
  height: 2.5rem;
}

.np-img-placeholder-box--avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
}

.np-img-placeholder-box--media,
.np-project-media__ph {
  display: flex;
  width: 100%;
  min-height: 10rem;
  aspect-ratio: 16 / 10;
}

.np-img-placeholder-box--portrait,
.np-about-leader__img.np-img-placeholder-box {
  display: flex;
  width: 100%;
  min-height: 14rem;
  aspect-ratio: 4 / 5;
}

.np-about-img-placeholder--img.np-img-placeholder-box {
  display: flex;
  width: 100%;
  min-height: 12rem;
  max-height: 22rem;
  aspect-ratio: 21 / 9;
  border-radius: var(--np-radius);
}

/* Floating accessibility menu */
.np-a11y-widget {
  position: fixed;
  inset-inline-start: 1rem;
  bottom: 1rem;
  z-index: 1200;
}

.np-a11y-widget__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--np-accent);
  border-radius: 999px;
  background: var(--np-bg2);
  color: var(--np-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.np-a11y-widget__toggle:hover,
.np-a11y-widget__toggle:focus-visible {
  background: color-mix(in srgb, var(--np-accent) 12%, var(--np-bg2));
  outline: 2px solid var(--np-accent);
  outline-offset: 2px;
}

.np-a11y-widget__icon {
  width: 1.35rem;
  height: 1.35rem;
}

.np-a11y-widget__panel {
  position: absolute;
  inset-inline-start: 0;
  bottom: calc(100% + 0.65rem);
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--np-accent) 35%, transparent);
  border-radius: var(--np-radius-sm);
  background: var(--np-bg2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.np-a11y-widget__title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.np-a11y-widget__actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.np-a11y-widget__actions a,
.np-a11y-widget__actions button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: var(--np-radius-sm);
  background: transparent;
  color: var(--np-text);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.np-a11y-widget__actions a:hover,
.np-a11y-widget__actions a:focus-visible,
.np-a11y-widget__actions button:hover,
.np-a11y-widget__actions button:focus-visible {
  background: color-mix(in srgb, var(--np-accent) 10%, var(--np-bg2));
  outline: 2px solid var(--np-accent);
  outline-offset: 1px;
}

.np-a11y-widget__actions button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--np-accent) 18%, var(--np-bg2));
  font-weight: 700;
}

html.np-a11y-font-110 { font-size: 110%; }
html.np-a11y-font-125 { font-size: 125%; }
html.np-a11y-font-140 { font-size: 140%; }

html.np-a11y-high-contrast {
  --np-text: #000;
  --np-muted: #1a1a1a;
  --np-bg: #fff;
  --np-bg2: #fff;
  --np-accent: #003d82;
}

html.np-a11y-high-contrast[data-theme="dark"] {
  --np-text: #fff;
  --np-muted: #f5f5f5;
  --np-bg: #000;
  --np-bg2: #111;
  --np-accent: #7ec8ff;
}

@media (max-width: 767px) {
  .np-a11y-widget {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Project case-study pages — compact gallery layout */
.np-container--project {
  max-width: 56rem;
}

.np-post-article--project {
  padding-top: 4.5rem;
}

.np-post-article--project .np-project-head {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--np-line);
}

.np-post-article--project .np-project-head__tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--np-accent) 35%, transparent);
  background: color-mix(in srgb, var(--np-accent) 10%, transparent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--np-accent);
  text-decoration: none;
}

.np-post-article--project .np-project-head__title {
  margin: 0.85rem 0 0;
  font-family: var(--np-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.np-post-article--project .np-project-head__lede {
  margin: 0.65rem 0 0;
  max-width: 42rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--np-muted);
}

.np-post-article--project .np-project-content {
  padding: 1.5rem 0 3rem;
}

.np-post-article--project .np-project-showcase {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.np-post-article--project .np-project-gallery,
.np-post-article--project .gh-content:has(> .kg-image-card) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}

@media (min-width: 640px) {
  .np-post-article--project .np-project-gallery,
  .np-post-article--project .gh-content:has(> .kg-image-card) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.np-post-article--project .np-project-gallery__item,
.np-post-article--project .kg-image-card {
  margin: 0 !important;
  border-radius: var(--np-radius-sm, 0.5rem);
  overflow: hidden;
  border: 1px solid var(--np-line);
  background: var(--np-bg2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.np-post-article--project .np-project-gallery__item:hover,
.np-post-article--project .kg-image-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--np-accent) 40%, var(--np-line));
  box-shadow: 0 8px 24px color-mix(in srgb, #000 18%, transparent);
}

.np-post-article--project .np-project-gallery__item img,
.np-post-article--project .kg-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.np-post-article--project .np-project-gallery__item figcaption,
.np-post-article--project .kg-image-card figcaption {
  padding: 0.45rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--np-muted);
  border-top: 1px solid var(--np-line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-post-article--project .np-project-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.np-post-article--project .np-project-scope li {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--np-line);
  background: color-mix(in srgb, var(--np-bg2) 80%, transparent);
  font-size: 0.78rem;
  color: var(--np-muted);
}

.np-post-article--project .np-project-actions,
.np-post-article--project .gh-content > p:last-of-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--np-radius-sm);
  border: 1px solid var(--np-line);
  background: color-mix(in srgb, var(--np-bg2) 65%, transparent);
  font-size: 0.88rem;
  text-align: center;
}

.np-post-article--project .np-project-actions a,
.np-post-article--project .gh-content > p:last-of-type a {
  color: var(--np-cta);
  text-decoration: none;
  font-weight: 600;
}

.np-post-article--project .np-project-actions a:hover,
.np-post-article--project .gh-content > p:last-of-type a:hover {
  text-decoration: underline;
}

.np-post-article--project .gh-content > h2,
.np-post-article--project .gh-content > p:has(strong:first-child),
.np-post-article--project .gh-content .np-article-cta {
  display: none !important;
}

.np-post-article--project .gh-content:not(:has(.np-project-showcase)) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .np-post-article--project .gh-content:not(:has(.np-project-showcase)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.np-post-article--project .gh-content:not(:has(.np-project-showcase)) > ul,
.np-post-article--project .gh-content:not(:has(.np-project-showcase)) > p {
  grid-column: 1 / -1;
}

.np-post-article--project .gh-content:not(:has(.np-project-showcase)) > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.np-post-article--project .gh-content:not(:has(.np-project-showcase)) > ul li {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--np-line);
  background: color-mix(in srgb, var(--np-bg2) 80%, transparent);
  font-size: 0.78rem;
  color: var(--np-muted);
}

/* ——— Home projects showcase (fixed thumbnails, editorial RTL) ——— */
.np-home-projects {
  padding-block: clamp(3rem, 7vw, 4.75rem);
  background: color-mix(in srgb, var(--np-bg2) 55%, var(--np-bg));
  border-block: 1px solid color-mix(in srgb, var(--np-line) 80%, transparent);
}

.np-home-projects__inner {
  width: min(980px, 100%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

.np-home-projects__head {
  margin-bottom: clamp(1.35rem, 3vw, 1.85rem);
  text-align: start;
}

.np-home-projects__kicker {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--np-accent);
}

.np-home-projects__title {
  margin: 0 0 0.5rem;
  font-family: var(--np-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
  text-wrap: balance;
}

.np-home-projects__lede {
  margin: 0;
  max-width: 52ch;
  color: var(--np-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.np-home-projects__board {
  border: 1px solid var(--np-line);
  border-radius: 12px;
  background: var(--np-bg2);
  overflow: hidden;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--np-text) 4%, transparent);
}

.np-home-projects__grid {
  display: grid;
  gap: 0;
}

@media (min-width: 768px) {
  .np-home-projects__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .np-home-projects__grid .np-home-project:nth-child(odd) {
    border-inline-end: 1px solid color-mix(in srgb, var(--np-line) 85%, transparent);
  }
}

.np-home-projects__foot {
  margin-top: 1.25rem;
  text-align: start;
}

.np-home-projects__all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--np-accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.np-home-projects__all:hover {
  color: color-mix(in srgb, var(--np-accent) 82%, var(--np-text));
}

.np-home-projects__all:focus-visible {
  outline: 2px solid var(--np-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Card row: compact fixed thumb (right) + text (left) — home + projects archive */
.np-home-projects .np-home-project,
.np-tax .np-home-project {
  border-block-end: 1px solid color-mix(in srgb, var(--np-line) 85%, transparent);
  transition: background 0.22s ease;
}

.np-home-projects__grid .np-home-project:last-child,
.np-tax .np-home-projects__grid .np-home-project:last-child {
  border-block-end: none;
}

@media (min-width: 768px) {
  .np-home-projects__grid .np-home-project:nth-last-child(-n + 2),
  .np-tax .np-home-projects__grid .np-home-project:nth-last-child(-n + 2) {
    border-block-end: none;
  }
}

.np-home-projects .np-home-project:hover,
.np-tax .np-home-project:hover {
  background: color-mix(in srgb, var(--np-accent) 4%, var(--np-bg2));
}

.np-home-projects .np-home-project__link,
.np-tax .np-home-project__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.15rem);
  min-height: 7.5rem;
  padding: 1rem 1.1rem;
  direction: rtl;
  text-decoration: none;
  color: inherit;
}

/* Fixed thumbnail — identical box on every card */
.np-home-projects .np-home-project__thumb,
.np-tax .np-home-project__thumb {
  flex: 0 0 6.75rem;
  width: 6.75rem;
  height: 5.0625rem;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--np-elev);
  border: 1px solid color-mix(in srgb, var(--np-line) 90%, transparent);
  box-shadow: 0 1px 2px color-mix(in srgb, #000 8%, transparent);
}

.np-home-projects .np-home-project__thumb img,
.np-tax .np-home-project__thumb img {
  display: block;
  width: 6.75rem;
  height: 5.0625rem;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

.np-home-projects .np-home-project:hover .np-home-project__thumb img,
.np-tax .np-home-project:hover .np-home-project__thumb img {
  transform: scale(1.04);
  filter: brightness(1.04);
}

.np-home-projects .np-home-project__thumb--empty,
.np-tax .np-home-project__thumb--empty {
  display: grid;
  place-items: center;
  color: var(--np-muted);
}

.np-home-projects .np-home-project__thumb--empty svg,
.np-tax .np-home-project__thumb--empty svg {
  width: 1.65rem;
  height: 1.65rem;
  opacity: 0.4;
}

.np-home-projects .np-home-project__body,
.np-tax .np-home-project__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  min-width: 0;
  padding-inline-end: 0.15rem;
  text-align: start;
}

.np-home-projects .np-home-project__tag,
.np-tax .np-home-project__tag {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--np-accent);
}

.np-home-projects .np-home-project__title,
.np-tax .np-home-project__title {
  margin: 0;
  font-family: var(--np-display);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-home-projects .np-home-project__excerpt,
.np-tax .np-home-project__excerpt {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--np-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-home-projects .np-home-project__cta,
.np-tax .np-home-project__cta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--np-accent);
}

.np-home-projects .np-home-project__link:focus-visible,
.np-tax .np-home-project__link:focus-visible {
  outline: 2px solid var(--np-accent);
  outline-offset: -2px;
}

.np-tax-projects {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

@media (max-width: 767px) {
  .np-home-projects__board,
  .np-tax .np-home-projects__board {
    border-radius: 10px;
  }

  .np-home-projects .np-home-project__link,
  .np-tax .np-home-project__link {
    min-height: 0;
    padding: 0.95rem 1rem;
  }

  .np-home-projects .np-home-project__thumb,
  .np-tax .np-home-project__thumb {
    flex-basis: 5.75rem;
    width: 5.75rem;
    height: 4.3125rem;
  }

  .np-home-projects .np-home-project__thumb img,
  .np-tax .np-home-project__thumb img {
    width: 5.75rem;
    height: 4.3125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .np-home-projects .np-home-project__thumb img,
  .np-tax .np-home-project__thumb img {
    transition: none;
  }

  .np-home-projects .np-home-project:hover .np-home-project__thumb img,
  .np-tax .np-home-project:hover .np-home-project__thumb img {
    transform: none;
  }
}
