/* Meridian: navy and cobalt, structured grids and scannable job rows. */

body.jn-theme-meridian {
  --th-bg: #fff;
  --th-surface: #fff;
  --th-soft: #f4f6fb;
  --th-ink: #101828;
  --th-muted: #526075;
  --th-line: #e2e7f0;
  --mer-navy: #0b1f3f;
  --mer-navy-2: #12305e;
}

body.jn-theme-meridian.dark-mode {
  --th-bg: #0b1220;
  --th-surface: #121b2d;
  --th-soft: #0f1727;
  --th-ink: #eef2f8;
  --th-muted: #a0acbf;
  --th-line: #24304a;
  --mer-navy: #0f1a30;
  --mer-navy-2: #18274a;
}

/* Header */
.mer-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 1030;
  border-bottom: 1px solid var(--th-line);
  background: var(--th-surface);
}

.mer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.mer-bar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mer-bar-end .th-link-plain {
  padding: 0 6px;
}

.mer-bar-end .th-btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

/* Hero */
.mer-hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 88px) !important;
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(135deg, var(--mer-navy), var(--mer-navy-2));
}

.mer-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.mer-hero-title {
  margin: 0;
  color: #fff !important;
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.mer-hero-lede {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .76) !important;
  font-size: 17px;
  line-height: 1.6;
}

.mer-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 8px 8px 8px 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(3, 12, 32, .32);
}

[dir="rtl"] .mer-search {
  padding: 8px 16px 8px 8px;
}

.mer-search .th-field {
  color: #526075;
}

.mer-search .th-field input {
  color: #101828;
}

.mer-search .th-field input::placeholder {
  color: #526075;
}

.mer-search .th-field + .th-field {
  padding-inline-start: 14px;
  border-inline-start: 1px solid #e2e7f0;
}

.mer-search .th-btn {
  min-height: 50px;
}

.mer-popular span {
  color: rgba(255, 255, 255, .72);
}

.mer-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: 16px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

.mer-popular a {
  display: inline-block;
  padding: 6px 0;
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .35);
  text-underline-offset: 3px;
}

.mer-popular a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

/* Hero job panel */
.mer-feed {
  padding: 8px;
  background: var(--th-surface);
  box-shadow: 0 24px 60px rgba(3, 12, 32, .36);
}

.mer-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px;
  font-size: 15px;
}

.mer-feed-head a {
  color: var(--th-accent-text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.mer-feed li + li {
  border-top: 1px solid var(--th-line);
}

.mer-feed li a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  color: var(--th-ink);
  text-decoration: none;
}

.mer-feed li a:hover {
  background: var(--th-soft);
}

.mer-feed img {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 1px solid var(--th-line);
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.mer-feed-main {
  flex: 1;
  min-width: 0;
}

.mer-feed-main strong,
.mer-feed-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mer-feed-main strong {
  font-size: 15px;
  font-weight: 600;
}

.mer-feed-main small {
  font-size: 13px;
}

.mer-feed-pay {
  flex: none;
  font-size: 14px;
  font-weight: 700;
}

/* Statistics */
.mer-stats {
  padding: 0 !important;
  border-bottom: 1px solid var(--th-line);
}

.mer-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.mer-stats-grid > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 28px 24px;
  border-inline-start: 1px solid var(--th-line);
}

.mer-stats-grid > div:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.mer-stats-grid dd {
  margin: 0 0 4px;
  color: var(--th-ink);
  font-family: var(--heading-font);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.mer-stats-grid dt {
  color: var(--th-muted);
  font-size: 14px;
  font-weight: 500;
}

/* Logos */
.mer-logos {
  padding-block: 34px !important;
  border-bottom: 1px solid var(--th-line);
}

.mer-logos p {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.mer-logos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 24px 48px;
}

.mer-logos-row img {
  height: 26px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .72;
  transition: filter .18s, opacity .18s;
}

.mer-logos-row img:hover {
  filter: none;
  opacity: 1;
}

.dark-mode .mer-logos-row img {
  filter: brightness(0) invert(1);
}

/* Sections */
.mer-section {
  padding-block: clamp(56px, 7vw, 88px) !important;
}

.mer-section-soft {
  background: var(--th-soft);
}

.mer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 32px;
}

.mer-head > div {
  max-width: 640px;
}

.mer-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.mer-head p {
  margin: 0;
  font-size: 16px;
}

.mer-head-center {
  justify-content: center;
  text-align: center;
}

/* Categories */
.mer-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mer-cat {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--th-line);
  background: var(--th-surface);
  color: var(--th-ink);
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s;
}

.mer-cat:hover {
  border-color: var(--th-accent);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
  color: var(--th-ink);
}

.mer-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--th-accent-soft);
}

.mer-cat-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.mer-cat strong,
.mer-cat small {
  display: block;
}

.mer-cat strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.mer-cat small {
  margin-top: 2px;
  font-size: 13px;
}

/* Job rows */
.mer-job-list {
  display: grid;
  gap: 10px;
}

.mer-job {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.6fr) minmax(0, .9fr) minmax(130px, .7fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--th-line);
  background: var(--th-surface);
  transition: border-color .18s, box-shadow .18s;
}

.mer-job:hover {
  border-color: var(--th-accent);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

.mer-job-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 7px;
  border: 1px solid var(--th-line);
  border-radius: 10px;
  background: #fff;
}

.mer-job-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mer-job-title {
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.mer-job-title a {
  font: inherit;
  color: var(--th-ink);
  text-decoration: none;
}

.mer-job-title a:hover {
  color: var(--th-accent-text);
}

.mer-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 0;
  font-size: 14px;
}

.mer-job-meta a {
  color: var(--th-ink);
  font-weight: 500;
  text-decoration: none;
}

.mer-job-meta a:hover {
  color: var(--th-accent-text);
}

.mer-job .th-chip {
  border-radius: 6px;
  background: var(--th-accent-soft);
  color: var(--th-accent-text);
}

.mer-job-pay strong,
.mer-job-pay small {
  display: block;
}

.mer-job-pay strong {
  font-size: 16px;
  font-weight: 700;
}

.mer-job-pay small {
  font-size: 12px;
}

.mer-job-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mer-job-actions .th-bookmark {
  border-radius: 10px;
}

/* Page title band on inner pages */
body.jn-theme-meridian .bg-dark {
  background: var(--mer-navy) !important;
}

/* The jobs page grid shows these rows one per line */
body.jn-theme-meridian #job_list > .col {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

/* Steps */
.mer-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 0;
}

.mer-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--th-accent);
  color: #fff;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 800;
}

.mer-steps h3 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
}

.mer-steps p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

/* Testimonials */
.mer-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mer-quote {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--th-line);
  background: var(--th-surface);
}

.mer-quote blockquote {
  flex: 1;
  margin: 0 0 20px;
  color: var(--th-ink);
  font-size: 16px;
  line-height: 1.6;
}

.mer-quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--th-line);
}

.mer-quote img {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.mer-quote strong,
.mer-quote small {
  display: block;
}

.mer-quote strong {
  font-size: 15px;
}

/* Blog */
.mer-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.mer-post {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--th-line);
  background: var(--th-surface);
  color: var(--th-ink);
  text-decoration: none;
  transition: box-shadow .18s, border-color .18s;
}

.mer-post:hover {
  border-color: var(--th-accent);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
  color: var(--th-ink);
}

.mer-post img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mer-post-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
}

.mer-post strong {
  font-family: var(--heading-font);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

/* CTA */
.mer-cta {
  padding-block: clamp(48px, 6vw, 72px) !important;
  background: linear-gradient(135deg, var(--mer-navy), var(--mer-navy-2));
}

.mer-cta-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}

.mer-cta h2 {
  margin: 0 0 10px;
  color: #fff !important;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.mer-cta p {
  margin: 0;
  color: rgba(255, 255, 255, .76) !important;
}

.mer-cta .th-subscribe input {
  border-color: transparent;
  background: #fff;
  color: #101828;
}

.mer-cta .th-subscribe input::placeholder {
  color: #526075;
}

/* Footer */
.mer-footer {
  padding-block: 56px 24px !important;
  background: var(--th-soft);
}

.mer-footer-top {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 48px;
  padding-bottom: 36px;
}

.mer-footer-about p {
  max-width: 380px;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.6;
}

.mer-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mer-footer h4 {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
}

.mer-footer-cols li a {
  display: inline-block;
  padding: 6px 0;
  color: var(--th-muted);
  font-size: 15px;
  text-decoration: none;
}

.mer-footer-cols li a:hover {
  color: var(--th-accent-text);
}

.mer-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--th-line);
  color: var(--th-muted);
}

.mer-footer-bottom p {
  margin: 0;
  font-size: 14px;
}

.mer-footer-bottom .th-socials a {
  border-radius: 10px;
  border-color: var(--th-line);
}

@media (max-width: 1199.98px) {
  .mer-job {
    grid-template-columns: 56px minmax(0, 1fr) auto auto;
  }

  .mer-job-chips {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .mer-hero-grid,
  .mer-cta-inner,
  .mer-footer-top {
    grid-template-columns: 1fr;
  }

  .mer-cats,
  .mer-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .mer-quotes,
  .mer-posts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .mer-search {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
  }

  [dir="rtl"] .mer-search {
    padding: 12px;
  }

  .mer-search .th-field {
    flex: none;
    padding-inline: 4px;
  }

  .mer-search .th-field + .th-field {
    padding-inline-start: 4px;
    border-inline-start: 0;
    border-top: 1px solid #e2e7f0;
  }

  .mer-search .th-btn {
    margin-top: 8px;
  }

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

  .mer-stats-grid > div {
    padding: 20px 14px;
    border-inline-start: 0;
    border-top: 1px solid var(--th-line);
  }

  .mer-stats-grid > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .mer-stats-grid > div:nth-child(even) {
    border-inline-start: 1px solid var(--th-line);
  }

  .mer-stats-grid > div:first-child {
    padding-inline-start: 14px;
  }

  .mer-job {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px 14px;
  }

  .mer-job-pay,
  .mer-job-actions {
    grid-column: 1 / -1;
  }

  .mer-job-pay {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .mer-job-actions .th-btn {
    flex: 1;
  }

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

@media (max-width: 575.98px) {
  .mer-cats,
  .mer-steps {
    grid-template-columns: 1fr;
  }
}
