.main {
  max-width: 1000px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 1rem; /* horizontal padding */
  flex-wrap: wrap; /* allow wrapping on smaller screens */
}

.text {
  flex: 1 1 400px; /* take available space, minimum 400px */
}

#horizontal {
  flex: 1 1 400px; /* take available space, minimum 400px */
  width: 100%;      /* fill flex space */
  height: auto;
  max-width: 500px; /* optional max width */
  /* border-radius: 8px; */
}

#about-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text);
}

#about-section {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text);
  text-align: left;
}

.image-wrapper {
  position: relative;
  flex: 1 1 400px;
  width: 100%;
  max-width: 500px;
}

.image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
}

#hover-gif {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;               /* hidden by default */
  pointer-events: none;     /* allow hover to reach the static image */
  transition: opacity 0.3s ease;
}

.image-wrapper:hover #hover-gif {
  opacity: 1;               /* show GIF on hover */
}

@media (max-width: 700px) {
  .main {
    flex-direction: column;
    text-align: center;
  }

  #horizontal,
  #about-section {
    width: 100%;
  }

  #about-section {
    text-align: center;
  }
}
