/* Enqueued only for internal WordPress records. The existing CTA owns its surface and typography. */
:root {
  --internal-width: 1200px;
  --internal-gutter: clamp(20px, 4vw, 56px);
  --internal-frame: min(var(--internal-width), calc(100% - 2 * var(--internal-gutter)));
  --internal-section: clamp(40px, 5vw, 76px);
  --internal-banner-height: clamp(260px, 24vw, 360px);
  --internal-gap: clamp(18px, 2.2vw, 32px);
  --internal-radius: 16px;
  --internal-rule: rgb(91 174 204 / 52%);
  --internal-heading: 650 clamp(28px, 3.1vw, 46px)/1.12 Poppins, sans-serif;
  --internal-card-title: 600 clamp(21px, 1.85vw, 28px)/1.2 Poppins, sans-serif;
  --internal-copy: 400 clamp(16px, 1.18vw, 18px)/1.65 Poppins, sans-serif;
}

/* Photo, breadcrumb and title-only templates all share one title frame. */
:is(body.cml-original-logistics, body.relo-page, body.cml-corporate) :is(.subject-banner, .page-title-area, .logistics-detail-hero) {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: var(--internal-banner-height);
  padding: 0;
  overflow: hidden;
  background-color: var(--primary-color);
  border-bottom: 3px solid var(--secondary-color);
}
body.cml-original-logistics :is(.subject-banner, .page-title-area, .logistics-detail-hero) {
  margin-block-start: 88px;
}
:is(body.cml-original-logistics, body.relo-page, body.cml-corporate) :is(.subject-banner__inner, .page-title-area > .container, .logistics-detail-hero__inner) {
  align-self: center;
  display: block;
  width: var(--internal-frame);
  max-width: none;
  margin-inline: auto;
  padding: clamp(38px, 4vw, 64px) 0;
  text-align: start;
}
body .page-title-area .page-title-content { text-align: start; }
body :is(.page-title-content, .subject-banner .subject-banner__inner, .logistics-detail-hero) h1 {
  max-width: 22ch;
  margin: 0;
  color: var(--white);
  font: 650 clamp(34px, 4.25vw, 64px)/1.06 Poppins, sans-serif;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
body :is(.subject-banner .subject-banner__inner, .logistics-detail-hero:has(.freight-hero-photo)) h1 {
  max-width: min(50%, 21ch);
}
body .subject-banner > img.subject-banner__photo, body .logistics-detail-hero > .freight-hero-photo {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -3;
  width: 53%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
body .subject-banner::before, body .logistics-detail-hero:has(.freight-hero-photo) .logistics-detail-hero__grid {
  z-index: -2;
  background: linear-gradient(98deg, var(--primary-color) 50%, var(--secondary-color) 50% 50.4%, transparent 50.4%);
  mask-image: none;
}
body .logistics-detail-hero::after { content: none; }
body .page-title-area::after { opacity: .1; background-position: right center; }
main:has(> :is(.page-title-area, .logistics-detail-hero):only-child) { padding-bottom: var(--internal-section); }
body .subject-banner .subject-banner__back,
body .subject-banner .subject-banner__eyebrow,
body .logistics-detail-hero__inner > :is(nav, a) {
  margin: 0 0 12px;
  color: var(--white);
  font: 600 14px/1.5 Poppins, sans-serif;
  letter-spacing: .025em;
}
body .subject-banner .subject-banner__intro, body .logistics-detail-hero .freight-hero-summary {
  max-width: min(48%, 54ch);
  margin: 14px 0 0;
  color: var(--white);
  font: var(--internal-copy);
}
body .subject-banner .subject-banner__intro p { color: inherit; font: inherit; }
body .freight-hero-summary::before { content: none; }
body .subject-banner__count { inset-inline-start: max(var(--internal-gutter), calc((100% - var(--internal-width)) / 2)); }

/* Align content from Bootstrap, the Relocation theme, and the WordPress editor. */
:is(.about-profile, .about-standards, .about-value-cards, .about-numbers, .moving-directory,
  .moving-process, .moving-detail-story, .moving-detail-points, .logistics-services, .logistics-detail-intro,
  .logistics-why, .freight-related, .pet-intro, .pet-workflow, .pet-trust, .contact-desk,
  .contact-branches, .terms-cards-area) > .container,
body #relo-main .relo-container:where(:not(.relo-highlights *)) {
  width: var(--internal-frame);
  max-width: var(--internal-width);
  margin-inline: auto;
  padding-inline: 0;
}
body :is(.contact-desk, .contact-branches, .moving-directory, .moving-process, .moving-detail-story,
  .moving-detail-points, .logistics-services, .logistics-detail-intro, .logistics-why, .freight-related,
  .pet-intro, .pet-workflow, .pet-trust, .faq-wrap, .about-value-cards, .terms-cards-area),
body .relo-service-intro > .relo-container, body .relo-service-features > .relo-container,
body #relo-main :is(.why-credentials, .why-expertise), body.relo-page--our-services #services {
  padding-block: var(--internal-section);
}
body .about-profile { padding-block: var(--internal-section) !important; }
body :is(.about-profile .about-content, .moving-detail-story .about-content, .moving-intro,
  .moving-process-heading, .logistics-detail-intro__content, .logistics-why__content, .freight-directory-intro,
  .freight-related, .pet-intro-copy, .pet-workflow, .contact-heading, .about-value-cards,
  .faq-wrap .section-title, .relo-service-intro, .relo-service-features) h2,
body #services .relo-section-head h2, body .moving-detail-lead h3, body .pet-trust-intro h3 {
  color: var(--primary-color);
  font: var(--internal-heading);
  letter-spacing: -.035em;
  text-wrap: balance;
}
body :is(.about-profile .about-content, .moving-detail-story .about-content, .moving-detail-lead,
  .moving-intro, .moving-copy, .logistics-service__content, .logistics-rich-text, .pet-intro-copy,
  .pet-stage-copy, .contact-heading, .relo-service-intro, .relo-service-features) p,
body .logistics-rich-text {
  color: var(--text-color);
  font: var(--internal-copy);
}
body :is(.about-value-grid, .moving-detail-grid, .freight-related-list, .relo-detail__list),
body #services .relo-discovery { gap: var(--internal-gap); }
body :is(.about-value-grid li, .moving-detail-grid li, .pet-credentials li, .terms-card,
  .faq-item, .freight-related-card, .why-credential, .relo-service-features .relo-detail__list li),
body #services .relo-journey {
  border: 1px solid var(--internal-rule);
  border-radius: var(--internal-radius);
  background-color: var(--white);
  box-shadow: none;
}
body :is(.moving-copy h3, .logistics-services .logistics-service__content h2, .about-value-grid h3,
  .terms-card h3, .pet-stage h3, .moving-step h3), body #services .relo-journey h3 {
  color: var(--primary-color);
  font: var(--internal-card-title);
  letter-spacing: -.025em;
}
body :is(.pet-marker i, .moving-step-icon, .moving-detail-grid i, .branch-marker) {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary-color);
  font-size: 17px;
}
body :is(.about-numbers .ctp-funfact-card h3, .why-diplomats h2 strong) {
  font: 700 clamp(40px, 4.6vw, 68px)/1.05 Poppins, sans-serif;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
body .about-numbers .about-metric-icon { color: var(--white); }
body .why-affiliations h2, body .why-expertise h2 { font: var(--internal-card-title); color: var(--primary-color); }
body .why-diplomats p, body .why-faim p, body .why-network p, body .why-expertise p { font: var(--internal-copy); }

/* Corresponding service directories share a photo ratio and card structure. */
body :is(.moving-services, .logistics-services__list), body #services .relo-discovery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--internal-gap);
}
@media (min-width: 621px) {
  :is(.moving-services, .logistics-services__list, #services .relo-discovery):has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body :is(.moving-service, .logistics-service):nth-child(n), body #services .relo-journey:nth-child(n) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  grid-row: auto;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--internal-rule);
  border-radius: var(--internal-radius);
  background: var(--white);
}
body :is(.moving-photo, .moving-photo a, .logistics-service__media),
body #services .relo-journey-photo {
  display: block;
  flex: none;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
}
body .moving-service:nth-child(n) .moving-photo img,
body .logistics-service:nth-child(n) .logistics-service__image, body #services .relo-journey-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  clip-path: none;
  object-fit: cover;
}
body :is(.moving-copy, .logistics-service__content), body #services .relo-journey-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: none;
  padding: clamp(20px, 2vw, 30px);
}
body .moving-copy h3, body .logistics-service__content h2 { margin: 0 0 10px; padding: 0; border: 0; }
body .logistics-service__rule { display: none; }
body :is(.moving-copy .read-more-btn, .logistics-service__content .logistics-text-link),
body #services .relo-journey-copy > .relo-btn { align-self: flex-start; margin-top: auto; }

.internal-prose, .internal-questions, .internal-featured-image {
  width: min(72ch, var(--internal-frame));
  margin: var(--internal-section) auto;
  color: var(--text-color);
  font: var(--internal-copy);
  overflow-wrap: anywhere;
}
.internal-prose :is(p, li) { color: inherit; font: inherit; }
.internal-prose :is(h2, h3, h4, strong) { color: var(--primary-color); }
.internal-prose h2 { margin-block: 1.4em .55em; font: var(--internal-heading); }
.internal-prose :is(h3, h4) { font: var(--internal-card-title); }
.internal-prose :first-child { margin-block-start: 0; }
.internal-prose a { color: var(--primary-color); text-decoration: underline; }
.internal-prose :is(img, iframe), .internal-featured-image img { max-width: 100%; }
.internal-questions { display: grid; gap: 12px; }
.internal-questions details { padding: 0 20px; border: 1px solid var(--internal-rule); border-radius: var(--internal-radius); }
.internal-questions summary { padding-block: 16px; color: var(--primary-color); font-weight: 600; cursor: pointer; }
.internal-questions details > div { padding-block: 0 18px; }
.internal-questions summary:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

@media (max-width: 991px) {
  body.cml-original-logistics :is(.subject-banner, .page-title-area, .logistics-detail-hero) { margin-block-start: 64px; }
  body :is(.moving-services, .logistics-services__list), body #services .relo-discovery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  :root { --internal-banner-height: 180px; }
  body.cml-original-logistics :is(.subject-banner, .page-title-area, .logistics-detail-hero) { margin-block-start: 58px; }
  :is(body.cml-original-logistics, body.relo-page, body.cml-corporate) .subject-banner,
  body.cml-original-logistics .logistics-detail-hero:has(.freight-hero-photo) { display: flex; flex-direction: column; align-items: stretch; }
  body .subject-banner > img.subject-banner__photo, body .logistics-detail-hero > .freight-hero-photo {
    position: static;
    order: 1;
    width: 100%;
    height: clamp(145px, 37vw, 230px);
  }
  body .subject-banner::before, body .logistics-detail-hero:has(.freight-hero-photo) .logistics-detail-hero__grid { background: none; }
  body .subject-banner .subject-art { top: auto; bottom: 10px; right: var(--internal-gutter); }
  body .subject-banner .subject-banner__count { inset: auto auto 12px var(--internal-gutter); }
  body :is(.subject-banner .subject-banner__inner, .logistics-detail-hero:has(.freight-hero-photo)) h1,
  body .subject-banner .subject-banner__intro, body .logistics-detail-hero .freight-hero-summary { max-width: 100%; }
  :is(body.cml-original-logistics, body.relo-page, body.cml-corporate) :is(.subject-banner__inner, .page-title-area > .container, .logistics-detail-hero__inner) { padding-block: 34px; }
}
@media (max-width: 620px) {
  body :is(.moving-services, .logistics-services__list), body #services .relo-discovery { grid-template-columns: minmax(0, 1fr); }
}
