/*=============== BASE ===============*/

html {
  scroll-behavior: smooth;
}

/* ==================== HEADER HIRE ME BUTTON FIX ==================== */
/* Prevent text overlap on page load - ensure animated texts start hidden */
.animate-fadeText {
  opacity: 0;
  animation-fill-mode: both;
}

/* ==================== END HEADER FIX ==================== */

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
}

/* ==================== SCROLL BAR STYLING ==================== */

::-webkit-scrollbar {
  width: .6rem;
  border-radius: .25rem;
  background-color: #ffffff; 
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #027f82, #00e0b3);
  border-radius: .5rem;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #111f30;
  border-radius: .5rem;
}

/*=============== SCROLL UP (FOOTER ICON) ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -30%;
  background-color: #ffffff; 
  box-shadow: 0 8px 12px hsla(228, 66%, 45%, .1);
  display: inline-flex;
  padding: .35rem;
  border-radius: .25rem;
  color: #000; 
  font-size: 1.5rem;
  transition: .3s;
}

.scrollup:hover {
  transform: translateY(-.25rem);
  background: linear-gradient(to right, #027f82, #00e0b3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.show-scroll {
  bottom: 12rem;
}

/* ==================== END SCROLL BAR Section Styling ==================== */

/* ==================== LOGO CAROUSEL ANIMATION ==================== */
.logo-carousel-track {
  will-change: transform;
}
/* ==================== END LOGO CAROUSEL ==================== */

@media screen and (min-width:1023px) {
  .show-scroll {
    bottom: 3rem;
    right: 3rem;
  }
}

/* ==================== CONTACT FORM STYLING ==================== */

/* Floating label animation for input fields */
.relative label {
  transition: all 0.3s ease;
}

.relative input:focus + label,
.relative textarea:focus + label,
.relative select:focus + label {
  color: #027f82;
}

.relative input:not(:placeholder-shown) + label,
.relative textarea:not(:placeholder-shown) + label {
  top: -1rem;
  font-size: 0.75rem;
}

/* Ensure proper spacing for error messages */
.relative + .text-xs {
  margin-top: 0.5rem;
}

/* ==================== END CONTACT FORM ==================== */

/* ==================== WHY CHOOSE SECTION - TYPING ANIMATION ==================== */

/* Cursor blink animation */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Typing cursor styling - bold and visible */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background: linear-gradient(to bottom, #027f82, #00e0b3);
  margin-left: 2px;
  animation: blink 0.7s infinite;
  vertical-align: text-bottom;
}

/* Typing text container - allow proper wrapping at word boundaries */
#typing-text {
  display: inline;
  white-space: normal;
  word-break: normal;
}

/* Word wrapper - keeps words together, prevents mid-word breaks */
#typing-text .word {
  display: inline-block;
  white-space: nowrap;
}

/* Each typed character with custom color */
#typing-text .char {
  display: inline;
  color: #111f30;
  font-weight: 200;
  opacity: 0;
  animation: fadeInChar 0.2s forwards;
}

/* Preserve spaces between words - these are the natural break points */
#typing-text .space {
  display: inline;
}

/* Fade in animation for characters */
@keyframes fadeInChar {
  to {
    opacity: 1;
  }
}

/* Gradient animation for heading */
@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

/* ==================== END WHY CHOOSE SECTION ==================== */


/* ==================== Testimonial SECTION ==================== */

/* Simple 50% transform for seamless infinite scroll */
  @keyframes scroll-left {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-50%);
    }
  }

  @keyframes scroll-right {
    0% {
      transform: translateX(-50%);
    }
    100% {
      transform: translateX(0);
    }
  }

  .animate-scroll-left {
    animation: scroll-left 40s linear infinite;
    width: max-content;
  }

  .animate-scroll-right-fast {
    animation: scroll-right 30s linear infinite;
    width: max-content;
  }

  /* Pause animation on hover */
  .animate-scroll-left:hover,
  .animate-scroll-right-fast:hover {
    animation-play-state: paused;
  }

  /* Line clamp utility for text truncation */
  .line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* ==================== END Testimonial SECTION ==================== */