/* ===== 수료증 팝업 ===== */
.cert-page { max-width: 800px; margin: 0 auto; padding: 30px 20px; }

/* 용지 */
.cert-paper { background: #fff; border: 1px solid #ccc; padding: 50px 60px 60px; position: relative; aspect-ratio: 210/297; display: flex; flex-direction: column; font-family: 'nanum-myeongjo', serif; }

/* 우측 상단 로고 */
.cert-paper .cert-top-logo { position: absolute; top: 40px; right: 50px; }
.cert-paper .cert-top-logo img { height: 24px; width: auto; }

/* 발행번호 */
.cert-paper .cert-number { font-size: 1.5rem; color: #333; margin-bottom: 15px; }

/* 제목 */
.cert-paper .cert-title { text-align: center; font-size: 5rem; font-weight: 800; color: #111; margin: 20px 0 90px; letter-spacing: 5px; }

/* 인적사항 */
.cert-paper .cert-info dl { display: flex; gap: 10px; margin: 0; padding: 6px 0; font-size: 2.2rem; line-height: 1.5; }
.cert-paper .cert-info dl dt { width: 120px; flex-shrink: 0; font-weight: 600; color: #222; letter-spacing: 1px; }
.cert-paper .cert-info dl dd { margin: 0; color: #333; font-weight: 600; }

/* 본문 */
.cert-paper .cert-body { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.cert-paper .cert-body p { font-size: 2.6rem; font-weight: 600; color: #222; line-height: 1.8; word-break: keep-all; }

/* 발급일 */
.cert-paper .cert-date { text-align: center; font-size: 2.2rem; font-weight: 600; color: #333; margin: 0px 0 80px; letter-spacing: 2px; }

/* 발급기관 */
.cert-paper .cert-footer { text-align: center; }
.cert-paper .cert-footer .cert-org-line1 { font-size: 2.8rem; color: #111; margin-bottom: 8px; font-weight: 600; }
.cert-paper .cert-footer .cert-org-line2 { display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; }
.cert-paper .cert-footer .cert-org-line2 p { font-size: 2.8rem; font-weight: 700; color: #111; }
.cert-paper .cert-footer .cert-seal-area { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 80px; }
.cert-paper .cert-footer .cert-seal-area .cert-seal { position: absolute; width: 80px; height: 80px; }
.cert-paper .cert-footer .cert-seal-area .cert-seal img { width: 100%; height: 100%; object-fit: contain; }
.cert-paper .cert-footer .cert-seal-area .cert-seal-label { position: relative; font-size: 2rem; color: #333; }

/* 상단 버튼 */
.cert-btn-top { display: flex; justify-content: flex-end; margin-bottom: 5px; }
.cert-btn-top button { padding: 8px 20px; font-size: 1.3rem; font-weight: 600; border: 1px solid #bbb; border-radius: 6px; background: #fff; color: #444; cursor: pointer; transition: border-color 0.2s; }
.cert-btn-top button:hover { border-color: #888; }

/* 하단 버튼 */
.cert-btn-area { display: flex; justify-content: center; gap: 10px; margin-top: 25px; }
.cert-btn-area .btn-print { padding: 12px 40px; font-size: 1.5rem; font-weight: 700; border: 0; border-radius: 6px; background: #002060; color: #fff; cursor: pointer; transition: background 0.2s; }
.cert-btn-area .btn-print:hover { background: #001a55; }
.cert-btn-area .btn-close { padding: 12px 40px; font-size: 1.5rem; font-weight: 600; border: 1px solid #bbb; border-radius: 6px; background: #fff; color: #444; cursor: pointer; transition: border-color 0.2s; }
.cert-btn-area .btn-close:hover { border-color: #888; }

/* 인쇄 */
@media print {
    @page { size: A4; margin: 0; }
    body { margin: 0; }
    .cert-page { padding: 0; max-width: none; }
    .cert-paper { border: none; padding: 15mm 20mm; aspect-ratio: auto; width: 210mm; height: 297mm; box-sizing: border-box; overflow: hidden; }
    .cert-paper .cert-title { margin: 50px 0 95px; }
    .cert-paper .cert-body p { font-size: 2.6rem; }
    .cert-paper .cert-date { margin: 20px 0 110px; }
    .cert-btn-top, .cert-btn-area { display: none; }
}

@media screen and (min-width: 1920px) {
    .cert-paper .cert-title { font-size: 4rem; margin: 15px 0 60px; }
    .cert-paper .cert-info dl { font-size: 1.8rem; }
    .cert-paper .cert-body p { font-size: 2.2rem; }
    .cert-paper .cert-date { font-size: 1.8rem; margin: 0 0 60px; }
    .cert-paper .cert-footer .cert-org-line1 { font-size: 2.2rem; }
    .cert-paper .cert-footer .cert-org-line2 p { font-size: 2.2rem; }
    .cert-paper .cert-footer .cert-seal-area { width: 65px; height: 65px; }
    .cert-paper .cert-footer .cert-seal-area .cert-seal { width: 65px; height: 65px; }
    .cert-paper .cert-footer .cert-seal-area .cert-seal-label { font-size: 1.7rem; }
}

@media screen and (max-width: 600px) {
    .cert-page { padding: 15px 10px; }
    .cert-paper { padding: 30px 25px 35px; }
    .cert-paper .cert-top-logo { top: 25px; right: 25px; }
    .cert-paper .cert-top-logo img { height: 18px; }
    .cert-paper .cert-number { font-size: 1.3rem; }
    .cert-paper .cert-title { font-size: 2.8rem; margin: 15px 0 25px; }
    .cert-paper .cert-info dl { font-size: 1.3rem; padding: 5px 0; }
    .cert-paper .cert-info dl dt { width: 95px; }
    .cert-paper .cert-body p { font-size: 1.6rem; }
    .cert-paper .cert-date { font-size: 1.5rem; margin: 20px 0 30px; }
    .cert-paper .cert-footer .cert-org-line1 { font-size: 1.5rem; }
    .cert-paper .cert-footer .cert-org-line2 p { font-size: 1.7rem; }
    .cert-paper .cert-footer .cert-seal-area { width: 60px; height: 60px; }
    .cert-paper .cert-footer .cert-seal-area .cert-seal { width: 60px; height: 60px; }
    .cert-paper .cert-footer .cert-seal-area .cert-seal-label { font-size: 1.5rem; }
}
