/* ═══════════════════════════════════════════════════════════════
   AK PRINT SEVA — 8 DISTINCT CORELDRAW-GRADE CERTIFICATE DESIGNS
   Exact A4 Landscape: 297mm x 210mm · Balanced Vertical Geometry
   Hero Name Display · Scalable Vector Embellishments & Borders
   ═══════════════════════════════════════════════════════════════ */

/* ─── A4 LANDSCAPE PAPER SHEET BASE ─── */
.a4-cert-sheet {
    width: 297mm;
    height: 210mm;
    min-height: 210mm;
    max-height: 210mm;
    background: #ffffff !important;
    color: #000000;
    box-sizing: border-box;
    position: relative;
    box-shadow: none;
    margin: 0 auto;
    overflow: hidden;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   UNIVERSAL CERTIFICATE ANATOMY (BALANCED TOP-TO-BOTTOM SPREAD)
   ═══════════════════════════════════════════════════════════════ */
.cert-canvas-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16mm 20mm;
    position: relative;
}

/* 1. TOP HEADER (Organization + Logo) */
.cert-top-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}
.cert-org-logo-img {
    max-height: 44px;
    max-width: 150px;
    object-fit: contain;
    margin-bottom: 4px;
    display: block;
}
.cert-org-heading {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin: 0 0 2px;
}
.cert-org-sub {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* 2. CERTIFICATE TITLE & BANNER */
.cert-title-section {
    text-align: center;
    margin: 6px 0;
}
.cert-main-headline {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 4px;
    line-height: 1.15;
}
.cert-sub-present-line {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.85;
}

/* 3. HERO RECIPIENT NAME (THE VISUAL CENTERPIECE) */
.cert-hero-name-section {
    text-align: center;
    margin: 8px 0;
    padding: 0 20px;
}
.cert-hero-name-calligraphy {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.1;
    margin: 0 auto;
    display: inline-block;
}
.cert-hero-name-line {
    width: 65%;
    max-width: 440px;
    height: 1.5px;
    margin: 6px auto 0;
    opacity: 0.7;
}

/* 4. BODY & PERFORMANCE TEXT */
.cert-body-section {
    text-align: center;
    max-width: 84%;
    margin: 0 auto;
}
.cert-body-paragraph {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.6;
    margin: 0 0 6px;
}
.cert-meta-pills {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 5. BOTTOM 3-COLUMN SIGNATORY & SEAL BLOCK */
.cert-bottom-sign-row {
    display: grid;
    grid-template-columns: 1fr 140px 1fr;
    gap: 20px;
    align-items: flex-end;
    margin-top: 6px;
    padding-top: 4px;
}
.cert-sign-col {
    text-align: center;
    padding: 0 10px;
}
.cert-sign-hr {
    width: 85%;
    height: 1.5px;
    margin: 0 auto 5px;
}
.cert-sign-person {
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 2px;
}
.cert-sign-designation {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-center-seal-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.cert-seal-badge-svg {
    width: 68px;
    height: 68px;
    display: block;
    margin: 0 auto;
}
.cert-qr-box-svg {
    width: 52px;
    height: 52px;
    display: block;
    margin: 0 auto;
}


/* ═══════════════════════════════════════════════════════════════
   1. TEMPLATE 01: ROYAL GOLD CLASSIC (Double Gold & Corner Filigree)
   ═══════════════════════════════════════════════════════════════ */
.cert-t1-card {
    background: #FFFDF9;
    border: 14px solid #78350F;
    outline: 3px solid #F59E0B;
    outline-offset: -8px;
    color: #1F2937;
    font-family: 'Cinzel', serif;
}
.cert-t1-card .cert-org-heading { color: #78350F; }
.cert-t1-card .cert-main-headline { color: #92400E; }
.cert-t1-card .cert-hero-name-calligraphy {
    color: #78350F;
    font-family: 'Playfair Display', serif;
}
.cert-t1-card .cert-hero-name-line { background: #D97706; }
.cert-t1-card .cert-sign-hr { background: #78350F; }
.cert-t1-corner-tl { position: absolute; top: 14px; left: 14px; width: 44px; height: 44px; }
.cert-t1-corner-tr { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; transform: scaleX(-1); }
.cert-t1-corner-bl { position: absolute; bottom: 14px; left: 14px; width: 44px; height: 44px; transform: scaleY(-1); }
.cert-t1-corner-br { position: absolute; bottom: 14px; right: 14px; width: 44px; height: 44px; transform: scale(-1); }


/* ═══════════════════════════════════════════════════════════════
   2. TEMPLATE 02: MODERN CORPORATE BLUE (Geometric Polygons)
   ═══════════════════════════════════════════════════════════════ */
.cert-t2-card {
    background: #FFFFFF;
    border-left: 18px solid #1E3A8A;
    border-right: 8px solid #0284C7;
    border-top: 6px solid #38BDF8;
    border-bottom: 14px solid #1E3A8A;
    color: #0F172A;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.cert-t2-card .cert-org-heading { color: #1E3A8A; }
.cert-t2-card .cert-main-headline { color: #1E40AF; letter-spacing: 2px; }
.cert-t2-card .cert-hero-name-calligraphy {
    color: #0284C7;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
}
.cert-t2-card .cert-hero-name-line { background: #0284C7; }
.cert-t2-card .cert-sign-hr { background: #1E40AF; }


/* ═══════════════════════════════════════════════════════════════
   3. TEMPLATE 03: VINTAGE HERITAGE PARCHMENT (Guilloche Border)
   ═══════════════════════════════════════════════════════════════ */
.cert-t3-card {
    background: #FCF8EE;
    border: 12px double #582C0E;
    outline: 2px solid #92400E;
    outline-offset: -5px;
    color: #292524;
    font-family: 'Cinzel', serif;
}
.cert-t3-card .cert-org-heading { color: #582C0E; }
.cert-t3-card .cert-main-headline { color: #881337; font-family: 'Cinzel', serif; }
.cert-t3-card .cert-hero-name-calligraphy {
    color: #582C0E;
    font-family: 'Playfair Display', serif;
}
.cert-t3-card .cert-hero-name-line { background: #582C0E; }
.cert-t3-card .cert-sign-hr { background: #582C0E; }


/* ═══════════════════════════════════════════════════════════════
   4. TEMPLATE 04: MINIMALIST LUXURY SWISS (Clean Hairlines)
   ═══════════════════════════════════════════════════════════════ */
.cert-t4-card {
    background: #FFFFFF;
    border: 2px solid #0F172A;
    outline: 1px solid #94A3B8;
    outline-offset: -10px;
    color: #1E293B;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.cert-t4-card .cert-org-heading { color: #0F172A; font-weight: 900; }
.cert-t4-card .cert-main-headline { color: #0F172A; letter-spacing: 5px; }
.cert-t4-card .cert-hero-name-calligraphy {
    color: #0F172A;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
}
.cert-t4-card .cert-hero-name-line { background: #0F172A; }
.cert-t4-card .cert-sign-hr { background: #64748B; }


/* ═══════════════════════════════════════════════════════════════
   5. TEMPLATE 05: ACADEMIC UNIVERSITY DIPLOMA (Laurel Crest & Crimson)
   ═══════════════════════════════════════════════════════════════ */
.cert-t5-card {
    background: #FFFDF9;
    border: 14px solid #881337;
    outline: 3px solid #D97706;
    outline-offset: -6px;
    color: #1C1917;
    font-family: 'Cinzel', serif;
}
.cert-t5-card .cert-org-heading { color: #881337; }
.cert-t5-card .cert-main-headline { color: #881337; }
.cert-t5-card .cert-hero-name-calligraphy {
    color: #9A3412;
    font-family: 'Playfair Display', serif;
}
.cert-t5-card .cert-hero-name-line { background: #D97706; }
.cert-t5-card .cert-sign-hr { background: #881337; }


/* ═══════════════════════════════════════════════════════════════
   6. TEMPLATE 06: SPORTS & ATHLETIC CHAMPIONSHIP (Bold Crimson & Gold)
   ═══════════════════════════════════════════════════════════════ */
.cert-t6-card {
    background: #FFFFFF;
    border-top: 14px solid #DC2626;
    border-bottom: 14px solid #D97706;
    border-left: 6px solid #DC2626;
    border-right: 6px solid #D97706;
    color: #0F172A;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.cert-t6-card .cert-org-heading { color: #DC2626; }
.cert-t6-card .cert-main-headline { color: #DC2626; font-weight: 900; }
.cert-t6-card .cert-hero-name-calligraphy {
    color: #D97706;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
}
.cert-t6-card .cert-hero-name-line { background: #DC2626; }
.cert-t6-card .cert-sign-hr { background: #DC2626; }


/* ═══════════════════════════════════════════════════════════════
   7. TEMPLATE 07: TECHNICAL / IT TRAINING (Cyber Slate & Electric Teal)
   ═══════════════════════════════════════════════════════════════ */
.cert-t7-card {
    background: #F8FAFC;
    border: 4px solid #0F766E;
    border-left: 20px solid #0F766E;
    color: #0F172A;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.cert-t7-card .cert-org-heading { color: #0F766E; }
.cert-t7-card .cert-main-headline { color: #0F766E; font-weight: 900; }
.cert-t7-card .cert-hero-name-calligraphy {
    color: #0D9488;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
}
.cert-t7-card .cert-hero-name-line { background: #0F766E; }
.cert-t7-card .cert-sign-hr { background: #0F766E; }


/* ═══════════════════════════════════════════════════════════════
   8. TEMPLATE 08: LUXURY PRESTIGE BLACK & GOLD (Obsidian & Radiant Gold)
   ═══════════════════════════════════════════════════════════════ */
.cert-t8-card {
    background: #090D16;
    border: 8px solid #B45309;
    outline: 2px solid #FBBF24;
    outline-offset: -5px;
    color: #F8FAFC;
    font-family: 'Cinzel', serif;
}
.cert-t8-card .cert-org-heading { color: #FBBF24; }
.cert-t8-card .cert-main-headline { color: #FBBF24; }
.cert-t8-card .cert-hero-name-calligraphy {
    color: #FDE68A;
    font-family: 'Playfair Display', serif;
}
.cert-t8-card .cert-hero-name-line { background: #FBBF24; }
.cert-t8-card .cert-sign-hr { background: #D97706; }
.cert-t8-card .cert-body-paragraph { color: #CBD5E1; }
.cert-t8-card .cert-sign-designation { color: #94A3B8; }


/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES FOR EXACT 1-PAGE VECTOR A4 LANDSCAPE PRINT & PDF
   ═══════════════════════════════════════════════════════════════ */
@media print {
    @page {
        size: A4 landscape;
        margin: 0mm !important;
    }
    *, *:before, *:after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box !important;
    }
    html, body, .cert-app-page, main, .studio-main-container, .studio-2col-layout, .studio-right-deck, .preview-deck-card, .pdk-canvas-viewport, .a4-scale-stage {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        position: static !important;
    }
    header, nav, footer, .builder-hero, .studio-left-deck, .pdk-header, .pdk-footer-bar, .toast-container, .hero-bg-shapes {
        display: none !important;
    }
    .a4-scale-stage {
        transform: none !important;
    }
    .a4-cert-sheet {
        width: 297mm !important;
        height: 209mm !important;
        max-height: 209mm !important;
        min-height: 209mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border: none !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        overflow: hidden !important;
    }
}
