/* Modal Base Styles with Enhanced Transitions */
.modal-overlay {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.modal-overlay.is-open {
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 75vw;
  background: transparent;
  transform: scale(0.7);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open .modal-close {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open .video-container {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.1s;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.open-modal-btn-container {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  animation: 1s fadeInUp;
}

.open-modal-btn {
  text-align: center;
  padding: 0.75rem 3rem;
  background: rgb(255, 255, 255);
  border: solid #fff 0px !important;
  color: rgb(28, 32, 35);
  border: none;
  border-radius: 2.5rem;
  cursor: pointer;
  transition: 0.5s ease;

  display: flex;
  justify-content: center;
  align-items: center;
}

.open-modal-btn-icon {
  font-size: 0 !important;
  width: 3rem;
  height: 3rem;
  border-radius: 2rem;
  mask-size: 100% auto;
  margin-left: -1.75rem;
  margin-right: 0.5rem;
  display: inline-block;
  mask-position: center;
  mask-repeat: no-repeat;
  background-image: none;
  background-color: #d34f38;
  -webkit-mask-image: url(../img/play-button.svg);
  mask-image: url(../img/play-button.svg);
  transition: 0.5s ease;
}

.open-modal-btn:hover {
  background: rgb(60, 151, 0);
  color: rgb(109, 255, 12);
  transition: 0.5s ease;
}

.open-modal-btn:hover .open-modal-btn-icon {
  background-color: rgb(109, 255, 12);
  transition: 0.5s ease;
}

.open-modal-btn.vimeo-error {
  background: rgb(190, 1, 1);
  color: rgb(250, 3, 3);
}

.open-modal-btn.vimeo-error .open-modal-btn-icon {
  background-color: rgb(250, 3, 3);
  transition: 0.5s ease;
}

@keyframes fadeInUp {
  0% {
    transform: translateY(10%);
    opacity: 0;
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}

@keyframes fadeInUpHeader {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
