/* ===== Секция "Рецепты" ===== */
.recipes {
  padding: 100px 0 0;
}

.recipes__title {
  margin: 0 0 40px;
  font-family: "Robotoslab", sans-serif;
  font-weight: 600;
  font-size: 52px;
  line-height: 74.154px;
  text-transform: uppercase;
  color: #a1652c;
}

.recipes__title.element-animation {
  opacity: 0;
}

.recipes__title.element-animation.element-show {
  opacity: 1;
  transition: opacity 1s;
  animation: textLeft 1s ease;
}

.recipes__list {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto -48px;
  padding-bottom: 48px;
  gap: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
}

.recipes__list.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.recipes__item img {
  -webkit-user-drag: none;
  user-drag: none;
}

.recipes__list::-webkit-scrollbar {
  display: none;
}

.recipes__item {
  flex: 0 0 min(343px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 40px 16px;
  scroll-snap-align: start;
  background-color: #fff8f3;
  background-image: radial-gradient(280px 740px at 43.5% 50%, #fff8f3 32%, #fff9ef 100%);
}

/* последняя карточка прилипает правым краем — иначе её не домотать */
.recipes__item:last-child {
  scroll-snap-align: end;
}

/* поочерёдное появление карточек — один раз, при входе ряда карточек в экран.
   общий .element-animation не используем: он бы срабатывал повторно при листании слайдера */
@keyframes recipesUp {
  from {
    opacity: 0;
    transform: translateY(48px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recipes__item {
  opacity: 0;
}

.recipes.is-revealed .recipes__item {
  animation: recipesUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.recipes.is-revealed .recipes__item:nth-child(1) {
  animation-delay: 0s;
}

.recipes.is-revealed .recipes__item:nth-child(2) {
  animation-delay: 0.22s;
}

.recipes.is-revealed .recipes__item:nth-child(3) {
  animation-delay: 0.44s;
}

.recipes.is-revealed .recipes__item:nth-child(4) {
  animation-delay: 0.66s;
}

.recipes.is-revealed .recipes__item:nth-child(n+5) {
  animation-delay: 0.88s;
}

/* если анимации отключены системно — просто показываем */
@media (prefers-reduced-motion: reduce) {
  .recipes__item {
    opacity: 1;
  }

  .recipes.is-revealed .recipes__item {
    animation: none;
  }
}

.recipes__item-title {
  min-height: 93px;
  font-family: "Robotoslab", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.3;
  text-transform: uppercase;
  color: #a1652c;
}

.recipes__item-img {
  margin-top: 24px;
  height: 352px;
}

.recipes__item-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipes__block {
  margin-top: 24px;
}

.recipes__subtitle {
  margin-bottom: 8px;
  font-family: "Robotoslab", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: normal;
  color: #a1652c;
}

.recipes__ing {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.recipes__ing:last-child {
  margin-bottom: 0;
}

.recipes__ing-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-right: 19px;
  background: url("../img/recipes/ico-whisk.svg") center center/contain no-repeat;
}

.recipes__ing-text {
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  color: #a1652c;
}

.recipes__method-text {
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  color: #303030;
}

/* точки — планшет и десктоп */
.recipes__dots {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.recipes__dots.is-visible {
  display: flex;
}

.recipes__dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #f5b272;
  opacity: 0.3;
  cursor: pointer;
  transition: opacity 0.3s;
}

.recipes__dot.is-active {
  opacity: 1;
}

/* стрелки со счётчиком — только мобильный */
.recipes__nav {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}

@media screen and (min-width: 768px) {
  .recipes__nav.is-visible {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  .recipes__nav.is-visible {
    display: flex;
  }

  .recipes__dots.is-visible {
    display: none;
  }
}

.recipes__nav-btn {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #996333;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: background 0.3s;
}

.recipes__nav-btn:before {
  content: '';
  position: absolute;
  top: 50%;
  width: 10.2px;
  height: 21px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='22' fill='none'%3E%3Cpath d='M10 1 1 11l9 10' stroke='%23996333' stroke-width='1.5'/%3E%3C/svg%3E") center center/contain no-repeat;
}

.recipes__nav-btn--prev:before {
  left: 28.75%;
}

.recipes__nav-btn--next:before {
  right: 28.75%;
  transform: translateY(-50%) scaleX(-1);
}

.recipes__nav-btn:hover {
  background: rgba(153, 99, 51, 0.08);
}

.recipes__nav-count {
  font-family: "Robotoslab", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.3;
  text-transform: uppercase;
  color: #996333;
}

@media screen and (max-width: 1199px) {
  .recipes {
    padding: 80px 0 0;
  }

  .recipes__title {
    font-size: 40px;
    line-height: 120%;
  }
}

@media screen and (max-width: 991px) {
  .recipes .l-default {
    padding: 0 16px;
  }

  .recipes__title {
    font-size: 32px;
    margin-bottom: 32px;
  }

  .recipes__list {
    width: auto;
    max-width: none;
    margin: 0 -16px -48px;
    padding: 0 16px 48px;
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
  }
}

@media screen and (max-width: 767px) {
  .recipes {
    padding: 60px 0 0;
  }

  .recipes__title {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .recipes__list {
    gap: 16px;
  }
}

/* ---- мобильный макет 375 (1-в-1) ---- */
@media screen and (max-width: 767px) {
  .recipes__item {
    padding: 40px 16px 24px;
  }
}
