.hero {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}


.hero-left,
.hero-right {
  flex: 1 1 50%;
  height: 100%;
  position: relative;
}

.hero-left {
  background: #272B67;
  clip-path: polygon(0 0, 100% 0, calc(100% - 300px) 100%, 0% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 2;
  position: relative;
  color: #ffffff;
}

.hero-right {
  background: #e3f2fd;
  clip-path: polygon(300px 0, 100% 0, 100% 100%, 0% 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  transition: background-image 1s ease-in-out;
  position: relative;
  margin-left: -300px;
  z-index: 1;
}


.hero-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0);
  z-index: 0;
}

.hero-right.fade::after {
  background-color: rgba(255, 255, 255, 0.3);
  transition: background-color 1s ease-in-out;
}


/* Text block */
.hero-text {
  max-width: 70%;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1s ease, transform 1s ease;
  line-height: 2rem;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: bolder;
  line-height: 4rem;
}

.hero-text p {
  padding-top: 2rem;
  padding-bottom: 2rem;
  font-size: 1.2rem;
}

.hero-text.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

.hero-text.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-btn {
    background-color: #ffffff;
    color: #272B67;
    padding: 0.5rem 1.5rem;
    width: fit-content;
    border-radius: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 600;
}

.hero-btn:hover {
    background-color: #69c6b9;
    color: white;
}


.carousel-controls {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 3;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: white;
  box-shadow: 0 0 5px rgba(0,0,0,0.15);
  font-size: 20px;
  transition: background-color 0.3s ease;
}

.carousel-btn:hover {
  background-color: #1f7f3e;
  color: white;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
  }

  .hero-left,
  .hero-right {
    flex: 1 1 100%;
    clip-path: none;
    height: auto;
    padding: 2rem;
  }

  .hero-right {
    margin: 0 auto;
    width: 100%;
  }

  .hero-text {
    margin-top: 3rem;
    max-width: 90%;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
  }

  .hero-text h1 {
    font-size: 1.6rem;
    font-weight: bolder;
    line-height: 2rem;
  }

  .hero-text p {
    padding-top: 1rem;
    padding-bottom: 2rem;
    font-size: 1.2rem;
  }

  .carousel-controls {
    flex-direction: row;
    top: auto;
    bottom: 1rem;
    right: 50%;
    transform: translateX(50%);
  }
}
