/* =========================================================
   RESUMECRAFT - ACTUAL TEMPLATE LAYOUTS
   These styles work with the existing builder.html preview DOM.
   Each template changes layout, spacing, typography and hierarchy.
========================================================= */

.resume-template-wrapper { width: 100%; display: block; }
.resume-template-wrapper .resume-page {
    position: relative;
    width: 100%;
    min-height: 555px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: #fff;
    color: #1f2937;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}
.resume-template-wrapper .resume-header,
.resume-template-wrapper .resume-section,
.resume-template-wrapper .resume-divider { box-sizing: border-box; }
.resume-template-wrapper .resume-heading { min-width: 0; }
.resume-template-wrapper .resume-heading h1 { margin: 0; line-height: 1.12; word-break: break-word; }
.resume-template-wrapper .resume-heading h2 { margin: 4px 0 0; line-height: 1.3; word-break: break-word; }
.resume-template-wrapper .resume-contact { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 7px; }
.resume-template-wrapper .resume-contact span { font-size: 8px; color: #667085; word-break: break-word; }
.resume-template-wrapper .preview-links { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 5px; }
.resume-template-wrapper .preview-links a { font-size: 8px; color: #2563eb; text-decoration: none; }
.resume-template-wrapper .resume-photo { overflow: hidden; border-radius: 50%; background: #f2f4f7; display: flex; align-items: center; justify-content: center; }
.resume-template-wrapper .resume-photo img { width: 100%; height: 100%; object-fit: cover; display: none; }
.resume-template-wrapper .resume-photo span { font-size: 22px; }
.resume-template-wrapper .resume-section { break-inside: avoid; }
.resume-template-wrapper .resume-section-title { margin: 0 0 9px; font-size: 9.5px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.resume-template-wrapper .resume-section p { margin: 0; font-size: 8.5px; line-height: 1.55; color: #475467; }
.resume-template-wrapper .experience-preview-item,
.resume-template-wrapper .education-preview-item { margin-bottom: 12px; }
.resume-template-wrapper .experience-preview-item h4,
.resume-template-wrapper .education-preview-item h4 { margin: 0; font-size: 9.5px; color: #111827; }
.resume-template-wrapper .experience-preview-item .company,
.resume-template-wrapper .education-preview-item .institution { margin-top: 2px; font-size: 8px; color: #475467; }
.resume-template-wrapper .experience-preview-item .date,
.resume-template-wrapper .education-preview-item .date { margin-top: 2px; font-size: 7.5px; color: #667085; }
.resume-template-wrapper .experience-preview-item p,
.resume-template-wrapper .education-preview-item p { margin-top: 4px; }
.resume-template-wrapper .preview-skills { display: flex; flex-wrap: wrap; gap: 5px; }
.resume-template-wrapper .preview-skills span { display: inline-block; padding: 3px 7px; border: 1px solid #d0d5dd; border-radius: 4px; font-size: 7.5px; color: #344054; background: #f8fafc; }

/* ===================== CLASSIC ===================== */
.template-classic .resume-page { padding: 32px 34px 36px; border-top: 6px solid #1f2937; }
.template-classic .resume-header { text-align: center; padding-bottom: 18px; }
.template-classic .resume-photo { width: 62px; height: 62px; margin: 0 auto 9px; }
.template-classic .resume-heading h1 { font-family: Georgia, serif; font-size: 25px; font-weight: 700; }
.template-classic .resume-heading h2 { font-family: Georgia, serif; color: #4b5563; font-size: 11px; }
.template-classic .resume-contact, .template-classic .preview-links { justify-content: center; }
.template-classic .resume-divider { width: 75%; height: 1px; margin: 0 auto 18px; background: #9ca3af; }
.template-classic .resume-section { margin: 0 0 19px; }
.template-classic .resume-section-title { text-align: center; font-family: Georgia, serif; color: #1f2937; border-bottom: 1px solid #d1d5db; padding-bottom: 5px; }

/* ===================== MODERN ===================== */
.template-modern .resume-page { display: grid; grid-template-columns: 112px minmax(0,1fr); grid-template-rows: auto 1fr; background: linear-gradient(to right,#123b45 0 112px,#fff 112px 100%); }
.template-modern .resume-header { grid-column: 1 / -1; display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 17px; align-items: center; padding: 25px 22px 22px 12px; background: #fff; border-top: 7px solid #0f766e; border-bottom: 1px solid #d0d5dd; }
.template-modern .resume-photo { width: 70px; height: 70px; justify-self: center; }
.template-modern .resume-heading h1 { font-size: 24px; color: #101828; }
.template-modern .resume-heading h2 { color: #0f766e; }
.template-modern .resume-contact { position: absolute; left: 10px; top: 124px; width: 92px; flex-direction: column; gap: 7px; margin: 0; }
.template-modern .resume-contact span, .template-modern .preview-links a { color: #fff; font-size: 7px; }
.template-modern .preview-links { position: absolute; left: 10px; top: 218px; width: 92px; flex-direction: column; }
.template-modern .resume-divider { display: none; }
.template-modern .resume-summary, .template-modern .resume-experience, .template-modern .resume-education { grid-column: 2; margin: 0; padding: 16px 22px; }
.template-modern .resume-skills { grid-column: 1; margin: 0; padding: 16px 10px; color: #fff; align-self: start; }
.template-modern .resume-skills .resume-section-title { color: #fff; border-bottom-color: rgba(255,255,255,.3); }
.template-modern .resume-skills .preview-skills { flex-direction: column; }
.template-modern .resume-skills .preview-skills span { color: #fff; background: transparent; border-color: rgba(255,255,255,.35); }
.template-modern .resume-section-title { color: #0f766e; border-bottom: 1px solid #dbe4e7; padding-bottom: 5px; }

/* ===================== MINIMAL ===================== */
.template-minimal .resume-page { padding: 38px 35px 36px; }
.template-minimal .resume-header { padding-bottom: 20px; border-bottom: 1px solid #e5e7eb; }
.template-minimal .resume-photo { display: none; }
.template-minimal .resume-heading h1 { font-size: 27px; font-weight: 500; letter-spacing: -.5px; }
.template-minimal .resume-heading h2 { color: #667085; font-size: 11px; }
.template-minimal .resume-section { margin: 20px 0; }
.template-minimal .resume-section-title { color: #344054; border-bottom: 1px solid #e5e7eb; padding-bottom: 5px; }

/* ===================== EXECUTIVE ===================== */
.template-executive .resume-page { padding: 0 34px 36px; border-top: 9px solid #111827; }
.template-executive .resume-header { text-align: center; padding: 28px 0 19px; border-bottom: 3px double #111827; }
.template-executive .resume-photo { display: none; }
.template-executive .resume-heading h1 { font-size: 27px; text-transform: uppercase; letter-spacing: 1px; }
.template-executive .resume-heading h2 { color: #344054; text-transform: uppercase; letter-spacing: 1.3px; font-size: 10px; }
.template-executive .resume-contact, .template-executive .preview-links { justify-content: center; }
.template-executive .resume-section { margin: 18px 0; }
.template-executive .resume-section-title { background: #111827; color: #fff; padding: 6px 8px; }

/* ===================== PROFESSIONAL ===================== */
.template-professional .resume-page { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,.85fr); column-gap: 22px; padding: 0 30px 35px; }
.template-professional .resume-header { grid-column: 1 / -1; padding: 27px 0 17px; border-bottom: 4px solid #2563eb; }
.template-professional .resume-photo { display: none; }
.template-professional .resume-heading h1 { font-size: 25px; }
.template-professional .resume-heading h2 { color: #2563eb; }
.template-professional .resume-summary, .template-professional .resume-experience { grid-column: 1; margin: 18px 0 0; }
.template-professional .resume-education, .template-professional .resume-skills { grid-column: 2; margin: 18px 0 0; }
.template-professional .resume-section-title { color: #2563eb; border-bottom: 1px solid #dbe3ef; padding-bottom: 5px; }

/* ===================== ELEGANT ===================== */
.template-elegant .resume-page { padding: 40px 38px 36px; background: #fffdfa; color: #292929; }
.template-elegant .resume-header { text-align: center; padding-bottom: 18px; }
.template-elegant .resume-photo { display: none; }
.template-elegant .resume-heading h1 { font-family: Georgia,serif; font-size: 28px; font-weight: 500; }
.template-elegant .resume-heading h2 { font-family: Georgia,serif; color: #6b625a; font-weight: 400; }
.template-elegant .resume-contact, .template-elegant .preview-links { justify-content: center; }
.template-elegant .resume-divider { width: 70px; height: 1px; margin: 0 auto 20px; background: #8b8178; }
.template-elegant .resume-section { margin-bottom: 20px; }
.template-elegant .resume-section-title { font-family: Georgia,serif; text-align: center; color: #514942; border-bottom: 1px solid #ded8d1; padding-bottom: 5px; }

/* ===================== CREATIVE ===================== */
.template-creative .resume-page { display: grid; grid-template-columns: 108px minmax(0,1fr); background: linear-gradient(to right,#4c1d95 0 108px,#fff 108px 100%); }
.template-creative .resume-header { grid-column: 1 / -1; display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 17px; align-items: center; padding: 25px 22px 22px 10px; background: #6d28d9; color: #fff; }
.template-creative .resume-photo { width: 68px; height: 68px; justify-self: center; background: rgba(255,255,255,.18); }
.template-creative .resume-heading h1, .template-creative .resume-heading h2 { color: #fff; }
.template-creative .resume-heading h1 { font-size: 24px; }
.template-creative .resume-contact { position: absolute; left: 9px; top: 122px; width: 90px; flex-direction: column; gap: 7px; }
.template-creative .resume-contact span, .template-creative .preview-links a { color: #fff; font-size: 7px; }
.template-creative .preview-links { position: absolute; left: 9px; top: 218px; width: 90px; flex-direction: column; }
.template-creative .resume-divider { display: none; }
.template-creative .resume-summary, .template-creative .resume-experience, .template-creative .resume-education { grid-column: 2; margin: 0; padding: 16px 23px; }
.template-creative .resume-skills { grid-column: 1; margin: 0; padding: 16px 9px; color: #fff; }
.template-creative .resume-skills .resume-section-title { color: #fff; border-bottom-color: rgba(255,255,255,.35); }
.template-creative .resume-skills .preview-skills { flex-direction: column; }
.template-creative .resume-skills .preview-skills span { color: #fff; background: transparent; border-color: rgba(255,255,255,.35); }
.template-creative .resume-section-title { color: #6d28d9; border-left: 3px solid #6d28d9; padding-left: 7px; border-bottom: 1px solid #eee; padding-bottom: 5px; }

/* ===================== CORPORATE ===================== */
.template-corporate .resume-page { padding: 0 32px 36px; border-left: 7px solid #1f2937; }
.template-corporate .resume-header { padding: 28px 0 19px; border-bottom: 1px solid #d1d5db; }
.template-corporate .resume-photo { display: none; }
.template-corporate .resume-heading h1 { font-size: 26px; text-transform: uppercase; letter-spacing: .6px; }
.template-corporate .resume-heading h2 { color: #374151; text-transform: uppercase; letter-spacing: 1px; }
.template-corporate .resume-section { margin: 19px 0; }
.template-corporate .resume-section-title { color: #1f2937; border-bottom: 2px solid #2563eb; padding-bottom: 5px; }

/* ===================== COMPACT ===================== */
.template-compact .resume-page { padding: 22px 27px 28px; }
.template-compact .resume-header { text-align: center; padding-bottom: 12px; border-bottom: 1px solid #d1d5db; }
.template-compact .resume-photo { display: none; }
.template-compact .resume-heading h1 { font-size: 22px; }
.template-compact .resume-heading h2 { font-size: 10px; color: #2563eb; }
.template-compact .resume-contact, .template-compact .preview-links { justify-content: center; margin-top: 4px; }
.template-compact .resume-contact span, .template-compact .preview-links a { font-size: 7px; }
.template-compact .resume-section { margin: 11px 0; }
.template-compact .resume-section-title { font-size: 8.5px; color: #2563eb; border-bottom: 1px solid #e5e7eb; padding-bottom: 3px; margin-bottom: 5px; }
.template-compact .resume-section p { font-size: 7.8px; }

/* ===================== ATS ===================== */
.template-ats .resume-page { padding: 28px 32px 34px; font-family: Arial,Helvetica,sans-serif; color: #111; }
.template-ats .resume-header { padding-bottom: 13px; border-bottom: 2px solid #111; }
.template-ats .resume-photo { display: none; }
.template-ats .resume-heading h1 { font-size: 24px; color: #111; }
.template-ats .resume-heading h2 { color: #111; }
.template-ats .resume-contact, .template-ats .preview-links { justify-content: flex-start; }
.template-ats .preview-links a { color: #111; }
.template-ats .resume-section { margin: 17px 0; }
.template-ats .resume-section-title { color: #111; border-bottom: 1px solid #111; padding-bottom: 4px; }
.template-ats .preview-skills span { background: none; border: 0; padding: 0; margin-right: 10px; font-weight: 400; }
.template-ats .preview-skills span::after { content: ","; }
.template-ats .preview-skills span:last-child::after { content: ""; }

/* Print */
@media print {
    .resume-template-wrapper .resume-page { box-shadow: none !important; border-radius: 0 !important; }
}
