/**
 * SREE JAIBHEEM FOUNDATION - Certificate, ID Card & Document Styles
 * High-res print & digital preview layouts
 */

/* ================= PRINT RULES ================= */
@media print {
    body {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .no-print {
        display: none !important;
    }
    .certificate-container, .id-card-container, .letter-container {
        box-shadow: none !important;
        margin: 0 auto !important;
        page-break-inside: avoid;
    }
}

/* ================= 1. MEMBERSHIP & DONATION CERTIFICATES ================= */
.certificate-container {
    width: 100%;
    max-width: 880px;
    margin: 30px auto;
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    position: relative;
    font-family: 'Times New Roman', Georgia, serif;
}

.certificate-outer-border {
    border: 8px double #0a3871;
    padding: 12px;
    background: #ffffff;
    position: relative;
}

.certificate-inner-border {
    border: 2px solid #d4af37;
    padding: 35px 40px;
    text-align: center;
    background: radial-gradient(circle at center, #ffffff 60%, #f7faff 100%);
    position: relative;
}

.certificate-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #d4af37;
}
.cert-tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.cert-tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.cert-bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.cert-br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.cert-header-org {
    font-size: 28px;
    font-weight: 800;
    color: #0a3871;
    letter-spacing: 1px;
    margin-bottom: 2px;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    text-transform: uppercase;
}

.cert-tagline {
    font-size: 13px;
    color: #555;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Segoe UI', sans-serif;
}

.cert-title-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0a3871, #061d3d);
    color: #ffd700;
    font-size: 16px;
    font-weight: 700;
    padding: 6px 28px;
    border-radius: 30px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border: 1px solid #d4af37;
    font-family: 'Segoe UI', sans-serif;
}

.cert-presented-to {
    font-size: 15px;
    font-style: italic;
    color: #666;
    margin-bottom: 8px;
}

.cert-recipient-name {
    font-size: 32px;
    font-weight: bold;
    color: #0a3871;
    border-bottom: 2px solid #d4af37;
    display: inline-block;
    padding: 0 30px 6px;
    margin-bottom: 18px;
    font-family: 'Georgia', serif;
}

.cert-body-text {
    font-size: 15px;
    color: #333;
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 30px;
    font-family: 'Segoe UI', sans-serif;
}

.cert-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 30px;
    padding: 0 20px;
    font-family: 'Segoe UI', sans-serif;
}

.cert-sign-box {
    text-align: center;
    width: 180px;
}

.cert-sign-line {
    border-top: 1px solid #0a3871;
    margin-top: 40px;
    padding-top: 6px;
    font-size: 12px;
    font-weight: bold;
    color: #0a3871;
}

.cert-seal-box {
    text-align: center;
}

.cert-seal-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px dashed #d4af37;
    padding: 5px;
}

.cert-qr-box {
    text-align: center;
    width: 130px;
}

.cert-qr-img {
    width: 75px;
    height: 75px;
    margin-bottom: 4px;
}

.cert-no-text {
    font-size: 10px;
    color: #666;
    font-weight: bold;
}

/* ================= 2. MEMBER ID CARD (FRONT & BACK) ================= */
.id-card-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin: 30px 0;
}

.id-card {
    width: 350px;
    height: 220px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(10, 56, 113, 0.15);
    overflow: hidden;
    position: relative;
    border: 1px solid #d4af37;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Front Side */
.id-card-front-header {
    background: linear-gradient(135deg, #0a3871, #061d3d);
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #d4af37;
}

.id-card-logo {
    width: 32px;
    height: 32px;
}

.id-card-header-text h6 {
    font-size: 11px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.id-card-header-text small {
    font-size: 8px;
    color: #cbd5e1;
    display: block;
}

.id-card-front-body {
    padding: 10px 14px;
    display: flex;
    gap: 14px;
    flex-grow: 1;
    align-items: center;
    background: #fdfefe;
}

.id-card-photo-box {
    width: 75px;
    height: 90px;
    border-radius: 6px;
    border: 2px solid #0a3871;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
}

.id-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-card-details {
    flex-grow: 1;
    font-size: 10px;
    line-height: 1.45;
}

.id-card-name {
    font-size: 13px;
    font-weight: 800;
    color: #0a3871;
    margin-bottom: 4px;
}

.id-card-code-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 4px;
    font-size: 9px;
}

.id-card-front-footer {
    background: #061d3d;
    color: #ffd700;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    padding: 4px;
    letter-spacing: 0.8px;
}

/* Back Side */
.id-card-back-header {
    background: #0a3871;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 6px 10px;
    text-align: center;
    letter-spacing: 0.5px;
}

.id-card-back-body {
    padding: 10px 14px;
    font-size: 9px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
}

.id-card-back-info {
    max-width: 220px;
}

.id-card-back-qr {
    width: 60px;
    height: 60px;
}

.id-card-terms {
    font-size: 7.5px;
    color: #666;
    line-height: 1.3;
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
    padding-top: 4px;
}

/* ================= 3. APPOINTMENT LETTER ================= */
.letter-container {
    max-width: 800px;
    margin: 30px auto;
    background: #ffffff;
    padding: 50px 60px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border-top: 6px solid #0a3871;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
    line-height: 1.7;
}

.letter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #0a3871;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.letter-org-title {
    font-size: 22px;
    font-weight: 800;
    color: #0a3871;
    margin: 0;
}

.letter-org-sub {
    font-size: 11px;
    color: #555;
    margin-top: 3px;
}

.letter-ref-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #444;
}

.letter-subject {
    font-size: 15px;
    font-weight: 800;
    color: #0a3871;
    margin-bottom: 20px;
    text-decoration: underline;
}

.letter-body {
    font-size: 14px;
    margin-bottom: 30px;
}

.letter-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 50px;
}
