.cosmetology-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 80px 10% 10px;
  background-color: #fff;
  flex-wrap: wrap;
}
.cosmetology-block .content { max-width: 50%; }
.cosmetology-block h1 {
  font-size: clamp(18px, calc(1rem + 2vw), 36px);
  line-height: 1.2;
  margin-bottom: 20px;
  color: #333;
  max-width: 100%;
  white-space: normal;
}

.cosmetology-block .subtitle {
  font-size: clamp(15px, calc(0.8rem + 1vw), 20px);
  color: #555;
  margin-bottom: 30px;
}
.cosmetology-block .button { display: inline-block; padding: 14px 28px; background-color: #b2763c; color: #fff; font-size: 16px; border-radius: 30px; text-decoration: none; transition: .3s; }
.cosmetology-block .button:hover { background-color: #945f2f; }

.slider {
  width: 100%;
  max-width: 505px; 
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  flex-shrink: 0;
}

.slider-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slider img {
  width: 100%;          
  height: auto;
  aspect-ratio: 505 / 379; 
  flex-shrink: 0;
  border-radius: 20px;
  object-fit: contain;
  background-color: #fff;
}

.slider button { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background-color: rgba(0,0,0,0.4); color: #fff; border: none; cursor: pointer; font-size: 20px; z-index: 10; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.slider button:hover { background-color: #A06D38; }
.prev { left: 10px; }
.next { right: 10px; }
.dots { text-align: center; position: absolute; bottom: 15px; width: 100%; z-index: 5; }
.dots span { display: inline-block; width: 10px; height: 10px; margin: 0 6px; background-color: rgba(255, 255, 255, 0.6); border-radius: 50%; cursor: pointer; transition: .3s; }
.dots span.active { background-color: #fff; }

.cosmetology-block.no-media {
  justify-content: center;
  align-items: center;
  text-align: left;
}

.cosmetology-block.no-media .content {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.cosmetology-block.no-media .button {
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 1263px) {
  .cosmetology-block {
    flex-wrap: nowrap;
  }
  .cosmetology-block .content {
    max-width: 45%;
  }
  .slider {
    max-width: 450px;
  }
}

@media (max-width: 900px) {
  .cosmetology-block {
    flex-wrap: wrap;
    justify-content: center;
  }
  .cosmetology-block .content {
    max-width: 100%;
    margin-bottom: 20px;
  }
  .cosmetology-block h1 { font-size: 28px; }
  .cosmetology-block .subtitle { font-size: 17px; }
  .slider {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 820px) {
  .cosmetology-block {
    margin-top: -60px;
  }
}

@media (max-width: 768px) {
  .cosmetology-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .cosmetology-block .button {
    display: inline-block;
    margin: 0 auto 20px;
  }
    .cosmetology-block.no-media {
    text-align: center;
    align-items: center;
  }

  .cosmetology-block.no-media .content {
    text-align: center;
  }

  .cosmetology-block.no-media .button {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 725px) {
  .cosmetology-block {
    align-items: flex-start;
    padding-left: 5%;
    padding-right: 5%;
  }
  .cosmetology-block .content {
    padding-left: 0;
    padding-right: 0;
  }
  .slider {
    max-width: 95%;
    transform: scale(0.95);
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .cosmetology-block {
    align-items: center;
    padding: 70px 5% 35px;
  }
  .cosmetology-block h1 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .cosmetology-block .subtitle {
    font-size: 16px;
    margin-bottom: 16px;
  }
  .cosmetology-block .button {
    font-size: 14px;
    padding: 12px 24px;
    margin-bottom: 12px;
  }
  .slider {
    max-width: 100%;
    margin-top: -8px;
    margin-bottom: -8px;
  }
  .slider button { width: 30px; height: 30px; font-size: 16px; }
  .dots span { width: 8px; height: 8px; margin: 0 4px; }
}

@media (max-width: 375px) {
  .cosmetology-block h1 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .cosmetology-block .subtitle {
    font-size: 15px;
    margin-bottom: 12px;
  }
  .cosmetology-block .button {
    margin-bottom: 8px;
  }
  .slider {
    margin-top: -10px;
    margin-bottom: -10px;
  }
}