/* ====================================
   Certificate Generator - Complete Styling
   ==================================== */

/* Tool Page Common Styles */
.tool-page {
    padding-top: 0;
}

.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    transition: all 0.3s;
}

.breadcrumb a:hover {
    color: #f59e0b;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ddd;
}

.breadcrumb .current {
    color: #333;
    font-weight: 600;
}

.tool-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '🎓📜';
    position: absolute;
    font-size: 300px;
    opacity: 0.05;
    top: -50px;
    right: -50px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tool-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tool-icon-large {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tool-header h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tool-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 16px;
}

.meta-separator {
    opacity: 0.5;
}

.tool-content {
    padding: 60px 20px;
    background: #f8f9fa;
}

/* Generator Root */
.generator-root {
    max-width: 1400px;
    margin: 0 auto;
}

/* Template Section */
.template-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.template-section h3 {
    color: #f59e0b;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.template-card {
    cursor: pointer;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
    background: white;
}

.template-card:hover {
    border-color: #f59e0b;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
}

.template-card.active {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.template-preview {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-weight: 700;
    color: #1f2937;
}

.classic-preview {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.classic-preview .preview-border {
    position: absolute;
    inset: 10px;
    border: 3px double #92400e;
}

.modern-preview {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.modern-preview .preview-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #3b82f6;
}

.elegant-preview {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.elegant-preview .preview-ornament {
    position: absolute;
    top: 10px;
    font-size: 32px;
    color: #7c3aed;
}

.professional-preview {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.professional-preview .preview-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: #1f2937;
}

.achievement-preview {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.achievement-preview .preview-star {
    position: absolute;
    top: 10px;
    font-size: 36px;
}

.diploma-preview {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.diploma-preview .preview-seal {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 28px;
}

.template-name {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

/* Generator Layout */
.generator-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Customization Panel */
.customization-panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.customization-panel h3 {
    color: #f59e0b;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.custom-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
}

.label-icon {
    font-size: 16px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.form-textarea {
    resize: vertical;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-btn {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #1f2937;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 15px;
    border-top: 2px dashed #e5e7eb;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s;
}

.preset-btn span {
    font-size: 20px;
}

.preset-btn:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

/* Preview Panel */
.preview-panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.preview-panel h3 {
    color: #f59e0b;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.certificate-preview {
    background: #f9fafb;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Certificate Canvas */
.certificate-canvas {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 1.414;
    background: white;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    padding: 60px;
    position: relative;
    font-family: 'Georgia', serif;
}

/* Classic Template */
.certificate-canvas.classic {
    border: 20px double;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
}

.certificate-canvas.classic .cert-border {
    position: absolute;
    inset: 30px;
    border: 3px double;
    pointer-events: none;
}

/* Modern Template */
.certificate-canvas.modern {
    border-top: 30px solid;
}

.certificate-canvas.modern::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
}

/* Elegant Template */
.certificate-canvas.elegant {
    border: 1px solid #d1d5db;
    background: #ffffff;
}

.certificate-canvas.elegant .cert-ornament {
    position: absolute;
    font-size: 60px;
    opacity: 0.2;
}

.certificate-canvas.elegant .cert-ornament.top-left {
    top: 20px;
    left: 20px;
}

.certificate-canvas.elegant .cert-ornament.top-right {
    top: 20px;
    right: 20px;
}

/* Professional Template */
.certificate-canvas.professional {
    background: #ffffff;
    border: 2px solid #e5e7eb;
}

.certificate-canvas.professional .cert-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

/* Achievement Template */
.certificate-canvas.achievement {
    background: linear-gradient(135deg, #fefce8 0%, #fde68a 100%);
    border: 5px solid;
}

.certificate-canvas.achievement .cert-star {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 80px;
}

/* Diploma Template */
.certificate-canvas.diploma {
    background: #ffffff;
    border: 15px solid;
}

.certificate-canvas.diploma .cert-seal {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border: 5px solid;
}

/* Certificate Content */
.cert-content {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
}

.cert-title {
    font-size: 48px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.cert-subtitle {
    font-size: 18px;
    font-style: italic;
    opacity: 0.8;
}

.cert-recipient {
    font-size: 56px;
    font-weight: 700;
    margin: 20px 0;
    font-family: 'Brush Script MT', cursive;
}

.cert-achievement {
    font-size: 20px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.cert-description {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto;
}

.cert-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 30px;
    border-top: 2px solid currentColor;
}

.cert-date,
.cert-issuer,
.cert-signature {
    text-align: center;
}

.cert-date strong,
.cert-issuer strong,
.cert-signature strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    margin-top: 8px;
    opacity: 0.6;
}

.cert-signature-line {
    width: 200px;
    height: 2px;
    background: currentColor;
    margin-bottom: 5px;
}

/* Download Buttons */
.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn {
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 5px solid #3b82f6;
    padding: 30px;
    border-radius: 15px;
}

.info-box h4 {
    color: #1e40af;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.7;
    font-size: 14px;
    color: #555;
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.info-item strong {
    color: #1e40af;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* SEO Content Section */
.seo-content {
    padding: 80px 20px;
    background: white;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.content-article strong {
    color: #333;
    font-weight: 700;
}

/* Related Tools */
.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
}

.related-tools h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    color: #f59e0b;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #f59e0b;
}

.related-tool-card .tool-icon {
    font-size: 42px;
}

.related-tool-card .tool-name {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    font-size: 15px;
    font-weight: 600;
    z-index: 10000;
    animation: slideInUp 0.3s ease-out;
}

.notification-toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .generator-layout {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 1024px) {
    .generator-layout {
        grid-template-columns: 1fr;
    }
    
    .customization-panel {
        position: relative;
        top: 0;
    }
    
    .certificate-canvas {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 32px;
    }
    
    .tool-subtitle {
        font-size: 16px;
    }
    
    .tool-icon-large {
        font-size: 52px;
    }
    
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certificate-canvas {
        padding: 30px;
        font-size: 14px;
    }
    
    .cert-title {
        font-size: 32px;
    }
    
    .cert-recipient {
        font-size: 36px;
    }
    
    .cert-achievement {
        font-size: 16px;
    }
    
    .download-buttons {
        grid-template-columns: 1fr;
    }
    
    .content-article h2 {
        font-size: 26px;
    }
}

@media (max-width: 520px) {
    .tool-header {
        padding: 40px 20px;
    }
    
    .tool-header h1 {
        font-size: 28px;
    }
    
    .tool-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .meta-separator {
        display: none;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .certificate-canvas {
        padding: 20px;
    }
    
    .cert-footer {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .notification-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        font-size: 14px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}