/* Six hub landing pages: keep their approved hero scenes intact and give the
   first content steps a common, deliberate reading grid. */
body main .psv-hub-continuation {
  padding-block: clamp(1.65rem, 2.7vw, 2.5rem);
}
body main .psv-hub-continuation__wrap > :is(.lb-hubhero__card, .labeeb-svc__card) {
  box-sizing: border-box;
}

/* Career's definition was isolated inside an 820px text island with almost a
   full section of empty white space. Present the same question and answer as
   a wide editorial panel attached to the opening decision section. */
body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section:has(.labeeb-quick-answer__card) {
  padding: 0 clamp(18px, 4vw, 48px) clamp(2rem, 3.5vw, 3.25rem) !important;
  background: #fff;
}
body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-in--article {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
}
body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-quick-answer__card {
  display: grid;
  grid-template-columns: minmax(210px, .42fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 3vw, 3rem);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border: 1px solid #d9e9e2;
  border-block-start: 3px solid #087746;
  border-radius: 16px;
  background: #f5faf7;
  box-shadow: 0 9px 26px #123d3010;
}
body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-quick-answer__q {
  margin: 0;
  color: #102052;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  font-weight: 800;
  line-height: 1.24;
}
body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-quick-answer__a {
  margin: 0;
  max-width: 82ch;
  color: #354b69;
  font-size: .96rem;
  line-height: 1.67;
}
body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-quick-answer__a strong,
body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-quick-answer__a a {
  color: #087746;
}

/* Academic's short journey explanation should sit on the same content grid
   as the opening section, with its existing stage sequence kept in full. */
body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section {
  padding: clamp(1.5rem, 2.8vw, 2.5rem) clamp(18px, 4vw, 48px) !important;
  background: #f3f7fc;
}
body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section > :is(.labeeb-in, .labeeb-svc__wrap) {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  gap: .75rem clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: start;
  width: 100%;
  max-width: 1200px;
  padding: clamp(1.25rem, 2.3vw, 2rem);
  border: 1px solid #dce6f3;
  border-block-start: 3px solid #205eae;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 26px #1b46770d;
}
body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section h2 {
  grid-column: 1;
  grid-row: 1 / 3;
  margin: 0;
  max-width: 16ch;
}
body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section > :is(.labeeb-in, .labeeb-svc__wrap) > p:first-of-type {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  max-width: 75ch;
}
body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section :is(.labeeb-note, .labeeb-svc__note) {
  grid-column: 2;
  grid-row: 2;
  margin: .25rem 0 0;
  max-width: none;
  border-inline-start-color: #205eae;
}
body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section > :is(.labeeb-in, .labeeb-svc__wrap) > p:empty {
  display: none;
}

/* The Business consultation card used a line break as spacing and lost its
   amber identity. Keep both published destinations, with compact hierarchy. */
body main .psv-hub-continuation[data-psv-hub="business"] .labeeb-svc__card .labeeb-cfg__cta {
  display: grid;
  gap: .6rem;
}
body main .psv-hub-continuation[data-psv-hub="business"] .labeeb-svc__card .labeeb-cfg__cta > br {
  display: none;
}
body main .psv-hub-continuation[data-psv-hub="business"] .labeeb-svc__card .labeeb-cfg__cta .btn--primary {
  background: #a65b0c !important;
  border-color: #a65b0c !important;
  color: #fff !important;
}
body main .psv-hub-continuation[data-psv-hub="business"] .labeeb-svc__card .labeeb-cfg__cta .btn--ai {
  background: #fff !important;
  border: 1px solid #d8a975 !important;
  color: #8b4a08 !important;
}
/* The Arabic Academic hub publishes its contact action with the legacy btn
   class, unlike the English hub's labeeb-cta. Give it the same button form. */
html[lang^="ar"] body main .psv-hub-continuation[data-psv-hub="academic"] .labeeb-svc__card a.btn--primary {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  padding: .7rem 1rem;
  border: 0;
  border-radius: 10px;
  background: #6750df !important;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
}

/* WordPress has inserted paragraphs and hard breaks inside the Career hub's
   second service directory. Flatten only that malformed wrapper so every
   published link participates in the same grid instead of stretching one
   card to the height of a paragraph containing six more cards. */
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> br) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: .75rem !important;
}
body.page-id-4525 main .labeeb-related__grid:has(> br):has(> a:nth-of-type(3):last-of-type) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> br) > br {
  display: none !important;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 clamp(1.25rem, 2.5vw, 2.25rem) !important;
  align-items: start;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) > p {
  display: contents !important;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) br {
  display: none !important;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) a.labeeb-related__card {
  box-sizing: border-box;
  display: grid !important;
  grid-template-rows: auto auto;
  align-content: start;
  align-self: stretch;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 1rem .75rem !important;
  border: 0 !important;
  border-top: 1px solid #bdd5c7 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) a.labeeb-related__card:hover {
  background: #e8f4ee !important;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) a.labeeb-related__card .labeeb-related__t {
  color: #0a614e !important;
  font-size: 1.02rem;
  line-height: 1.35;
}
body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) a.labeeb-related__card .labeeb-related__s {
  color: #52637d;
  font-size: .91rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-quick-answer__card,
  body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section > :is(.labeeb-in, .labeeb-svc__wrap) {
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem;
  }
  body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section > :is(.labeeb-in, .labeeb-svc__wrap) > :is(h2, p) {
    grid-column: 1 !important;
    grid-row: auto !important;
    max-width: none;
  }
}
@media (min-width: 350px) and (max-width: 700px) {
  body main .psv-hub-continuation[data-psv-hub="business"] .psv-hub-continuation__copy .lb-reassure {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }
  body main .psv-hub-continuation[data-psv-hub="business"] .psv-hub-continuation__copy .lb-reassure > li {
    box-sizing: border-box;
    min-width: 0;
    min-height: 3.5rem;
    margin: 0;
    padding: .55rem .65rem;
    font-size: .72rem;
    line-height: 1.3;
  }
}
@media (max-width: 700px) {
  body.page-id-4525 main .labeeb-related__grid > a.psv-service-row :is(.labeeb-related__t, .labeeb-related__s) {
    max-width: 60% !important;
  }
  body.page-id-4525 main .labeeb-related__grid > a.psv-service-row .psv-art {
    width: 31% !important;
  }
  body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> br) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.page-id-4525 main .labeeb-related__grid:has(> br):has(> a:nth-of-type(3):last-of-type) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> p > a.labeeb-related__card) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section:has(.labeeb-quick-answer__card) {
    padding-bottom: 1.65rem !important;
  }
  body main .psv-hub-continuation[data-psv-hub="career"] + .labeeb-section .labeeb-quick-answer__card,
  body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section > :is(.labeeb-in, .labeeb-svc__wrap) {
    padding: 1rem;
  }
  body main .psv-hub-continuation[data-psv-hub="academic"] + .labeeb-section {
    padding-block: 1.4rem !important;
  }
}
@media (min-width: 701px) and (max-width: 1050px) {
  body:is(.page-id-69, .page-id-4525) main .labeeb-related__grid:has(> br) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.page-id-4525 main .labeeb-related__grid:has(> br):has(> a:nth-of-type(3):last-of-type) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
/* The featured Academic directory card has a navy fill at narrow widths.
   Keep the existing card design and restore readable foreground contrast. */
@media (max-width: 700px) {
  body.page-id-72 main #academic-services .labeeb-related__grid > a.psv-service-row:first-child .labeeb-related__t {
    color: #fff !important;
  }
  body.page-id-72 main #academic-services .labeeb-related__grid > a.psv-service-row:first-child .labeeb-related__t::after {
    color: #fff !important;
  }
  body.page-id-72 main #academic-services .labeeb-related__grid > a.psv-service-row:first-child .labeeb-related__s {
    color: #dbe8f4 !important;
  }
}
