/* ================================================================
   Works Certificate Page
   ================================================================ */

#page-certificate {
    position: relative;
    min-height: 100vh;
    background: #0b0b0b;
    color: #fff;
    overflow: visible;
}

#page-certificate.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh !important;
    padding: calc(var(--site-header-h, var(--identity-header-h, 90px)) + 24px) 0 calc(var(--site-footer-h, var(--identity-footer-h, 90px)) + 24px);
    box-sizing: border-box;
}

#page-certificate .certificate-layout {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(34px, 4.2dvh, 58px);
    padding: 0 clamp(28px, 5vw, 72px);
    box-sizing: border-box;
}

#page-certificate .certificate-hero {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

#page-certificate .content-wrapper.sub-header {
    position: relative;
    z-index: 1;
    padding: 0;
}

#page-certificate .works-breadcrumb {
    margin-bottom: 18px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

#page-certificate .works-breadcrumb a {
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
    transition: color 0.24s ease;
}

#page-certificate .works-breadcrumb a:hover,
#page-certificate .works-breadcrumb .current-noola {
    color: #ff2c2c;
}

#page-certificate .business-title-small {
    margin: 0;
    color: #fff;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
}

#page-certificate .certificate-content {
    width: 100%;
    max-width: 1260px;
    padding: 0;
    margin: 0 auto;
}

#page-certificate .certificate-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(220px, 0.64fr) minmax(0, 1.56fr);
    gap: clamp(38px, 4.8vw, 68px);
    align-items: start;
    justify-content: center;
}

#page-certificate .certificate-image-area,
#page-certificate .certificate-text-area {
    min-width: 0;
}

#page-certificate .certificate-image-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding-top: 2px;
}

#page-certificate .certificate-image-button {
    position: relative;
    display: block;
    width: min(320px, 27vw);
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #fff;
}

#page-certificate .certificate-image-button img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: clamp(8px, 1vw, 12px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

#page-certificate .certificate-image-placeholder {
    display: none;
    width: 100%;
    aspect-ratio: 595 / 841;
    align-items: center;
    justify-content: center;
    padding: 28px;
    color: rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-sizing: border-box;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    word-break: keep-all;
}

#page-certificate .certificate-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    border-radius: clamp(8px, 1vw, 12px);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

#page-certificate .certificate-image-button:hover .certificate-image-overlay {
    opacity: 1;
}

#page-certificate .certificate-view-text {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.64);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.22s ease;
}

#page-certificate .certificate-view-text:hover {
    color: #fff;
}

#page-certificate .certificate-text-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
    text-align: left;
    max-width: 840px;
}

#page-certificate .certificate-heading {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 2.35vw, 38px);
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: 0;
    word-break: keep-all;
}

#page-certificate .certificate-emphasis {
    color: #ff2c2c;
}

#page-certificate .certificate-emphasis-fill {
    --certificate-emphasis-base-color: #fff;
    display: inline-block;
    white-space: nowrap;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}

#page-certificate .certificate-emphasis-base {
    display: inline;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(90deg, #ff2c2c 0 50%, var(--certificate-emphasis-base-color) 50% 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    transition: background-position 1.15s cubic-bezier(0.65, 0, 0.35, 1);
}

#page-certificate .certificate-emphasis-fill.is-resetting .certificate-emphasis-base {
    background-position: 100% 0 !important;
    transition: none !important;
}

#page-certificate .certificate-emphasis-fill.is-animated .certificate-emphasis-base {
    background-position: 0 0;
}

#page-certificate .certificate-emphasis-fill.is-complete .certificate-emphasis-base {
    color: #ff2c2c !important;
    -webkit-text-fill-color: #ff2c2c !important;
    background: none !important;
}

#page-certificate .certificate-divider {
    width: 100%;
    height: 1px;
    margin: 6px 0 0;
    border: 0;
    background: rgba(255, 255, 255, 0.22);
}

#page-certificate .certificate-description {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(15px, 1.08vw, 17px);
    font-weight: 400;
    line-height: 1.78;
    letter-spacing: 0;
    word-break: keep-all;
    max-width: 840px;
}

#page-certificate .certificate-description p {
    margin: 0;
}

#page-certificate .certificate-note {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.92em;
    line-height: 1.7;
}

#page-certificate .certificate-description strong {
    color: #fff;
    font-weight: 600;
}

#page-certificate .certificate-tech-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

#page-certificate .certificate-section-label {
    color: #ff2c2c;
    font-size: 0.95em;
    font-weight: 700;
    line-height: 1.35;
}

#page-certificate .certificate-tech-item {
    position: relative;
}

#page-certificate .certificate-tech-item strong,
#page-certificate .certificate-tech-item span {
    display: block;
}

#page-certificate .certificate-tech-item strong {
    margin-bottom: 3px;
    color: #fff;
    font-weight: 700;
}

#page-certificate .certificate-tech-item span {
    color: rgba(255, 255, 255, 0.7);
}

#page-certificate .certificate-paragraph-gap {
    display: block;
    height: 14px;
}

#page-certificate .certificate-modal {
    position: fixed;
    inset: var(--site-header-h, var(--identity-header-h, 90px)) 0 0 0;
    z-index: 100004;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    box-sizing: border-box;
}

#page-certificate .certificate-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#page-certificate .certificate-modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2.6vw, 34px);
    width: min(94vw, 1180px);
    max-width: min(94vw, 1180px);
    max-height: min(88vh, calc(100svh - var(--site-header-h, var(--identity-header-h, 90px)) - 56px));
}

#page-certificate .certificate-modal-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 min(44vw, 560px);
    min-width: 0;
    margin: 0;
}

#page-certificate .certificate-modal-item[hidden] {
    display: none !important;
}

#page-certificate .certificate-modal.has-single-certificate .certificate-modal-content {
    width: auto;
    max-width: min(92vw, 620px);
}

#page-certificate .certificate-modal.has-single-certificate .certificate-modal-item {
    flex: 0 0 auto;
    width: auto;
    max-width: min(92vw, 620px);
}

#page-certificate .certificate-modal-image-frame {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    max-height: min(88vh, calc(100svh - var(--site-header-h, var(--identity-header-h, 90px)) - 56px));
    margin: 0 auto;
}

#page-certificate .certificate-modal-content img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(88vh, calc(100svh - var(--site-header-h, var(--identity-header-h, 90px)) - 56px));
    object-fit: contain;
    border-radius: clamp(8px, 1vw, 12px);
}

#page-certificate .certificate-modal-placeholder {
    display: none;
    align-items: center;
    justify-content: center;
    width: min(82vw, 520px);
    aspect-ratio: 595 / 841;
    padding: 30px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-sizing: border-box;
    text-align: center;
}

#page-certificate .certificate-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 44, 44, 0.92);
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.22s ease;
}

#page-certificate .certificate-modal-close:hover {
    background: rgba(210, 32, 32, 0.96);
}

body.light-mode #page-certificate {
    background: #f7f7f7;
    color: #0b0b0b;
}

body.light-mode #page-certificate .business-title-small,
body.light-mode #page-certificate .certificate-heading {
    color: #0b0b0b;
}

body.light-mode #page-certificate .works-breadcrumb,
body.light-mode #page-certificate .works-breadcrumb a,
body.light-mode #page-certificate .certificate-view-text {
    color: rgba(11, 11, 11, 0.58);
}

body.light-mode #page-certificate .works-breadcrumb a:hover,
body.light-mode #page-certificate .works-breadcrumb .current-noola,
body.light-mode #page-certificate .certificate-emphasis {
    color: #ff2c2c;
}

body.light-mode #page-certificate .certificate-emphasis-fill {
    --certificate-emphasis-base-color: #0b0b0b;
}

body.light-mode #page-certificate .certificate-divider {
    background: rgba(11, 11, 11, 0.18);
}

body.light-mode #page-certificate .certificate-description {
    color: rgba(11, 11, 11, 0.7);
}

body.light-mode #page-certificate .certificate-description strong,
body.light-mode #page-certificate .certificate-tech-item strong {
    color: #0b0b0b;
}

body.light-mode #page-certificate .certificate-tech-item span {
    color: rgba(11, 11, 11, 0.66);
}

body.light-mode #page-certificate .certificate-note {
    color: rgba(11, 11, 11, 0.62);
}

body.light-mode #page-certificate .certificate-image-placeholder {
    color: rgba(11, 11, 11, 0.68);
    background: rgba(11, 11, 11, 0.05);
    border-color: rgba(11, 11, 11, 0.14);
}

@media (max-width: 980px) {
    #page-certificate.active {
        align-items: flex-start;
        padding-top: calc(var(--site-header-h, var(--identity-header-h, 90px)) + 38px);
    }

    #page-certificate .certificate-layout {
        gap: 30px;
    }

    #page-certificate .certificate-row {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    #page-certificate .certificate-image-area {
        justify-content: center;
        padding-top: 0;
    }

    #page-certificate .certificate-image-button {
        width: min(250px, 52vw);
    }

    #page-certificate .certificate-text-area {
        align-items: center;
        text-align: center;
    }

}

@media (max-width: 640px) {
    #page-certificate.active {
        padding: calc(var(--site-header-h, var(--identity-header-h, 76px)) + 32px) 0 calc(var(--site-footer-h, 120px) + 28px);
    }

    #page-certificate .certificate-layout {
        padding: 0 20px;
        gap: 26px;
    }

    #page-certificate .business-title-small {
        font-size: 40px;
    }

    #page-certificate .works-breadcrumb {
        margin-bottom: 12px;
        font-size: 13px;
    }

    #page-certificate .certificate-image-button {
        width: min(210px, 62vw);
    }

    #page-certificate .certificate-heading {
        font-size: 23px;
    }

    #page-certificate .certificate-description {
        font-size: 14px;
        line-height: 1.68;
    }

    #page-certificate .certificate-modal {
        padding: 22px;
    }

    #page-certificate .certificate-modal-content {
        width: min(88vw, 430px);
        max-width: min(88vw, 430px);
        max-height: min(84vh, calc(100svh - var(--site-header-h, var(--identity-header-h, 76px)) - 44px));
        gap: 0;
    }

    #page-certificate .certificate-modal.has-single-certificate .certificate-modal-content {
        width: auto;
        max-width: min(88vw, 430px);
    }

    #page-certificate .certificate-modal-item {
        flex: 0 1 100%;
        width: 100%;
        max-width: 100%;
    }

    #page-certificate .certificate-modal-item:not(.is-mobile-active) {
        display: none;
    }

    #page-certificate .certificate-modal-content img {
        max-height: min(84vh, calc(100svh - var(--site-header-h, var(--identity-header-h, 76px)) - 44px));
    }

    #page-certificate .certificate-modal-image-frame {
        max-height: min(84vh, calc(100svh - var(--site-header-h, var(--identity-header-h, 76px)) - 44px));
    }

    #page-certificate .certificate-modal-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 22px;
    }
}
