/* Embedding google font for timeline navbar items */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

section {
  padding-left: 5.8vw;
  padding-right: 5.8vw;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin: 0 auto !important;
  margin-bottom: 5.8vw !important;
}

#history-text {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-justify-content: space-between;
  -moz-justify-content: space-between;
  justify-content: space-between;

  margin: 0 auto;
}

.history-text-textwall {
  width: min(52.1vw, 729.4px);
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-flex-direction: column;
  -moz-flex-direction: column;
  flex-direction: column;
  gap: 1rem;
}

#history-timeline {
  margin: 12.8vw auto 0;

}

.timeline-nav {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  gap: min(14.8vw, 208px);
}

.timeline-nav li {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 3.33vw;
  opacity: 0.4;
  cursor: pointer;
  -webkit-transition: opacity 0.3s ease-in-out;
  -moz-transition: opacity 0.3s ease-in-out;
  transition: opacity 0.3s ease-in-out;
}

.timeline-nav li:hover {
  opacity: 1;
}

.timeline-nav li.active {
  opacity: 1;
}

.timeline-nav li.active:hover {
  opacity: 1;
}

.timeline-desc-text {
  margin-top: 2.5vw;
}

/* Timeline Carousel Container */
.timeline-carousel-container {
  overflow: hidden;
  margin-top: 3rem;
}

#history-timeline > div > div > div > div.timeline-desc-text > h2 {
  font-weight: 300;
  line-height: 152%;
}

.timeline-carousel {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -moz-transition: -moz-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 400%; /* 4 slides × 100% */
}

.timeline-details {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-justify-content: space-between;
  -moz-justify-content: space-between;
  justify-content: space-between;
  width: 25%; /* Each slide takes 1/4 of carousel width */
  opacity: 0;
  -webkit-transition: opacity 0.6s ease-in-out;
  -moz-transition: opacity 0.6s ease-in-out;
  transition: opacity 0.6s ease-in-out;
  -webkit-flex-shrink: 0;
  -moz-flex-shrink: 0;
  flex-shrink: 0;
}

.timeline-details.active {
  opacity: 1;
}

.timeline-imgs {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  gap: 1rem;
  margin-left: 2rem;
  height: 17.4vw;
}

.timeline-img {
  max-width: 300px;
  cursor: pointer;
  -webkit-transition: -webkit-transform 0.3s ease-in-out;
  -moz-transition: -moz-transform 0.3s ease-in-out;
  transition: transform 0.3s ease-in-out;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  overflow: hidden;
}

.timeline-img:hover {
  -webkit-transform: scale(1.05);
  -moz-transform: scale(1.05);
  transform: scale(1.05);
}

.timeline-carousel .timeline-imgs > div:nth-child(2) {
  width: 30vw;
  max-width: none;
}

.timeline-img img {
  width: 100%;
  height: 100%;
  -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  -moz-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  object-position: center;
}

.timeline-carousel .timeline-desc-text > p {
  margin-top: .625vw;
}

#history-timeline > div > div.timeline-desc-text > h2 {
  font-weight: 300;
  line-height: 150%;
}

/* CTA Section*/
section#cta {
  margin-top: 4.48vw;
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-justify-content: space-between;
  -moz-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 4.48vw;margin-right: 0;height: 26vw;
  padding-right: 0;
}

#cta > div.cta-text > h2 {
  font-size: min(2.08vw, 29.12px) !important;
  font-weight: 300;
  line-height: 172%;
}

.cta-video {
  position: relative;
  width: 50%;
  -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  -moz-box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  -webkit-border-radius: min(2.08vw, 40px);
  -moz-border-radius: min(2.08vw, 40px);
  border-radius: min(2.08vw, 40px);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  background-color: white;
}

.cta-video iframe {
  width: 100%;
  -webkit-border-radius: min(2.08vw, 40px);
  -moz-border-radius: min(2.08vw, 40px);
  border-radius: min(2.08vw, 40px);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  height: 100%;
  object-fit: cover;
  border: min(1.04vw, 20px) solid white;
  border-right: none;
}

.cta-text {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-flex-direction: column;
  -moz-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: space-between;
  -moz-justify-content: space-between;
  justify-content: space-between;
  width: 50%;
}

#cta > div.cta-text > button {
  width: fit-content;
}

#history-text > div.history-text-h2 > h2 {
  font-size: min(1.6vw, 22.4px) !important;
  line-height: 152%;
  font-weight: 400;
}

#history-text > div.history-text-h2 {
  margin-left: min(8vw, 112px);
}

#cta > div.cta-video > div.themed-shape {
  top: -10vw;
  -webkit-transform: rotate(-20deg);
  -moz-transform: rotate(-20deg);
  transform: rotate(-20deg);
  right: 24vw;
}

#cta > div.cta-video > div.dotted-square {
  right: 45vw;
  top: 17vw;
}

/* Responsive video */
@media (max-width: 768px) {
  /* Additional styles can be added here if needed */
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  -webkit-animation: fadeIn 0.3s ease-in-out;
  -moz-animation: fadeIn 0.3s ease-in-out;
  animation: fadeIn 0.3s ease-in-out;
}

.image-modal.show {
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-justify-content: center;
  -moz-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  -moz-align-items: center;
  align-items: center;
}

.modal-content {
  position: relative;
  max-width: 60%;
  max-height: 60%;
  -webkit-animation: scaleIn 0.3s ease-in-out;
  -moz-animation: scaleIn 0.3s ease-in-out;
  animation: scaleIn 0.3s ease-in-out;
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  -moz-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  -webkit-transition: opacity 0.3s ease;
  -moz-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
}

.modal-close:hover {
  opacity: 0.7;
}

@-webkit-keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@-moz-keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@-webkit-keyframes scaleIn {
  from { 
    opacity: 0;
    -webkit-transform: scale(0.8);
    transform: scale(0.8);
  }
  to { 
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@-moz-keyframes scaleIn {
  from { 
    opacity: 0;
    -moz-transform: scale(0.8);
    transform: scale(0.8);
  }
  to { 
    opacity: 1;
    -moz-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes scaleIn {
  from { 
    opacity: 0;
    -webkit-transform: scale(0.8);
    -moz-transform: scale(0.8);
    transform: scale(0.8);
  }
  to { 
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1);
  }
}

/* video responsiveness when larger than 1400px */
@media (width > 1400px) {
  #cta {
    margin: 4.48vw auto !important;
  }

  #cta > div.cta-video > iframe {
    border-right: min(1.04vw, 20px) solid white;
  }

  #cta > div.cta-video,
  #cta > div.cta-video > iframe {
    border-top-right-radius: min(2.08vw, 40px);
    border-bottom-right-radius: min(2.08vw, 40px);
  }
}

@media (width <= 1000px) {
  .timeline-details {
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    flex-direction: column;
  }

  .timeline-imgs {
    margin-left: 0;
  }

  #history-text > div.history-text-h2 > h2 {
    font-size: 20px !important;
  }

  .timeline-img {
    width: 50% !important;
    max-width: none;
  }
}

@media (width <= 650px) {
  #history-text > div.history-text-h2 {
    margin-left: 0;
  }

  #history-text {
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    flex-direction: column;
  }

  .history-text-textwall {
    width: 100%;
    margin-top: 1.5rem;
  }
}

@media (width <= 850px) {
  #cta > div.cta-text > button {
    font-size: 15px;
  }
}

@media (width <= 768px) {
  .modal-content{
    max-width: 80%;
    max-height: 80%;
  }

  #cta {
    flex-direction: column;
    height: inherit !important;
    padding-right: 5.8vw !important;
    gap: 2rem;
  }

  #cta > div.cta-text > h2 > br {
    display: none !important;
  }

  #cta > div.cta-text {
    width: 100%;
    gap: 1.5rem;
  }

  .cta-video { 
    width: 100%;
    border-radius: min(2.08vw, 40px);
  }

}