/**
 * SEO-Day 2025 Zertifikat - Layout und Struktur
 * DIN A4 Format: 210mm x 297mm (793px x 1123px bei 96 DPI)
 * Professionelles, hochwertiges Design
 */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #e8e8e8;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Certificate Container - DIN A4 Premium */
.certificate-container {
    width: 210mm;
    height: 297mm;
    max-width: 793px;
    max-height: 1123px;
    background-color: #FFFFFF;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1);
    position: relative;
    page-break-after: always;
    overflow: visible;
    padding-bottom: 50px;
}

/* Certificate Frame - Ohne Rahmen */
.certificate-frame {
    width: 100%;
    height: 100%;
    padding: 35px;
    position: relative;
    background-color: #FFFFFF;
    overflow: visible;
    border: none;
}

/* Kein innerer Rahmen mehr */
.certificate-frame::before {
    display: none;
}

/* Corner Ornaments - Hidden */
.corner-ornament {
    display: none;
}

.corner-ornament.top-left {
    top: 8px;
    left: 8px;
}

.corner-ornament.top-right {
    top: 8px;
    right: 8px;
}

.corner-ornament.bottom-left {
    bottom: 8px;
    left: 8px;
}

.corner-ornament.bottom-right {
    bottom: 8px;
    right: 8px;
}

/* Content Area - Maximal komprimiert */
.certificate-content {
    position: relative;
    padding: 50px 55px 25px 55px;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 0px);
    overflow: visible;
    padding-bottom: 60px;
}

/* Logo Container - Kompakt */
.logo-container {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    text-align: center;
}

.certificate-logo {
    height: 70px;
    width: auto;
}

/* Title Section - Maximal kompakt */
.certificate-title-section {
    margin-top: 70px;
    margin-bottom: 25px;
    text-align: center;
}

.certificate-main-title {
    margin-bottom: 10px;
    padding: 5px 0;
}

.title-ornament {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
}

.title-ornament svg {
    width: 250px;
    height: 24px;
}

/* Text Section - Maximal kompakt */
.certificate-text-section {
    text-align: center;
    margin-bottom: 18px;
}

.certificate-intro-text {
    margin-bottom: 12px;
    font-size: 16px;
}

.participant-name {
    margin: 18px 0;
    min-height: 40px;
    padding: 10px 0;
    border-top: 1px solid #E8E8E8;
    border-bottom: 1px solid #E8E8E8;
}

.certificate-participation-text {
    margin-bottom: 18px;
    font-size: 16px;
}

.certificate-topics-intro {
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

/* Topics List - Maximal kompakt */
.certificate-topics-list {
    margin: 0 auto 25px auto;
    max-width: 650px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #F0F0F0;
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.topic-icon svg {
    width: 100%;
    height: 100%;
}

.topic-content {
    flex-grow: 1;
    text-align: left;
}

.topic-title {
    margin-bottom: 2px;
    font-size: 15px;
    font-weight: 600;
    color: #000000;
}

.topic-description {
    margin: 0;
    font-size: 12px;
    color: #666666;
    line-height: 1.3;
}

/* Footer Section - Maximal kompakt */
.certificate-footer {
    margin-top: auto;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 20px;
    gap: 25px;
    padding-bottom: 40px;
    overflow: visible;
    min-height: 300px;
}

.date-location {
    flex: 0 0 auto;
    text-align: left;
}

.date-location p {
    font-size: 14px;
    font-weight: 500;
    color: #2c2c2c;
}

.signature-section {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Handwritten Signature SVG - Maximal kompakt */
.signature-handwritten {
    width: 240px;
    height: 65px;
    margin-bottom: 6px;
}

.signature-handwritten svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.signature-line {
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #4a4a4a 20%, 
        #2c2c2c 50%, 
        #4a4a4a 80%, 
        transparent 100%);
    margin: 0 auto 5px auto;
}

.signature-name {
    margin: 0 0 3px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.signature-title {
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    color: #666666;
}

/* Badge Seal - Prominent Red Wax Seal */
.badge-seal {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding-left: 15px;
    margin-bottom: 100px;
    padding-bottom: 20px;
    padding-right: 20px;
    padding-top: 20px;
    overflow: visible;
}

.badge-seal svg {
    width: 200px;
    height: 200px;
    overflow: visible;
}

/* Print Button Container */
.print-button-container {
    margin-top: 30px;
    text-align: center;
}

.print-button {
    padding: 14px 36px;
    background: linear-gradient(135deg, #D4AF37 0%, #C8A865 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media screen and (max-width: 850px) {
    body {
        padding: 20px 10px;
    }
    
    .certificate-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
    }
    
    .certificate-content {
        padding: 50px 40px 40px 40px;
    }
    
    .certificate-title-section {
        margin-top: 80px;
    }
    
    .logo-container {
        top: 30px;
    }
    
    .certificate-logo {
        height: 70px;
    }
    
    .certificate-footer {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .date-location {
        text-align: center;
    }
    
    .signature-section {
        margin: 0 auto;
    }
    
    .badge-seal {
        justify-content: center;
    }
}

@media screen and (max-width: 600px) {
    .certificate-content {
        padding: 40px 30px 30px 30px;
    }
    
    .certificate-main-title {
        font-size: 42px;
    }
    
    .participant-name {
        font-size: 28px;
    }
    
    .topic-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .topic-content {
        text-align: center;
    }
}

/* Print Media - Optimiert für Druck */
@media print {
    body {
        background-color: #FFFFFF;
        padding: 0;
    }
    
    .certificate-container {
        width: 210mm;
        height: 297mm;
        box-shadow: none;
        margin: 0;
    }
    
    .certificate-frame {
        border-color: #C8A865;
        box-shadow: none;
    }
    
    .certificate-frame::before {
        border-color: #D4AF37;
        box-shadow: none;
    }
}
