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

.section1-container {
  display: flex;
  flex-direction: row;
  margin-top: 5rem;
}

/* Media query for small screens */
@media (max-width: 768px) {
  .section1-container {
    flex-direction: column;
    align-items: center;
  }
}

.section1-card {
  max-width: 725.625px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background-color: #241631;
  padding: 85px 63px;
}

.section1-h1 {
  background: linear-gradient(135deg, #FF6680 5%, #FF4DA9 45%, #CD42D7 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 4.5rem;
  font-family: inconsolata, sans-serif;
  font-weight: 700;
  max-width: 550px;
  line-height: 56.25px;
  letter-spacing: normal;
  word-spacing: 10px;
  margin-bottom: 20px;

  /* Initial hidden state */
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.section1-p {
  color: #dad1e6;
  font-family: fira-sans, sans-serif;
  width: 599.625px;
  /* height: 86.4px; */
  font-size: 2em;
  line-height: 28.8px;
  letter-spacing: normal;
  margin-bottom: 30px;
  
  /* Initial hidden state */
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out 0.2s;
}

.button-container {
  /* Initial hidden state */
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out 0.4s;
}

.section1-button {
  background: linear-gradient(135deg, #FF6680 5%, #FF4DA9 45%, #CD42D7 85%);
  color: #000000;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-family: fira-sans, sans-serif;
  font-weight: 700;
  width: 200px;
  height: 50px;
  margin-right: 10px;
}

.section1-image {
  width: 435.375px;
  height: 543.15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-size: cover;
  background-repeat: no-repeat;
}

.image-container {
  /* Initial hidden state */
  opacity: 0;
  transform: scale(0.8);
  transition: all 1s ease-out;
}

/* Visible states when scrolled into view */
.section1-h1.visible {
  opacity: 1;
  transform: translateY(0);
}

.section1-p.visible {
  opacity: 1;
  transform: translateY(0);
}

.button-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.image-container.visible {
  opacity: 1;
  transform: scale(1);
}

/* Floating animation for the image after it becomes visible */
.section1-image.visible {
  animation: float 6s ease-in-out 2s infinite;
}

/* Keyframes */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Mobile landscape and small tablet (481px - 768px) */
@media (max-width: 768px) {
  .section1-container {
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    gap: 2rem;
    padding: 0 1rem;
  }

  .section1-card {
    max-width: 100%;
    width: 100%;
    padding: 50px 30px;
    text-align: center;
    align-items: center;
  }

  .section1-h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    width: 100%;
  }

  .section1-p {
    font-size: 1.5rem;
    line-height: 1.6;
    text-align: center;
    max-width: 100%;
    width: 100%;
  }

  .button-container {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .section1-button {
    width: 100%;
    max-width: 280px;
    margin-bottom: 10px;
    font-size: 1.8rem;
    height: 52px;
  }

  .image-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
  }

  .section1-image {
    max-width: 100%;
    height: auto;
    min-height: 250px;
  }
}

/* Mobile portrait (320px - 480px) */
@media (max-width: 480px) {
  .section1-container {
    margin-top: 1rem;
    padding: 0 0.5rem;
    width: 90vw;
    
  }

  .section1-card {
    padding: 40px 20px;
  }

  .section1-h1 {
    font-size: 3rem;
    line-height: 1.15;
    word-spacing: 5px;
  }

  .section1-p {
    font-size: 1.5rem;
    line-height: 1.5;
  }

  .section1-button {
    height: 35px;
    font-size: 1.5rem;
    max-width: 90%;
  }

  .image-container {
    max-width: 350px;
    margin: 0 auto;
  }

  .section1-image {
    min-height: 200px;
  }
}

/* Very small screens (less than 320px) */
@media (max-width: 319px) {
  .section1-h1 {
    font-size: 3rem;
    word-spacing: 3px;
  }

  .section1-p {
    font-size: 1.1rem;
  }

  .section1-card {
    padding: 30px 15px;
  }

  .section1-button {
    font-size: 0.95rem;
    height: 28px;
  }
}

/* Large desktop screens */
@media (min-width: 1200px) {
  .section1-container {
    max-width: 1400px;
    gap: 3rem;
  }

  .section1-h1 {
    font-size: 5rem;
  }

  .section1-p {
    font-size: 2rem;
  }
}

/* Ultra-wide screens */
@media (min-width: 1600px) {
  .section1-container {
    max-width: 1600px;
    gap: 4rem;
  }
}

/* High DPI/Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .section1-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Accessibility - Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .section1-h1,
  .section1-p,
  .button-container,
  .image-container {
    transition: none;
    opacity: 1;
    transform: none;
  }
  
  .section1-image {
    animation: none;
  }
}