/* ==========================================================================
   About Us > History page
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;600;700&display=swap');

.history-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0 120px;
  width: 100%;
  color: #000000;
  font-family: 'Comfortaa', system-ui, -apple-system, sans-serif;
  font-size: 16px;
}

/* ---- Hero headline (top of page) ---- */
.history-hero-wrapper {
  max-width: 1200px;
  width: 100%;
  padding: 0 40px;
  margin: 0 auto 64px auto;
  text-align: center;
}

.history-hero-headline {
  margin: 0;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.2;
  font-family: 'Comfortaa', system-ui, -apple-system, sans-serif;
}

@media (max-width: 1200px) {
  .history-hero-headline {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .history-hero-headline {
    font-size: 32px;
  }
}

/* ---- Hero section (image left + description right) ---- */
.history-hero {
  max-width: 1200px;
  width: 100%;
  padding: 0 40px;
  margin: 0 auto 80px auto;
}

.history-hero-container {
  display: flex;
  align-items: center;
  gap: 56px;
}

.history-hero-image {
  flex: 0 0 45%;
  max-width: 45%;
}

.history-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  object-fit: cover;
}

.history-hero-description {
  flex: 1;
  font-size: 16px;
  line-height: 1.75;
  font-family: 'Comfortaa', system-ui, -apple-system, sans-serif;
  font-weight: 400;
}

.history-hero-description p {
  margin: 0 0 16px 0;
}

.history-hero-description p:last-child {
  margin-bottom: 0;
}

@media (max-width: 992px) {
  .history-hero-wrapper {
    padding: 0 24px;
    margin-bottom: 40px;
  }

  .history-hero {
    padding: 0 24px;
    margin-bottom: 48px;
  }

  .history-hero-container {
    flex-direction: column;
    gap: 32px;
  }

  .history-hero-image {
    flex: 0 0 100%;
    max-width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 14px;
  }

  .history-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

@media (max-width: 768px) {
  .history-hero-wrapper {
    padding: 0 20px;
    margin-bottom: 40px;
  }

  .history-hero {
    padding: 0 20px;
    margin-bottom: 48px;
  }

  .history-hero-container {
    flex-direction: column;
    gap: 32px;
  }

  .history-hero-image {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .history-hero-description {
    font-size: 16px;
  }
}

/* ---- Gray copy band ---- */
.history-copy-band {
  width: 100%;
  background: #F4F5F7;
  padding: 72px 0;
  margin-bottom: 40px;
}

.history-copy-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.history-copy-inner.history-copy-with-image {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 56px;
}

.history-copy-text {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-copy-image {
  flex: 0 0 40%;
  max-width: 40%;
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  align-items: center;
}

.history-copy-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
}

.history-copy-inner p {
  margin: 0 0 18px 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  font-family: 'Comfortaa', system-ui, -apple-system, sans-serif;
}

/* ---- HISTORY label ---- */
.history-label-wrapper {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.history-label {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  font-family: 'Comfortaa', system-ui, -apple-system, sans-serif;
}

/* -- Laptop (993px–1200px) -- */
@media (min-width: 993px) and (max-width: 1200px) {
  .history-copy-inner.history-copy-with-image {
    gap: 40px;
  }

  .history-copy-image {
    flex: 1 1 0%;
    min-width: 0;
  }

  .history-copy-inner p {
    font-size: 16px;
  }

  .history-hero-description {
    font-size: 16px;
  }
}

/* -- Tablet (769px–992px) -- */
@media (min-width: 769px) and (max-width: 992px) {
  .history-copy-inner.history-copy-with-image {
    flex-direction: column;
    gap: 32px;
  }

  .history-copy-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 14px;
    display: block;
    order: -1;
  }

  .history-copy-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top center;
    border-radius: 14px;
    display: block;
  }

  .history-copy-inner {
    padding: 0 24px;
  }

  .history-copy-inner p {
    font-size: 18px;
    line-height: 1.75;
  }

  .history-hero-description {
    font-size: 18px;
  }
}

/* -- Mobile (≤768px) -- */
@media (max-width: 768px) {
  .history-label {
    font-size: 32px;
  }

  .history-copy-inner.history-copy-with-image {
    flex-direction: column;
    gap: 32px;
  }

  .history-copy-inner {
    padding: 0 20px;
  }

  .history-copy-image {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    border-radius: 14px;
    order: -1;
    margin: 0 auto;
  }

  .history-copy-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 14px;
    object-fit: cover;
    object-position: center;
  }

  .history-copy-inner p {
    font-size: 16px;
  }
}

/* ---- Timeline image ---- */
.history-timeline-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.history-timeline-wrapper img {
  width: 944px;
  max-width: 90vw;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* ---- Responsive timeline swap (desktop vs mobile) ---- */

/* Mobile version hidden by default */
.history-timeline-mobile {
  display: none;
}

/* Above 768px: desktop visible, mobile hidden (defaults) */

/* At 768px and below: hide desktop, show mobile */
@media (max-width: 768px) {
  .history-timeline-desktop {
    display: none;
  }

  .history-timeline-mobile {
    display: flex;
    justify-content: center;
    padding: 0 20px;
  }

  .history-timeline-mobile img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    border-radius: 14px;
  }
}
