#design-tool {
  display: block;
  position: relative;
  min-width: 5.5ch;
  text-align: left;
  min-height: 4.4em; /* Ensures at least one line of space */
  /* Allow to expand downward if multiple lines */
}

#design-tool .typewriter-text {
  text-transform: none;
}

/* Fix vertical layout for the first slide's text block */
.tms-slide:first-child .tms-content-inner .row > .column.width-11 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 32rem; /* Adjust as needed for your design, ensures vertical centring */
}

.tms-slide:first-child .tms-content-inner .row > .column.width-11 > div {
  /* Ensure each text line stacks vertically, no extra margin collapse */
  margin-bottom: 0.5em;
}

.tms-slide:first-child .tms-content-inner .row > .column.width-11 .mt-40 {
  margin-top: 2em;
}

@media (max-width: 900px) {
  .tms-slide:first-child .tms-content-inner .row > .column.width-11 {
    height: 20rem;
  }
}

/* Mobile-specific fixes for header text positioning */
@media (max-width: 768px) {
  /* Fixed height for typewriter container to prevent layout shifts */
  #design-tool {
    min-height: 5.5em;
    height: 4.5em;
    display: flex;
    align-items: top;
    overflow: visible;
  }
  
  /* Ensure header text maintains consistent position */
  .tms-slide:first-child .tms-content-inner .row > .column.width-12 > div {
    position: relative;
    min-height: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* Anchor the header text to prevent movement */
  .tms-slide:first-child .tms-content-inner .row > .column.width-12 > div > p:first-child {
    position: relative;
    z-index: 2;
    margin-bottom: 1rem;
  }
  
  /* Position typewriter text below header with fixed space */
  .tms-slide:first-child .tms-content-inner .row > .column.width-12 > div > p:last-child {
    position: relative;
    z-index: 1;
    margin-top: 0;
    flex-shrink: 0;
  }
  
  /* Increase font weight for "Product Designer" text on mobile */
  .tms-slide:first-child .tms-content-inner .row > .column.width-12 > div > p:first-child .text-xxlarge {
    font-weight: 600;
  }
}

.hero-line {
  display: block;
  line-height: 1.2;
}

.typewriter-container {
  display: inline-block;
  position: relative;
}

.typewriter-text {
  display: inline;
  color: #ffffff;
}

.typewriter-cursor {
  display: inline-block;
  width: 0.6em;
  height: 0.1em;
  background-color: #333;
  margin-left: 1px;
  vertical-align: baseline;
  position: relative;
  bottom: 0;
  animation: blink 0.7s infinite;
}

.quote-mark {
  display: inline-block;
  color: #ffffff;
}

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