/* Hershey Entertainment & Resorts case-study extensions */

.page-hershey-entertainment-case .kp-case-logo-link {
  width: min(330px, 100%);
}

.page-hershey-entertainment-case .kp-case-logo {
  max-height: 112px;
  object-position: left center;
}

.page-hershey-entertainment-case .kp-project-info-card {
  min-width: 0;
  height: auto;
  overflow: hidden;
}

.page-hershey-entertainment-case .kp-project-info-card p {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.page-hershey-entertainment-case .kp-hershey-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-hershey-entertainment-case .kp-hershey-metric-grid .kp-mini-label {
  display: inline-flex;
  color: #8a2528;
  font-size: .76rem;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-hershey-entertainment-case .kp-hershey-operations-preview {
  padding: 30px;
  border: 1px solid rgba(17,17,17,.08);
  border-radius: 28px;
  background: #fff;
}

.page-hershey-entertainment-case .kp-hershey-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}

.page-hershey-entertainment-case .kp-hershey-preview-grid article {
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(17,17,17,.08);
  border-radius: 20px;
  background: rgba(17,17,17,.018);
  transition:
    transform 280ms var(--kp-case-ease),
    border-color 260ms ease,
    background-color 260ms ease,
    box-shadow 280ms ease;
}

.page-hershey-entertainment-case .kp-hershey-preview-grid article:hover {
  transform: translateY(-5px);
  border-color: rgba(138,37,40,.28);
  background: #fff;
  box-shadow: 0 16px 30px rgba(17,17,17,.06);
}

.page-hershey-entertainment-case .kp-hershey-preview-center {
  border-color: rgba(138,37,40,.24) !important;
  background: rgba(138,37,40,.05) !important;
}

.page-hershey-entertainment-case .kp-hershey-preview-grid strong {
  display: block;
  margin: 10px 0 8px;
  color: #111;
  line-height: 1.35;
}

.page-hershey-entertainment-case .kp-hershey-preview-grid p {
  margin: 0;
  color: rgba(17,17,17,.62);
  font-size: .9rem;
  line-height: 1.6;
}

.page-hershey-entertainment-case .kp-hershey-preview-flow,
.page-hershey-entertainment-case .kp-hershey-driver-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 24px;
  padding: 18px 14px;
  border-radius: 18px;
  background: rgba(138,37,40,.045);
  white-space: nowrap;
}

.page-hershey-entertainment-case .kp-hershey-preview-flow span,
.page-hershey-entertainment-case .kp-hershey-driver-flow span {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: .79rem;
  font-weight: 800;
}

.page-hershey-entertainment-case .kp-hershey-preview-flow b,
.page-hershey-entertainment-case .kp-hershey-driver-flow b {
  flex: 0 0 auto;
  color: #8a2528;
}

.page-hershey-entertainment-case .kp-hershey-responsibility-visual {
  padding: 28px;
}

.page-hershey-entertainment-case .kp-hershey-responsibility-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-top: 18px;
}

.page-hershey-entertainment-case .kp-hershey-responsibility-grid span {
  min-height: 88px;
  display: grid;
  place-items: center;
  padding: 15px;
  border: 1px solid rgba(17,17,17,.08);
  border-radius: 17px;
  background: rgba(17,17,17,.018);
  text-align: center;
  font-size: .84rem;
  font-weight: 750;
}

.page-hershey-entertainment-case .kp-hershey-responsibility-center {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(138,37,40,.06);
  text-align: center;
}

.page-hershey-entertainment-case .kp-hershey-responsibility-center small,
.page-hershey-entertainment-case .kp-hershey-responsibility-center strong {
  display: block;
}

.page-hershey-entertainment-case .kp-hershey-responsibility-center small {
  color: #8a2528;
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-hershey-entertainment-case .kp-hershey-responsibility-center strong {
  margin-top: 7px;
}

/* All Hershey serpentines use explicit connector cells. */
.page-hershey-entertainment-case
  :is(.kp-hershey-eleven-map, .kp-hershey-seven-map)
  .kp-process-node::after {
  content: none !important;
  display: none !important;
}

.page-hershey-entertainment-case
  :is(.kp-hershey-eleven-map, .kp-hershey-seven-map)
  .kp-process-node {
  min-width: 0;
  min-height: 214px;
  height: auto;
  padding: 22px 20px;
  overflow: visible;
  align-self: stretch;
}

.page-hershey-entertainment-case
  :is(.kp-hershey-eleven-map, .kp-hershey-seven-map)
  .kp-process-node strong {
  margin-bottom: 9px;
  line-height: 1.32;
}

.page-hershey-entertainment-case
  :is(.kp-hershey-eleven-map, .kp-hershey-seven-map)
  .kp-process-node p {
  margin: 0;
  overflow: visible;
}

/* Eleven-step desktop serpentine:
   01 → 02 → 03
   06 ← 05 ← 04
   07 → 08 → 09
   11 ← 10 */
.page-hershey-entertainment-case .kp-process-map.kp-hershey-eleven-map {
  display: grid;
  grid-template-columns:
    minmax(0,1fr) 34px
    minmax(0,1fr) 34px
    minmax(0,1fr);
  grid-template-rows:
    auto 34px auto 34px auto 34px auto;
  grid-template-areas:
    "step1 c12 step2 c23 step3"
    ".     .   .     .   c34"
    "step6 c56 step5 c45 step4"
    "c67   .   .     .   ."
    "step7 c78 step8 c89 step9"
    ".     .   .     .   c910"
    ".     .   step11 c1011 step10";
  column-gap: 12px;
  row-gap: 12px;
  align-items: center;
  overflow: visible;
}

.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="1"] { grid-area: step1; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="2"] { grid-area: step2; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="3"] { grid-area: step3; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="4"] { grid-area: step4; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="5"] { grid-area: step5; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="6"] { grid-area: step6; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="7"] { grid-area: step7; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="8"] { grid-area: step8; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="9"] { grid-area: step9; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="10"] { grid-area: step10; }
.page-hershey-entertainment-case .kp-hershey-eleven-map .kp-process-node[data-step="11"] { grid-area: step11; }

/* Seven-step desktop serpentine:
   01 → 02 → 03
   06 ← 05 ← 04
   07 */
.page-hershey-entertainment-case .kp-process-map.kp-hershey-seven-map {
  display: grid;
  grid-template-columns:
    minmax(0,1fr) 34px
    minmax(0,1fr) 34px
    minmax(0,1fr);
  grid-template-rows:
    auto 34px auto 34px auto;
  grid-template-areas:
    "step1 c12 step2 c23 step3"
    ".     .   .     .   c34"
    "step6 c56 step5 c45 step4"
    "c67   .   .     .   ."
    "step7 .   .     .   .";
  column-gap: 12px;
  row-gap: 12px;
  align-items: center;
  overflow: visible;
}

.page-hershey-entertainment-case .kp-hershey-seven-map .kp-process-node[data-step="1"] { grid-area: step1; }
.page-hershey-entertainment-case .kp-hershey-seven-map .kp-process-node[data-step="2"] { grid-area: step2; }
.page-hershey-entertainment-case .kp-hershey-seven-map .kp-process-node[data-step="3"] { grid-area: step3; }
.page-hershey-entertainment-case .kp-hershey-seven-map .kp-process-node[data-step="4"] { grid-area: step4; }
.page-hershey-entertainment-case .kp-hershey-seven-map .kp-process-node[data-step="5"] { grid-area: step5; }
.page-hershey-entertainment-case .kp-hershey-seven-map .kp-process-node[data-step="6"] { grid-area: step6; }
.page-hershey-entertainment-case .kp-hershey-seven-map .kp-process-node[data-step="7"] { grid-area: step7; }

/* Exact standardized connector design.
   Opacity and shadow remain animatable so the shared glow keyframes work. */
.page-hershey-entertainment-case .kp-hershey-map-arrow {
  position: relative;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(138,37,40,.18);
  border-radius: 999px;
  background: #fff;
  color: #8a2528;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: scale(.55);
  box-shadow: 0 0 0 0 rgba(138,37,40,.17);
  pointer-events: none;
}

.page-hershey-entertainment-case [data-arrow-area="c12"] { grid-area: c12; }
.page-hershey-entertainment-case [data-arrow-area="c23"] { grid-area: c23; }
.page-hershey-entertainment-case [data-arrow-area="c34"] { grid-area: c34; }
.page-hershey-entertainment-case [data-arrow-area="c45"] { grid-area: c45; }
.page-hershey-entertainment-case [data-arrow-area="c56"] { grid-area: c56; }
.page-hershey-entertainment-case [data-arrow-area="c67"] { grid-area: c67; }
.page-hershey-entertainment-case [data-arrow-area="c78"] { grid-area: c78; }
.page-hershey-entertainment-case [data-arrow-area="c89"] { grid-area: c89; }
.page-hershey-entertainment-case [data-arrow-area="c910"] { grid-area: c910; }
.page-hershey-entertainment-case [data-arrow-area="c1011"] { grid-area: c1011; }

.page-hershey-entertainment-case
  [data-kp-hershey-process-map].is-map-animated
  .kp-hershey-map-arrow {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 360ms ease,
    transform 520ms var(--kp-case-ease);
  will-change: opacity, box-shadow, filter;
}

.page-hershey-entertainment-case
  [data-kp-hershey-process-map].is-map-animated
  .kp-hershey-map-arrow--horizontal {
  animation: kpMapArrowPulseHorizontal 1.45s ease-in-out infinite;
}

.page-hershey-entertainment-case
  [data-kp-hershey-process-map].is-map-animated
  .kp-hershey-map-arrow--vertical {
  animation: kpMapArrowPulseVertical 1.45s ease-in-out infinite;
  animation-delay: 520ms;
}

.page-hershey-entertainment-case
  [data-kp-hershey-process-map].is-map-animated
  :is(
    [data-arrow-area="c23"],
    [data-arrow-area="c56"],
    [data-arrow-area="c89"]
  ) {
  animation-delay: 260ms;
}

.page-hershey-entertainment-case .kp-hershey-checklist {
  display: grid;
  gap: 9px;
}

.page-hershey-entertainment-case .kp-hershey-checklist > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(17,17,17,.07);
  border-radius: 12px;
  background: #fff;
  font-size: .82rem;
}

.page-hershey-entertainment-case .kp-hershey-checklist b {
  color: #8a2528;
}

.page-hershey-entertainment-case .kp-hershey-restraint-card {
  display: grid;
  gap: 10px;
}

.page-hershey-entertainment-case .kp-hershey-restraint-card > div {
  padding: 12px;
  border: 1px solid rgba(17,17,17,.07);
  border-radius: 13px;
  background: #fff;
}

.page-hershey-entertainment-case .kp-hershey-restraint-card small,
.page-hershey-entertainment-case .kp-hershey-restraint-card strong {
  display: block;
}

.page-hershey-entertainment-case .kp-hershey-restraint-card small {
  color: #8a2528;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.page-hershey-entertainment-case .kp-hershey-restraint-card strong {
  margin-top: 4px;
  font-size: .82rem;
  line-height: 1.4;
}

.page-hershey-entertainment-case .kp-hershey-communication-card,
.page-hershey-entertainment-case .kp-hershey-readiness-card {
  padding: 18px;
  border: 1px solid rgba(17,17,17,.08);
  border-radius: 16px;
  background: #fff;
}

.page-hershey-entertainment-case .kp-hershey-communication-card strong {
  display: block;
  margin-top: 12px;
  line-height: 1.45;
}

.page-hershey-entertainment-case .kp-hershey-communication-card p {
  margin: 10px 0 0;
  color: rgba(17,17,17,.62);
  font-size: .84rem;
  line-height: 1.6;
}

.page-hershey-entertainment-case .kp-hershey-team-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}

.page-hershey-entertainment-case .kp-hershey-team-grid > .kp-mini-label {
  grid-column: 1 / -1;
}

.page-hershey-entertainment-case .kp-hershey-team-grid > div {
  padding: 11px;
  border: 1px solid rgba(17,17,17,.07);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-size: .8rem;
  font-weight: 750;
}

.page-hershey-entertainment-case .kp-hershey-readiness-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.page-hershey-entertainment-case .kp-hershey-risk-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 18px;
}

.page-hershey-entertainment-case .kp-hershey-risk-grid .kp-result-card {
  padding: 22px;
}

.page-hershey-entertainment-case .kp-hershey-value-grid,
.page-hershey-entertainment-case .kp-hershey-ownership-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 20px;
}

.page-hershey-entertainment-case .kp-hershey-before-after {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
}

.page-hershey-entertainment-case .kp-hershey-before-after > article,
.page-hershey-entertainment-case .kp-hershey-confidential-card {
  padding: 28px;
}

.page-hershey-entertainment-case .kp-hershey-highlight {
  max-width: 960px;
  margin: 28px auto 0;
  padding: 28px 32px;
  border-left: 4px solid #8a2528;
  border-radius: 0 20px 20px 0;
  background: rgba(138,37,40,.055);
  color: #111;
  font-family: var(--kp-font-heading);
  font-size: clamp(1.3rem,2.1vw,1.76rem);
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .page-hershey-entertainment-case .kp-hershey-risk-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .page-hershey-entertainment-case .kp-hershey-value-grid,
  .page-hershey-entertainment-case .kp-hershey-ownership-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

/* Tablet serpentines: two-column alternating route. */
@media (max-width: 980px) {
  .page-hershey-entertainment-case .kp-hershey-preview-grid,
  .page-hershey-entertainment-case .kp-hershey-metric-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .page-hershey-entertainment-case .kp-hershey-preview-flow {
    flex-wrap: wrap;
    white-space: normal;
  }

  .page-hershey-entertainment-case .kp-process-map.kp-hershey-eleven-map {
    grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr);
    grid-template-rows:
      auto 34px auto 34px auto 34px auto 34px auto 34px auto;
    grid-template-areas:
      "step1 c12 step2"
      ".     .   c23"
      "step4 c34 step3"
      "c45   .   ."
      "step5 c56 step6"
      ".     .   c67"
      "step8 c78 step7"
      "c89   .   ."
      "step9 c910 step10"
      ".     .   c1011"
      ".     .   step11";
    column-gap: 12px;
    row-gap: 12px;
  }

  .page-hershey-entertainment-case .kp-process-map.kp-hershey-seven-map {
    grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr);
    grid-template-rows:
      auto 34px auto 34px auto 34px auto;
    grid-template-areas:
      "step1 c12 step2"
      ".     .   c23"
      "step4 c34 step3"
      "c45   .   ."
      "step5 c56 step6"
      ".     .   c67"
      ".     .   step7";
    column-gap: 12px;
    row-gap: 12px;
  }

  .page-hershey-entertainment-case .kp-hershey-map-arrow {
    font-size: 0;
  }

  .page-hershey-entertainment-case .kp-hershey-map-arrow::before {
    color: #8a2528;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1;
  }

  .page-hershey-entertainment-case
    :is(.kp-hershey-eleven-map,.kp-hershey-seven-map)
    [data-arrow-area="c12"]::before,
  .page-hershey-entertainment-case
    .kp-hershey-eleven-map [data-arrow-area="c56"]::before,
  .page-hershey-entertainment-case
    .kp-hershey-eleven-map [data-arrow-area="c910"]::before,
  .page-hershey-entertainment-case
    .kp-hershey-seven-map [data-arrow-area="c56"]::before {
    content: "→";
  }

  .page-hershey-entertainment-case
    :is(.kp-hershey-eleven-map,.kp-hershey-seven-map)
    [data-arrow-area="c34"]::before,
  .page-hershey-entertainment-case
    .kp-hershey-eleven-map [data-arrow-area="c78"]::before {
    content: "←";
  }

  .page-hershey-entertainment-case
    :is(.kp-hershey-eleven-map,.kp-hershey-seven-map)
    :is(
      [data-arrow-area="c23"],
      [data-arrow-area="c45"],
      [data-arrow-area="c67"],
      [data-arrow-area="c89"],
      [data-arrow-area="c1011"]
    )::before {
    content: "↓";
  }

  .page-hershey-entertainment-case
    [data-kp-hershey-process-map].is-map-animated
    :is(
      [data-arrow-area="c23"],
      [data-arrow-area="c45"],
      [data-arrow-area="c67"],
      [data-arrow-area="c89"],
      [data-arrow-area="c1011"]
    ) {
    animation-name: kpMapArrowPulseVertical;
  }

  .page-hershey-entertainment-case
    [data-kp-hershey-process-map].is-map-animated
    :is(
      [data-arrow-area="c12"],
      [data-arrow-area="c34"],
      [data-arrow-area="c56"],
      [data-arrow-area="c78"],
      [data-arrow-area="c910"]
    ) {
    animation-name: kpMapArrowPulseHorizontal;
  }
}

@media (max-width: 720px) {
  .page-hershey-entertainment-case .kp-hershey-risk-grid,
  .page-hershey-entertainment-case .kp-hershey-value-grid,
  .page-hershey-entertainment-case .kp-hershey-ownership-grid,
  .page-hershey-entertainment-case .kp-hershey-before-after {
    grid-template-columns: 1fr;
  }

  .page-hershey-entertainment-case .kp-hershey-responsibility-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile serpentines: one card and one vertical connector per transition. */
@media (max-width: 640px) {
  .page-hershey-entertainment-case .kp-hershey-preview-grid,
  .page-hershey-entertainment-case .kp-hershey-metric-grid {
    grid-template-columns: 1fr;
  }

  .page-hershey-entertainment-case .kp-hershey-metric-grid .kp-ataglance-item {
    border-right: 0;
    border-bottom: 1px solid rgba(17,17,17,.08);
    padding: 24px 0;
  }

  .page-hershey-entertainment-case .kp-hershey-metric-grid .kp-ataglance-item:last-child {
    border-bottom: 0;
  }

  .page-hershey-entertainment-case .kp-hershey-preview-flow {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hershey-entertainment-case .kp-hershey-preview-flow b {
    align-self: center;
    transform: rotate(90deg);
  }

  .page-hershey-entertainment-case .kp-process-map.kp-hershey-eleven-map {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: none;
    grid-template-areas:
      "step1"
      "c12"
      "step2"
      "c23"
      "step3"
      "c34"
      "step4"
      "c45"
      "step5"
      "c56"
      "step6"
      "c67"
      "step7"
      "c78"
      "step8"
      "c89"
      "step9"
      "c910"
      "step10"
      "c1011"
      "step11";
    row-gap: 12px;
    column-gap: 0;
  }

  .page-hershey-entertainment-case .kp-process-map.kp-hershey-seven-map {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: none;
    grid-template-areas:
      "step1"
      "c12"
      "step2"
      "c23"
      "step3"
      "c34"
      "step4"
      "c45"
      "step5"
      "c56"
      "step6"
      "c67"
      "step7";
    row-gap: 12px;
    column-gap: 0;
  }

  .page-hershey-entertainment-case .kp-hershey-map-arrow::before {
    content: "↓" !important;
  }

  .page-hershey-entertainment-case
    [data-kp-hershey-process-map].is-map-animated
    .kp-hershey-map-arrow {
    animation-name: kpMapArrowPulseVertical;
  }

  .page-hershey-entertainment-case .kp-hershey-operations-preview {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-hershey-entertainment-case .kp-hershey-map-arrow {
    opacity: 1;
    transform: none;
    animation: none !important;
    transition: none;
  }
}
