@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Dancing+Script:wght@700&family=Great+Vibes&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/**
 * Official PDF Certificate & Transcript Styles - Reflexology Association
 * Perfectly calibrated for SINGLE PAGE A4 (210mm x 297mm) Vector/Print Output
 */

/* Hidden Container for Generation (Placed at 0,0 under viewport with zero opacity) */
#pdfRenderContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 794px;
    height: 1122px;
    z-index: -9999;
    opacity: 0;
    pointer-events: none;
    background: #ffffff;
    overflow: hidden;
}

/* PDF Preview Modal Container */
.pdf-preview-wrap {
    background: #525659;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 75vh;
    overflow-y: auto;
}

/* -------------------------------------------------------------
   THE OFFICIAL A4 CERTIFICATE DOCUMENT ROOT (EXACT A4 SINGLE PAGE)
------------------------------------------------------------- */
.ra-cert-document {
    width: 794px; /* Standard A4 at 96 DPI */
    height: 1122px; /* Exact A4 height */
    max-height: 1122px;
    padding: 16px;
    background-color: #ffffff;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Georgia', serif;
    color: #0b1f3a;
    position: relative;
    box-shadow: 0 10px 35px rgba(0,0,0,0.18);
    overflow: hidden;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.94) 0%, rgba(248,250,252,0.92) 100%),
        repeating-linear-gradient(45deg, rgba(0,40,85,0.015) 0, rgba(0,40,85,0.015) 2px, transparent 0, transparent 8px);
}

/* -------------------------------------------------------------
   OUTER & INNER LUXURY ORNATE BORDERS
------------------------------------------------------------- */
.ra-cert-outer-border {
    width: 100%;
    height: 1090px;
    max-height: 1090px;
    border: 3px solid #002855;
    padding: 4px;
    position: relative;
    box-sizing: border-box;
    background: #ffffff;
    overflow: hidden;
}

.ra-cert-gold-border {
    width: 100%;
    height: 1078px;
    max-height: 1078px;
    border: 1.5px solid #c59b27;
    padding: 3px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.ra-cert-inner-frame {
    width: 100%;
    height: 1068px;
    max-height: 1068px;
    border: 1px solid #002855;
    padding: 18px 24px 14px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    overflow: hidden;
}

/* Corner Ornaments */
.cert-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #c59b27;
    z-index: 10;
}
.cert-corner-tl { top: -2px; left: -2px; border-top: 3px solid #c59b27; border-left: 3px solid #c59b27; }
.cert-corner-tr { top: -2px; right: -2px; border-top: 3px solid #c59b27; border-right: 3px solid #c59b27; }
.cert-corner-bl { bottom: -2px; left: -2px; border-bottom: 3px solid #c59b27; border-left: 3px solid #c59b27; }
.cert-corner-br { bottom: -2px; right: -2px; border-bottom: 3px solid #c59b27; border-right: 3px solid #c59b27; }

/* Security Watermark in Center */
.ra-watermark {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

/* Security Ribbon / Header Top Tag */
.ra-top-security-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 5px;
    margin-bottom: 8px;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #64748b;
    position: relative;
    z-index: 2;
}

.ra-security-tag-left {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #002855;
}

.ra-security-tag-right {
    font-family: 'JetBrains Mono', monospace;
    color: #c59b27;
}

/* -------------------------------------------------------------
   HEADER SECTION: ORIGINAL LOGO & TITLES SIDE-BY-SIDE
------------------------------------------------------------- */
.ra-cert-header {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 6px;
}

.ra-cert-header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 6px;
}

.ra-cert-logo-img {
    height: 52px;
    max-width: 140px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,40,85,0.08));
}

.ra-cert-header-titles {
    text-align: left;
}

.ra-cert-org-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #002855;
    margin-bottom: 1px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.1;
}

.ra-cert-org-sub {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #0d7a68;
    margin-bottom: 0;
}

.ra-cert-title-badge-wrap {
    display: inline-block;
    position: relative;
    margin-top: 6px;
    margin-bottom: 6px;
}

.ra-cert-title-badge {
    background: linear-gradient(135deg, #001e3d 0%, #002855 100%);
    color: #ffffff;
    padding: 4px 18px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    border: 1px solid #c59b27;
    box-shadow: 0 2px 8px rgba(0,40,85,0.18);
}

.ra-cert-preamble {
    font-size: 9px;
    font-style: italic;
    color: #475569;
    letter-spacing: 0.4px;
    margin-bottom: 3px;
    text-transform: uppercase;
}

/* -------------------------------------------------------------
   RECIPIENT NAME (VURGULU VE PRESTİJLİ)
------------------------------------------------------------- */
.ra-recipient-block {
    text-align: center;
    position: relative;
    z-index: 2;
    margin: 2px 0 8px;
    padding: 6px 12px;
    background: linear-gradient(to right, rgba(0,40,85,0.01), rgba(0,40,85,0.04), rgba(0,40,85,0.01));
    border-top: 1px dashed rgba(197, 155, 39, 0.4);
    border-bottom: 1px dashed rgba(197, 155, 39, 0.4);
}

.ra-recipient-name {
    font-size: 23px;
    font-weight: 800;
    color: #002855;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-family: 'Plus Jakarta Sans', serif;
}

.ra-recipient-affirmation {
    font-size: 10.5px;
    color: #334155;
    line-height: 1.35;
    max-width: 600px;
    margin: 0 auto;
}

/* -------------------------------------------------------------
   CREDENTIAL MATRIX / DETAILS TABLE (ZENGİN & DOLU)
------------------------------------------------------------- */
.ra-credential-matrix {
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
    border: 1.5px solid #002855;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
}

.ra-matrix-header {
    background: #002855;
    color: #ffffff;
    padding: 5px 12px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ra-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}

.ra-matrix-table td {
    padding: 5.5px 10px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.ra-matrix-table tr:last-child td {
    border-bottom: none;
}

.ra-matrix-table tr:nth-child(even) {
    background: #f8fafc;
}

.ra-col-label {
    width: 32%;
    font-weight: 700;
    color: #1e293b;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-right: 1px solid #e2e8f0;
}

.ra-col-value {
    width: 68%;
    font-weight: 600;
    color: #002855;
}

.ra-val-highlight {
    font-weight: 800;
    color: #002855;
    font-size: 11.5px;
}

.ra-val-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 11px;
    color: #0f172a;
    background: #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    display: inline-block;
}

.ra-cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1.5px 7px;
    border-radius: 10px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.ra-badge-active {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ra-badge-certified {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* -------------------------------------------------------------
   ACCREDITATION CLAUSE & COMPLIANCE STATEMENTS
------------------------------------------------------------- */
.ra-compliance-clause {
    position: relative;
    z-index: 2;
    background: #fdfbf7;
    border-left: 3px solid #c59b27;
    padding: 5px 10px;
    margin-bottom: 8px;
    font-size: 8.5px;
    line-height: 1.35;
    color: #475569;
    border-radius: 0 4px 4px 0;
}

.ra-compliance-clause strong {
    color: #002855;
}

/* -------------------------------------------------------------
   VERIFICATION BARCODE / QR & SEAL ROW
------------------------------------------------------------- */
.ra-verification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    position: relative;
    z-index: 2;
}

.ra-qr-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ra-qr-code-box {
    width: 80px;
    height: 80px;
    background: #ffffff;
    padding: 4px;
    border: 1.5px solid #002855;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.ra-qr-code-box img,
.ra-qr-code-box canvas {
    width: 72px !important;
    height: 72px !important;
    display: block;
}

.ra-qr-info {
    font-size: 8.5px;
    color: #475569;
    line-height: 1.3;
}

.ra-qr-info strong {
    color: #002855;
    display: block;
    font-size: 9.5px;
    margin-bottom: 1px;
}

/* Large Prominent Circular Emblem (At least 3x larger) */
.ra-large-emblem-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 96px;
    height: 96px;
}

.ra-large-emblem-img {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 0 2px #c59b27, 0 4px 12px rgba(0,40,85,0.22);
    display: block;
}

/* -------------------------------------------------------------
   OFFICIAL SIGNATURES & AUTHENTIC INK STAMP (KAŞE)
------------------------------------------------------------- */
.ra-signatures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
}

.ra-sig-box {
    text-align: center;
    position: relative;
}

.ra-sig-img-wrap {
    height: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 2px;
}

/* Dr. Ali Öktem Signature: Düz ve Doğal El Yazısı / Signature Style */
.ra-sig-name-straight {
    font-family: 'Alex Brush', 'Dancing Script', 'Great Vibes', 'Brush Script MT', cursive;
    font-size: 26px;
    font-weight: 700;
    color: #002855;
    letter-spacing: 0.5px;
    line-height: 1;
    transform: none !important;
}

.ra-simulated-signature {
    font-family: 'Brush Script MT', 'Alex Brush', 'Great Vibes', cursive;
    font-size: 23px;
    color: #002855;
    transform: rotate(-1deg);
    line-height: 1;
    font-weight: 700;
}

.ra-sig-line {
    width: 85%;
    margin: 0 auto 3px;
    border-bottom: 1.5px solid #002855;
}

.ra-sig-title {
    font-size: 9.5px;
    font-weight: 800;
    color: #002855;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ra-sig-dept {
    font-size: 8px;
    color: #64748b;
    font-weight: 600;
}

/* Authentic Reflexology Association Ink Stamp (Temsili Islak Kaşe) */
.ra-official-ink-stamp {
    position: absolute;
    right: 18px;
    bottom: -8px;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 2px dashed #0a3d78;
    padding: 3px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-8deg);
    opacity: 0.88;
    pointer-events: none;
    z-index: 6;
    background: radial-gradient(circle, rgba(10, 61, 120, 0.04) 0%, transparent 75%);
}

.ra-stamp-inner {
    width: 100%;
    height: 100%;
    border: 1.5px solid #0a3d78;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #0a3d78;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 2px;
    box-sizing: border-box;
}

.ra-stamp-top {
    font-size: 5.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.1;
}

.ra-stamp-star {
    font-size: 8px;
    color: #0a3d78;
    margin: 1px 0;
    line-height: 1;
}

.ra-stamp-mid {
    font-size: 6.5px;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    border-top: 1px solid #0a3d78;
    border-bottom: 1px solid #0a3d78;
    padding: 1px 3px;
    margin: 1px 0;
}

.ra-stamp-sub {
    font-size: 5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* -------------------------------------------------------------
   DOCUMENT FOOTER (OFFICIAL CONTACT & DISCLOSURE)
------------------------------------------------------------- */
.ra-cert-footer {
    border-top: 1.5px solid #002855;
    padding-top: 5px;
    text-align: center;
    font-size: 7.5px;
    color: #64748b;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ra-footer-contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    color: #002855;
    font-size: 8px;
}

.ra-footer-contacts span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ra-footer-legal {
    font-size: 7px;
    color: #94a3b8;
    line-height: 1.2;
}
