/* Общий первый экран спецпредложений Juvi Clinic: .offer-hero.
   Используется обычными акциями (news/promo/detail.php) и страницей урологии.
   Десктоп: 40% контент / 60% фото; левый край контента = левый край контейнера шапки (.center-wrap). */

.offer-hero {
    --oh-pad: 40px;
    --oh-max: 1400px;
    --oh-gold: #d4c294;
    --oh-green: #003e33;
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(120% 140% at 0% 0%, #00574a 0%, #003e33 55%, #002a22 100%);
    font-family: var(--font-primary, "Montserrat"), sans-serif;
}

.offer-hero *,
.offer-hero *::before,
.offer-hero *::after {
    box-sizing: border-box;
}

/* Колонки: [отступ до сетки шапки] [контент = 40% ширины контейнера] [фото до правого края окна].
   Формулы отступа и max-width повторяют .center-wrap из style.css на каждом брейкпоинте. */
.offer-hero__grid {
    display: grid;
    grid-template-columns:
        max(var(--oh-pad), calc((100% - var(--oh-max)) / 2 + var(--oh-pad)))
        minmax(0, calc((min(100%, var(--oh-max)) - 2 * var(--oh-pad)) * 0.4))
        minmax(0, 1fr)
        minmax(0, max(var(--oh-photo-max, 1000px), 50%));
    min-height: 300px;
}

.offer-hero__content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(32px, 3vw, 48px) clamp(28px, 2.5vw, 48px) clamp(32px, 3vw, 52px) 0;
}

.offer-hero__visual {
    grid-column: 4;
    position: relative;
    min-width: 0;
    /* Пропорция блока = пропорция исходника (1700×900): высота hero = ширина фото / 1,89, обрезки нет,
       пока текст не выше фото. Фото прижато к правому краю окна и не шире --oh-photo-max. */
    aspect-ratio: 1700 / 900;
    align-self: stretch;
    width: 100%;
    background: #002a22;
}

.offer-hero__visual img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

.offer-hero__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgb(0 42 34 / 45%) 0%, rgb(0 42 34 / 0%) 24%);
}

/* Хлебные крошки внутри hero: второстепенные, на зелёном фоне. */
.offer-hero__crumbs {
    margin-bottom: 26px;
}

.offer-hero .breadcrumbs {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    min-width: 0;
    margin: 0;
}

.offer-hero .breadcrumbs__link {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    width: auto;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0;
    color: rgb(255 255 255 / 72%);
    opacity: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

/* Разделитель — точка между пунктами (в общем style.css она вынесена влево абсолютом). */
.offer-hero .breadcrumbs__link::before {
    content: "";
    position: static;
    flex: 0 0 4px;
    width: 4px;
    height: 4px;
    margin: 0 10px;
    border-radius: 50%;
    background-color: rgb(255 255 255 / 45%);
    transform: none;
}

.offer-hero .breadcrumbs__link:first-child::before {
    display: none;
}

.offer-hero a.breadcrumbs__link:hover {
    color: #fff;
}

/* Последний пункт может сжиматься с многоточием, остальные не переносятся. */
.offer-hero .breadcrumbs__link.active {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgb(255 255 255 / 48%);
}

.offer-hero .breadcrumbs__link.active::before {
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    background-color: rgb(255 255 255 / 45%);
}

.offer-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--oh-gold);
}

.offer-hero__eyebrow::before {
    content: "";
    flex: 0 0 32px;
    width: 32px;
    height: 1px;
    background: currentColor;
}

.offer-hero__title {
    margin: 0;
    font-family: inherit;
    font-size: clamp(26px, 1.3vw + 16px, 40px);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -0.015em;
    text-align: left;
    text-transform: none;
    color: #fff;
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: auto;
}

.offer-hero__title--long {
    font-size: clamp(24px, 1vw + 16px, 32px);
}

.offer-hero__title--xlong {
    font-size: clamp(22px, 0.8vw + 14px, 26px);
    line-height: 1.25;
}

.offer-hero__price {
    color: var(--oh-gold);
    font-weight: 500;
    white-space: nowrap;
}

/* Факты акции из полей ИБ: срок, выгода, филиалы. Подписи выровнены по одной колонке; весь блок контента центрируется в hero. */
.offer-hero__facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px 24px;
    align-items: baseline;
    margin: 32px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid rgb(255 255 255 / 16%);
}

.offer-hero__fact {
    display: contents;
}

.offer-hero__fact dt {
    margin: 0;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 56%);
}

.offer-hero__fact dd {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgb(255 255 255 / 92%);
}

.offer-hero__visual:empty {
    display: none;
}

/* Кнопка записи: по ширине текста, без стрелки; штатный #callback. */
.offer-hero a.offer-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    min-height: 52px;
    margin: 32px 0 0;
    padding: 14px 40px;
    border: 1px solid #fff;
    border-radius: 5px;
    background: #fff;
    color: var(--oh-green);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    box-shadow: 0 10px 28px rgb(0 0 0 / 22%);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.offer-hero a.offer-hero__btn:hover {
    background: #f6f6f4;
    border-color: #f6f6f4;
    color: var(--oh-green);
    transform: translateY(-1px);
}

.offer-hero a:focus-visible {
    outline: 2px solid var(--oh-gold);
    outline-offset: 4px;
}

/* Очень широкие экраны: фото занимает не меньше половины ширины, а высота ограничена 640 px
   (кадр 1700×900 слегка обрезается по бокам; лицо держим в верхней части кадра). */
@media (min-width: 2440px) {
    .offer-hero__visual {
        aspect-ratio: auto;
        min-height: 640px;
    }
}

/* ---- Брейкпоинты как у .center-wrap ---- */
@media (max-width: 1599px) {
    .offer-hero { --oh-max: 1280px; }
}

@media (max-width: 1399px) {
    .offer-hero { --oh-pad: 36px; --oh-max: 1220px; }
}

/* Ниже 1200px — одна колонка: фото сверху, текст под ним. */
@media (max-width: 1199px) {
    .offer-hero { --oh-pad: 32px; --oh-maxs: 1040px; }

    .offer-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .offer-hero__visual {
        grid-column: 1;
        order: -1;
        aspect-ratio: 1700 / 900;
        max-height: none;
    }

    .offer-hero__visual::after {
        background: linear-gradient(0deg, rgb(0 42 34 / 40%) 0%, rgb(0 42 34 / 0%) 35%);
    }

    .offer-hero__content {
        grid-column: 1;
        padding: 36px max(var(--oh-pad), calc((100% - var(--oh-maxs)) / 2 + var(--oh-pad))) 44px;
    }

    .offer-hero__content > * {
        max-width: 640px;
    }
}

@media (max-width: 991px) {
    .offer-hero { --oh-pad: 28px; --oh-maxs: 800px; }
}

@media (max-width: 767px) {
    .offer-hero { --oh-pad: 24px; --oh-maxs: 600px; }
    .offer-hero__content { padding-top: 30px; padding-bottom: 40px; }
}

@media (max-width: 575px) {
    .offer-hero { --oh-pad: 20px; --oh-maxs: 9999px; }
    .offer-hero__facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .offer-hero__fact dd { margin-bottom: 10px; }
}

@media (max-width: 359px) {
    .offer-hero { --oh-pad: 16px; }
}

/* ---- Текстовый блок обычной акции под hero ---- */
.promo-detail {
    padding: 64px 0 80px;
    color: #003e33;
    font-family: var(--font-primary, "Montserrat"), sans-serif;
}

.promo-detail > .center-wrap {
    padding-left: 0;
    padding-right: 0;
}

.promo-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 56px;
    align-items: start;
}

.promo-detail__grid--single {
    grid-template-columns: minmax(0, 760px);
}

.promo-detail__content {
    min-width: 0;
    font-size: 17px;
    line-height: 1.7;
}

.promo-detail__content ul,
.promo-detail__content ol {
    margin: 12px 0;
    padding-left: 1.3em;
}

.promo-detail__content li + li {
    margin-top: 8px;
}

.promo-detail__content small {
    font-size: 14px;
    color: rgb(0 62 51 / 70%);
}

.promo-detail__content img {
    max-width: 100%;
    height: auto;
}

.promo-detail__image {
    margin: 0;
    border-radius: 5px;
    overflow: hidden;
    background: #f6f6f4;
}

.promo-detail__image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Кнопка из редакторского текста: тот же вид без стрелки. */
.promo-detail__content a.promo-item__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 52px;
    margin-top: 28px;
    padding: 14px 40px;
    border: 1px solid #003e33;
    border-radius: 5px;
    background: #003e33;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    text-transform: none;
    transition: background 0.2s, transform 0.2s;
}

.promo-detail__content a.promo-item__btn:hover {
    background: #002a22;
    color: #fff;
    transform: translateY(-1px);
}

.promo-detail__content a.promo-item__btn svg {
    display: none;
}

@media (max-width: 1199px) {
    .promo-detail { padding: 48px 0 64px; }
    .promo-detail__grid { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
}

@media (max-width: 767px) {
    .promo-detail { padding: 36px 0 48px; }
    .promo-detail__grid,
    .promo-detail__grid--single { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .promo-detail__content { font-size: 16px; }
}
