.company-history-page {
  color: var(--kpn-green-grey-grey-900);
  background: #fff;
}

.history-overview,
.history-journey,
.history-next {
  font-family: "FC Minimal", sans-serif;
}

.history-shell {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.history-overview {
  padding: 96px 0 80px;
  overflow: hidden;
  background: #fff;
}

.history-overview__grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 80px;
  align-items: start;
}

.history-overview__heading h2,
.history-section-head h2,
.history-next__panel h2 {
  margin: 0;
  font-size: var(--fc-minimal-heading-40-semibold);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

.history-overview__heading h2,
.history-section-head h2 {
  color: var(--kpn-green-green-green-600);
}

.history-overview__heading > p {
  max-width: 430px;
  margin: 24px 0 0;
  color: var(--kpn-green-grey-grey-600);
  font-size: var(--fc-minimal-paragraph-small-regular);
  line-height: 1.6;
}

.history-overview__story {
  padding-top: 4px;
}

.history-overview__story p {
  margin: 0 0 20px;
  color: var(--kpn-green-grey-grey-700);
  font-size: var(--fc-minimal-paragraph-small-regular);
  line-height: 1.68;
}

.history-overview__story p:last-child {
  margin-bottom: 0;
}

.history-overview__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 64px 0 0;
  padding: 32px 0 0;
}

.history-overview__facts > div {
  min-width: 0;
  padding: 0 32px;
  border-left: 1px solid var(--kpn-green-grey-grey-50);
}

.history-overview__facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.history-overview__facts dt {
  margin: 0;
  color: var(--kpn-green-blue-blue-600);
  font-size: var(--fc-minimal-heading-48-semibold);
  font-weight: 600;
  line-height: 1;
}

.history-overview__facts dd {
  margin: 8px 0 0;
  color: var(--kpn-green-grey-grey-600);
  font-size: var(--fc-minimal-paragraph-detail-regular);
  line-height: 1.4;
}

.history-journey {
  padding: 88px 0 112px;
  background: var(--kpn-green-grey-grey-25, #f7f9f8);
}

.history-section-head {
  margin-bottom: 48px;
}

.history-section-head p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--kpn-green-grey-grey-600);
  font-size: var(--fc-minimal-paragraph-small-regular);
  line-height: 1.5;
  text-align: left;
}

/* รูปประวัติเป็นแนวนอน 16:9 — คอลัมน์รูปกว้างกว่าคอลัมน์ข้อความเล็กน้อย */
.history-journey__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(48px, 5vw, 80px);
  align-items: start;
}

/* รูปติดอยู่กึ่งกลางแนวตั้งของจอระหว่างเลื่อน (ไม่ชิดใต้ header เกินไป) */
.history-visual {
  position: sticky;
  top: max(120px, calc(50vh - 190px));
  display: flex;
  justify-content: center;
}

.history-visual__frame {
  position: relative;
  width: 100%;
  /* สูงกว่า 16:9 เล็กน้อย — รูป 16:9 จะถูกตัดขอบซ้ายขวานิดเดียว */
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--kpn-green-grey-grey-50);
}

.history-visual__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .24s ease, transform .55s ease;
}

.history-visual__frame img.is-changing {
  opacity: .25;
  transform: scale(1.025);
}

.history-events {
  position: relative;
}

.history-events::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 23px;
  width: 1px;
  background: var(--kpn-green-blue-blue-200);
  content: "";
}

.history-event {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 32px;
  align-content: center;
  min-height: 58vh;
  padding: 48px 0;
  scroll-margin-top: 184px;
}


.history-event__marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--kpn-green-blue-blue-200);
  border-radius: 50%;
  color: var(--kpn-green-blue-blue-700);
  background: var(--kpn-green-grey-grey-25, #f7f9f8);
  font-size: 13px;
  font-weight: 600;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease, transform .25s ease;
}

.history-event.is-active .history-event__marker {
  border-color: var(--kpn-green-blue-blue-600);
  color: #fff;
  background: var(--kpn-green-blue-blue-600);
  transform: scale(1.08);
}

.history-event__copy {
  padding-top: 2px;
}

.history-event__copy time {
  display: block;
  margin-bottom: 16px;
  color: var(--kpn-green-blue-blue-600);
  font-size: var(--fc-minimal-heading-30-medium);
  font-weight: 500;
  line-height: 1;
}

.history-event__copy h3 {
  max-width: 520px;
  margin: 0 0 16px;
  color: var(--kpn-green-grey-grey-900);
  font-size: var(--fc-minimal-heading-30-medium);
  font-weight: 500;
  line-height: 1.18;
  transition: color .25s ease;
}

.history-event.is-active .history-event__copy h3 {
  color: var(--kpn-green-green-green-600);
}

.history-event__copy p,
.history-event__copy li {
  color: var(--kpn-green-grey-grey-600);
  font-size: var(--fc-minimal-paragraph-small-regular);
  line-height: 1.55;
}

.history-event__copy p {
  max-width: 520px;
  margin: 0;
}

.history-event__copy ul,
.history-event__copy ol {
  max-width: 520px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-event__copy p + ul,
.history-event__copy p + ol {
  margin-top: 8px;
}

.history-event__copy li {
  position: relative;
  padding-left: 20px;
}

.history-event__copy li + li {
  margin-top: 6px;
}

.history-event__copy li::before {
  position: absolute;
  top: .7em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kpn-green-orange-orange-500);
  content: "";
}

.history-event__copy .history-event__note {
  width: fit-content;
  margin-top: 18px;
  padding-top: 12px;
  color: var(--kpn-green-blue-blue-800);
  font-size: var(--fc-minimal-paragraph-detail-medium);
  font-weight: 500;
}

.history-event__media {
  display: none;
}

.history-next {
  padding: 80px 0;
  background: #fff;
}

.history-next__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-height: 224px;
  padding: 48px 56px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(18, 94, 125, .96) 0%, rgba(18, 94, 125, .90) 58%, rgba(18, 94, 125, .84) 100%),
    url("../images/projects/BG-Project-1600.webp");
  background-position: center, center;
  background-size: cover, cover;
}

.history-next__panel > * {
  position: relative;
  z-index: 1;
}

.history-next__panel h2 {
  color: #fff;
}

.history-next__panel p {
  margin: 16px 0 0;
  color: var(--kpn-green-blue-blue-100);
  font-size: var(--fc-minimal-paragraph-small-regular);
  line-height: 1.45;
}

.history-next__panel .btn-more {
  flex: 0 0 auto;
  align-self: center;
}

[data-history-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

[data-history-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991.98px) {
  .history-overview {
    padding: 72px 0 64px;
  }

  .history-overview__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .history-overview__heading > p {
    max-width: 680px;
  }

  .history-journey__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
  }

  .history-visual {
    top: max(112px, calc(50vh - 140px));
  }

  .history-visual__frame {
    border-radius: 18px;
  }

  .history-event {
    gap: 24px;
    min-height: 54vh;
  }

  .history-event__copy h3 {
    font-size: var(--fc-minimal-paragraph-large-medium);
  }

  .history-event__copy p,
  .history-event__copy li,
  .history-overview__heading > p,
  .history-overview__story p {
    font-size: var(--fc-minimal-paragraph-detail-regular);
  }
}

@media (max-width: 767.98px) {
  .history-shell {
    width: min(1200px, calc(100% - 32px));
  }

  .history-overview {
    padding: 56px 0 48px;
  }

  .history-overview__heading h2,
  .history-section-head h2,
  .history-next__panel h2 {
    font-size: var(--fc-minimal-heading-30-semibold);
  }

  .history-overview__heading h2 br,
  .history-next__panel h2 br {
    display: none;
  }

  .history-overview__heading > p {
    margin-top: 16px;
  }

  .history-overview__facts {
    margin-top: 40px;
    padding-top: 24px;
  }

  .history-overview__facts > div {
    padding: 0 16px;
  }

  .history-overview__facts dt {
    font-size: var(--fc-minimal-heading-30-semibold);
  }

  .history-overview__facts dd {
    font-size: 13px;
  }

  .history-journey {
    padding: 56px 0 64px;
  }

  .history-section-head {
    margin-bottom: 32px;
  }

  .history-journey__layout {
    display: block;
  }

  .history-visual {
    display: none;
  }

  .history-events::before {
    left: 18px;
  }

  .history-event {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
    padding: 0 0 32px;
    scroll-margin-top: 136px;
  }

  .history-event + .history-event {
    padding-top: 0;
    border-top: 0;
  }

  .history-event:last-child {
    padding-bottom: 0;
  }

  .history-event__marker {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }

  .history-event__media {
    display: block;
    grid-column: 2;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 0 20px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--kpn-green-grey-grey-50);
  }

  .history-event__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .history-event__copy {
    grid-column: 2;
    padding: 0 0 0;
  }

  .history-event__copy time {
    margin-bottom: 10px;
    font-size: var(--fc-minimal-paragraph-large-medium);
  }

  .history-event__copy h3 {
    margin-bottom: 12px;
    font-size: var(--fc-minimal-paragraph-large-medium);
  }

  .history-event__copy .history-event__note {
    margin-top: 14px;
  }

  .history-next {
    padding: 48px 0 56px;
  }

  .history-next__panel {
    display: block;
    min-height: 0;
    padding: 32px 24px;
    border-radius: 16px;
  }

  .history-next__panel p {
    margin-top: 12px;
  }

  .history-next__panel .btn-more {
    margin-top: 24px;
  }
}

@media (max-width: 767.98px) {
  .history-overview__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: 0;
  }

  .history-overview__facts > div,
  .history-overview__facts > div:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 18px;
    border: 0;
    border-radius: 12px;
    background: var(--kpn-green-grey-grey-25, #f7f9f8);
  }

  .history-overview__facts > div:last-child {
    grid-column: span 2;
    min-height: 94px;
  }

  .history-overview__facts dt {
    font-size: 34px;
  }

  .history-overview__facts dd {
    margin: 8px 0 0;
    font-size: var(--fc-minimal-paragraph-detail-regular);
    line-height: 1.35;
  }
}

@media (max-width: 299.98px) {
  .history-overview__facts {
    grid-template-columns: 1fr;
  }

  .history-overview__facts > div,
  .history-overview__facts > div:first-child,
  .history-overview__facts > div:last-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 72px;
    padding: 14px 16px;
  }

  .history-overview__facts > div:last-child {
    grid-column: auto;
  }

  .history-overview__facts dt {
    flex: 0 0 74px;
  }

  .history-overview__facts dd {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  [data-history-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .history-visual__frame img {
    transition: none;
  }
}
/* KPN typography audit --------------------------------------------------- */
.history-overview__heading > p,
.history-overview__story p,
.history-section-head p,
.history-event__copy p,
.history-event__copy li {
  color: var(--kpn-green-grey-grey-500);
  font-size: var(--fc-minimal-paragraph-regular-regular);
  font-weight: 400;
}
