/* Page title — slim white topbar under site header */

.custom-page-title-wrapper {
    --cpt-ink: #161616;
    --cpt-mute: #6b6b6b;
    --cpt-green: #153d25;
    --cpt-line: #E0E0E0;
    --cpt-bg: #ffffff;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--cpt-bg) !important;
    border: 0;
    border-bottom: 1px solid var(--cpt-line);
    box-sizing: border-box;
    font-family: "DM Sans", Arial, sans-serif;
}

.custom-page-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--uicore-header--wide-spacing, 70px);
    min-height: 42px;
    height: 42px;
    box-sizing: border-box;
}

.custom-page-title-left {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: hidden;
}

body .custom-page-title-wrapper h1.custom-page-title {
    margin: 0;
    padding: 0;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 0.9375rem !important;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-transform: none !important;
    color: var(--cpt-ink) !important;
    white-space: nowrap;
}

/* Breadcrumbs — small inline text */
.custom-breadcrumbs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.custom-breadcrumbs .breadcrumbs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    font-size: 0.6875rem !important;
    line-height: 1.2;
    color: var(--cpt-mute) !important;
    text-align: left !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-breadcrumbs a,
.custom-breadcrumbs a.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 0;
    background: transparent !important;
    color: var(--cpt-mute) !important;
    text-decoration: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: inherit !important;
    font-weight: 500;
    line-height: inherit;
    transition: color 0.15s ease;
}

.breadcrumb-home-icon {
    width: 11px;
    height: 11px;
    stroke: currentColor;
}

.custom-breadcrumbs a:hover,
.custom-breadcrumbs a.breadcrumb-item:hover {
    background: transparent !important;
    color: var(--cpt-green) !important;
    border-color: transparent !important;
    opacity: 1 !important;
    text-decoration: none !important;
}

.custom-breadcrumbs .breadcrumb-separator {
    color: #b0b0b0 !important;
    margin: 0 5px;
    font-weight: 400;
    opacity: 1;
}

.custom-breadcrumbs .breadcrumb-current,
.custom-breadcrumbs .current,
.custom-breadcrumbs span:not(.breadcrumb-separator) {
    display: inline;
    margin: 0;
    padding: 0;
    background: transparent !important;
    color: var(--cpt-mute) !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: inherit !important;
    font-weight: 500;
    line-height: inherit;
}

/* Slogan — right corner, compact */
.custom-page-title-right {
    flex: 0 0 auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.custom-page-title-right::before {
    content: none;
}

.custom-site-slogan {
    text-align: right;
    color: var(--cpt-mute);
    position: relative;
    z-index: 1;
    max-width: 100%;
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.slogan-background-icon {
    display: none;
}

.custom-site-slogan p,
.custom-site-slogan__text {
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: 500;
    font-style: italic;
    color: var(--cpt-ink) !important;
    letter-spacing: 0;
    text-shadow: none;
}

.custom-site-slogan__attr {
    display: inline;
    margin: 0;
    font-size: 0.625rem;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.01em;
    color: var(--cpt-mute) !important;
}

/* Hide excerpt / description in topbar mode */
.custom-page-title-meta {
    display: none;
}

/* Theme Builder: flush under header, full-bleed bar */
body:not(.home):not(.front-page) #uicore-tb-pagetitle {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

body:not(.home):not(.front-page) #uicore-tb-pagetitle > .elementor > .elementor-element:first-child {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#uicore-tb-pagetitle .elementor-hidden-tablet,
#uicore-tb-pagetitle .elementor-hidden-mobile,
#uicore-tb-pagetitle .elementor-hidden-phone {
    display: block !important;
}

#uicore-tb-pagetitle .elementor,
#uicore-tb-pagetitle .elementor-section,
#uicore-tb-pagetitle .elementor-container,
#uicore-tb-pagetitle .elementor-column,
#uicore-tb-pagetitle .elementor-widget-wrap,
#uicore-tb-pagetitle .elementor-element {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#uicore-tb-pagetitle .elementor-section.elementor-section-boxed > .elementor-container,
#uicore-tb-pagetitle .elementor-container {
    max-width: none !important;
}

#uicore-tb-pagetitle .elementor-widget-shortcode > .elementor-widget-container,
#uicore-tb-pagetitle .elementor-shortcode {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

@media (max-width: 1024px) {
    .custom-page-title-wrapper {
        display: block !important;
    }

    .custom-page-title-bar {
        height: 40px;
        min-height: 40px;
        padding: 0 20px;
        gap: 12px;
    }

    .custom-page-title-left {
        flex: 1 1 auto;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        overflow: hidden;
    }

    body .custom-page-title-wrapper h1.custom-page-title {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        font-size: 0.875rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .custom-breadcrumbs {
        display: flex !important;
        flex: 0 1 auto;
        max-width: 48%;
        justify-content: flex-end;
        overflow: hidden;
    }

    .custom-breadcrumbs .breadcrumbs {
        justify-content: flex-end;
        max-width: 100%;
    }

    .custom-page-title-right {
        display: none;
    }
}

@media (max-width: 767px) {
    .custom-page-title-bar {
        height: 36px;
        min-height: 36px;
        padding: 0 16px;
    }

    body .custom-page-title-wrapper h1.custom-page-title {
        font-size: 0.8125rem !important;
    }

    .custom-breadcrumbs {
        max-width: 45%;
    }

    .custom-breadcrumbs .breadcrumbs {
        font-size: 0.625rem !important;
    }
}
