/* ============================================
   CONTENT ENGINE - VIDEO WRAPPER
   ============================================ */

/* ----- Video wrapper container ----- */
.content-engine-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    background-color: #000;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.content-engine-video-wrapper:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

/* ----- Plyr player inside wrapper ----- */
.content-engine-video-wrapper > .js-plyr,
.content-engine-video-wrapper .plyr {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 14px;
    overflow: hidden;
}

/* ----- Video element ----- */
.content-engine-video-wrapper video.js-plyr {
    object-fit: cover;
}

.content-engine-video-wrapper video:not([data-plyr-initialized]) {
    border-radius: 14px;
}

/* ============================================
   PLYR CUSTOMIZATION
   ============================================ */

.content-engine-video-wrapper .plyr {
    /* ----- Main colors ----- */
    --plyr-color-main: #00BDE0;
    --plyr-control-radius: 8px;
    --plyr-control-spacing: 10px;

    /* ----- Video controls ----- */
    --plyr-video-control-color: #fff;
    --plyr-video-control-background-hover: rgba(0, 189, 224, 0.9);

    /* ----- Menu (settings) ----- */
    --plyr-menu-background: rgba(20, 20, 20, 0.9);
    --plyr-menu-color: #fff;
}

/* ----- Overlaid play button (center) ----- */
.content-engine-video-wrapper .plyr__control--overlaid {
    background: rgba(0, 189, 224, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

.content-engine-video-wrapper .plyr__control--overlaid:hover {
    background: rgba(0, 189, 224, 1);
}

/* ----- Controls bar ----- */
.content-engine-video-wrapper .plyr--video .plyr__controls {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    border-radius: 0 0 14px 14px;
    padding-top: 30px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 600px) {
    .content-engine-video-wrapper {
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .content-engine-video-wrapper > .js-plyr,
    .content-engine-video-wrapper .plyr {
        border-radius: 10px;
    }

    /*!* ----- Volume control fix for mobile ----- *!*/
    /*.content-engine-video-wrapper .plyr__volume {*/
    /*    position: relative;*/
    /*    width: auto;*/
    /*    max-width: none;*/
    /*    flex: 0 0 auto;*/
    /*}*/

    /*.content-engine-video-wrapper .plyr__volume input[data-plyr="volume"] {*/
    /*    position: absolute;*/
    /*    bottom: calc(100% + 8px);*/
    /*    right: -6px;*/
    /*    width: 90px;*/
    /*    transform: rotate(-90deg);*/
    /*    transform-origin: right bottom;*/
    /*    background: rgba(20, 20, 20, 0.9);*/
    /*    padding: 10px 6px;*/
    /*    border-radius: 8px;*/
    /*    opacity: 0;*/
    /*    pointer-events: none;*/
    /*    transition: opacity 0.15s ease;*/
    /*    z-index: 5;*/
    /*}*/

    /*.content-engine-video-wrapper .plyr__volume.is-open input[data-plyr="volume"] {*/
    /*    opacity: 1;*/
    /*    pointer-events: auto;*/
    /*}*/
}


/* ============================================
   CONTENT ENGINE - ALERTS / CALL OUTS
   ============================================ */

/* ----- Base alert ----- */
.content-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 24px 0;
    border: 1px solid transparent;
}

.content-alert-icon {
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
}

.content-alert-body {
    flex: 1;
    min-width: 0;
}

.content-alert-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
}

.content-alert-body p:last-child {
    margin-bottom: 0;
}

/* ----- Note (neutral blue) ----- */
.content-alert-note {
    background: #eef5fb;
    border-color: #cfe3f3;
}

.content-alert-note .content-alert-title,
.content-alert-note .content-alert-icon {
    color: #1d5f96;
}

/* ----- Tip (green) ----- */
.content-alert-tip {
    background: #eaf7f0;
    border-color: #c9ead6;
}

.content-alert-tip .content-alert-title,
.content-alert-tip .content-alert-icon {
    color: #1f8a4d;
}

/* ----- Warning (yellow/amber) ----- */
.content-alert-warning {
    background: #fdf6e8;
    border-color: #f3e2ae;
}

.content-alert-warning .content-alert-title,
.content-alert-warning .content-alert-icon {
    color: #a9740f;
}

/* ----- Danger (red) ----- */
.content-alert-danger {
    background: #fbebeb;
    border-color: #f2c7c7;
}

.content-alert-danger .content-alert-title,
.content-alert-danger .content-alert-icon {
    color: #b02a2a;
}


/* ============================================
   CONTENT ENGINE - STEPS / PROCESS
   ============================================ */

/* ----- Steps container ----- */
.content-steps {
    display: flex;
    flex-direction: column;
    margin: 32px 0;
}

/* ----- Individual step ----- */
.content-step {
    display: flex;
    gap: 20px;
    padding-bottom: 32px;
}

.content-step:last-child {
    padding-bottom: 0;
}

/* ----- Step marker (number) ----- */
.content-step-marker {
    position: relative;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.content-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-primary, #0e6e6e);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(14, 110, 110, 0.12);
}

/* ----- Connecting line between steps (hidden on last) ----- */
.content-step:not(:last-child) .content-step-marker::after {
    content: "";
    position: absolute;
    top: 40px;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: var(--border-color, #dbe4e4);
}

/* ----- Step content ----- */
.content-step-body {
    flex: 1;
    padding-top: 6px;
    min-width: 0;
}

.content-step-title {
    margin: 0 0 8px;
    font-size: 16.5px;
    font-weight: 700;
    color: #16283f;
}

.content-step-content {
    color: var(--text, #5a6a6a);
    font-size: 14.5px;
    line-height: 1.8;
}

.content-step-content p:last-child {
    margin-bottom: 0;
}

/* ----- Responsive steps ----- */
@media (max-width: 575.98px) {
    .content-step {
        gap: 14px;
        padding-bottom: 24px;
    }

    .content-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .content-step:not(:last-child) .content-step-marker::after {
        top: 32px;
        bottom: -24px;
    }

    .content-step-title {
        font-size: 15px;
    }
}


/* ============================================
   CONTENT ENGINE - TABLE OF CONTENTS (TOC)
   ============================================ */

.toc {
    background: #f4f8f8;
    border: 1px solid var(--border-color, #e5ebeb);
    border-inline-start: 4px solid var(--bs-primary, #0e6e6e);
    border-radius: 14px;
    padding: 22px 26px;
    margin: 32px 0;
    box-shadow: 0 6px 20px rgba(16, 42, 42, 0.05);
}

.toc .toctitle,
div.toc > .toctitle {
    display: block;
    font-family: var(--font-family-title, inherit);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.4;
    color: #16283f;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-color, #dde5e5);
}

.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc li {
    padding: 7px 0;
}


.toc ul ul {
    padding-inline-start: 20px;
    margin-top: 6px;
}

.toc a,
.toc li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color:#3d4a4a ;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.7;
    text-decoration: none;
    transition: color 0.2s ease;
}


.toc a::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bs-primary, #0e6e6e);
    opacity: 0.45;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ----- Arrow icon (always on the left side) ----- */
.toc a .toc-link-icon {
    flex-shrink: 0;
    order: 2;
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toc a:hover,
.toc a:focus-visible {
    color: var(--bs-primary, #0e6e6e);
    transform: translateX(-3px);
}

.toc a:hover::before,
.toc a:focus-visible::before {
    opacity: 1;
    transform: scale(1.4);
}

/* ----- Responsive TOC ----- */
@media (max-width: 575.98px) {
    .toc {
        padding: 18px 20px;
        border-radius: 10px;
    }

    .toc .toctitle,
    div.toc > .toctitle {
        font-size: 18px;
    }


}


/* ============================================
   CONTENT ENGINE - TABLES
   ============================================ */

.dz-post-text table,
.content-item table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 14.5px;
    box-shadow: 0 4px 14px rgba(16, 42, 42, 0.05);
}

/* ----- Table header ----- */
.dz-post-text thead th,
.content-item thead th {
    background: var(--bs-primary, #0e6e6e);
    color: #fff;
    font-weight: 700;
    padding: 14px 16px;
    text-align: start;
    white-space: nowrap;
}

/* Rounded corners on header (since border-radius on table doesn't work with border-collapse) */
.dz-post-text thead th:first-child,
.content-item thead th:first-child {
    border-top-right-radius: 10px;
}

.dz-post-text thead th:last-child,
.content-item thead th:last-child {
    border-top-left-radius: 10px;
}

/* ----- Table body ----- */
.dz-post-text tbody td,
.content-item tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #e5ebeb);
    color: var(--text, #3d4a4a);
}

.dz-post-text tbody tr:last-child td,
.content-item tbody tr:last-child td {
    border-bottom: none;
}

/* Rounded corners on last row */
.dz-post-text tbody tr:last-child td:first-child,
.content-item tbody tr:last-child td:first-child {
    border-bottom-right-radius: 10px;
}

.dz-post-text tbody tr:last-child td:last-child,
.content-item tbody tr:last-child td:last-child {
    border-bottom-left-radius: 10px;
}

/* ----- Striped rows ----- */
.dz-post-text tbody tr:nth-child(even),
.content-item tbody tr:nth-child(even) {
    background: var(--rgba-primary-1, #f4f8f8);
}

.dz-post-text tbody tr:hover,
.content-item tbody tr:hover {
    background: rgba(14, 110, 110, 0.08);
}

/* ----- Responsive tables (horizontal scroll on mobile) ----- */
@media (max-width: 575.98px) {
    .dz-post-text table,
    .content-item table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        border-radius: 10px;
    }
}


/* ============================================
   CONTENT ENGINE - FOOTNOTE ANCHOR OFFSET
   ============================================ */

.dz-post-text [id^="fn:"],
.dz-post-text [id^="fnref:"],
.content-item [id^="fn:"],
.content-item [id^="fnref:"] {
    scroll-margin-top: 100px;
}

/* ============================================
   CONTENT ENGINE - LISTS
   ============================================ */
.content-engine-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.content-engine-list.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.content-engine-list.grid-1 {
    display: block;
}

.content-engine-list li {
    padding: 10px 28px 10px 0;
    position: relative;
    line-height: 1.6;
}

.content-engine-list--bullet li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 19px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00b2ff;
}

.content-engine-list--number {
    counter-reset: content-engine-counter;
}

.content-engine-list--number li {
    counter-increment: content-engine-counter;
}

.content-engine-list--number li::before {
    content: counter(content-engine-counter);
    position: absolute;
    right: 0;
    top: 8px;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    background-color: #00b2ff;
}

@media (max-width: 600px) {
    .content-engine-list.grid-2 {
        grid-template-columns: 1fr;
    }
}

.dz-post-text h2[id],
.dz-post-text h3[id],
.dz-post-text h4[id],
.content-item h2[id],
.content-item h3[id],
.content-item h4[id] {
    scroll-margin-top: 100px;
}


/* ============================================
   CONTENT ENGINE - VOICE (SUMMARY AUDIO) BOX
   ============================================ */

.content-engine-voice {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 16px 18px;
    border-radius: 14px;
    background-color: #f4f9fb;
    border: 1px solid rgba(0, 189, 224, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease;
}

.content-engine-voice:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.content-engine-voice-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* small podcast/mic icon before the title */
.content-engine-voice-title::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background-color: #00BDE0;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.content-engine-voice audio.js-plyr,
.content-engine-voice .plyr {
    width: 100%;
    border-radius: 10px;
}

/* ----- Plyr color customization (audio) ----- */
.content-engine-voice .plyr--audio {
    --plyr-color-main: #00BDE0;
    --plyr-control-radius: 8px;
    --plyr-audio-control-color: #333;
    --plyr-audio-control-background-hover: #00BDE0;
    --plyr-audio-control-color-hover: #fff;
    --plyr-audio-controls-background: transparent;
}

@media (max-width: 600px) {
    .content-engine-voice {
        padding: 14px;
        border-radius: 10px;
    }

    .content-engine-voice-title {
        font-size: 0.88rem;
    }
}

/* ============================================
   CONTENT ENGINE - APARAT EMBED
   ============================================ */

.content-engine-video-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 14px;
}

@media (max-width: 600px) {
    .content-engine-video-wrapper iframe {
        border-radius: 10px;
    }
}

.author-card {
    background-color: #f4f5f7;
    border-radius: 14px;
    padding: 24px;
    margin: 2.5rem 0;
}

.author-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.author-card-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-card-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.author-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 2px;
}

.author-card-job {
    font-size: 13px;
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
    margin: 0;
}

.author-card-social {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.author-card-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background-color: #fff;
    color: #666;
    font-size: 15px;
    transition: all 0.2s ease;
}

.author-card-social a:hover {
    background-color: var(--bs-primary, #0d6efd);
    color: #fff;
}

.author-card-bio {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin: 16px 0 0;
}

@media (max-width: 480px) {
    .author-card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}