/* Reusable Duende page heading: university/institute, AR/FR/EN.
   Original titles, breadcrumb destinations and home-page layout are retained. */
header:has(#cu-university-navigation) > .detail-header {
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    height: auto !important;
    min-height: clamp(170px,16vw,220px);
    margin: 0 !important;
    padding: 28px 0 !important;
    overflow: hidden;
    border: 0;
    border-bottom: 3px solid #bd9454;
    border-radius: 0;
    background: #102f43 !important;
    color: #fff;
    text-align: start;
}
header:has(#cu-university-navigation[dir="ltr"]) > .detail-header { direction: ltr !important; }
header:has(#cu-university-navigation[dir="rtl"]) > .detail-header { direction: rtl !important; }
header:has(#cu-university-navigation) > .detail-header *,
header:has(#cu-university-navigation) > .detail-header *::before { box-sizing: border-box; }
header:has(#cu-university-navigation) > .detail-header > [class*="background"],
header:has(#cu-university-navigation) > .detail-header > .background { display: none !important; }
header:has(#cu-university-navigation) > .detail-header::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    /* Half-width, full-image composition at the requested compact height.
       Explicit sizing widens the photo rather than cropping its edges. */
    height: 100%;
    width: 50%;
    aspect-ratio: auto;
    max-width: 50%;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(90deg,#102f430a 0%,#102f4340 38%,#102f43 100%),
        linear-gradient(0deg,#102f4399,transparent 75%), url("../img/images/gallery/4.jpg");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}
header:has(#cu-university-navigation[dir="ltr"]) > .detail-header::before {
    background-image: linear-gradient(270deg,#102f430a 0%,#102f4340 38%,#102f43 100%),
        linear-gradient(0deg,#102f4399,transparent 75%), url("../img/images/gallery/4.jpg");
}
header:has(#cu-university-navigation) > .detail-header::after {
    content: none;
    position: absolute;
    inset-inline-end: max(28px,calc((100% - 1384px)/2));
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 174px;
    opacity: .17;
    pointer-events: none;
    z-index: -1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 154h260M45 146h230M60 136h200M65 69h190L160 21 65 69Zm10 8h170M82 82v47m14-47v47m31-47v47m14-47v47m38-47v47m14-47v47m31-47v47m14-47v47M73 82h32m13 0h32m20 0h32m13 0h32M73 129h32m13 0h32m20 0h32m13 0h32'/%3E%3Ccircle cx='160' cy='53' r='9'/%3E%3Cpath d='M15 164h290M160 12v-9m0 0h28v12h-28'/%3E%3C/svg%3E") center/contain no-repeat;
}
header:has(#cu-university-navigation) > .detail-header .parent_title {
    position: relative;
    z-index: 1;
    float: none;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    background: transparent;
}
header:has(#cu-university-navigation) > .detail-header .container {
    position: relative;
    width: 100%;
    max-width: 1440px;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto;
    padding: 0 28px;
    background: transparent;
    text-align: start !important;
}
header:has(#cu-university-navigation) > .detail-header h1,
header:has(#cu-university-navigation) > .detail-header h3 {
    max-width: 58%;
    margin: 0 0 16px !important;
    padding: 0 !important;
    color: #fff !important;
    font-family: inherit;
    font-size: clamp(27px,2.7vw,38px);
    font-weight: 700;
    line-height: 1.5;
    text-align: start !important;
    overflow-wrap: anywhere;
}
header:has(#cu-university-navigation) > .detail-header .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 58%;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #deebef;
    font-size: 13px;
    line-height: 1.8;
    text-align: start;
}
header:has(#cu-university-navigation) > .detail-header .breadcrumb li {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    float: none;
    min-width: 0;
    padding: 0;
    margin: 0;
    color: #deebef;
}
header:has(#cu-university-navigation) > .detail-header .breadcrumb li + li::before {
    content: '›';
    display: inline-block;
    float: none;
    padding: 0 3px;
    color: #b9cdd5;
}
header:has(#cu-university-navigation[dir="rtl"]) > .detail-header .breadcrumb li + li::before { content: '‹'; }
header:has(#cu-university-navigation) > .detail-header .breadcrumb a {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 6px;
    color: #e0edf0 !important;
    font: inherit;
    font-weight: 400 !important;
    line-height: 1.8;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background .18s,color .18s;
}
header:has(#cu-university-navigation) > .detail-header .breadcrumb a[href]:hover {
    background: #ffffff18;
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}
header:has(#cu-university-navigation) > .detail-header .breadcrumb a[href]:focus-visible { outline: 2px solid #e0bc7f; outline-offset: 2px; background: #ffffff18; }
header:has(#cu-university-navigation) > .detail-header .breadcrumb li:last-child a { background: #ffffff12; color: #fff !important; }
@media (max-width: 760px) {
    /* On phones, show the complete photo above the text instead of under it. */
    header:has(#cu-university-navigation) > .detail-header { min-height: 0; padding-block: calc(clamp(130px,42vw,180px) + 18px) 18px !important; }
    header:has(#cu-university-navigation) > .detail-header::before { inset-block: auto; top: 0; width: auto; max-width: 100%; height: clamp(130px,42vw,180px); aspect-ratio: 760 / 502; background-size: 100% 100%,100% 100%,contain; opacity: 1; }
    header:has(#cu-university-navigation) > .detail-header .container { padding-inline: 18px; }
    header:has(#cu-university-navigation) > .detail-header h1,
    header:has(#cu-university-navigation) > .detail-header h3,
    header:has(#cu-university-navigation) > .detail-header .breadcrumb { max-width: 100%; }
    header:has(#cu-university-navigation) > .detail-header::after { width: 180px; opacity: .07; inset-inline-end: 10px; }
    header:has(#cu-university-navigation) > .detail-header .breadcrumb { font-size: 12px; gap: 2px; }
    header:has(#cu-university-navigation) > .detail-header .breadcrumb a { padding: 4px 6px; }
}
@media (prefers-reduced-motion: reduce) { header:has(#cu-university-navigation) > .detail-header .breadcrumb a { transition: none; } }
@media print {
    header:has(#cu-university-navigation) > .detail-header { background: #fff !important; color: #173b4b; min-height: 0; padding-block: 15px !important; border-bottom: 1px solid #bbcbd2; }
    header:has(#cu-university-navigation) > .detail-header::before,
    header:has(#cu-university-navigation) > .detail-header::after { display: none; }
    header:has(#cu-university-navigation) > .detail-header h3,
    header:has(#cu-university-navigation) > .detail-header h1,
    header:has(#cu-university-navigation) > .detail-header .breadcrumb a { color: #173b4b !important; max-width: 100%; }
}
