.certificate-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 15%, rgba(37, 117, 252, 0.16), transparent 30%),
        linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
}

.certificate-header {
    height: auto;
    min-height: 64px;
    margin: 0;
    padding: 0;
}

.certificate-header nav {
    background: rgba(255, 255, 255, 0.96);
}

.certificate-header nav ul li a.active {
    color: #155eef;
}

.certificate-main {
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(430px, 1.2fr);
    align-items: center;
    gap: clamp(30px, 6vw, 90px);
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(24px, 4vh, 48px) 5%;
}

.certificate-main section {
    padding: 0;
    background: transparent;
}

.event-poster {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.event-poster a {
    display: block;
    border-radius: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.event-poster a:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 65px rgba(13, 52, 120, 0.26);
}

.event-poster a:focus-visible {
    outline: 4px solid rgba(21, 94, 239, 0.35);
    outline-offset: 5px;
}

.event-poster img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(13, 52, 120, 0.2);
}

.certificate-search {
    overflow: visible;
}

.certificate-card {
    position: relative;
    max-width: 610px;
    padding: clamp(30px, 5vw, 58px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(37, 117, 252, 0.14);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(21, 94, 239, 0.13);
    backdrop-filter: blur(14px);
}

.certificate-icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    color: #fff;
    font-size: 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #155eef, #053cae);
    box-shadow: 0 14px 30px rgba(21, 94, 239, 0.28);
}

.certificate-card .eyebrow {
    margin-bottom: 8px;
    color: #155eef;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.certificate-card h1 {
    color: #101828;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.certificate-card .intro {
    max-width: 520px;
    margin: 18px 0 32px;
    color: #667085;
    font-size: 1.04rem;
}

.search-field {
    position: relative;
}

.search-field label {
    display: block;
    margin-bottom: 9px;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.input-wrap i {
    position: absolute;
    top: 50%;
    left: 18px;
    color: #667085;
    transform: translateY(-50%);
}

.input-wrap input {
    width: 100%;
    height: 58px;
    padding: 0 18px 0 50px;
    color: #101828;
    font-size: 1rem;
    background: #fff;
    border: 1.5px solid #d0d5dd;
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input:focus {
    border-color: #155eef;
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

.suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 220px;
    margin: 0;
    padding: 7px;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 18px 35px rgba(16, 24, 40, 0.16);
}

.suggestions li {
    padding: 11px 13px;
    color: #344054;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
}

.suggestions li:hover,
.suggestions li.active {
    color: #155eef;
    background: #eff4ff;
}

.certificate-status {
    min-height: 24px;
    margin: 16px 0;
    color: #667085;
    font-size: 0.9rem;
}

.certificate-password-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 17px;
    padding: 13px 15px;
    color: #344054;
    background: #f5f8ff;
    border: 1px solid #d6e4ff;
    border-radius: 12px;
}

.certificate-password-note > i {
    margin-top: 3px;
    color: #155eef;
}

.certificate-password-note strong,
.certificate-password-note span {
    display: block;
}

.certificate-password-note strong {
    color: #101828;
    font-size: 0.88rem;
}

.certificate-password-note span {
    margin-top: 2px;
    color: #667085;
    font-size: 0.8rem;
    line-height: 1.45;
}

.certificate-status.success {
    color: #067647;
    font-weight: 700;
}

.certificate-status.error {
    color: #b42318;
}

.download-button {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, #155eef, #053cae);
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(21, 94, 239, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.download-button:not(.disabled):hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(21, 94, 239, 0.32);
}

.download-button.disabled {
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
}

@media (max-width: 850px) {
    .certificate-main {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 30px;
        padding-bottom: 45px;
    }

    .event-poster img {
        width: min(100%, 420px);
        max-height: none;
    }

    .certificate-card {
        max-width: 620px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .certificate-main {
        padding: 24px 18px 36px;
        gap: 24px;
    }

    .certificate-main section {
        padding: 0;
    }

    .certificate-card {
        padding: 26px 20px;
        border-radius: 22px;
    }

    .certificate-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 20px;
        font-size: 1.6rem;
        border-radius: 16px;
    }

    .certificate-card .intro {
        margin: 14px 0 25px;
    }
}
