body {
  margin: 0;
  font-family: sans-serif;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  min-height: 100vh; /* Full viewport height */
  max-height: 900px; /* Optional: Limit max height */
  overflow: hidden; /* Prevent content spill */
}

.hero-image,
.hero-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover the container without distortion */
  display: block; /* Remove extra space below image */
}

.hero-content {
  padding: 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-align: left;
}

.highlight {
  display: inline-block;
  position: relative;
  white-space: nowrap;
}

.highlight::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2em;
  height: 0.5em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 150' preserveAspectRatio='none'%3E%3Cpath d='M9.3,127.3c49.3-3,150.7-7.6,199.7-7.4c121.9,0.4,189.9,0.4,282.3,7.2C380.1,129.6,181.2,130.6,70,139 c82.6-2.9,254.2-1,335.9,1.3c-56,1.4-137.2-0.3-197.1,9'%3E%3C/path%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: underline 5s infinite;
}

@keyframes underline {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  20% {
    transform: scaleX(1);
    opacity: 1;
  }
  40% {
    transform: scaleX(1.1);
    opacity: 0.8;
  }
  60% {
    transform: scaleX(1);
    opacity: 1;
  }
  80% {
    transform: scaleX(0.9);
    opacity: 0.8;
  }
  100% {
    transform: scaleX(0);
    opacity: 0;
  }
}

.hero-content p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #444;
  order: 2; /* Ensure p is second */
  margin-top: 0; /* Remove default margin */
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr; /* Single column for mobile */
    min-height: auto; /* Adjust height for stacked content */
    max-height: none; /* Remove max height limit */
  }

  .hero-image,
  .hero-content {
    width: 100%; /* Take full width */
  }

  .hero-image {
     /* Optional: Set a max height for the image on mobile */
     max-height: 50vh;
  }

  .hero-content {
    min-height: 50vh; /* Ensure content takes up reasonable space */
  }
}
