/* ===========================
   HISTORY PAGE - SABIANA
   =========================== */

/* HERO SECTION */
.history-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('/sites/default/files/company/history/history-banner.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: #fff;
  overflow: hidden;
}

.history-hero__overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}

.history-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  padding: 60px; text-align: center;
}

.history-hero__title {
  font-size: 44px;
  font-weight: 300;
  line-height: 1.3;
  margin: 0;
  color: #fff;
  letter-spacing: 0.3px;
}

/* SUBTITLE - outside hero, white background, centered */
.history-subtitle {
  background: #fff;
  padding: 50px 50px;
  text-align: center;
}

.history-subtitle p {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  line-height: 2;
  text-transform: uppercase;
  color: #555;
  max-width: 900px;
  margin: 0 auto;
}

/* NARRATIVE SECTION */
.history-narrative {
  padding: 40px 0 80px;
  background: #fff;
}

.history-narrative__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.history-narrative__text {
  flex: 1;
}

.history-narrative__title {
  font-size: 42px;
  font-weight: 300;
  color: #4A7FB5;
  line-height: 1.25;
  text-align: left;
  margin: 0 auto 30px auto;
  max-width: 1200px;
  padding: 0 60px;
  text-align: left;
}

.history-narrative__text p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin: 0 0 18px 0;
  text-align: left;
}

.history-narrative__text p strong {
  color: #333;
}

.history-narrative__image {
  flex: 0 0 380px;
}

.history-narrative__image img {
  width: 100%;
  height: auto;
  display: block;
}

/* TIMELINE SECTION */
.history-timeline {
  padding: 80px 0;
  background: #f5f5f5;
}

.history-timeline__title {
  text-align: center;
  font-size: 32px;
  font-weight: 300;
  color: #555;
  margin: 0 0 50px 0;
}

/* CAROUSEL */
.history-carousel {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  padding: 0 40px;
}

.history-carousel__viewport {
  overflow: hidden;
}

.history-carousel__track {
  display: flex;
  gap: 30px;
  transition: transform 0.4s ease;
}

/* Timeline item: text on top, image on bottom - 3 columns */
.history-carousel__item {
  flex: 0 0 calc(25% - 22.5px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.history-carousel__year {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.history-carousel__heading {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.history-carousel__item p {
  font-size: 13px;
  line-height: 1.6;
  color: #666;
  margin: 0 0 15px 0;
  flex-grow: 1;
}

.history-carousel__item img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
  /* background: #f0f0f0; */
  margin-top: auto;
}

/* CAROUSEL NAV - centered below carousel */
.history-carousel__nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.history-carousel__arrow {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 10px 15px;
  transition: opacity 0.3s, color 0.3s;
}

.history-carousel__arrow:hover {
  color: #4A7FB5;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .history-carousel__item {
    flex: 0 0 calc(50% - 15px);
  }
  .history-narrative__inner {
    flex-direction: column;
  }
  .history-narrative__image {
    flex: none;
    max-width: 100%;
  }
  .history-hero__title {
    font-size: 32px;
  }
  .history-narrative__title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .history-hero {
    min-height: 50vh;
    background-attachment: scroll;
  }
  .history-hero__title {
    font-size: 24px;
  }
  .history-hero__content {
    padding: 40px 20px;
  }
  .history-subtitle {
    padding: 25px 20px;
  }
  .history-narrative__inner {
    padding: 0 20px;
  }
  .history-narrative__title {
    font-size: 24px;
  }
  .history-carousel__item {
    flex: 0 0 100%;
  }
  .history-carousel {
    padding: 0 20px;
  }
}
