/*
 * Cabecera reutilizable de páginas de listado y categorías.
 * Banda compacta con breadcrumb, H1 y subtítulo. Sin foto para no penalizar
 * el LCP y mantener el listado en el primer pliegue de móvil.
 */

.page_header {
    padding: 24px 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.page_header > .container {
    background: linear-gradient(135deg, #c8102e 0%, #8a0a1f 100%);
    color: #fff;
    padding: 24px 32px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(138, 10, 31, 0.18);
    max-width: 1140px;
}

/* El último elemento del card no debe sumar margen al padding inferior. */
.page_header > .container > *:last-child {
    margin-bottom: 0;
}


.page_header > .container {
    position: relative;
}

.page_header__breadcrumb {
    margin: 0 0 8px;
    font-size: 12.5px;
    opacity: 0.85;
    line-height: 1.05;
}

.page_header__breadcrumb ol li {
    line-height: 1.05;
}

.page_header__back {
    display: block;
    margin-top: 8px;
    margin-left: auto;
    width: max-content;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.page_header__back:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

@media (min-width: 768px) {
    /* En desktop el botón se ancla arriba a la derecha del card, alineado
       con el breadcrumb. En móvil queda en flujo natural debajo del H1. */
    .page_header__back {
        position: absolute;
        top: 24px;
        right: 32px;
        margin-top: 0;
    }
}

.page_header__breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.page_header__breadcrumb li {
    display: flex;
    align-items: center;
}

.page_header__breadcrumb li + li::before {
    content: "›";
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.55);
}

.page_header__breadcrumb a {
    color: #ffd9de;
    text-decoration: none;
}

.page_header__breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.page_header__breadcrumb [aria-current="page"] span {
    color: #fff;
    font-weight: 500;
}

.page_header__title {
    color: #fff;
    margin: 0 0 4px;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 600;
}

.page_header__title strong {
    font-weight: 700;
}

.page_header__subtitle {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.85);
    max-width: 780px;
}

.page_header__chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 767px) {
    .page_header {
        display: block !important;
        padding: 10px 12px;
        margin-top: 3px;
        overflow: hidden;
    }
    .page_header > .container {
        padding: 12px 14px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
    }
    .page_header__breadcrumb {
        margin: 0 0 4px;
        font-size: 11.5px;
    }
    .page_header__title {
        font-size: 18px;
        line-height: 1.2;
        margin: 0 0 2px;
    }
    .page_header__subtitle {
        font-size: 12.5px;
        line-height: 1.3;
        margin: 0 0 4px;
    }
    .page_header__chip {
        font-size: 11.5px;
        padding: 3px 10px;
    }
    .page_header__back {
        margin-top: 4px;
        padding: 3px 10px;
        font-size: 11.5px;
    }
}
