/* Typing Animation for Hero Title */

.hero-title {
  margin-bottom: 10px;
  padding: 0 !important; /* Remove padding that might cause alignment issues */
  position: relative;
  display: flex;
  justify-content: center; /* Center the text */
  align-items: center; /* Vertical centering */
  width: 100%;
  text-align: center;
}

.hero-title .typing-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid;
  width: 0;
  animation: typing 3.5s steps(40, end) forwards,
             blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: rgba(255, 255, 255, 0.7) }
}

/* Make the text more visible against backgrounds */
.hero-title .typing-text {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  font-size: 2.8rem; /* Even larger font size for better visibility */
  letter-spacing: 0.5px; /* Slightly increased letter spacing */
  color: #ffffff; /* Ensure white text for visibility */
  position: relative;
  margin: 0 auto !important; /* Center horizontally */
  display: inline-block; /* Better text block handling */
  text-align: center !important; /* Center text alignment */
}

/* After animation completes, keep the cursor blinking for a while then hide it */
.hero-title .typing-text.completed {
  border-right: none;
}

/* Typing container for better positioning */
.typing-container {
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  text-align: center;
  margin: 0 auto;
  width: 100%;
  position: relative;
  padding: 0; /* Ensure no padding is interfering with centering */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    padding: 0; /* Remove all padding on mobile */
  }
  
  .hero-title .typing-text {
    font-size: 1.8rem; /* Slightly smaller on mobile */
    margin: 0 auto; /* Ensure horizontal centering */
  }
}