/* ═══════════════════════════════════════════
   Build Digital — Widget Styles
   Design tokens from Elementor global settings
   ═══════════════════════════════════════════ */

/* ─── Taxonomy-Based Hero Colour Overrides ─── */
/* These use body classes added by the plugin based on bd_topic taxonomy.
   They override Elementor's inline background on the hero container. */

body.bd-hero--green .elementor-element[data-id="bd_hero_01"],
body.bd-hero--green [data-elementor-id] > .elementor-section:first-child,
body.bd-hero--green .bd-hero {
    background-color: #0D5951 !important;
}

body.bd-hero--blue .elementor-element[data-id="bd_hero_01"],
body.bd-hero--blue [data-elementor-id] > .elementor-section:first-child,
body.bd-hero--blue .bd-hero {
    background-color: #3F88A7 !important;
}

/* ─── Content + Sidebar: 60px top padding to push down from hero ─── */

.elementor-widget-bd_content_blocks,
.elementor-widget-bd_resource_sidebar {
    padding-top: 60px;
}

/* ─── Content Blocks Widget ─── */

.bd-content-blocks {
    max-width: 100%;
}

.bd-content-block + .bd-content-block {
    margin-top: 24px;
}

.bd-block-heading {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    line-height: 1.1;
    color: #B14581;
    text-wrap: balance;
}

.bd-block-heading--h2 {
    font-size: clamp(1.75rem, 2.65vw + 0.76rem, 3.25rem);
    margin-top: 20px;
    margin-bottom: 16px;
}

.bd-block-heading--h3 {
    font-size: clamp(1.375rem, 2.05vw + 0.64rem, 2.5rem);
    margin-bottom: 12px;
}

.bd-block-heading--h4 {
    font-size: clamp(1.125rem, 1.5vw + 0.55rem, 1.875rem);
    margin-bottom: 8px;
}

/* Headings inside WYSIWYG paragraph/accordion content
   (when editors use heading tags in the rich-text field) */

.bd-block-paragraph h2,
.bd-block-paragraph h3,
.bd-block-paragraph h4,
.bd-accordion-body-inner h2,
.bd-accordion-body-inner h3,
.bd-accordion-body-inner h4 {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    line-height: 1.1;
    color: #B14581;
    text-wrap: balance;
}

.bd-block-paragraph h2,
.bd-accordion-body-inner h2 {
    font-size: clamp(1.75rem, 2.65vw + 0.76rem, 3.25rem);
    margin-top: 20px;
    margin-bottom: 16px;
}

.bd-block-paragraph h3,
.bd-accordion-body-inner h3 {
    font-size: clamp(1.375rem, 2.05vw + 0.64rem, 2.5rem);
    margin-bottom: 12px;
}

.bd-block-paragraph h4,
.bd-accordion-body-inner h4 {
    font-size: clamp(1.125rem, 1.5vw + 0.55rem, 1.875rem);
    margin-bottom: 8px;
}

.bd-block-paragraph {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;  font-weight: 400;
    font-size: clamp(1rem, 0.9vw + 0.75rem, 1.375rem);
    line-height: 1.4;
    color: #706C69;  color: #2D2926;
}

.bd-block-paragraph p {
    margin-bottom: 1em;
}

.bd-block-paragraph p:last-child {
    margin-bottom: 0;
}

.bd-block-list {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    line-height: 1.5;
    color: #706C69;
    padding-left: 24px;
    list-style-type: disc;font-weight: 400;color: #2D2926;
}

.bd-block-list li {
    margin-bottom: 8px;
}

.bd-block-list li:last-child {
    margin-bottom: 0;
}

.bd-block-quote {
    border-left: 4px solid #B14581;
    background-color: #FAFAFA;
    padding: 24px 32px;
    margin: 8px 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 0.9vw + 0.75rem, 1.375rem);
    line-height: 1.4;
    color: #706C69;
    font-style: italic;
}

.bd-block-quote p {
    margin: 0;
}

/* ─── Accordion Block ─── */

.bd-accordion {
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
    max-width: 100%;
}

.bd-accordion-item {
    border-bottom: 1px solid #E5E5E5;
}

.bd-accordion-item:last-child {
    border-bottom: none;
}

.bd-accordion-title,
button.bd-accordion-title,
.bd-accordion button.bd-accordion-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 18px 20px 18px 24px;
    background: #fff !important;
    background-color: #fff !important;
    border: none;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1rem, 0.9vw + 0.75rem, 1.375rem);
    color: #B14581 !important;
    text-align: left;
    line-height: 1.3;
    text-wrap: balance;
    text-transform: none;
    letter-spacing: normal;
    text-decoration: none;
    transition: background-color 0.2s;
    margin: 0;
}

.bd-accordion-title > span {
    flex: 1 1 0%;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow: hidden;
}

.bd-accordion-title:hover,
button.bd-accordion-title:hover,
.bd-accordion button.bd-accordion-title:hover {
    background-color: #FAFAFA !important;
    color: #B14581 !important;
}

.bd-accordion-title[aria-expanded="true"],
button.bd-accordion-title[aria-expanded="true"],
.bd-accordion button.bd-accordion-title[aria-expanded="true"] {
    background-color: #FAFAFA !important;
    color: #B14581 !important;
}

.bd-accordion-title:focus,
button.bd-accordion-title:focus {
    outline: 2px solid #B14581;
    outline-offset: -2px;
}

.bd-accordion-icon {
    flex-shrink: 0;
    min-width: 20px;
    transition: transform 0.25s ease;
    margin-top: 2px;
    color: #B14581;
}

.bd-accordion-title[aria-expanded="true"] .bd-accordion-icon {
    transform: rotate(180deg);
}

.bd-accordion-body {
    overflow: hidden;
    max-height: 0;
    padding: 0 24px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    line-height: 1.6;
    color: #706C69;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.bd-accordion-body--open {
    padding: 20px 24px;
}

/* When inner wrapper is present, reset parent padding to avoid double-padding */
.bd-accordion-body:has(.bd-accordion-body-inner) {
    padding: 0;
}

.bd-accordion-body-inner {
    padding: 20px 24px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    line-height: 1.6;
    color: #706C69;
}

.bd-accordion-body-inner p {
    margin-bottom: 1em;
}

.bd-accordion-body-inner p:last-child {
    margin-bottom: 0;
}

/* ─── Bold + Link = Button (WYSIWYG convention) ─── */
/* When a user bolds a link in the WYSIWYG editor, it renders as a styled button.
   Regular (non-bold) links remain as normal inline text links. */

.bd-accordion-body-inner strong > a,
.bd-accordion-body-inner a > strong,
.bd-accordion-body-inner b > a,
.bd-accordion-body-inner a > b,
.bd-block-paragraph strong > a,
.bd-block-paragraph a > strong,
.bd-block-paragraph b > a,
.bd-block-paragraph a > b {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    background: transparent;
    color: #B14581;
    border: 2px solid #B14581;
}

.bd-accordion-body-inner strong > a:hover,
.bd-accordion-body-inner a > strong:hover,
.bd-accordion-body-inner b > a:hover,
.bd-accordion-body-inner a > b:hover,
.bd-block-paragraph strong > a:hover,
.bd-block-paragraph a > strong:hover,
.bd-block-paragraph b > a:hover,
.bd-block-paragraph a > b:hover {
    background-color: #B14581;
    color: #fff !important;
    text-decoration: none !important;
}

/* Ensure no underline on bold-link buttons in any state */
.bd-accordion-body-inner strong > a,
.bd-accordion-body-inner a > strong,
.bd-block-paragraph strong > a,
.bd-block-paragraph a > strong {
    text-decoration: none !important;
}

/* Regular inline links (non-bold) in WYSIWYG content */
.bd-accordion-body-inner a:not(:has(strong)):not(:has(b)),
.bd-block-paragraph a:not(:has(strong)):not(:has(b)) {
    color: #B14581;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bd-accordion-body-inner a:not(:has(strong)):not(:has(b)):hover,
.bd-block-paragraph a:not(:has(strong)):not(:has(b)):hover {
    color: #8a3566;
}

/* Ensure strong inside a link doesn't show extra bold styling */
.bd-accordion-body-inner a > strong,
.bd-accordion-body-inner a > b,
.bd-block-paragraph a > strong,
.bd-block-paragraph a > b {
    font-weight: 500;
}

/* ─── Button / CTA Block ─── */

.bd-block-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.bd-block-button--primary {
    background-color: #B14581;
    color: #fff;
    border: 2px solid #B14581;
}

.bd-block-button--primary:hover {
    background-color: #9a3b6f;
    border-color: #9a3b6f;
}

.bd-block-button--outline {
    background: transparent;
    color: #B14581;
    border: 2px solid #B14581;
}

.bd-block-button--outline:hover {
    background-color: #B14581;
    color: #fff;
}

.bd-block-button--download,.bd-block-button--video {
    background: transparent;
    color: #B14581;
    border: 2px solid #B14581;
    padding: 14px 28px;
}

.bd-block-button--download:hover,.bd-block-button--video:hover {
    background-color: #B14581;
    color: #fff;
}

.bd-block-button--download svg,.bd-block-button--video svg {
    flex-shrink: 0;
}
.bd-accordion-body-inner strong a[download]::before {
	content: '';
	width: 16px;
	height: 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B14581' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}
.bd-accordion-body-inner strong a[download]:hover:before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
}
/* ─── Table Block ─── */

.bd-block-table {
    width: 100%;
    overflow-x: auto;
    margin: 8px 0;
}

.bd-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    color: #706C69;
}

.bd-block-table th,
.bd-block-table td {
    padding: 12px 16px;
    border: 1px solid #E5E5E5;
    text-align: left;
    vertical-align: top;
}

.bd-block-table th {
    background-color: #B14581;
    color: #fff;
    font-weight: 600;
    font-size: clamp(0.8rem, 0.5vw + 0.66rem, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bd-block-table tr:nth-child(even) td {
    background-color: #FAFAFA;
}

.bd-block-table tr:hover td {
    background-color: #f0f0f0;
}

/* ─── Image Block ─── */

.bd-block-image {
    margin: 8px 0;
}

.bd-block-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.bd-block-image--medium {
    max-width: 66%;
}

.bd-block-image--small {
    max-width: 50%;
}

.bd-block-image-caption {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #706C69;
    margin-top: 8px;
    font-style: italic;
}

.bd-block-image-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #FAFAFA;
    border: 2px dashed #E5E5E5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-style: italic;
}

/* ─── Gallery Block (thumbnail grid, spans full width) ─── */

.bd-content-block--gallery {
    /* Break out of the content column to span full width (content + sidebar) */
    margin-left: calc(-33.333% - 20px);
    margin-right: 0;
    width: calc(133.333% + 20px);
    max-width: none;
}

.bd-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.bd-block-gallery__item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    background-color: #F0EFEE;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bd-block-gallery__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bd-block-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1024px) {
    /* On tablet/mobile, sidebar stacks below, so no breakout needed */
    .bd-content-block--gallery {
        margin-left: 0;
        width: 100%;
    }

    .bd-block-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .bd-block-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── Video Grid (2-column layout) ─── */

.bd-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    /* Prevent row height recalculation as iframes load */
    grid-auto-rows: auto;
}

.bd-video-grid .bd-block-video {
    margin: 0;
    /* Contain layout shifts within each grid cell */
    contain: layout style;
}

@media (max-width: 768px) {
    .bd-video-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Video Block ─── */

.bd-block-video {
    margin: 8px 0;
}

.bd-block-video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}

/* Fallback for older browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
    .bd-block-video-embed {
        padding-bottom: 56.25%;
        height: 0;
    }
    .bd-block-video-embed iframe {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.bd-block-video-embed iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.bd-block-video-caption {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #706C69;
    margin-top: 8px;
    font-style: italic;
}

/* ─── Divider Block ─── */

.bd-block-divider {
    border: none;
    margin: 16px 0;
}

.bd-block-divider--line {
    border-top: 1px solid #E5E5E5;
}

.bd-block-divider--dashed {
    border-top: 2px dashed #E5E5E5;
}

.bd-block-divider--space {
    height: 40px;
}

/* ─── Worked Example Tag ─── */

.bd-worked-example {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #ECC6DB;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    color: #B14581;
    margin-top: 4px;
    margin-right: 8px;
    margin-bottom: 4px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

.bd-worked-example:hover {
    background: #B14581;
    color: #fff;
}

.bd-worked-example:hover svg {
    stroke: #fff;
}

.bd-worked-example svg {
    flex-shrink: 0;
}

/* ─── Webinar Callout ─── */

.bd-webinar-callout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: #FAFAFA;
    border-left: 4px solid #0D5951;
    padding: 20px 24px;
    margin-top: 8px;
}

.bd-webinar-callout__label {
    font-weight: 600;
    font-size: clamp(0.8rem, 0.4vw + 0.65rem, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0D5951;
    margin-bottom: 4px;
}

.bd-webinar-callout__title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1rem, 0.9vw + 0.75rem, 1.375rem);
    color: #0D5951;
    margin-bottom: 4px;
    line-height: 1.3;
    text-wrap: balance;
}

.bd-webinar-callout__date {
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    color: #706C69;
    font-weight: 400;
    margin-bottom: 12px;
}

.bd-webinar-callout__button,
button.bd-webinar-callout__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 14px 28px;
    background: transparent;
    color: #B14581;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 2px;
    border: 2px solid #B14581;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.bd-webinar-callout__button:hover,
button.bd-webinar-callout__button:hover {
    background-color: #B14581;
    color: #fff;
}

.bd-webinar-callout__button svg {
    flex-shrink: 0;
}

/* Past webinar callout — teal accent on left border and labels */
.bd-webinar-callout--past {
    border-left-color: #3F88A7;
}

.bd-webinar-callout--past .bd-webinar-callout__label {
    color: #3F88A7;
}

.bd-webinar-callout--past .bd-webinar-callout__title {
    color: #3F88A7;
}

/* Past / View Webinar button — solid teal fill */
.bd-webinar-callout__button--view,
button.bd-webinar-callout__button--view,
.bd-webinar-callout--past .bd-webinar-callout__button,
.bd-webinar-callout--past button.bd-webinar-callout__button {
    background: #3F88A7;
    color: #fff;
    border: 2px solid #3F88A7;
}

.bd-webinar-callout__button--view:hover,
button.bd-webinar-callout__button--view:hover,
.bd-webinar-callout--past .bd-webinar-callout__button:hover,
.bd-webinar-callout--past button.bd-webinar-callout__button:hover {
    background-color: #2E6D8A;
    border-color: #2E6D8A;
    color: #fff;
}

/* Upcoming Webinar button — solid magenta fill */
.bd-webinar-callout:not(.bd-webinar-callout--past) .bd-webinar-callout__button,
.bd-webinar-callout:not(.bd-webinar-callout--past) button.bd-webinar-callout__button {
    background: #B14581;
    color: #fff;
    border: 2px solid #B14581;
}

.bd-webinar-callout:not(.bd-webinar-callout--past) .bd-webinar-callout__button:hover,
.bd-webinar-callout:not(.bd-webinar-callout--past) button.bd-webinar-callout__button:hover {
    background-color: #8E3668;
    border-color: #8E3668;
    color: #fff;
}

/* Disabled webinar button (no URL yet) */
.bd-webinar-callout__button--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Video Lightbox ─── */

.bd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-lightbox[hidden] {
    display: none;
}

.bd-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.bd-lightbox__container {
    position: relative;
    width: 90vw;
    max-width: 960px;
    z-index: 1;
}

.bd-lightbox__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.bd-lightbox__close:hover {
    opacity: 1;
}

.bd-lightbox__video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.bd-lightbox__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Editor placeholder */
.bd-content-blocks-placeholder {
    background: #f5f5f5;
    border: 2px dashed #ccc;
    padding: 32px;
    text-align: center;
    color: #999;
    border-radius: 4px;
}

/* ─── Resource Sidebar Widget ─── */

.bd-resource-sidebar {
    background-color: #FAFAFA;
    padding: 32px 24px;
    border-radius: 4px;
    position: sticky;
    top: 160px;
}

/* Hide grey background when sidebar has no content (safety net) */
.bd-resource-sidebar:empty {
    display: none;
}

/* Sidebar header image — full-width, negative margins to fill the rounded box */
.bd-sidebar-header-image {
    margin: -32px -24px 24px -24px;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
    line-height: 0; /* remove inline-block gap below img */
}
.bd-sidebar-header-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.bd-sidebar-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #E5E5E5;
}

.bd-sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.bd-sidebar-section-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1.125rem, 1.5vw + 0.55rem, 1.875rem);
    line-height: 1.1;
    color: #B14581;
    margin-bottom: 12px;
    text-wrap: balance;
}

/* Compact title for Topics/Tags */
.bd-sidebar-section-title--sm {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: clamp(0.8rem, 0.4vw + 0.65rem, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #706C69;
    margin-bottom: 8px;
}

/* Compact section (less padding) */
.bd-sidebar-section--compact {
    margin-bottom: 16px;
    padding-bottom: 16px;
}

/* Tags grid */
.bd-sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bd-sidebar-tag {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #B14581;
    border-radius: 2px;
    color: #B14581;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.bd-sidebar-tag:hover,
.bd-sidebar-tag--flat:hover {
    background-color: #B14581 !important;
    border-color: #B14581 !important;
    color: #fff !important;
    text-decoration: none;
}

.bd-sidebar-tag--flat {
    border-color: #706C69;
    color: #706C69;
}

/* Show All toggle for tags — MUST exactly match .bd-sidebar-view-all button */
.bd-sidebar-show-all,
button.bd-sidebar-show-all,
.bd-resource-sidebar button.bd-sidebar-show-all {
    display: block !important;
    width: 100% !important;
    padding: 14px 24px !important;
    border: 1px solid #B14581 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #B14581 !important;
    text-align: center !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 500 !important;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem) !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    margin-top: 16px !important;
    /* Full button reset to match <a> tag rendering */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    text-transform: none !important;
}
.bd-sidebar-show-all:hover,
button.bd-sidebar-show-all:hover,
.bd-resource-sidebar button.bd-sidebar-show-all:hover {
    background-color: #B14581 !important;
    color: #fff !important;
    border-color: #B14581 !important;
}

/* Downloads (enhanced card style) */
.bd-sidebar-downloads {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bd-sidebar-downloads li {
    margin-bottom: 0;
}

.bd-sidebar-downloads li + li {
    margin-top: 8px;
}

.bd-sidebar-download-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    color: #B14581;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bd-sidebar-download-link:hover {
    border-color: #B14581;
    box-shadow: 0 2px 8px rgba(177, 69, 129, 0.12);
}

.bd-sidebar-download-link svg {
    flex-shrink: 0;
}

.bd-sidebar-download-meta {
    font-size: 12px;
    font-weight: 400;
    color: #706C69;
    margin-left: auto;
    white-space: nowrap;
}

/* External Links */
.bd-sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bd-sidebar-links li {
    margin-bottom: 8px;
}

.bd-sidebar-external-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #B14581;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    text-decoration: underline;
}

.bd-sidebar-external-link:hover {
    text-decoration: none;
}

/* Related Resource Cards */
.bd-related-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bd-related-card {
    display: block;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    padding: 16px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bd-related-card:hover {
    border-color: #B14581;
    box-shadow: 0 2px 8px rgba(177, 69, 129, 0.1);
}

.bd-related-card__overline {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #C16A9A;
    margin-bottom: 6px;
}

.bd-related-card__title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    line-height: 1.25;
    color: #B14581;
    margin: 0;
    text-wrap: balance;
}

/* View All (outlined button — matching News & Events) */
.bd-sidebar-view-all {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: 1px solid #B14581;
    background: transparent;
    color: #B14581;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    margin-top: 16px;
}

.bd-sidebar-view-all:hover {
    background-color: #B14581 !important;
    color: #fff !important;
    border-color: #B14581 !important;
}

/* Placeholder */
.bd-sidebar-placeholder {
    color: #999;
    font-style: italic;
    font-size: 14px;
    padding-top: 16px;
}

/* ─── Info Callout Widget ─── */

.bd-info-callout {
    border-left: 4px solid #B14581;
    background-color: #FAFAFA;
    padding: 24px 32px;
}

.bd-info-callout__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.6vw + 0.69rem, 1.125rem);
    line-height: 1.4;
}

.bd-info-callout__label {
    color: #706C69;
}

.bd-info-callout__link {
    color: #B14581;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.bd-info-callout__link:hover {
    text-decoration: none;
    opacity: 0.7;
}

.bd-info-callout--placeholder {
    border: 2px dashed #ccc;
    background: #f5f5f5;
    text-align: center;
    color: #999;
}

/* ─── Responsive ─── */

@media (max-width: 1024px) {
    .bd-resource-sidebar {
        position: static;
        margin-top: 40px;
    }
}

/* ─── Course List Widget ─── */

.bd-course-list {
    max-width: 900px;
    margin: 0 auto;
}

.bd-course-list__header {
    margin-bottom: 32px;
}

.bd-course-list__description {
    color: #706C69;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 12px;
}

.bd-course-list__chapters {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bd-course-list__chapter {
    border: 1px solid #E8E4E1;
    border-radius: 8px;
    overflow: hidden;
}

.bd-course-list__chapter-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #F8F7F6;
    border: none;
    cursor: pointer;
    text-align: left;
}

.bd-course-list__chapter-title {
    font-size: 18px;
    font-weight: 600;
    color: #2D2926;
    margin: 0;
}

.bd-course-list__chapter-meta {
    font-size: 14px;
    color: #706C69;
    margin-left: auto;
    margin-right: 16px;
    white-space: nowrap;
}

.bd-course-list__chapter-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.bd-course-list__chapter-trigger[aria-expanded="true"] .bd-course-list__chapter-icon {
    transform: rotate(180deg);
}

.bd-course-list__chapter-content[hidden] {
    display: none;
}

.bd-course-list__lessons {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bd-course-list__lesson {
    border-top: 1px solid #E8E4E1;
}

.bd-course-list__lesson-inner {
    display: flex;
    align-items: stretch;
    padding: 16px 24px;
    gap: 20px;
}

.bd-course-list__lesson-thumbnail-container {
    flex-shrink: 0;
    width: 120px;
    text-decoration: none;
}

.bd-course-list__lesson-thumbnail {
    width: 100%;
    padding-bottom: 133.33%;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    background-color: #E8E4E1;
}

.bd-course-list__lesson-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.bd-course-list__lesson-title {
    font-size: 16px;
    font-weight: 500;
    color: #2D2926;
    margin: 0 0 4px;
    line-height: 1.4;
}

.bd-course-list__lesson-excerpt {
    font-size: 14px;
    color: #706C69;
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bd-course-list__lesson:hover {
    background: #FAFAF9;
}

.bd-course-list__lesson-title:hover {
    color: #B14581;
}

.bd-course-list__footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #E8E4E1;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

/* ─── Lesson Navigation Widget ─── */

.bd-lesson-nav {
    background: #F8F7F6;
    border-radius: 12px;
    padding: 24px;
    font-size: 14px;
}

.bd-lesson-nav__course-title {
    font-size: 18px;
    font-weight: 600;
    color: #B14581;
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E8E4E1;
}

.bd-lesson-nav__course-title:hover {
    text-decoration: underline;
}

.bd-lesson-nav__chapter {
    margin-bottom: 20px;
}

.bd-lesson-nav__chapter:last-child {
    margin-bottom: 0;
}

.bd-lesson-nav__chapter-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin: 0 0 8px;
    padding: 0;
}

.bd-lesson-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: lesson;
}

.bd-lesson-nav__item {
    margin: 0;
}

.bd-lesson-nav__link {
    display: block;
    padding: 8px 12px;
    color: #706C69;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
    line-height: 1.4;
}

.bd-lesson-nav__link:hover {
    background: rgba(0,0,0,0.04);
    color: #2D2926;
}

.bd-lesson-nav__item--active .bd-lesson-nav__link {
    background: #fff;
    color: #B14581;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.bd-lesson-nav__pagination {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #E8E4E1;
}

.bd-lesson-nav__prev,
.bd-lesson-nav__next {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #B14581;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-lesson-nav__prev:hover,
.bd-lesson-nav__next:hover {
    background: rgba(0,0,0,0.04);
}

.bd-lesson-nav__next {
    margin-left: auto;
    text-align: right;
}

.bd-lesson-nav__prev--disabled,
.bd-lesson-nav__next--disabled {
    color: #CCC;
    cursor: default;
}

.bd-lesson-nav__prev--disabled:hover,
.bd-lesson-nav__next--disabled:hover {
    background: transparent;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
    .bd-course-list__lesson-inner {
        flex-direction: column;
    }

    .bd-course-list__lesson-thumbnail-container {
        width: 100%;
    }

    .bd-course-list__lesson-thumbnail {
        padding-bottom: 56.25%;
    }

    .bd-course-list__chapter-trigger {
        padding: 16px;
    }

    .bd-lesson-nav {
        padding: 16px;
    }

    .bd-lesson-nav__pagination {
        flex-direction: column;
    }

    .bd-lesson-nav__prev,
    .bd-lesson-nav__next {
        max-width: 100%;
    }
}
