/* Скрываем стандартный featured image и заголовочный блок */
figure.wp-block-post-featured-image {
    display: none !important;
}
.wp-block-group.is-vertical.is-content-justification-stretch.is-layout-flex.wp-container-core-group-is-layout-8.wp-block-group-is-layout-flex {
    display: none !important;
}
.wp-block-group.has-global-padding.is-layout-constrained {
    margin: 15px !important;
    padding: 5px !important;
}
.has-base-background-color {
    background-color: transparent !important;
}
footer.wp-block-template-part {
    background: #E7FAFE;
    padding: 20px;
}
.bg-ingedient {
    background: #E7FAFE;
    border-radius: 25px !important;
    padding: 30px !important;
}
h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", sans-serif;
    font-weight: 600;
}

.carousel-control-next, .carousel-control-prev {
    height: 90%;
}

.category-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.category-divider::before,
.category-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #ccc;
}

.category-divider:not(:empty)::before {
    margin-right: 1rem;
}

.category-divider:not(:empty)::after {
    margin-left: 1rem;
}

.category-divider span {
    white-space: nowrap;
}

/* --- Горизонтальный скролл якорей --- */
.recipe-categories-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    padding: 10px 0;
    margin-bottom: 1.5rem;
}

/* Только для мобильных: включаем горизонтальный скролл */
@media (max-width: 768px) {
    .recipe-categories-sticky {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 10px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        -ms-overflow-style: none;
        scrollbar-width: none;

        /* Во всю ширину экрана */
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding: 20px 45px;
        box-sizing: border-box;
        scroll-padding-left: 45px;
    }

    .recipe-categories-sticky a {
        scroll-snap-align: start;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .recipe-categories-sticky::-webkit-scrollbar {
        display: none;
    }
    .row-img-ing {
    padding: 12px;
}

.recipe-categories-sticky a:hover {
    background-color: inherit !important;
    color: inherit !important;
    border-color: inherit !important;
  }
}




/* Стиль активного якоря */
.recipe-categories-sticky a.active {
    background-color: #042B2A !important;
    color: #fff !important;
    border-color: #042B2A !important;
}

a.btn.btn-outline-primary {
    font-weight: bold;
    color: #000;
    border-color: #042B2A !important;
}
.recipe-categories-sticky a:hover {
    background-color: #042B2A;
    color: #fff;
    border-color: #042B2A;
  }

  .recipe-categories-sticky a:focus {
    outline: none;
    box-shadow: none;
}

.recipe-categories-sticky a:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.row-img-ing {
    padding-right: 13px;
}  

/* Универсальный класс для изображения рецепта */
.recipe-image {
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 600px;
}

/* Если используется iframe в карусели */
.ratio iframe {
    width: 100%;
    height: 100%;
    border-radius: 20px;
}

.bg-ingedient ul.list-unstyled li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.bg-ingedient .ingredient-name {
  flex: 1;
  padding-right: 10px;
  word-break: break-word;
}

.bg-ingedient .ingredient-amount {
  white-space: nowrap;
  text-align: right;
}
.ingredient-name {
    white-space: normal;
    word-break: break-word;
    flex: 1;
}

.ingredient-amount {
    text-align: right;
    margin-left: 1rem;
    white-space: nowrap;
}


/* Убираем фиксированную высоту у карусели */
@media (max-width: 768px) {
    .carousel-inner,
    .carousel-item,
    .ratio {
        height: auto !important;
    }

.img-block-rec {
    padding: 0;
    margin-bottom: 15px;
}
}

.mobile-recipe-toggle {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}

.mobile-recipe-toggle .thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 10px;
}

.mobile-recipe-toggle .info {
    flex: 1;
}

.mobile-recipe-toggle .info .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mobile-recipe-toggle .info .time {
    font-size: 14px;
    color: #555;
}

.mobile-recipe-toggle .arrow {
    font-size: 16px;
    color: #ffffff;
    background: #000;
    padding: 0px 4px;
    border-radius: 5px;
}

.mobile-recipe-content {
    margin-bottom: 20px;
}


