/* Dialog Group website concept v39
   Clearer office map, colleague portraits, visual timeline and contrast refinements. */

body.v39-site {
  --v39-border: rgba(0, 39, 102, 0.14);
  --v39-shadow-soft: 0 16px 40px rgba(0, 39, 102, 0.08);
  --v39-portrait-bg: #EAF2FB;
  --v39-portrait-text: #002766;
  --v39-timeline-line: #7AAEE8;
  --v39-timeline-marker: #3468D0;
  --v39-timeline-marker-alt: #4DDBA0;
}

/* 1. Wider, proportionally correct map without changing selector behaviour */
body.v39-site .office-map-stage-v36 {
  aspect-ratio: 760 / 452;
  min-height: 0;
  max-height: none;
  background: #F7FAFD;
}

body.v39-site .office-map-base-v36 {
  object-fit: contain;
  object-position: center;
}

/* Keep a generous 44px target while making neighbouring markers visually calmer. */
body.v39-site .office-point-v36::before {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

body.v39-site .office-point-v36::after {
  width: 25px;
  height: 25px;
}

body.v39-site .office-point-v36.is-active::before {
  width: 20px;
  height: 20px;
}

body.v39-site .office-point-v36.is-active::after {
  width: 38px;
  height: 38px;
}

/* 2. Colleague cards with official portraits and accessible initials fallback */
body.v39-site .colleague-card-v38 {
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 18px;
  row-gap: 6px;
  align-items: center;
  padding: 20px;
  background: #FFFFFF;
  box-shadow: 0 10px 28px rgba(0, 39, 102, 0.06);
}

body.v39-site .colleague-portrait-v39 {
  position: relative;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 1px solid rgba(0, 74, 151, 0.18);
  border-radius: 999px;
  background: var(--v39-portrait-bg);
  box-shadow: inset 0 0 0 5px #FFFFFF;
}

body.v39-site .colleague-initials-v39,
body.v39-site .colleague-portrait-v39 img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.v39-site .colleague-initials-v39 {
  display: grid;
  place-items: center;
  color: var(--v39-portrait-text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

body.v39-site .colleague-portrait-v39 img {
  z-index: 1;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #FFFFFF;
}

body.v39-site .colleague-portrait-v39.is-unavailable img,
body.v39-site .colleague-portrait-v39 img[hidden] {
  display: none;
}

body.v39-site .colleague-card-v38 h3 {
  grid-column: 2;
  align-self: end;
  font-size: 1.08rem;
}

body.v39-site .colleague-card-v38 > p {
  grid-column: 2;
  align-self: start;
}

/* 3. Alternating, semantic timeline */
body.v39-site .timeline-grid-v38 {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 48px;
}

body.v39-site .timeline-grid-v38::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7AAEE8 0%, #3468D0 52%, #4DDBA0 100%);
  transform: translateX(-50%);
}

body.v39-site .timeline-item-v38 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.v39-site .timeline-item-v38::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 4px solid #FFFFFF;
  border-radius: 999px;
  background: var(--v39-timeline-marker);
  box-shadow: 0 0 0 2px #004A97;
  transform: translate(-50%, -50%);
}

body.v39-site .timeline-item-v38:nth-child(3n + 2)::before {
  background: #004A97;
}

body.v39-site .timeline-item-v38:nth-child(3n)::before {
  background: var(--v39-timeline-marker-alt);
}

body.v39-site .timeline-item-v38::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36px;
  height: 2px;
  background: var(--v39-timeline-line);
  transform: translateY(-50%);
}

body.v39-site .timeline-item-v38:nth-child(odd)::after {
  right: 50%;
}

body.v39-site .timeline-item-v38:nth-child(even)::after {
  left: 50%;
}

body.v39-site .timeline-card-v39 {
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  border: 1px solid var(--v39-border);
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: var(--v39-shadow-soft);
}

body.v39-site .timeline-item-v38:nth-child(odd) .timeline-card-v39 {
  grid-column: 1;
}

body.v39-site .timeline-item-v38:nth-child(even) .timeline-card-v39 {
  grid-column: 3;
}

body.v39-site .timeline-card-v39 time {
  color: #004A97;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 800;
  line-height: 1;
}

body.v39-site .timeline-card-v39 p {
  margin: 0;
  color: #2B3A52;
  line-height: 1.55;
}

/* 4. Core-value contrast on the blue section */
body.v39-site .core-values-section-v38 .eyebrow,
body.v39-site .core-values-section-v38 .section-heading > p,
body.v39-site .core-values-section-v38 .split-heading--inverse-v38 > p {
  color: #F2F7FF !important;
  opacity: 1 !important;
}

body.v39-site .core-values-section-v38 .eyebrow::before {
  background: #87FFC7 !important;
}

body.v39-site .core-values-section-v38 .heading-part.heading-base {
  color: #FFFFFF !important;
}

body.v39-site .core-values-section-v38 .heading-part.heading-accent {
  color: #F2F7FF !important;
}

body.v39-site .core-values-section-v38 .core-value-card-v38 h3 {
  color: #002766 !important;
}

body.v39-site .core-values-section-v38 .core-value-card-v38 p {
  color: #2B3A52 !important;
}

@media (max-width: 1080px) {
  body.v39-site .colleague-grid-v38 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.v39-site .colleague-grid-v38 {
    grid-template-columns: 1fr;
  }

  body.v39-site .colleague-card-v38 {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 18px;
  }

  body.v39-site .colleague-portrait-v39 {
    width: 76px;
    height: 76px;
  }

  body.v39-site .timeline-grid-v38 {
    gap: 16px;
    margin-top: 32px;
    padding-left: 0;
  }

  body.v39-site .timeline-grid-v38::before {
    left: 21px;
  }

  body.v39-site .timeline-item-v38 {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  body.v39-site .timeline-item-v38::before {
    left: 21px;
  }

  body.v39-site .timeline-item-v38::after,
  body.v39-site .timeline-item-v38:nth-child(odd)::after,
  body.v39-site .timeline-item-v38:nth-child(even)::after {
    right: auto;
    left: 21px;
    width: 23px;
  }

  body.v39-site .timeline-item-v38:nth-child(odd) .timeline-card-v39,
  body.v39-site .timeline-item-v38:nth-child(even) .timeline-card-v39 {
    grid-column: 2;
  }

  body.v39-site .timeline-card-v39 {
    padding: 20px;
  }
}

@media (forced-colors: active) {
  body.v39-site .colleague-portrait-v39,
  body.v39-site .timeline-card-v39 {
    border: 1px solid CanvasText;
    box-shadow: none;
  }

  body.v39-site .timeline-grid-v38::before,
  body.v39-site .timeline-item-v38::after {
    background: CanvasText;
  }

  body.v39-site .timeline-item-v38::before {
    border-color: Canvas;
    background: Highlight;
    box-shadow: 0 0 0 2px CanvasText;
  }
}

/* Final v39 map proportions: more horizontal room, accurate SVG ratio. */
body.v39-site .office-selector-v36 {
  grid-template-columns: minmax(390px, 0.48fr) minmax(0, 0.52fr);
  gap: clamp(28px, 3.2vw, 48px);
}

body.v39-site .office-map-stage-v36 {
  aspect-ratio: 900 / 620;
}

@media (max-width: 1120px) and (min-width: 981px) {
  body.v39-site .office-selector-v36 {
    grid-template-columns: minmax(350px, 0.46fr) minmax(0, 0.54fr);
    gap: 32px;
  }
}

@media (max-width: 980px) {
  body.v39-site .office-selector-v36 {
    grid-template-columns: 1fr;
  }

  body.v39-site .office-map-pane-v36 {
    width: 100%;
    max-width: 680px;
  }
}

/* Benelux office markers use short leader lines so both 44px targets remain distinguishable. */
body.v39-site .office-point-v36 .office-point-leader-v39 {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: var(--leader-length, 0px);
  height: 2px;
  border-radius: 999px;
  background: #004A97;
  transform: translateY(-50%) rotate(var(--leader-angle, 0deg));
  transform-origin: 0 50%;
  pointer-events: none;
}

body.v39-site .office-point-v36::after { z-index: 1; }
body.v39-site .office-point-v36::before { z-index: 2; }
