/* HECADI – MGO certificate checker */

:root {
    --hcm-navy: #061453;
    --hcm-navy-light: #102763;
    --hcm-gold: #dda928;
    --hcm-cream: #fffaf1;
    --hcm-text: #3f4652;
    --hcm-muted: #6f7680;
    --hcm-border: #eee2ca;
}

.hcm-wrapper {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 66px 24px 86px;
    color: var(--hcm-text);
    font-family: inherit;
}

.hcm-section-heading {
    margin-bottom: 38px;
    text-align: center;
}

.hcm-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--hcm-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hcm-title {
    margin: 0 0 14px;
    color: var(--hcm-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.15;
}

.hcm-lead {
    max-width: 760px;
    margin: 0 auto;
    color: var(--hcm-muted);
    font-size: 15px;
    line-height: 1.75;
}

.hcm-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 30px;
}

.hcm-step {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 26px 28px;
    border: 1px solid var(--hcm-border);
    border-radius: 14px;
    background: var(--hcm-cream);
    box-shadow: 0 10px 28px rgba(6, 20, 83, .045);
    text-align: left;
}

.hcm-step-num {
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--hcm-gold);
    color: var(--hcm-navy);
    font-size: 16px;
    font-weight: 700;
}

.hcm-step h4 {
    margin: 1px 0 8px;
    color: var(--hcm-navy);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
}

.hcm-step p {
    margin: 0;
    color: #666d77;
    font-size: 13px;
    line-height: 1.65;
}

.hcm-search-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(221, 169, 40, .12), transparent 32%),
        linear-gradient(145deg, var(--hcm-navy), var(--hcm-navy-light));
    box-shadow: 0 24px 65px rgba(6, 20, 83, .18);
    color: #fff;
}

.hcm-search-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
    text-align: left;
}

.hcm-search-icon {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hcm-gold);
    border-radius: 50%;
    color: var(--hcm-gold);
    font-weight: 700;
}

.hcm-search-box h3 {
    margin: 0 0 4px;
    color: var(--hcm-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    line-height: 1.2;
}

.hcm-instr {
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: 13px;
}

.hcm-instr strong {
    color: #fff;
}

.hcm-input-label {
    display: block;
    width: min(100%, 560px);
    margin: 0 auto 7px;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 600;
}

.hcm-input-wrap {
    position: relative;
    width: min(100%, 560px);
    margin: 0 auto;
}

#hcm-input {
    display: block;
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0 52px 0 18px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 9px;
    background: #fff;
    color: var(--hcm-navy);
    font-size: 15px;
    box-shadow: none;
    outline: none;
}

#hcm-input:focus {
    border-color: var(--hcm-gold);
    box-shadow: 0 0 0 3px rgba(221, 169, 40, .18);
}

.hcm-input-symbol {
    position: absolute;
    top: 50%;
    right: 18px;
    color: var(--hcm-gold);
    font-size: 24px;
    transform: translateY(-50%);
    pointer-events: none;
}

#hcm-result {
    margin-top: 26px;
    text-align: left;
}

.hcm-result-inner {
    overflow: hidden;
    border: 1px solid rgba(6, 20, 83, .08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .16);
}

.hcm-result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 88px;
    padding: 14px 18px;
    border-bottom: 1px solid #eee7da;
    background: var(--hcm-cream);
}

.hcm-result-header > img {
    flex: 0 0 58px;
    width: 58px;
    height: 68px;
    padding: 3px;
    border: 1px solid #ece4d5;
    border-radius: 7px;
    background: #fff;
    object-fit: contain;
}

.hcm-result-header-info {
    min-width: 0;
}

.hcm-result-header-info h4 {
    margin: 0 0 5px;
    color: var(--hcm-navy);
    font-size: 16px;
    font-weight: 700;
}

.hcm-result-header-info span {
    color: #777e87;
    font-size: 11px;
}

.hcm-result-cert {
    position: relative;
    min-height: 220px;
    padding: 24px;
    background: #f4f5f7;
    text-align: center;
}

.hcm-result-cert > img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 780px;
    margin: 0 auto;
    border-radius: 5px;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 8px 24px rgba(6, 20, 83, .08);
}

.hcm-pdf-container {
    display: grid;
    gap: 18px;
    justify-content: center;
}

.hcm-pdf-page {
    display: block;
    max-width: 100%;
    height: auto !important;
    background: #fff;
    box-shadow: 0 8px 24px rgba(6, 20, 83, .08);
}

.hcm-pdf-fallback {
    margin-top: 14px;
    text-align: center;
}

.hcm-pdf-link {
    color: var(--hcm-navy);
    font-weight: 700;
}

.hcm-zoom-btn {
    position: absolute;
    z-index: 5;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: 0;
    border-radius: 6px;
    background: var(--hcm-navy);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(6, 20, 83, .2);
}

.hcm-zoom-btn:hover,
.hcm-zoom-btn:focus-visible {
    background: var(--hcm-gold);
    color: var(--hcm-navy);
}

.hcm-lightbox-overlay {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(1, 7, 28, .92);
}

.hcm-lightbox-overlay.active {
    display: flex;
}

.hcm-lightbox-content {
    position: relative;
    width: min(1200px, 94vw);
    max-height: 92vh;
    padding: 18px;
    overflow: auto;
    border-radius: 10px;
    background: #fff;
}

.hcm-lightbox-content > img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(92vh - 36px);
    object-fit: contain;
}

.hcm-lightbox-pdf-wrap {
    display: grid;
    gap: 18px;
    justify-content: center;
}

.hcm-lightbox-close {
    position: sticky;
    z-index: 10;
    top: 0;
    float: right;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0 0 -40px auto;
    border: 0;
    border-radius: 50%;
    background: var(--hcm-gold);
    color: var(--hcm-navy);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.hcm-loading,
.hcm-error {
    margin: 0;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.hcm-loading {
    color: var(--hcm-gold);
}

.hcm-error {
    color: #7b2530;
}

.hcm-footer-note {
    margin: 24px 0 0;
    color: #777e87;
    font-size: 12px;
    text-align: center;
}

.hcm-footer-note a {
    color: var(--hcm-navy);
    font-weight: 700;
    text-decoration: underline;
}

body.hcm-lightbox-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .hcm-wrapper {
        padding: 44px 16px 60px;
    }

    .hcm-section-heading {
        margin-bottom: 30px;
    }

    .hcm-steps {
        grid-template-columns: 1fr;
    }

    .hcm-step {
        padding: 22px;
    }

    .hcm-search-box {
        padding: 26px 15px;
        border-radius: 14px;
    }

    .hcm-search-heading {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .hcm-search-box h3 {
        font-size: 23px;
    }

    .hcm-result-header {
        align-items: flex-start;
    }

    .hcm-result-cert {
        padding: 62px 10px 14px;
    }

    .hcm-result-cert > img {
        max-height: none;
    }

    .hcm-zoom-btn {
        top: 14px;
        right: 14px;
    }

    .hcm-lightbox-overlay {
        padding: 10px;
    }

    .hcm-lightbox-content {
        width: 100%;
        max-height: 95vh;
        padding: 10px;
    }
}

/* Dodatkowe dopracowanie sekcji certyfikatów HECADI */

.hcm-wrapper {
    padding: 66px 24px 55px;
}

.hcm-steps,
.hcm-search-box {
    max-width: 1020px;
}

.hcm-input-label,
.hcm-input-wrap {
    width: min(100%, 640px);
}

.hcm-result-header > img {
    flex: 0 0 66px;
    width: 66px;
    height: 78px;
}

.hcm-result-cert {
    padding: 18px;
}

.hcm-result-cert > img {
    max-height: 900px;
}

@media (max-width: 767px) {
    .hcm-wrapper {
        padding: 44px 16px 45px;
    }

    .hcm-result-header > img {
        flex-basis: 58px;
        width: 58px;
        height: 68px;
    }

    .hcm-result-cert {
        padding: 62px 10px 14px;
    }

    .hcm-result-cert > img {
        max-height: none;
    }
}

/* FINALNE DOPRACOWANIE WYSZUKIWARKI CERTYFIKATÓW */

.hcm-wrapper {
    width: min(1180px, 100%);
    padding: 66px 24px 55px;
}

.hcm-steps,
.hcm-search-box {
    max-width: 1020px;
}

/* KROKI */
.hcm-step {
    min-height: 108px;
    align-items: center;
}

.hcm-step-num {
    flex: 0 0 42px;
}

/* POLE WYSZUKIWANIA */
.hcm-input-label,
.hcm-input-wrap {
    width: min(100%, 640px);
}

#hcm-input {
    height: 56px;
}

/* NAGŁÓWEK WYNIKU */
.hcm-result-header {
    min-height: 92px;
    padding: 14px 18px;
}

.hcm-result-header > img {
    flex: 0 0 66px;
    width: 66px;
    height: 78px;
}

/* OBSZAR CERTYFIKATU */
.hcm-result-cert {
    padding: 20px 24px 24px;
    background: #f4f5f7;
}

/* NAJWAŻNIEJSZA POPRAWKA – WIĘKSZY CERTYFIKAT */
.hcm-result-cert > img {
    display: block;
    width: min(100%, 680px);
    max-width: 680px;
    max-height: none;
    margin: 0 auto;
    object-fit: contain;
}

/* PRZYCISK POWIĘKSZANIA */
.hcm-zoom-btn {
    top: 16px;
    right: 16px;
}

/* MNIEJSZY ODSTĘP POD CAŁĄ SEKCJĄ */
.hcm-footer-note {
    margin-top: 20px;
}

@media (max-width: 767px) {
    .hcm-wrapper {
        padding: 44px 16px 45px;
    }

    .hcm-step {
        min-height: auto;
        padding: 22px;
    }

    .hcm-result-header > img {
        flex-basis: 58px;
        width: 58px;
        height: 68px;
    }

    .hcm-result-cert {
        padding: 62px 10px 14px;
    }

    .hcm-result-cert > img {
        width: 100%;
        max-width: 100%;
    }
}

/* WYMUSZENIE WIĘKSZEGO PODGLĄDU CERTYFIKATU */

.hvc-shortcode-wrap .hcm-result-cert {
    padding: 20px !important;
}

.hvc-shortcode-wrap .hcm-result-cert > img {
    display: block !important;
    width: 90% !important;
    max-width: 820px !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 auto !important;
    object-fit: contain !important;
}

@media (max-width: 767px) {
    .hvc-shortcode-wrap .hcm-result-cert {
        padding: 60px 10px 14px !important;
    }

    .hvc-shortcode-wrap .hcm-result-cert > img {
        width: 100% !important;
        max-width: none !important;
    }
}

/* PRAWDZIWE POWIĘKSZENIE CERTYFIKATU W LIGHTBOXIE */

.hcm-lightbox-overlay {
    padding: 20px !important;
}

.hcm-lightbox-content {
    width: 96vw !important;
    height: 94vh !important;
    max-width: none !important;
    max-height: none !important;
    padding: 55px 20px 30px !important;
    overflow: auto !important;
    background: #e9ebef !important;
}

/* Obraz nie jest już zmniejszany do wysokości ekranu */
.hcm-lightbox-content > img {
    display: block !important;
    width: 1400px !important;
    min-width: 1400px !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
    object-fit: initial !important;
    background: #fff;
    box-shadow: 0 10px 35px rgba(6, 20, 83, 0.18);
}

/* PDF w powiększeniu */
.hcm-lightbox-pdf-wrap {
    width: 1400px !important;
    min-width: 1400px !important;
    margin: 0 auto !important;
}

.hcm-lightbox-pdf-wrap canvas {
    width: 1400px !important;
    max-width: none !important;
    height: auto !important;
}

/* Przycisk zamknięcia zawsze widoczny */
.hcm-lightbox-close {
    position: fixed !important;
    top: 22px !important;
    right: 30px !important;
    z-index: 100001 !important;
    margin: 0 !important;
}

/* Telefon */
@media (max-width: 767px) {
    .hcm-lightbox-overlay {
        padding: 8px !important;
    }

    .hcm-lightbox-content {
        width: 100% !important;
        height: 96vh !important;
        padding: 52px 10px 20px !important;
    }

    .hcm-lightbox-content > img,
    .hcm-lightbox-pdf-wrap {
        width: 900px !important;
        min-width: 900px !important;
    }

    .hcm-lightbox-pdf-wrap canvas {
        width: 900px !important;
    }

    .hcm-lightbox-close {
        top: 16px !important;
        right: 16px !important;
    }
}

/* DOPRACOWANIE NAGŁÓWKA I POLA WYSZUKIWANIA */

.hvc-shortcode-wrap .hcm-search-box {
    padding: 38px 44px 44px !important;
}

.hvc-shortcode-wrap .hcm-search-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-bottom: 28px !important;
    text-align: left !important;
}

.hvc-shortcode-wrap .hcm-search-icon {
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 18px !important;
}

.hvc-shortcode-wrap .hcm-search-box h3 {
    margin: 0 0 5px !important;
    font-size: 30px !important;
    line-height: 1.15 !important;
}

.hvc-shortcode-wrap .hcm-instr {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.hvc-shortcode-wrap .hcm-input-label {
    width: min(100%, 640px) !important;
    margin: 0 auto 8px !important;
    font-size: 12px !important;
}

.hvc-shortcode-wrap .hcm-input-wrap {
    position: relative !important;
    width: min(100%, 640px) !important;
    margin: 0 auto !important;
}

.hvc-shortcode-wrap #hcm-input {
    width: 100% !important;
    height: 54px !important;
    padding: 0 50px 0 18px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
}

.hvc-shortcode-wrap .hcm-input-symbol {
    position: absolute !important;
    top: 50% !important;
    right: 18px !important;
    transform: translateY(-50%) !important;
    font-size: 20px !important;
    line-height: 1 !important;
}

@media (max-width: 767px) {
    .hvc-shortcode-wrap .hcm-search-box {
        padding: 26px 16px 30px !important;
    }

    .hvc-shortcode-wrap .hcm-search-heading {
        justify-content: flex-start !important;
        gap: 12px !important;
        margin-bottom: 24px !important;
    }

    .hvc-shortcode-wrap .hcm-search-icon {
        flex-basis: 40px !important;
        width: 40px !important;
        height: 40px !important;
    }

    .hvc-shortcode-wrap .hcm-search-box h3 {
        font-size: 24px !important;
    }

    .hvc-shortcode-wrap .hcm-instr {
        font-size: 12px !important;
    }

    .hvc-shortcode-wrap #hcm-input {
        height: 52px !important;
        font-size: 15px !important;
    }
}

/* Tłumaczenie STEP dopisywanego przez ogólny CSS strony.
   Wymaga oznaczenia data-hcm-lang z wersji 1.2 wtyczki. */

.hcm-wrapper[data-hcm-lang="pl"] .hcm-steps .hcm-step-num::before {
    content: "KROK " !important;
}

.hcm-wrapper[data-hcm-lang="de"] .hcm-steps .hcm-step-num::before {
    content: "SCHRITT " !important;
}

.hcm-wrapper[data-hcm-lang="fr"] .hcm-steps .hcm-step-num::before {
    content: "ÉTAPE " !important;
}

.hcm-wrapper[data-hcm-lang="es"] .hcm-steps .hcm-step-num::before {
    content: "PASO " !important;
}

.hcm-wrapper[data-hcm-lang="nl"] .hcm-steps .hcm-step-num::before {
    content: "STAP " !important;
}

.hcm-wrapper[data-hcm-lang="pt"] .hcm-steps .hcm-step-num::before {
    content: "PASSO " !important;
}

.hcm-wrapper[data-hcm-lang="ru"] .hcm-steps .hcm-step-num::before {
    content: "ШАГ " !important;
}
