/* Main Container */
.certificate-container {
    width: 1120px !important;
    height: 790px !important;
    position: relative;
    overflow: visible;
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    page-break-after: avoid;
    page-break-inside: avoid;
    box-sizing: border-box;
    display: block !important;
    visibility: visible !important;
}

/* Remove the old before pseudo-element */
.certificate-container::before {
    display: none;
}

/* --- Corner Decorations --- */

/* Shared Styles for Layers */
.decoration-top-right,
.decoration-bottom-left {
    position: absolute;
    width: 450px;
    height: 450px;
    pointer-events: none;
}

.decoration-top-right {
    top: 0;
    right: 0;
}

.decoration-bottom-left {
    bottom: 0;
    left: 0;
    transform: rotate(180deg);
}

.decoration-top-right div,
.decoration-bottom-left div {
    position: absolute;
    top: 0;
    right: 0;
    border-bottom-left-radius: 100%;
}

/* Layer 1: Navy Blue (Deepest) */
.layer-blue {
    width: 100%;
    height: 100%;
    background: #003B6D;
    /* Deep Navy */
    z-index: 1;
}

/* Layer 2: Gold Gradient */
.layer-gold {
    width: 75%;
    height: 75%;
    background: linear-gradient(135deg, #FDE08D 0%, #D4AF37 50%, #FDE08D 100%);
    z-index: 2;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* Layer 3: White (Canvas) */
.layer-white {
    width: 60%;
    height: 60%;
    background: #ffffff;
    z-index: 3;
}

/* --- Seal --- */
.gold-seal {
    position: absolute;
    top: 60px;
    left: 60px;
    width: 140px;
    height: auto;
    z-index: 10;
    /* Removed background/box styles */
}

.gold-seal img {
    width: 140px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

/* --- Content --- */
.content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    /* Above decorations */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 100px;
    box-sizing: border-box;
}

/* Spacer to push content down slightly if needed, or just use margins */

.volunteer-commendation .header-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    letter-spacing: 3px;
    text-transform: capitalize;
    color: #444;
    margin-top: 40px;
    margin-bottom: 25px;
    font-weight: 500;
}

.volunteer-commendation .header-main {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    letter-spacing: 12px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 30px;
    font-weight: 700;
    /* Adjust for letter spacing to centering */
    margin-left: 12px;
}

.volunteer-commendation .header-presented {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    color: #444;
    margin-bottom: 35px;
    font-weight: 400;
    text-transform: capitalize;
}

.volunteer-commendation .recipient-name {
    font-family: 'Montserrat', sans-serif;
    /* Using sans-serif as per image */
    font-size: 64px;
    font-weight: 700;
    color: #000;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.volunteer-commendation .certificate-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    max-width: 700px;
    margin: 0 auto 100px;
    /* Large margin bottom to push footer down */
    font-weight: 400;
}

/* --- Footer --- */
.volunteer-commendation .certificate-footer {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 40px;
    box-sizing: border-box;
}

.signature-block {
    text-align: left;
}

.signature-name {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 5px;
}

.signature-title {
    font-size: 14px;
    color: #555;
    font-weight: 400;
}

.date-block {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    letter-spacing: 1px;
}

/* --- Print Overrides --- */
@page {
    size: A4 landscape;
    margin: 0;
}

@media print {
    body {
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .certificate-container {
        width: 1120px;
        height: 790px;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        page-break-after: always;
    }

    /* Ensure background colors print */
    .layer-blue {
        background-color: #003B6D !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .layer-gold {
        background: linear-gradient(135deg, #FDE08D 0%, #D4AF37 50%, #FDE08D 100%) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}