.certificate-congrats .ast-container {
    max-width: 100%;
}

.page-template-page-certificate-view {
    background-color: #FBFCFC;
}

.page-template-page-certificate-view .ast-container {
    max-width: 100%;
    padding: 0;
}

.nsc-cert-page {
    max-width: 1464px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: flex;
    flex-direction: column;
}

/* --- Header Area --- */

.nsc-cert-page__header-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 0 8px;
    order: 1;
}

/* --- Breadcrumbs --- */

.nsc-cert-page .nsc-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 14px;
    line-height: 1.5;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nsc-cert-page .nsc-breadcrumb__link {
    color: #0077c8;
    text-decoration: underline;
    white-space: nowrap;
}

.nsc-cert-page .nsc-breadcrumb__link:hover {
    text-decoration: underline;
}

.nsc-cert-page .nsc-breadcrumb__sep {
    margin: 0 8px;
    color: #6f787e;
    flex-shrink: 0;
}

.nsc-cert-page .nsc-breadcrumb__current {
    color: #333f48;
}

.nsc-cert-page .nsc-breadcrumb__collapsible {
    display: contents;
}

.nsc-cert-page .nsc-breadcrumb__toggle {
    display: none;
}

.nsc-cert-page .nsc-breadcrumb__toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    border-radius: 0;
    padding: 2px 4px;
    cursor: pointer;
    font-size: 14px;
    color: #6f787e;
    line-height: 1;
    position: relative;
}

.nsc-cert-page .nsc-breadcrumb__toggle-btn:hover,
.nsc-cert-page .nsc-breadcrumb__toggle-btn:focus {
    color: #6f787e !important;
    background: none !important;
    border-color: transparent !important;
}

.nsc-cert-page .nsc-breadcrumb__toggle-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nsc-cert-page .nsc-breadcrumb__toggle-btn--open svg {
    transform: rotate(180deg);
}

.nsc-cert-page .nsc-breadcrumb__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #D9E1E2;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    z-index: 100;
    min-width: 180px;
    list-style: none;
}

.nsc-cert-page .nsc-breadcrumb__dropdown--open {
    display: block;
}

.nsc-cert-page .nsc-breadcrumb__dropdown li {
    padding: 0;
    margin: 0;
}

.nsc-cert-page .nsc-breadcrumb__dropdown a {
    display: block;
    padding: 8px 16px;
    color: #0077c8;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.nsc-cert-page .nsc-breadcrumb__dropdown a:hover {
    background: #F0F3F3;
}

@media screen and (max-width: 768px) {
    .nsc-cert-page .nsc-breadcrumb--has-collapsed .nsc-breadcrumb__collapsible {
        display: none;
    }
    .nsc-cert-page .nsc-breadcrumb--has-collapsed .nsc-breadcrumb__toggle {
        display: list-item;
        list-style: none;
        position: relative;
    }
}

/* --- Heading --- */

.nsc-cert-page__heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nsc-cert-page__title {
    font-size: 36px;
    font-weight: 350;
    color: #333F48;
    line-height: 42px;
    margin: 0;
}

.nsc-cert-page__subtitle {
    font-size: 16px;
    font-weight: 350;
    color: #333F48;
    line-height: 21px;
    margin: 0;
}

/* --- Action Buttons --- */

.nsc-cert-page__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    padding: 0 0 8px;
    order: 2;
}

/* --- Share Dropdown --- */

.nsc-cert-page__share {
    position: relative;
}

.nsc-cert-page__share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    padding: 0 16px;
    border: 2px solid #0077C8;
    background: transparent;
    color: #0077C8;
    font-size: 16px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    line-height: 21px;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
}

.nsc-cert-page .nsc-cert-page__share-btn:hover,
.nsc-cert-page .nsc-cert-page__share-btn:focus {
    background: #0077C8;
    border-color: #0077C8;
    color: #fff;
}

.nsc-cert-page__share-btn:hover svg,
.nsc-cert-page__share-btn:focus svg {
    fill: #fff;
}

.nsc-cert-page__share-btn svg {
    flex-shrink: 0;
}

.nsc-cert-page__share-chevron {
    transition: transform 0.2s;
}

.nsc-cert-page__share-btn--open .nsc-cert-page__share-chevron {
    transform: rotate(180deg);
}

.nsc-cert-page__share-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: none;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.08);
    z-index: 100;
    flex-direction: column;
    padding: 16px;
}

.nsc-cert-page__share-dropdown--open {
    display: flex;
}

.nsc-cert-page__share-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 350;
    color: #333F48;
    text-decoration: none;
    line-height: 19px;
    white-space: nowrap;
    transition: background 0.1s;
}

.nsc-cert-page__share-option svg {
    flex-shrink: 0;
}

.nsc-cert-page__share-option:hover {
    background: #f0fbfc;
    color: #333F48;
}

/* --- LinkedIn Button --- */

.nsc-cert-page__linkedin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    padding: 0 16px;
    border: 2px solid #0077C8;
    background: transparent;
    color: #0077C8;
    font-size: 16px;
    font-weight: 400;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 21px;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
}

.nsc-cert-page__linkedin-btn:hover {
    background: #0077C8;
    color: #fff;
}

.nsc-cert-page__linkedin-btn:hover svg {
    fill: #fff;
}

.nsc-cert-page__linkedin-btn svg {
    flex-shrink: 0;
}

/* --- Download Button (uses .ld-course-button .course-state) --- */

.nsc-cert-page__actions .ld-course-button {
    display: inline-flex;
}

.nsc-cert-page__actions .ld-course-button .course-state {
    width: auto;
    font-size: 16px;
    font-weight: 400;
    padding: 8px 16px;
    white-space: nowrap;
    line-height: 21px;
}

/* --- Certificate Preview --- */

.nsc-cert-page__preview {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    order: 3;
}

.nsc-cert-page__preview .ld-cvss-certificate-img {
    max-width: 962px;
    width: 100%;
}

.nsc-cert-page__preview .ld-cvss-certificate-img.ld-cvss-certificate-format-letter.ld-cvss-certificate-orientation-l {
    padding-bottom: 0;
}

.nsc-cert-page__preview .ld-cvss-certificate-img canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Override plugin styles within our container --- */

.nsc-cert-page .ld-cvss-certificate {
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.nsc-cert-page .ld-cvss-col-1 {
    width: 100%;
    max-width: none;
    float: none;
}

/* --- Responsive --- */

@media screen and (max-width: 768px) {
    .nsc-cert-page__title {
        font-size: 28px;
        line-height: 34px;
    }

    .nsc-cert-page__actions {
        order: 4;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 8px 0 0;
    }

    .nsc-cert-page__share-btn,
    .nsc-cert-page__linkedin-btn {
        font-size: 14px;
        height: 36px;
        padding: 0 12px;
    }

    .nsc-cert-page__actions .ld-course-button .course-state {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media screen and (max-width: 480px) {
    .nsc-cert-page__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .nsc-cert-page__share-btn,
    .nsc-cert-page__linkedin-btn {
        width: 100%;
        justify-content: center;
    }

    .nsc-cert-page__actions .ld-course-button {
        width: 100%;
    }

    .nsc-cert-page__actions .ld-course-button .course-state {
        width: 100%;
    }
}

