/*
 * Compact archive catalogue
 * Loaded after inner-pages.css so legacy featured-card rules cannot win.
 */

/*
 * Unified archive hero
 * All catalogue and editorial archives use the same compact navy stage as News.
 */
body.nessar-unified-archive {
  background: #000f38;
}

body.nessar-unified-archive .inner-hero {
  min-height: auto !important;
  align-items: initial !important;
  overflow: visible !important;
  background:
    radial-gradient(circle at 78% 25%, rgba(36, 200, 237, .12), transparent 20rem),
    #000f38 !important;
  padding: clamp(7.1rem, 8.4vw, 8rem) 0 clamp(1.75rem, 3vw, 2.35rem) !important;
}

body.nessar-unified-archive .inner-hero::before,
body.nessar-unified-archive .inner-hero::after {
  display: none !important;
}

body.nessar-unified-archive .inner-hero__eyebrow {
  display: none !important;
}

body.nessar-unified-archive .inner-hero h1 {
  max-width: 28ch !important;
  color: #fff;
  font-size: clamp(2.28rem, 3.05vw, 3.25rem) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.12 !important;
}

body.nessar-unified-archive .inner-hero__description {
  max-width: 42rem;
  color: rgba(255, 255, 255, .82) !important;
  font-size: clamp(1rem, 1.2vw, 1.08rem) !important;
  line-height: 1.55 !important;
}

body.nessar-unified-archive .inner-section {
  display: flow-root;
  background:
    linear-gradient(180deg, #000f38 0, #001744 19rem, #edf4fb 19rem, #f6faff 100%) !important;
  padding: 0 0 clamp(4rem, 7vw, 7rem) !important;
}

body.nessar-unified-archive .archive-filter-panel {
  margin-top: 1rem;
}

body.nessar-unified-archive.nessar-services-page .services-page__grid {
  padding-top: 1rem;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(.8rem, 1.2vw, 1.1rem);
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card-grid > .inner-card {
  grid-column: auto !important;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card__link,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card:first-child .inner-card__link,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card-grid--featured-tail .inner-card:last-child .inner-card__link {
  height: 12.5rem !important;
  min-height: 12.5rem !important;
  grid-template-areas:
    "media body"
    "media action";
  grid-template-columns: minmax(10rem, .78fr) minmax(0, 1.22fr) !important;
  grid-template-rows: 1fr auto !important;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card__media,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card:first-child .inner-card__media,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card-grid--featured-tail .inner-card:last-child .inner-card__media {
  grid-area: media !important;
  aspect-ratio: auto !important;
  height: 100%;
  min-height: 0 !important;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card__body,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card:first-child .inner-card__body {
  grid-area: body;
  min-height: 0 !important;
  justify-content: center;
  padding: 1rem 1.1rem .65rem;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card__title,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card:first-child .inner-card__title {
  min-height: 0 !important;
  font-size: clamp(.98rem, 1.05vw, 1.12rem) !important;
  letter-spacing: -.015em;
  line-height: 1.25;
  -webkit-line-clamp: 2;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card__excerpt,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card:first-child .inner-card__excerpt {
  margin-top: .5rem;
  font-size: .72rem;
  line-height: 1.48;
  -webkit-line-clamp: 2;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card__action,
:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card:first-child .inner-card__action {
  grid-area: action;
  min-height: 2.8rem;
  padding: .45rem 1.1rem;
  font-size: .68rem;
}

:where(
  body.nessar-solution-archive,
  body.blog,
  body.category,
  body.tag,
  body.date,
  body.post-type-archive-post
) .inner-card__action-icon {
  width: 1.65rem;
  height: 1.65rem;
}

@media (max-width: 64rem) {
  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 48rem) {
  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card__link,
  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card:first-child .inner-card__link,
  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card-grid--featured-tail .inner-card:last-child .inner-card__link {
    height: 9.65rem !important;
    min-height: 9.65rem !important;
    grid-template-columns: minmax(7.75rem, .72fr) minmax(0, 1.28fr) !important;
  }

  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card__media,
  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card:first-child .inner-card__media,
  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card-grid--featured-tail .inner-card:last-child .inner-card__media {
    height: 100%;
    min-height: 0 !important;
  }

  :where(
    body.nessar-solution-archive,
    body.blog,
    body.category,
    body.tag,
    body.date,
    body.post-type-archive-post
  ) .inner-card__excerpt {
    display: none;
  }
}

/*
 * Product catalogue
 * Product cards deliberately follow the compact, upright presentation used on
 * the home page. Other archives keep the editorial horizontal card above.
 */
body.nessar-card-catalog .inner-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 1.35vw, 1.35rem);
}

body.nessar-card-catalog .inner-card-grid > .inner-card {
  grid-column: auto !important;
  min-width: 0;
}

body.nessar-card-catalog .inner-card__link,
body.nessar-card-catalog .inner-card:first-child .inner-card__link,
body.nessar-card-catalog .inner-card-grid--featured-tail .inner-card:last-child .inner-card__link {
  display: grid;
  height: clamp(22rem, 26vw, 26.5rem) !important;
  min-height: 22rem !important;
  grid-template-areas:
    "body"
    "media"
    "action" !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  overflow: hidden;
  color: #fff !important;
  border: 1px solid rgba(133, 207, 255, .72) !important;
  border-radius: .85rem !important;
  background:
    radial-gradient(circle at 100% 100%, rgba(0, 190, 255, .2), transparent 42%),
    linear-gradient(145deg, #12336e 0%, #0d4488 54%, #0872bf 100%) !important;
  box-shadow: 0 1rem 2.2rem rgba(3, 28, 75, .12);
}

body.nessar-card-catalog .inner-card__link::after {
  background: linear-gradient(115deg, transparent 24%, rgba(255, 255, 255, .1) 48%, transparent 72%);
}

body.nessar-card-catalog .inner-card__link:hover {
  border-color: #66d8ff;
  box-shadow: 0 1.2rem 2.7rem rgba(0, 94, 194, .22);
  transform: translateY(-.25rem);
}

body.nessar-card-catalog .inner-card__body,
body.nessar-card-catalog .inner-card:first-child .inner-card__body {
  grid-area: body !important;
  min-height: 6.75rem !important;
  justify-content: flex-start;
  padding: 1.35rem 1.35rem .65rem;
}

body.nessar-card-catalog .inner-card-grid .inner-card .inner-card__label {
  color: #5ee5ff !important;
  font-size: .67rem;
  letter-spacing: .075em;
}

body.nessar-card-catalog .inner-card-grid .inner-card .inner-card__title,
body.nessar-card-catalog .inner-card-grid .inner-card:first-child .inner-card__title {
  min-height: 2.8rem !important;
  color: #fff;
  font-size: clamp(1.05rem, 1.2vw, 1.35rem) !important;
  line-height: 1.18;
  letter-spacing: -.025em;
  -webkit-line-clamp: 2;
}

body.nessar-card-catalog .inner-card__excerpt {
  display: none !important;
}

body.nessar-card-catalog .inner-card__media,
body.nessar-card-catalog .inner-card:first-child .inner-card__media,
body.nessar-card-catalog .inner-card-grid--featured-tail .inner-card:last-child .inner-card__media {
  grid-area: media !important;
  width: auto;
  height: auto;
  min-height: 0 !important;
  margin: 0 1.35rem .8rem;
  overflow: hidden;
  aspect-ratio: auto !important;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: .55rem;
  background: linear-gradient(145deg, #f8fbff, #e7f2fb);
}

body.nessar-card-catalog .inner-card__media img,
body.nessar-card-catalog .inner-card:first-child .inner-card__media img {
  box-sizing: border-box !important;
  width: 100%;
  height: 100% !important;
  padding: .45rem;
  object-fit: contain !important;
}

body.nessar-card-catalog .inner-card__link:hover .inner-card__media img {
  transform: scale(1.025);
}

body.nessar-card-catalog .inner-card-grid .inner-card .inner-card__action,
body.nessar-card-catalog .inner-card-grid .inner-card:first-child .inner-card__action {
  grid-area: action !important;
  min-height: 3.25rem;
  padding: .65rem 1.35rem;
  color: #fff;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(0, 18, 57, .12);
}

body.nessar-card-catalog .inner-card__action-icon {
  width: 1.8rem;
  height: 1.8rem;
  color: #032958;
  background: #fff;
}

@media (max-width: 78rem) {
  body.nessar-card-catalog .inner-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.nessar-card-catalog .inner-card__link,
  body.nessar-card-catalog .inner-card:first-child .inner-card__link,
  body.nessar-card-catalog .inner-card-grid--featured-tail .inner-card:last-child .inner-card__link {
    height: 24rem !important;
  }
}

@media (max-width: 48rem) {
  body.nessar-card-catalog .inner-card-grid {
    grid-template-columns: 1fr !important;
    gap: .9rem;
  }

  body.nessar-card-catalog .inner-card__link,
  body.nessar-card-catalog .inner-card:first-child .inner-card__link,
  body.nessar-card-catalog .inner-card-grid--featured-tail .inner-card:last-child .inner-card__link {
    height: 22rem !important;
    min-height: 22rem !important;
  }

  body.nessar-card-catalog .inner-card__body,
  body.nessar-card-catalog .inner-card:first-child .inner-card__body {
    min-height: 5.75rem !important;
    padding: 1.05rem 1.1rem .5rem;
  }

  body.nessar-card-catalog .inner-card__media,
  body.nessar-card-catalog .inner-card:first-child .inner-card__media,
  body.nessar-card-catalog .inner-card-grid--featured-tail .inner-card:last-child .inner-card__media {
    margin: 0 1.1rem .65rem;
  }

  body.nessar-card-catalog .inner-card__action,
  body.nessar-card-catalog .inner-card:first-child .inner-card__action {
    padding-inline: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.nessar-card-catalog .inner-card__link,
  body.nessar-card-catalog .inner-card__media img {
    transition: none;
  }
}

/* The Services page uses curated capability cards instead of archive posts. */
body.nessar-services-page .services-page__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 1.35vw, 1.35rem);
}

body.nessar-services-page .services-page__card {
  min-height: 24rem;
  color: #fff;
  border-color: rgba(133, 207, 255, .72);
  background:
    radial-gradient(circle at 100% 100%, rgba(0, 190, 255, .2), transparent 42%),
    linear-gradient(145deg, #12336e 0%, #0d4488 54%, #0872bf 100%);
  box-shadow: 0 1rem 2.2rem rgba(3, 28, 75, .12);
}

body.nessar-services-page .services-page__card:hover {
  border-color: #66d8ff;
  box-shadow: 0 1.2rem 2.7rem rgba(0, 94, 194, .22);
}

body.nessar-services-page .services-page__code {
  color: #032958;
  background: #fff;
}

body.nessar-services-page .services-page__number {
  color: rgba(255, 255, 255, .58);
}

body.nessar-services-page .services-page__card h3 {
  color: #fff;
}

body.nessar-services-page .services-page__card > p {
  color: rgba(238, 248, 255, .76);
}

body.nessar-services-page .services-page__card ul {
  border-color: rgba(255, 255, 255, .18);
}

body.nessar-services-page .services-page__card li {
  color: rgba(247, 252, 255, .9);
}

@media (max-width: 78rem) {
  body.nessar-services-page .services-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  body.nessar-services-page .services-page__grid {
    grid-template-columns: 1fr;
  }

  body.nessar-services-page .services-page__card {
    min-height: 0;
  }

  body.nessar-services-page .services-page__process {
    margin-inline: 0;
  }
}
