.hero-section {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1660px;
  margin: -100px auto 0; /* Pull up behind the header since header y is 1060 and hero y is 1042 */
  padding-top: 100px; /* Space for the header */
  background-color: #d9d9d9;
  border-radius: 50px;
  overflow: hidden;
  display: flex;
  min-height: 1117px;
  box-sizing: border-box;
}

.hero-content {
  flex: 1;
  padding: 100px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: 'Onest', sans-serif;
  font-size: 60px;
  font-weight: 900;
  color: #222222;
  margin: 0 0 30px;
  line-height: 1.05;
  max-width: 620px;
  position: relative;
}

.hero-title-dot {
  position: absolute;
  top: -14px;
  left: -30px;
  width: 30px;
  height: 30px;
  background-color: #dde96e;
  border-radius: 50%;
  z-index: -1;
}

.hero-subtitle {
  font-family: 'Roboto', sans-serif;
  font-size: 30px;
  font-weight: 400;
  color: #222222;
  margin: 0 0 60px;
  line-height: 1.4;
  max-width: 620px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #dde96e;
  color: #000000;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 400;
  text-decoration: none;
  border-radius: 100px;
  padding: 20px 40px;
  width: max-content;
  transition: background-color 0.3s;
}

.hero-button:hover {
  background-color: #cdd95d;
}

.hero-button svg {
  margin-left: 10px;
}

.hero-image-container {
  flex: 1;
  position: static;
}

.hero-image {
  position: absolute;
  right: 46px;
  bottom: 0;
  width: 861px;
  height: 861px;
  object-fit: contain;
}

/* Intermediate Viewports (992px - 1300px) */
@media (max-width: 1300px) and (min-width: 992px) {
  .hero-section {
    min-height: 850px;
    border-radius: 40px;
  }
  .hero-content {
    padding: 60px 40px;
  }
  .hero-title {
    font-size: 48px;
  }
  .hero-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
  }
  .hero-image {
    width: 650px;
    height: 650px;
    right: 10px;
  }
}

/* Mobile Viewports (<= 991px) */
@media (max-width: 991px) {
  .hero-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-top: 90px;
    background-color: #D9D9D9;
    border-radius: 0;
    min-height: auto;
    overflow: hidden;
  }

  .hero-image-container {
    order: 1;
    width: 100%;
    position: static;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 10px 10px 0;
    box-sizing: border-box;
    border-radius: 0;
  }

  .hero-image {
    position: static;
    width: 100%;
    max-width: 379px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }

  .hero-content {
    order: 2;
    width: 100%;
    box-sizing: border-box;
    background-color: #1E1C1C;
    border-radius: 0;
    padding: 40px 20px 35px;
    color: #FFFFFF;
    position: relative;
    z-index: 2;
    margin-top: -10px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .hero-title {
    font-family: 'Onest', sans-serif;
    font-size: 40px;
    font-weight: 900;
    line-height: 40px;
    color: #FFFFFF;
    max-width: 100%;
    margin: 0;
    text-align: left;
    position: relative;
    display: inline-block;
  }

  /* Yellow circle decor below "школа" word at last letter */
  .hero-title-dot {
    display: block;
    position: absolute;
    width: 38px;
    height: 38px;
    background-color: #DDE96E;
    border-radius: 50%;
    right: 15px;
    bottom: -4px;
    top: auto;
    left: auto;
    z-index: -1;
  }

  .hero-subtitle {
    font-family: 'Onest', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.35;
    color: #FFFFFF;
    max-width: 100%;
    margin: 0;
    text-align: left;
  }

  .hero-subtitle p {
    margin: 0;
    color: #FFFFFF;
  }

  .hero-floating-icons {
    display: none;
  }

  /* Hero button: left aligned, max-content normal width */
  .hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #DDE96E;
    color: #000000;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 400;
    padding: 18px 42px;
    border-radius: 100px;
    width: max-content;
    align-self: flex-start;
    box-sizing: border-box;
    margin: 0;
  }

  .hero-button:hover {
    background-color: #cdd95d;
  }
}
