:root {
  --njm-navy-950: #061634;
  --njm-navy-900: #081f42;
  --njm-navy-800: #0c2a55;
  --njm-blue: #2e6fdd;
  --njm-blue-soft: #eaf1fb;
  --njm-gold: #d4a937;
  --njm-gold-deep: #b98a1f;
  --njm-text: #122748;
  --njm-muted: #5d6e8c;
  --njm-line: #e3eaf4;
  --njm-soft: #f4f7fc;
  --njm-green: #1fa85a;
  --njm-shadow: 0 18px 50px rgba(8, 31, 66, .11);
  --njm-gold-gradient: linear-gradient(135deg, #f2d479 0%, #d4a937 52%, #b98a1f 100%);
  --njm-navy-gradient: linear-gradient(140deg, #11376c 0%, #081f42 100%);
}

html:has(body.njm-article-page) {
  overflow-x: hidden;
  overflow-x: clip;
}

body.njm-article-page {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-x: clip !important;
  color: var(--njm-text);
  background: var(--njm-soft);
  font-family: "Almarai", sans-serif !important;
  line-height: 1.95;
}

.njm-article-page *,
.njm-article-page *::before,
.njm-article-page *::after {
  box-sizing: border-box;
}

.njm-article-page img {
  max-width: 100%;
}

.njm-article-page a {
  text-underline-offset: 4px;
}

.njm-article-page .site-header,
.njm-article-page .site-footer {
  display: none !important;
}

.njm-article-page .wp-site-blocks,
.njm-article-page .wp-site-blocks > *,
.njm-article-page main,
.njm-article-page .entry-content {
  min-width: 0 !important;
  max-width: 100% !important;
}

.njm-wrap {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.njm-topbar {
  position: relative;
  z-index: 302;
  width: 100%;
  background: var(--njm-navy-950);
  color: #b9c8e4;
  font-size: .8rem;
}

.njm-topbar .njm-wrap {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.njm-topbar span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.njm-topbar svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: var(--njm-gold);
}

.njm-topbar strong {
  color: var(--njm-gold);
}

.njm-topbar a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.njm-article-header {
  position: sticky;
  top: 0;
  z-index: 300;
  width: 100%;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--njm-line);
  box-shadow: 0 5px 20px rgba(8, 31, 66, .06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.njm-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
}

.njm-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--njm-navy-900) !important;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none !important;
}

.njm-brand img {
  display: block;
  width: auto !important;
  height: 56px !important;
  aspect-ratio: 200 / 189;
  object-fit: contain;
  flex: 0 0 auto;
}

.njm-brand small {
  display: block;
  color: var(--njm-muted);
  font-size: .66rem;
  font-weight: 400;
}

.njm-nav {
  min-width: 0;
}

.njm-nav ul {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.njm-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .72rem;
  border-radius: 999px;
  color: var(--njm-navy-800) !important;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.njm-nav a:hover,
.njm-nav a:focus-visible {
  color: var(--njm-blue) !important;
  background: var(--njm-blue-soft);
}

.njm-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.njm-header-call,
.njm-whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  color: #fff !important;
  background: var(--njm-navy-gradient);
  box-shadow: 0 9px 24px rgba(8, 31, 66, .25);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none !important;
}

.njm-header-call svg,
.njm-whatsapp-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.njm-menu-button {
  display: none;
  width: 46px;
  height: 46px;
  padding: 8px;
  border: 2px solid var(--njm-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.njm-menu-button span {
  display: block;
  width: 22px;
  height: 2.5px;
  margin: 4.5px auto;
  border-radius: 3px;
  background: var(--njm-navy-900);
  transition: transform .25s, opacity .25s;
}

.njm-menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.njm-menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.njm-menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.njm-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 289;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(6, 22, 52, .52);
}

/* Article title banner */
.njm-article-page .wp-site-blocks > main {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  color: #fff;
  background-color: var(--njm-navy-950);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(46, 111, 221, .24), transparent 42%),
    radial-gradient(circle at 88% 100%, rgba(212, 169, 55, .14), transparent 37%);
}

.njm-article-page .wp-site-blocks > main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 26px 26px;
}

.njm-article-page .wp-site-blocks > main > .wp-block-group {
  position: relative;
  z-index: 1;
  width: min(1000px, calc(100% - 40px)) !important;
  min-height: 260px;
  margin-inline: auto !important;
  padding: 70px 0 76px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none !important;
}

.njm-article-page .hostinger-ai-page-title {
  width: 100%;
  margin: 0 !important;
  color: #fff !important;
  font-family: "Almarai", sans-serif !important;
  font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
  font-weight: 800 !important;
  line-height: 1.65 !important;
  text-align: center;
  text-wrap: balance;
}

.njm-article-page .hostinger-ai-page-title::before {
  content: "دليل النجم المثالي";
  display: table;
  margin: 0 auto 16px;
  padding: 6px 16px;
  border: 1px solid rgba(212, 169, 55, .5);
  border-radius: 999px;
  color: var(--njm-gold);
  background: rgba(255, 255, 255, .07);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.7;
}

/* Article body */
.njm-article-page .wp-site-blocks > main + .wp-block-group {
  width: min(1000px, calc(100% - 40px)) !important;
  margin: -36px auto 70px !important;
  padding: 0 !important;
  position: relative;
  z-index: 2;
}

.njm-article-page .wp-site-blocks > main + .wp-block-group > .wp-block-group:first-child {
  width: 100% !important;
  margin: 0 0 24px !important;
}

.njm-article-page .wp-block-post-featured-image {
  margin: 0 !important;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 24px !important;
  background: #fff;
  box-shadow: var(--njm-shadow);
}

.njm-article-page .wp-block-post-featured-image a,
.njm-article-page .wp-block-post-featured-image img {
  display: block;
  width: 100% !important;
}

.njm-article-page .wp-block-post-featured-image img {
  height: auto !important;
  aspect-ratio: 12 / 5;
  object-fit: cover;
  border-radius: 18px !important;
}

.njm-article-page .entry-content {
  width: min(860px, 100%) !important;
  margin: 0 auto !important;
  padding: clamp(26px, 5vw, 56px) clamp(20px, 6vw, 68px) !important;
  border: 1px solid var(--njm-line);
  border-radius: 24px;
  color: var(--njm-text);
  background: #fff;
  box-shadow: var(--njm-shadow);
  font-family: "Almarai", sans-serif !important;
  font-size: 1.03rem;
  line-height: 2.05;
}

.njm-article-page .entry-content > * {
  max-width: 100% !important;
}

.njm-article-page .entry-content > :first-child {
  margin-top: 0 !important;
}

.njm-article-page .entry-content h2,
.njm-article-page .entry-content h3,
.njm-article-page .entry-content h4 {
  position: relative;
  margin: 2.2em 0 .8em !important;
  padding-inline-start: 18px;
  color: var(--njm-navy-900) !important;
  font-family: "Almarai", sans-serif !important;
  font-weight: 800 !important;
  line-height: 1.75 !important;
  overflow-wrap: anywhere;
}

.njm-article-page .entry-content h2 {
  font-size: clamp(1.45rem, 3vw, 2rem) !important;
}

.njm-article-page .entry-content h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem) !important;
}

.njm-article-page .entry-content h4 {
  font-size: 1.1rem !important;
}

.njm-article-page .entry-content h2::before,
.njm-article-page .entry-content h3::before,
.njm-article-page .entry-content h4::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .35em;
  width: 5px;
  height: 1.15em;
  border-radius: 99px;
  background: var(--njm-gold-gradient);
}

.njm-article-page .entry-content p {
  margin: 0 0 1.25em;
  color: #263b5d;
}

.njm-article-page .entry-content a {
  color: #174fa6;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.njm-article-page .entry-content ul,
.njm-article-page .entry-content ol {
  margin: 1.15em 0 1.6em;
  padding: 0 1.45rem 0 0;
}

.njm-article-page .entry-content li {
  margin-bottom: .65em;
  padding-inline-start: .25em;
}

.njm-article-page .entry-content li::marker {
  color: var(--njm-gold-deep);
  font-weight: 800;
}

.njm-article-page .entry-content figure {
  margin: 2rem auto !important;
}

.njm-article-page .entry-content figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(8, 31, 66, .13);
}

.njm-article-page .entry-content figcaption {
  margin-top: .65rem;
  color: var(--njm-muted);
  font-size: .8rem;
  text-align: center;
}

.njm-table-scroll {
  width: 100%;
  margin: 1.8rem 0;
  overflow-x: auto;
  border: 1px solid var(--njm-line);
  border-radius: 15px;
  -webkit-overflow-scrolling: touch;
}

.njm-article-page .entry-content table {
  width: 100%;
  min-width: 540px;
  margin: 0 !important;
  border: 0;
  border-collapse: collapse;
  background: #fff;
  font-size: .9rem;
}

.njm-article-page .entry-content th,
.njm-article-page .entry-content td {
  padding: .82rem 1rem;
  border: 1px solid var(--njm-line);
  text-align: right;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.njm-article-page .entry-content tr:nth-child(even) {
  background: var(--njm-soft);
}

.njm-article-page .entry-content th,
.njm-article-page .entry-content td:first-child {
  color: var(--njm-navy-900);
  font-weight: 700;
}

.njm-article-page .wp-site-blocks > main + .wp-block-group > .wp-block-separator {
  width: min(860px, 100%) !important;
  height: 1px !important;
  margin: 28px auto 14px !important;
  border: 0 !important;
  background: var(--njm-line) !important;
}

.njm-article-page .wp-site-blocks > main + .wp-block-group > .wp-block-group:has(.wp-block-post-date) {
  width: min(860px, 100%) !important;
  margin-inline: auto !important;
  color: var(--njm-muted);
  font-size: .82rem;
}

.njm-article-page .wp-block-post-date {
  text-align: center !important;
}

/* Footer */
.njm-article-footer {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: #b9c8e4;
  background: var(--njm-navy-950);
}

.njm-article-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--njm-gold-gradient);
}

.njm-article-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 300px at 90% 0%, rgba(46, 111, 221, .15), transparent 60%);
}

.njm-footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.15fr;
  gap: 2.4rem;
  padding-block: 58px 42px;
}

.njm-footer-logo {
  width: 126px;
  height: 84px;
  margin-bottom: 1rem;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(212, 169, 55, .5);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

.njm-footer-logo img {
  display: block;
  width: auto;
  height: 64px;
  object-fit: contain;
}

.njm-footer-about p {
  max-width: 22rem;
  margin: 0;
  font-size: .85rem;
  font-weight: 300;
  line-height: 1.9;
}

.njm-article-footer h2 {
  position: relative;
  margin: 0 0 1.1rem;
  padding-bottom: .55rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.njm-article-footer h2::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--njm-gold-gradient);
}

.njm-article-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.njm-article-footer li {
  margin-bottom: .45rem;
}

.njm-article-footer li a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: #b9c8e4;
  font-size: .86rem;
  text-decoration: none;
}

.njm-article-footer li a:hover,
.njm-article-footer li a:focus-visible {
  color: var(--njm-gold);
}

.njm-footer-contact {
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
}

.njm-footer-contact strong {
  display: block;
  margin-bottom: .25rem;
  color: #fff;
  font-size: .92rem;
}

.njm-footer-phone {
  display: inline-block;
  margin-bottom: .7rem;
  color: var(--njm-gold) !important;
  font-size: 1.42rem;
  font-weight: 800;
  text-decoration: none !important;
}

.njm-whatsapp-button {
  width: 100%;
  min-height: 44px;
  padding: .65rem 1rem;
  background: linear-gradient(135deg, #2bc26b, #189a4e);
  box-shadow: 0 9px 24px rgba(31, 168, 90, .28);
}

.njm-footer-bottom {
  position: relative;
  z-index: 1;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .77rem;
}

.njm-footer-bottom .njm-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.njm-footer-bottom strong {
  color: var(--njm-gold);
}

.njm-mobile-cta {
  display: none;
}

@media (max-width: 1080px) {
  .njm-header-call {
    display: none;
  }

  .njm-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 920px) {
  .njm-menu-button {
    display: block;
  }

  .njm-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 301;
    width: min(340px, 86vw);
    height: 100vh;
    height: 100dvh;
    padding: 92px 24px 30px;
    overflow-y: auto;
    background: #fff;
    box-shadow: -24px 0 70px rgba(8, 31, 66, .25);
    visibility: hidden;
    transform: translateX(110%);
    transition: transform .3s, visibility 0s linear .3s;
  }

  .njm-nav.is-open {
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .njm-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
  }

  .njm-nav a {
    width: 100%;
    justify-content: flex-start;
    padding: .75rem 1rem;
    font-size: 1rem;
  }

  .njm-menu-backdrop.is-open {
    display: block;
  }

  body.njm-menu-open {
    overflow: hidden !important;
  }
}

@media (max-width: 768px) {
  body.njm-article-page {
    padding-bottom: 58px !important;
  }

  .njm-wrap {
    width: min(100% - 28px, 1200px);
  }

  .njm-topbar .njm-wrap {
    justify-content: center;
  }

  .njm-topbar .njm-hours {
    display: none;
  }

  .njm-header-inner {
    min-height: 70px;
  }

  .njm-brand img {
    height: 50px !important;
  }

  .njm-brand {
    font-size: .98rem;
  }

  .njm-brand small {
    font-size: .6rem;
  }

  .njm-article-page .wp-site-blocks > main > .wp-block-group {
    width: calc(100% - 28px) !important;
    min-height: 220px;
    padding: 50px 0 62px !important;
  }

  .njm-article-page .hostinger-ai-page-title {
    font-size: clamp(1.42rem, 7vw, 2rem) !important;
    line-height: 1.7 !important;
  }

  .njm-article-page .wp-site-blocks > main + .wp-block-group {
    width: calc(100% - 28px) !important;
    margin-top: -28px !important;
    margin-bottom: 46px !important;
  }

  .njm-article-page .wp-block-post-featured-image {
    border-width: 4px;
    border-radius: 18px !important;
  }

  .njm-article-page .wp-block-post-featured-image img {
    border-radius: 13px !important;
  }

  .njm-article-page .entry-content {
    padding: 28px 20px !important;
    border-radius: 18px;
    font-size: .97rem;
    line-height: 2;
  }

  .njm-article-page .entry-content h2,
  .njm-article-page .entry-content h3,
  .njm-article-page .entry-content h4 {
    margin-top: 1.9em !important;
  }

  .njm-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding-block: 46px 34px;
  }

  .njm-footer-bottom .njm-wrap {
    flex-direction: column;
    text-align: center;
  }

  .njm-mobile-cta {
    position: fixed;
    inset: auto 0 0;
    z-index: 400;
    height: 58px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 -8px 26px rgba(8, 31, 66, .2);
  }

  .njm-mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: #fff;
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
  }

  .njm-mobile-cta svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .njm-mobile-call {
    color: #231803 !important;
    background: var(--njm-gold-gradient);
  }

  .njm-mobile-whatsapp {
    background: linear-gradient(135deg, #2bc26b, #189a4e);
  }
}

@media (max-width: 390px) {
  .njm-wrap {
    width: calc(100% - 22px);
  }

  .njm-brand {
    gap: .5rem;
    font-size: .9rem;
  }

  .njm-brand img {
    height: 46px !important;
  }

  .njm-brand small {
    font-size: .56rem;
  }

  .njm-menu-button {
    width: 44px;
    height: 44px;
  }

  .njm-article-page .wp-site-blocks > main > .wp-block-group,
  .njm-article-page .wp-site-blocks > main + .wp-block-group {
    width: calc(100% - 22px) !important;
  }

  .njm-article-page .entry-content {
    padding-inline: 17px !important;
  }
}

@media (max-width: 330px) {
  .njm-brand span {
    max-width: 142px;
  }

  .njm-brand small {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .njm-nav,
  .njm-menu-button span {
    transition: none !important;
  }
}

/* Version 2: reuse the homepage header and footer directly. */
.njm-article-page > .topbar,
.njm-article-page > #hdr,
.njm-article-page > footer,
.njm-article-page > .m-cta {
  width: 100%;
  max-width: none;
}

.njm-article-page > #hdr .brand img {
  width: auto !important;
  height: 56px !important;
  aspect-ratio: 200 / 189;
  object-fit: contain;
}

.njm-article-page > footer .f-logo-badge img {
  width: auto !important;
  height: 64px !important;
  object-fit: contain;
}

/* Featured image on the right + the homepage service-card images on the left. */
.njm-article-page .njm-article-media {
  width: 100%;
  height: 340px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  direction: rtl;
}

.njm-article-page .njm-featured-pane,
.njm-article-page .njm-category-gallery {
  min-width: 0;
  height: 100%;
}

.njm-article-page .njm-featured-pane .wp-block-post-featured-image,
.njm-article-page .njm-featured-pane .wp-block-post-featured-image a {
  width: 100%;
  height: 100%;
}

.njm-article-page .njm-featured-pane .wp-block-post-featured-image img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: cover;
}

.njm-article-page .njm-category-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.njm-article-page .njm-category-image {
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(8, 31, 66, .13);
}

.njm-article-page .njm-category-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Remove the old empty tail and join the real article ending to the content. */
.njm-article-page .wp-site-blocks > main + .wp-block-group {
  margin-bottom: 18px !important;
}

.njm-article-page .wp-site-blocks > main + .wp-block-group > .wp-block-spacer {
  display: none !important;
}

.njm-article-page .wp-site-blocks > main + .wp-block-group > .wp-block-group:has(.wp-block-post-date) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

.njm-article-ending {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto 70px;
  color: var(--njm-text);
  font-family: "Almarai", sans-serif;
}

.njm-ending-heading {
  margin-bottom: 22px;
  text-align: center;
}

.njm-ending-heading span {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--njm-gold-deep);
  font-size: .8rem;
  font-weight: 800;
}

.njm-ending-heading h2 {
  margin: 0;
  color: var(--njm-navy-900);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
}

.njm-related-section {
  margin-bottom: 30px;
}

.njm-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.njm-related-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--njm-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(8, 31, 66, .09);
  transition: transform .25s, box-shadow .25s;
}

.njm-related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(8, 31, 66, .14);
}

.njm-related-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--njm-navy-900);
}

.njm-related-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.njm-related-card:hover .njm-related-image img {
  transform: scale(1.035);
}

.njm-related-card > div {
  padding: 18px 19px 20px;
}

.njm-related-card span {
  color: var(--njm-gold-deep);
  font-size: .72rem;
  font-weight: 800;
}

.njm-related-card h3 {
  margin: 7px 0 12px;
  color: var(--njm-navy-900);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.75;
}

.njm-related-card h3 a {
  color: inherit;
  text-decoration: none;
}

.njm-related-more {
  color: var(--njm-blue);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.njm-related-more b {
  display: inline-block;
  margin-inline-start: 4px;
  transition: transform .2s;
}

.njm-related-more:hover b {
  transform: translateX(-4px);
}

.njm-ending-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(212, 169, 55, .32);
  border-radius: 26px;
  color: #fff;
  background-color: var(--njm-navy-950);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(46, 111, 221, .25), transparent 42%),
    radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: auto, 24px 24px;
  box-shadow: 0 22px 55px rgba(8, 31, 66, .2);
}

.njm-ending-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--njm-gold);
  font-size: .8rem;
  font-weight: 800;
}

.njm-ending-cta h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 800;
}

.njm-ending-cta p {
  max-width: 650px;
  margin: 0 0 14px;
  color: #c9d5e9;
  font-size: .92rem;
}

.njm-ending-cta ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.njm-ending-cta li {
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}

.njm-ending-cta li::before {
  content: "✓";
  margin-inline-end: 5px;
  color: var(--njm-gold);
}

.njm-ending-actions {
  width: min(100%, 250px);
  display: grid;
  gap: 11px;
}

.njm-ending-actions .btn {
  width: 100%;
  min-height: 50px;
  padding: .75rem 1.2rem;
  font-size: .84rem;
}

@media (max-width: 920px) {
  .njm-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .njm-related-card:last-child {
    display: none;
  }

  .njm-ending-cta {
    grid-template-columns: 1fr;
  }

  .njm-ending-actions {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .njm-article-page .njm-article-media {
    height: auto;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .njm-article-page .njm-featured-pane {
    height: clamp(155px, 48vw, 215px);
  }

  .njm-article-page .njm-category-gallery {
    height: auto;
    aspect-ratio: 1 / 1;
    gap: 8px;
  }

  .njm-article-page .njm-category-image {
    border-width: 2px;
    border-radius: 12px;
  }

  .njm-article-ending {
    width: calc(100% - 28px);
    margin-bottom: 46px;
  }

  .njm-related-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .njm-related-card:last-child {
    display: none;
  }

  .njm-related-card {
    display: grid;
    grid-template-columns: minmax(108px, 40%) minmax(0, 1fr);
    min-height: 150px;
  }

  .njm-related-image {
    height: 100%;
    aspect-ratio: auto;
  }

  .njm-related-card > div {
    padding: 14px;
  }

  .njm-related-card h3 {
    margin-block: 5px 8px;
    font-size: .86rem;
    line-height: 1.65;
  }

  .njm-ending-cta {
    gap: 24px;
    padding: 28px 21px;
    border-radius: 20px;
  }

  .njm-ending-cta ul {
    display: grid;
  }

  .njm-ending-actions {
    grid-template-columns: 1fr;
  }
}

/* Visitor service rating powered by KK Star Ratings. */
.njm-article-page .entry-content > .kk-star-ratings {
  position: relative;
  isolation: isolate;
  width: min(720px, 100%) !important;
  max-width: 720px !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .55rem;
  margin: 3rem auto 1.2rem !important;
  padding: 2.2rem clamp(1.1rem, 4vw, 3rem) 1.75rem !important;
  overflow: hidden;
  border: 1px solid rgba(212, 169, 55, .42);
  border-radius: 24px;
  background:
    radial-gradient(340px 150px at 50% -20%, rgba(212, 169, 55, .2), transparent 72%),
    linear-gradient(145deg, #fff 0%, #f7faff 100%);
  box-shadow: 0 18px 46px rgba(8, 31, 66, .11);
  text-align: center;
}

.njm-article-page .entry-content > .kk-star-ratings::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -70px;
  bottom: -100px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(46, 111, 221, .07);
}

.njm-rating-intro {
  max-width: 580px;
}

.njm-rating-intro span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: .55rem;
  padding: .25rem .85rem;
  border-radius: 999px;
  background: #fbf3dc;
  color: var(--njm-gold-deep);
  font-size: .76rem;
  font-weight: 800;
}

.njm-rating-intro h2 {
  margin: 0 0 .45rem !important;
  color: var(--njm-navy-900) !important;
  font-size: clamp(1.15rem, 3vw, 1.55rem) !important;
  line-height: 1.55 !important;
  text-align: center !important;
}

.njm-rating-intro h2::before {
  display: none !important;
}

.njm-rating-intro p {
  margin: 0 !important;
  color: var(--njm-muted) !important;
  font-size: .92rem !important;
  line-height: 1.9 !important;
  text-align: center !important;
}

.njm-article-page .kk-star-ratings .kksr-stars {
  margin: .9rem 0 .65rem !important;
  transform: scale(1.35);
  transform-origin: center;
  filter: drop-shadow(0 5px 8px rgba(185, 138, 31, .2));
}

.njm-article-page .kk-star-ratings .kksr-stars-inactive .kksr-icon {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff4cf' stroke='%23d4a937' stroke-width='1.15' d='M12 .587l3.668 7.568L24 9.306l-6.064 5.828 1.48 8.279L12 19.446l-7.417 3.967 1.481-8.279L0 9.306l8.332-1.151z'/%3E%3C/svg%3E");
}

.njm-article-page .kk-star-ratings .kksr-stars-active .kksr-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d4a937' stroke='%23b98a1f' stroke-width='1' d='M12 .587l3.668 7.568L24 9.306l-6.064 5.828 1.48 8.279L12 19.446l-7.417 3.967 1.481-8.279L0 9.306l8.332-1.151z'/%3E%3C/svg%3E");
}

.njm-article-page .kk-star-ratings .kksr-star {
  transition: transform .18s ease;
}

.njm-article-page .kk-star-ratings .kksr-star:hover {
  transform: translateY(-2px) scale(1.08);
}

.njm-article-page .kk-star-ratings .kksr-legend {
  width: 100%;
  margin: .35rem 0 0 !important;
  color: var(--njm-muted) !important;
  font-size: .78rem !important;
  font-weight: 700;
  line-height: 1.8;
}

.njm-article-page .kk-star-ratings .kksr-legend .kksr-muted {
  color: inherit !important;
  opacity: 1 !important;
}

@media (max-width: 640px) {
  .njm-article-page .entry-content > .kk-star-ratings {
    margin-top: 2.2rem !important;
    padding: 1.65rem 1rem 1.4rem !important;
    border-radius: 20px;
  }

  .njm-rating-intro p {
    font-size: .84rem !important;
  }

  .njm-article-page .kk-star-ratings .kksr-stars {
    transform: scale(1.35);
  }

  .njm-article-page .entry-content > .kk-star-ratings::after {
    right: -55px;
    bottom: -70px;
    width: 150px;
    height: 150px;
  }
}

/* Version 2.1: two equal cards; full featured image + homepage-style slider. */
.njm-article-page .njm-article-media {
  height: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.njm-article-page .njm-featured-pane,
.njm-article-page .njm-category-gallery {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.njm-article-page .njm-featured-pane .wp-block-post-featured-image {
  position: relative;
  height: 100%;
  display: block;
  background: #fafafa;
}

.njm-article-page .njm-featured-pane .wp-block-post-featured-image a {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto !important;
  min-width: 0;
  min-height: 0;
  display: block;
}

.njm-article-page .njm-featured-pane .wp-block-post-featured-image img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: right center;
  background: #fafafa;
}

.njm-article-page .njm-category-gallery {
  display: block;
}

.njm-article-page .njm-category-slider.bnr {
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: 1 / 1;
  cursor: default;
  border: 5px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--njm-shadow);
}

.njm-article-page .njm-category-slider .sl {
  transition: opacity .35s ease;
}

.njm-article-page .njm-category-slider .sl img {
  object-fit: contain;
  background: #fff;
}

@media (max-width: 640px) {
  .njm-article-page .njm-article-media {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .njm-article-page .njm-featured-pane,
  .njm-article-page .njm-category-gallery {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .njm-article-page .njm-category-slider.bnr {
    border-width: 4px;
    border-radius: 18px;
  }
}
