/* ============================================================
 * hero-content-global.css
 * Оформление .p2-header-hero__content (крошки, заголовок, лид, линия)
 * на всех страницах, где рендерится includes/header.php.
 * Стили ограничены контекстом .p2-header-hero__content, чтобы не
 * задевать обычные .breadcrumbs и .page__title вне hero.
 * На /styleguide/ перекрывается более специфичными правилами
 * из styleguide/css/hero-content.css (body.sg-page …).
 * ============================================================ */

.p2-header-hero__content {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    box-sizing: border-box;
    color: #fff;
    pointer-events: none;
    container-type: inline-size;
    container-name: hero-content;
}
.p2-header-hero__content > * { pointer-events: auto; }

.p2-header-hero__content .breadcrumbs { margin: 0 0 24px; }
.p2-header-hero__content .breadcrumbs__list {
    font-family: "Capture", sans-serif !important;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body, 'Manrope', sans-serif);
    font-size: 14px;
    line-height: 1.4;
}
.p2-header-hero__content .breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}
.p2-header-hero__content .page__header {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1400px;
}
.p2-header-hero__content .page__title {
    font-family: "Capture", sans-serif !important;
    font-weight: 10;
    font-size: clamp(22px, 6vw, 88px);
    font-size: clamp(22px, 8cqi, 96px);
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ffffff !important;
    margin: 0;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
}
.p2-header-hero__content .page__title .cat-hl {
    display: inline-block;
    background: var(--color-highlight, #fed500);
    color: var(--color-black, #0b0b0d) !important;
    padding: 0 14px;
    clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.p2-header-hero__content .v11-head-line {
    width: 56px;
    height: 4px;
    background: var(--color-highlight, #fed500);
    margin: 20px auto;
    flex-shrink: 0;
}

.p2-header-hero__content .page__lead {
    font-family: "Capture", sans-serif !important;
    font-size: clamp(15px, 1.6cqi, 22px);
    line-height: 1.6;
    font-weight: 700 !important;
    color: #ffffff !important;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .p2-header-hero__content { padding: 20px 14px 32px; }
    .p2-header-hero__content .page__title { letter-spacing: 0.01em; }
    .p2-header-hero__content .page__lead { font-size: 15px; }
}

/* ============================================================
 * Мобильная версия hero-видео и хлебных крошек
 * ============================================================ */
@media (max-width: 900px) {
    /* Контент hero — вертикальные отступы, чуть меньше паддинги */
    .p2-header-hero__content {
        padding: 24px 16px !important;
    }

    /* Крошки — меньше по размеру, меньше паддинги */
    .p2-header-hero__content .breadcrumbs {
        margin: 0 0 16px !important;
    }
    .p2-header-hero__content .breadcrumbs__list {
        gap: 8px !important;
    }
    .p2-header-hero__content .breadcrumbs__link,
    .p2-header-hero__content .breadcrumbs__item[aria-current="page"] {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }

    /* Заголовок hero — чуть меньше */
    .p2-header-hero__content .page__title {
        font-size: clamp(20px, 7cqi, 56px) !important;
        line-height: 1.15 !important;
        letter-spacing: 0.01em !important;
    }

    /* Линия-разделитель */
    .p2-header-hero__content .v11-head-line {
        width: 44px !important;
        height: 3px !important;
        margin: 14px auto !important;
    }

    /* Лид — меньше */
    .p2-header-hero__content .page__lead {
        font-size: 14px !important;
        line-height: 1.55 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .p2-header-hero__content {
        padding: 18px 12px !important;
    }
    .p2-header-hero__content .breadcrumbs__link,
    .p2-header-hero__content .breadcrumbs__item[aria-current="page"] {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
    .p2-header-hero__content .breadcrumbs__list {
        gap: 6px !important;
    }
    .p2-header-hero__content .page__title {
        font-size: clamp(18px, 7.5cqi, 40px) !important;
    }
    .p2-header-hero__content .page__lead {
        font-size: 13px !important;
    }
    .p2-header-hero__content .v11-head-line {
        width: 36px !important;
        height: 2px !important;
        margin: 12px auto !important;
    }
}

/* Очень узкие экраны: крошки переносятся в несколько строк корректно */
@media (max-width: 360px) {
    .p2-header-hero__content .breadcrumbs__list {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    .p2-header-hero__content .breadcrumbs__link,
    .p2-header-hero__content .breadcrumbs__item[aria-current="page"] {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
    .p2-header-hero__content .page__title {
        font-size: clamp(16px, 8cqi, 32px) !important;
        letter-spacing: 0 !important;
    }
    .p2-header-hero__content .page__lead {
        font-size: 12px !important;
    }
}