 /* Melior custom styles */

/* ==========================================================================
   Case studies / insights: load more
   ========================================================================== */
.case-studies-section .facetwp-facet-load_more_case_studies,
.case-studies-section .facetwp-facet-load_more_insights {
    text-align: center;
}
.case-studies-section .facetwp-type-pager .facetwp-load-more {
    margin-top: 30px;
}

/* ==========================================================================
   Sidebar: Recent insights
   ========================================================================== */
.recent-insights {
    border-top: 1px solid #e3e3e3;
    padding-top: 24px;
    margin-bottom: 24px;
}
.recent-insights__heading {
    font-size: 13px;
    font-weight: 700 !important;
    line-height: 19px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #015362;
    margin: 0 0 16px;
}
.recent-insights__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.recent-insights__item {
    border-bottom: 1px solid #e3e3e3;
    padding: 12px 0;
}
.recent-insights__item:first-child {
    padding-top: 0;
}
.recent-insights__item a {
    display: block;
    text-decoration: none;
}
.recent-insights__label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7878;
    margin-bottom: 4px;
}
.recent-insights__title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #464646;
}
.recent-insights__item a:hover .recent-insights__title {
    color: #15838f;
}
/* underline the post title on hover / keyboard focus (stronger selector so theme link styles can't remove it) */
#Content .recent-insights__item a:hover .recent-insights__title,
#Content .recent-insights__item a:focus-visible .recent-insights__title {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}
.recent-insights__all {
    display: inline-block;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #00747d;
    text-decoration: none;
}

/* ==========================================================================
   Sidebar: In this article
   ========================================================================== */
.in-this-article {
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    padding: 20px 20px 16px;
    margin-bottom: 24px;
    background: #fff;
}
.in-this-article[hidden] {
    display: none;
}
.in-this-article__heading {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700 !important;
    line-height: 18px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #015362;
}
.in-this-article__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.in-this-article__list li {
    margin: 0 0 4px;
    padding: 0;
}
.in-this-article__list a {
    display: block;
    padding: 1px 0 1px 12px;
    border-left: 2px solid #dcdcdc;
    font-size: 13px;
    line-height: 19px;
    font-weight: 400;
    color: #464646;
    text-decoration: none;
    transition: color .2s, border-color .2s;
}
.in-this-article__list a:hover {
    color: #015362;
    border-left-color: #15838f;
}
.in-this-article__list a:hover,
.in-this-article__list a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}
/* stronger selector so the theme's link hover styles can't remove the underline */
#Content .in-this-article .in-this-article__list a:hover,
#Content .in-this-article .in-this-article__list a:focus-visible {
    text-decoration: underline !important;
}

/* ==========================================================================
   Sidebar: Follow on LinkedIn
   ========================================================================== */
.follow-linkedin {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border: 1px solid #15838f;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    transition: background-color .2s, box-shadow .2s;
}
.follow-linkedin:hover,
.follow-linkedin:focus-visible {
    background: #f2f9fa;
    box-shadow: 0 2px 8px rgba(1, 83, 98, .15);
    text-decoration: none;
}
.follow-linkedin__icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background-color: #15838f;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M6.94 5a2 2 0 1 1-4-.002 2 2 0 0 1 4 .002zM7 8.48H3V21h4V8.48zm6.32 0H9.34V21h3.94v-6.57c0-3.66 4.77-4 4.77 0V21H22v-7.93c0-6.17-7.06-5.94-8.72-2.91l.04-1.68z'/%3E%3C/svg%3E");
}
.follow-linkedin__text {
    font-size: 15px;
    line-height: 20px;
    color: #464646;
}
.follow-linkedin__text strong {
    font-weight: 700;
    color: #015362;
}
.follow-linkedin:hover .follow-linkedin__text,
.follow-linkedin:focus-visible .follow-linkedin__text,
.follow-linkedin:hover .follow-linkedin__text strong,
.follow-linkedin:focus-visible .follow-linkedin__text strong {
    text-decoration: underline;
    text-underline-offset: 1px;
}

/* ==========================================================================
   Sidebar: Related services (blog post)
   ========================================================================== */
.related-services-blog-post {
    border-top: 1px solid #e3e3e3;
    padding-top: 24px;
    margin-bottom: 24px;
}
.related-services-blog-post__heading {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #015362;
}
.related-services-blog-post__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.related-services-blog-post__list li {
    margin: 0 0 14px;
    padding: 0;
}
.related-services-blog-post__list li:last-child {
    margin-bottom: 0;
}
.related-services-blog-post__list a {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 400;
    color: #15838f;
    text-decoration: none;
}
.related-services-blog-post__list a:hover,
.related-services-blog-post__list a:focus-visible {
    color: #015362;
}
/* underline on hover / keyboard focus (stronger selector so theme link styles can't remove it) */
#Content .related-services-blog-post .related-services-blog-post__list a:hover,
#Content .related-services-blog-post .related-services-blog-post__list a:focus-visible {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* ==========================================================================
   Sidebar: sticky group (positioned by js/custom.js)
   ========================================================================== */
.sticky-group-holder {
    position: relative;
}

/* ==========================================================================
   Image captions
   ========================================================================== */
.wp-caption,
.wp-caption.aligncenter {
    border: 0;
}

/* ==========================================================================
   Sidebar: Insights and Discoveries menu (blog detail)
   ========================================================================== */
.sidebar-2 .widget_nav_menu .menu {
    background: #ececec !important;
    padding: 30px 24px !important;
    margin: 0 !important;
}
.sidebar-2 .widget_nav_menu .menu li {
    list-style: none !important;
    background: none !important;
    border: 0 !important;
    font-size: 14px !important;
    line-height: 20px !important;
}
.sidebar-2 .widget_nav_menu .menu li::before,
.sidebar-2 .widget_nav_menu .menu li::marker {
    content: none !important;
}
/* every link reserves a 2px transparent bottom border so hover/active don't shift the layout */
.sidebar-2 .widget_nav_menu .menu a {
    display: inline !important;
    padding: 0 0 2px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    background: none !important;
    color: #00747d !important;
    text-decoration: none !important;
    font-weight: 400 !important;
}
.sidebar-2 .widget_nav_menu .menu > li > a {
    display: block !important;   /* section title */
}
.sidebar-2 .widget_nav_menu .sub-menu {
    list-style: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 0 0 15px !important;
    border: 0 !important;
}
.sidebar-2 .widget_nav_menu .sub-menu li {
    margin: 10px 0 0 !important;
    padding: 0 !important;
}
/* active section: bold + bottom border (Melior Insights) */
.sidebar-2 .widget_nav_menu .current-page-ancestor > a,
.sidebar-2 .widget_nav_menu .current-menu-item > a {
    font-weight: 500 !important;
    text-decoration: none !important;
    border-bottom: 1cap solid #00747d !important;
    padding-bottom: 1px !important;
}
.sidebar-2 .widget_nav_menu .menu a:hover {
    color: #00747d !important;
    text-decoration: none !important;
    border-bottom: 1px solid #00747d !important;
}
/* remove the line under every menu item */
.sidebar-2 .widget_nav_menu .menu li::after,
.sidebar-2 .widget_nav_menu .menu li a::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    height: 0 !important;
}
/* bottom border ONLY on the active sub-menu item */
.sidebar-2 .widget_nav_menu .menu .sub-menu li.current-page-ancestor > a,
.sidebar-2 .widget_nav_menu .menu .sub-menu li.current-menu-item > a,
.sidebar-2 .widget_nav_menu .menu .sub-menu li.current_page_item > a {
    font-weight: 500 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #00747d !important;
    padding-bottom: 1px !important;
}
body.page-child .sidebar-2 .widget-area.clearfix.lines-hidden {
    padding-top: 0;
}
body.page-child .sidebar.sidebar-2.four.columns {
    margin-top: 0;
}

/* ==========================================================================
   Blog details header (page-blog-details.php)
   ========================================================================== */
.blog-details-header {
    background: #fff;
}
.blog-details-title {
    font-family: "Merriweather", Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.2;
    color: #015362;
    margin: 0 0 24px;
}
.blog-details-author {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}
.blog-details-author__label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6b7878;
    padding-right: 15px;
    border-right: 1px solid #ddd;
    line-height: 28px;
}
.blog-details-author__info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.blog-details-author__info + .blog-details-author__info {
    margin-left: 20px;
}
.blog-details-author__photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.blog-details-author__text {
    display: flex;
    flex-direction: column;
}
.blog-details-author__name {
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    color: #00747d;
}
.blog-details-author__name:hover,
.blog-details-author__name:focus-visible {
    text-decoration: underline;
}
/* author name link (author_bio_url) */
a.blog-details-author__name {
    text-decoration: none;
}
a.blog-details-author__name:hover,
a.blog-details-author__name:focus-visible {
    color: #015362;
    text-decoration: underline;
}
.blog-details-author__role {
    font-size: 13px;
    line-height: 19px;
    color: #6f6f6f;
}

/* Header sits inside .content_wrapper as the first row, spanning the whole container (the container itself caps at 1092px) */
body.page-template-page-blog-details .content_wrapper > .blog-details-header {
    box-sizing: border-box;
    order: 0;
    width: 100%;
    max-width: 1092px;
    margin: 0 0 24px;
    justify-self: stretch;   /* grid (768px+): full width across both columns */
    align-self: stretch;     /* flex column (mobile) */
}

/* ==========================================================================
   Blog details: sidebar widgets
   ========================================================================== */
.content_wrapper:has(.melior-blog-detail) .sidebar-2 .widget {
    padding-bottom: 0;
    margin-bottom: 0;
}
/* 22px space below each widget; none after the last (class set on the sidebar in page-blog-details.php) */
body.page-template-page-blog-details .content_wrapper .blog-details-sidebar .widget {
    margin-bottom: 22px;
    padding-bottom: 0;
}
body.page-template-page-blog-details .content_wrapper .blog-details-sidebar .widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* theraTRACE promo widget: centred card */
.sidebar-2 .widget.for-specific-blog-section {
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    padding: 24px 20px;
    background: #fff;
    text-align: center;
}
.sidebar-2 .widget.for-specific-blog-section .image-section {
    margin-bottom: 18px;
    text-align: center;
}
.sidebar-2 .widget.for-specific-blog-section .image-section img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}
.sidebar-2 .widget.for-specific-blog-section .main-head {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    color: #00747d;
    text-align: center;
}
.sidebar-2 .widget.for-specific-blog-section p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    text-align: center;
}
.sidebar-2 .widget.for-specific-blog-section .learn-more {
    display: table;          /* own line, centred under the text */
    margin: 20px auto 0;
}
/* keep the card's bottom padding (the sidebar widget rules above zero it, incl. :last-child) */
body.page-template-page-blog-details .content_wrapper .blog-details-sidebar .widget.for-specific-blog-section,
body.page-template-page-blog-details .content_wrapper .blog-details-sidebar .widget.for-specific-blog-section:last-child {
    padding-bottom: 24px;
}

/* ==========================================================================
   Blog details: image caption (scoped to this template)
   ========================================================================== */
body.page-template-page-blog-details .wp-caption .wp-caption-text,
body.page-template-page-blog-details .wp-caption-text {
    margin: 8px 0 24px;
    padding: 2px 0 2px 12px;
    border-left: 3px solid #d9dde0;
    font-family: inherit;
    font-size: 13px;
    line-height: 18px;
    font-weight: 400;
    font-style: normal;
    color: #555;
    text-align: left;
    background: none;
}
/* citation link (DOI, "Taken from") */
body.page-template-page-blog-details .wp-caption-text a {
    display: inline;
    color: #00838f;
    text-decoration: none;
    word-break: break-word;
    overflow-wrap: anywhere;
}
body.page-template-page-blog-details .wp-caption-text a:hover {
    text-decoration: underline;
}
/* footnote number after "Taken from" */
body.page-template-page-blog-details .wp-caption-text sup {
    font-size: 9px;
    line-height: 0;
    vertical-align: super;
}
/* journal title in the citation */
body.page-template-page-blog-details .wp-caption-text em,
body.page-template-page-blog-details .wp-caption-text i {
    font-style: italic;
}
/* image box above the caption: thin border, no extra gap */
body.page-template-page-blog-details .wp-caption {
    width: 100% !important;        /* overrides WP inline width */
    max-width: 100%;
}
body.page-template-page-blog-details .wp-caption img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    padding: 24px;
    border: 1px solid #dcdcdc;
    box-sizing: border-box;
}

/* ==========================================================================
   Media queries (kept at the end of the file)
   ========================================================================== */

/* Tablet and up (768px+) */
@media (min-width: 768px) {
    /* flexible content + sidebar layout for any page holding .melior-blog-detail */
    .content_wrapper:has(.melior-blog-detail) {
        display: flex !important;
        align-items: flex-start;
        gap: 44px;
        width: 100%;
        max-width: 1092px !important;
        margin-left: auto !important;   /* centre the capped-width container */
        margin-right: auto !important;
    }
    /* stop the theme's clearfix pseudo-elements acting as flex items */
    .content_wrapper:has(.melior-blog-detail)::before,
    .content_wrapper:has(.melior-blog-detail)::after {
        display: none !important;
    }
    /* content: takes all remaining space */
    .content_wrapper:has(.melior-blog-detail) .sections_group {
        float: none !important;
        flex: 1 1 0;
        min-width: 0;
        width: auto !important;
    }
    /* sidebar: about 29% of the row, never below 240px or above 320px */
    .content_wrapper:has(.melior-blog-detail) .sidebar-2 {
        float: none !important;
        flex: 0 0 clamp(240px, 29.3%, 320px);
        width: auto !important;
    }
    .content_wrapper:has(.melior-blog-detail) .sidebar-2 .widget-area {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Blog Details template: two-column grid, content up to 728px + fixed 320px sidebar, always side by side */
    body.page-template-page-blog-details .content_wrapper:has(.melior-blog-detail) {
        display: grid !important;
        grid-template-columns: minmax(0, 728px) 320px;
        justify-content: space-between;
        column-gap: 44px;
        row-gap: 0;
        align-items: start;
        height: auto;
    }
    body.page-template-page-blog-details .content_wrapper > .blog-details-header {
        grid-column: 1 / -1;
    }
    body.page-template-page-blog-details .content_wrapper:has(.melior-blog-detail) .sections_group {
        width: auto !important;
        height: auto !important;
        min-width: 0;
        max-width: 728px;
    }
    body.page-template-page-blog-details .content_wrapper:has(.melior-blog-detail) .sidebar-2 {
        width: 320px !important;
        height: auto !important;
        min-width: 320px;
        max-width: 320px;
        box-sizing: border-box;
    }
}

/* Tablet (768-959px): 708px container, same as Betheme's .with_aside */
@media (min-width: 768px) and (max-width: 959px) {
    .content_wrapper:has(.melior-blog-detail) {
        box-sizing: border-box;
        max-width: 708px !important;
        padding-left: 15px !important;
    }
    body.page-template-page-blog-details .content_wrapper:has(.melior-blog-detail) {
        /* content takes whatever is left of the 708px container beside the fixed 320px sidebar, so the grid never overflows */
        grid-template-columns: minmax(0, 1fr) 320px;
        column-gap: 24px;
    }
}

/* Desktop (960px+) */
@media (min-width: 960px) {
    /* no side padding on the container: content 728px + gap 44px + sidebar 320px = 1092px */
    body.page-template-page-blog-details .content_wrapper:has(.melior-blog-detail) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.page-template-page-blog-details .vc_column_container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Small desktop (960-1239px): Betheme's 940px container */
@media (min-width: 960px) and (max-width: 1239px) {
    body.page-template-page-blog-details .content_wrapper:has(.melior-blog-detail) {
        max-width: 940px !important;
        /* content shrinks beside the fixed 320px sidebar so the 940px container never overflows */
        grid-template-columns: minmax(0, 1fr) 320px;
        column-gap: 44px;
    }
}

/* Mobile (up to 767px): sidebar first, then content */
@media (max-width: 767px) {
    .content_wrapper:has(.melior-blog-detail) {
        display: flex !important;
        flex-direction: column;
    }
    /* stop the theme's clearfix pseudo-elements acting as flex items */
    .content_wrapper:has(.melior-blog-detail)::before,
    .content_wrapper:has(.melior-blog-detail)::after {
        display: none !important;
    }
    .content_wrapper:has(.melior-blog-detail) .sidebar-2 {
        order: 1;
        float: none !important;
        width: 100% !important;
    }
    .content_wrapper:has(.melior-blog-detail) .sections_group {
        order: 2;
        float: none !important;
        width: 100% !important;
    }
    /* left-align all sidebar content */
    .content_wrapper:has(.melior-blog-detail) .sidebar-2,
    .content_wrapper:has(.melior-blog-detail) .sidebar-2 .widget,
    .content_wrapper:has(.melior-blog-detail) .sidebar-2 .widget-area {
        text-align: left !important;
    }

    /* header: 650px of content + 33px gutters (716px box); below 716px the gutters keep it off the screen edge */
    body.page-template-page-blog-details .content_wrapper > .blog-details-header {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 716px !important;
        min-width: 0;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 33px !important;
        padding-right: 33px !important;
    }
    body.page-template-page-blog-details .blog-details-title {
        overflow-wrap: anywhere;
        max-width: 100%;
    }
    .blog-details-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .blog-details-author__label {
        border-right: 0;
        padding-right: 0;
        line-height: 1;
    }
}
