/* =========================================================
   ISSUED CERTIFICATES PAGE
========================================================= */

.template-page {
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    background: #f5f7fb;
    font-family: Arial, Helvetica, sans-serif;
    color: #17213a;
}

.template-wrapper {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

.template-wrapper h1 {
    margin: 0;
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    color: #17213a;
}

.template-wrapper > .subtitle {
    margin: 10px auto 28px;
    max-width: 720px;
    text-align: center;
    color: #68738a;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
   SEARCH
========================================================= */

.search-form {
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

.search-form input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    padding: 0 17px;
    border: 1px solid #d9deea;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #17213a;
    font-size: 15px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-form input::placeholder {
    color: #9aa3b5;
}

.search-form input:focus {
    border-color: #5a20d6;
    box-shadow: 0 0 0 3px rgba(90, 32, 214, 0.10);
}


/* =========================================================
   STATUS
========================================================= */

#issuedStatus {
    text-align: center;
    color: #707b91;
    font-size: 14px;
}


/* =========================================================
   CERTIFICATE GRID
========================================================= */

#issuedCertificates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}


/* =========================================================
   CERTIFICATE CARD
========================================================= */

.issued-certificate-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e4e7ee;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(24, 35, 60, 0.08);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.issued-certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(24, 35, 60, 0.14);
}


/* =========================================================
   CERTIFICATE IMAGE
========================================================= */

.certificate-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1.414 / 1;
    overflow: hidden;
    background: #f1f3f7;
    border-bottom: 1px solid #e7e9ef;
}

.certificate-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.issued-certificate-card:hover
.certificate-image-wrapper img {
    transform: scale(1.02);
}


/* =========================================================
   IMAGE PLACEHOLDER
========================================================= */

.certificate-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #a3aabd;
    font-size: 45px;
}


/* =========================================================
   CARD CONTENT
========================================================= */

.certificate-card-content {
    padding: 20px;
}

.certificate-card-content h3 {
    margin: 0 0 7px;
    color: #17213a;
    font-size: 20px;
    font-weight: 750;
    line-height: 1.3;
}

.certificate-card-content > p {
    margin: 0 0 14px;
    color: #68738a;
    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   CERTIFICATE DETAILS
========================================================= */

.certificate-detail {
    margin-top: 7px;
    color: #59657b;
    font-size: 13px;
    line-height: 1.5;
}

.certificate-detail strong {
    color: #29344d;
}


/* =========================================================
   CERTIFICATE ID
========================================================= */

.certificate-id {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-top: 14px;
    padding: 6px 10px;
    box-sizing: border-box;
    border-radius: 6px;
    background: #f3efff;
    color: #5520c8;
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    word-break: break-all;
}


/* =========================================================
   EVENT IMAGE
========================================================= */

.certificate-event-image {
    width: 100%;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 9px;
    background: #f1f3f7;
}

.certificate-event-image img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}


/* =========================================================
   VERIFY BUTTON
========================================================= */

.verify-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 18px;
    box-sizing: border-box;
    padding: 11px 16px;
    border-radius: 9px;
    background: linear-gradient(
        135deg,
        #4b16c5,
        #702de2
    );
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.verify-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(75, 22, 197, 0.25);
}

.verify-btn:active {
    transform: translateY(0);
}

.verify-btn i {
    font-size: 14px;
}


/* =========================================================
   EMPTY / LOADING / ERROR
========================================================= */

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 35px 20px;
    box-sizing: border-box;
    border: 1px dashed #d6dae4;
    border-radius: 14px;
    background: #ffffff;
    text-align: center;
}

.empty-state i {
    margin-bottom: 15px;
    color: #6224d5;
    font-size: 38px;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: #263149;
    font-size: 19px;
}

.empty-state p {
    margin: 0;
    color: #7a8498;
    font-size: 14px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    #issuedCertificates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .template-page {
        padding: 25px 14px;
    }

    .template-wrapper h1 {
        font-size: 26px;
    }

    .template-wrapper > .subtitle {
        font-size: 14px;
        margin-bottom: 22px;
    }

    #issuedCertificates {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .certificate-card-content {
        padding: 17px;
    }

    .certificate-card-content h3 {
        font-size: 18px;
    }

    .certificate-event-image img {
        max-height: 220px;
    }

}