/**
 * Company profile only. Shared about / process / enquiry keep their own sheets.
 * Facilities is a contained page carousel (NwEdgeRail), not the legacy center swiper.
 */

body.company-page .nw-about a.button,
body.company-page .nw-about a.button:hover,
body.company-page .nw-about a.button:focus-visible,
body.company-page .nw-process a.button,
body.company-page .nw-process a.button:hover,
body.company-page .nw-process a.button:focus-visible,
body.company-page .nw-about__tel,
body.company-page .nw-about__tel:hover,
body.company-page .nw-about__tel:focus-visible {
  text-decoration: none;
}

/* Homepage caps are a 2-up grid sized for a wide column and a short line.
   This page's right column is narrower and the lines are longer, so each
   point takes the full column. */
body.company-page .nw-about__caps {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 22px;
}

body.company-page .nw-about__cap {
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

body.company-page .nw-about__cap-icon {
  width: 40px;
  height: 40px;
  margin-top: 0;
  border-radius: 10px;
}

body.company-page .nw-about__cap-icon .icon {
  font-size: 20px;
}

body.company-page .nw-about__cap-body h3 {
  font-size: var(--nw-fs-secondary);
}

body.company-page .nw-about__cap-body p {
  font-size: var(--nw-fs-secondary);
  line-height: 1.55;
}

/* Right column sets the row height (it changes with the language).
   Left photos fill that height instead of a fixed tile size. */
@media (min-width: 981px) {
  body.company-page .nw-about__visual {
    height: 100%;
    min-height: 0;
  }

  body.company-page .nw-about__media {
    flex: 1.35 1 0;
    min-height: 0;
  }

  body.company-page .nw-about__foot {
    flex: 1 1 0;
    min-height: 0;
  }

  body.company-page .nw-about__tile {
    height: 100%;
    min-height: 0;
  }
}

/*
 * Facilities: PC multi-card rail + card chrome only.
 * ≤1279 peek / pager / side strips = shared nw-mobile .nw-m-peek (same as home apps).
 */
body.company-page #facilities {
  overflow-x: clip;
  padding-block: 80px;
}

body.company-page #facilities .nw-section-title {
  white-space: nowrap;
}

body.company-page #facilities .nw-facilities__viewport {
  --visible-count: 1;
  --apps-gap: 16px;
  --apps-side-gutter: 0px;
  --nw-facility-content-w: min(var(--nw-inner-max, 1440px), calc(100vw - 2 * var(--page-gutter)));
  overflow: hidden;
  padding: 8px 0 28px;
  margin: -8px 0 -16px;
}

body.company-page #facilities .nw-facilities__track {
  display: flex;
  gap: var(--apps-gap);
  box-sizing: border-box;
  will-change: transform;
}

body.company-page #facilities .nw-facility {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((var(--nw-facility-content-w) - (var(--visible-count) - 1) * var(--apps-gap)) / var(--visible-count));
  width: calc((var(--nw-facility-content-w) - (var(--visible-count) - 1) * var(--apps-gap)) / var(--visible-count));
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--nw-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px #20385e0a;
}

body.company-page #facilities .nw-facility__photo {
  position: relative;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  background: #e7eef8;
}

body.company-page #facilities .nw-facility__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.company-page #facilities .nw-facility__body {
  padding: 14px 16px 16px;
}

body.company-page #facilities .nw-facility__body h3 {
  margin: 0;
  font-size: var(--nw-fs-body);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink, #171c29);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.company-page #facilities .nw-facility__body p {
  margin: 6px 0 0;
  font-size: var(--nw-fs-secondary);
  line-height: 1.5;
  color: var(--muted, #626d7d);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* PC only — rail spans the viewport. Card width stays on --nw-facility-content-w. */
@media (min-width: 1280px) {
  body.company-page #facilities .nw-facilities__viewport {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    --visible-count: 2;
    --apps-gap: 18px;
  }
  body.company-page #facilities .nw-facilities__track {
    margin-left: max(0px, calc((100vw - var(--nw-facility-content-w)) / 2));
  }
}

@media (min-width: 1440px) {
  body.company-page #facilities .nw-facilities__viewport {
    --visible-count: 3;
    --apps-gap: 20px;
  }
}

/* ≤1279: head chrome off — peek-nav / full-bleed from nw-mobile */
@media (max-width: 1279px) {
  body.company-page #facilities .nw-facilities__head-nav {
    display: none !important;
  }

  /* Beat ID specificity so shared peek 100vw breakout wins */
  body.make-site.company-page #facilities.nw-m-peek .container .nw-facilities__viewport.nw-m-peek__viewport {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  body.company-page #facilities .nw-section-title {
    white-space: normal;
  }
}

@media (max-width: 960px) {
  body.company-page #facilities {
    padding-block: 36px;
  }

  body.company-page #facilities .nw-facility__body h3 {
    white-space: normal;
  }
}
