/* Photo Reveal */
.photo-reveal path {
  stroke: white;
  stroke-width: 10px;
  fill: none;
}

/* Thinking Blink */
.Typewriter__cursor {
  display: inline-block;
  font-weight: 400;
  color: #fff;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  -webkit-animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}

#to-top #to-top-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bta-hide {
  animation: active 0.5s;
  -webkit-animation: active 0.5s;
  cursor: default;
}

.bta-active {
  animation: hide 0.5s;
  -webkit-animation: hide 0.5s;
  cursor: pointer;
}

@keyframes hide {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes active {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

#to-top {
  overflow: hidden;
  transition: none !important; /* Hindari transisi Tailwind mengganggu keyframe */
}

.tab-btn.tab-active {
  background-color: #334155; /* aktif abu tua */
  color: white;
}

/* Animate Text */
.animate-text {
  background: linear-gradient(
    to right,
    #ff6b35,
    #c5c3c6,
    #1e90ff,
    #c5c3c6,
    #ff6b35
  );
  background-size: 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: animateText 2.5s linear infinite;
  -webkit-animation: animateText 2.5s linear infinite;
}

@keyframes animateText {
  to {
    background-position: 200%;
  }
}

/* Animate to Left Start */
.slider-left {
  height: 185px;
  margin: auto;
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #fff 10% 90%, transparent);
}

.slider-track-left {
  display: flex;
  width: calc(185px * 16);
  animation: scrollRight1 17s linear infinite;
  -webkit-animation: scrollRight1 17s linear infinite;
}

.slider-track-left:hover {
  animation-play-state: paused !important;
}

.slider-track-left .slide {
  height: 200px;
  width: 185px;
  display: flex;
  align-items: center;
  perspective: 100px;
}

.slider-track-left .slide img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 1s;
}
/* Animate to Left End */

/* Animate to Right Start */
.slider-right-1 {
  height: 200px;
  margin: auto;
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #fff 10% 90%, transparent);
}

.slider-track-right-1 {
  display: flex;
  width: calc(185px * 16);
  animation: scrollRight1 17s linear infinite reverse;
  -webkit-animation: scrollRight1 17s linear infinite reverse;
}

.slider-track-right-1:hover {
  animation-play-state: paused !important;
}

@keyframes scrollRight1 {
  0% {
    transform: translateX(0);
    -webkit-transform: translateX(0);
    -moz-transform: translateX(0);
    -ms-transform: translateX(0);
    -o-transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-185px * 8));
    -webkit-transform: translateX(calc(-185px * 8));
    -moz-transform: translateX(calc(-185px * 8));
    -ms-transform: translateX(calc(-185px * 8));
    -o-transform: translateX(calc(-185px * 8));
  }
}

.slider-track-right-1 .slide {
  height: 200px;
  width: 185px;
  display: flex;
  align-items: center;
  perspective: 100px;
}

.slider-track-right-1 .slide img {
  width: 90%;
  max-width: 100%;
  height: auto;
  transition: transform 1s;
  object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .slider-track-left .slide img {
    width: 80%;
  }

  .slider-track-right-1 .slide img {
    width: 80%;
  }
}

@media (max-width: 480px) {
  .slider-track-left .slide img {
    width: 75%;
  }

  .slider-track-right-1 .slide img {
    width: 75%;
  }
}
/* Animate to Right End */

/* Tab Content */
.tab-content-animate {
  animation: active 0.5s ease-out;
  -webkit-animation: active 0.5s ease-out;
}

@keyframes active {
  0% {
    opacity: 0;
    transform: translateY(-40px);
    -webkit-transform: translateY(-40px);
    -moz-transform: translateY(-40px);
    -ms-transform: translateY(-40px);
    -o-transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
  }
}

/* Slide Text Hover */
.slide-text {
  position: relative;
  border: 0;
  outline: none;
  background: none;
  color: rgb(103, 37, 2);
  text-transform: uppercase;
  font-size: 1.125rem;
  letter-spacing: 2px;
  font-weight: 800;
  cursor: pointer;
}

.hover-text {
  position: absolute;
  content: "";
  color: #ff6b35;
  width: 0%;
  inset: 0;
  overflow: hidden;
  border-right: 6px solid #ff6b35;
  transition: width 0.7s ease;
}

.slide-text:hover .hover-text {
  width: 100%;
  filter: drop-shadow(0 0 23px #ff6b35);
}

/* Trafic Light Animation */
.trafic-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: #333;
  width: 120px;
  height: 300px;
  gap: 15px;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.7),
    0 3px 6px rgba(0, 0, 0, 0.7),
    0 6px 12px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  margin-top: -30px;
}

.red-light,
.yellow-light,
.green-light {
  width: 70px;
  height: 70px;
  border: 2px solid #8e8787;
  border-radius: 50%;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7);
}

.red-light {
  background: #cc0000;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(204, 0, 0, 0.8);
}

.yellow-light {
  background: #cc9900;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(204, 153, 0, 0.8);
}

.green-light {
  background: #009900;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(0, 153, 0, 0.8);
}

/* POPUP */
.modal-wrapper {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.75);
  visibility: hidden;
  opacity: 0;
  transition: all 0.25s ease-in-out;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-wrapper.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: all 0.5s ease-in-out;
  display: flex;
  flex-direction: column;
}

.modal-wrapper.open .modal {
  opacity: 1;
  transform: translateY(40px) scale(1);
  -webkit-transform: translateY(40px) scale(1);
  -moz-transform: translateY(40px) scale(1);
  -ms-transform: translateY(40px) scale(1);
  -o-transform: translateY(40px) scale(1);
}

.head {
  width: 100%;
  background: #ff6b35;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem;
  text-align: center;
}

.content {
  padding: 1rem;
  flex-grow: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.content img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  margin-bottom: 1.2rem;
}

.close-button {
  padding: 0.75rem;
  background: #ff6b35;
  color: white;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  transition: transform 0.3s ease-in-out;
  margin-bottom: 0.5rem;
}

.close-button:hover {
  transform: scale(1.05);
}

/* RESPONSIVE ADJUSTMENT */
@media (max-width: 768px) {
  .modal {
    max-width: 100%;
    max-height: 90vh;
  }

  .head {
    font-size: 0.9rem;
  }

  .content img {
    max-height: 50vh;
  }
}
