/* =====================================================
   RocxCV — Resume Template Styles
   Print-ready A4 format, 3 templates
   ===================================================== */

/* ── Shared resume wrapper ── */
.resume-paper {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  border-radius: 4px;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #1a1a1a;
  font-size: 9.5pt;
  line-height: 1.5;
  position: relative;
  transform-origin: top center;
}
@media (max-width: 900px) {
  .resume-paper { width: 100%; min-height: auto; transform: none !important; }
}

.resume-section-title {
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-bottom: 3px;
}
.resume-entry { margin-bottom: 10px; }
.resume-entry-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.resume-entry-title { font-weight: 700; font-size: 9.5pt; }
.resume-entry-sub   { font-size: 8.5pt; opacity: .75; }
.resume-entry-date  { font-size: 8pt; opacity: .6; white-space: nowrap; flex-shrink: 0; }
.resume-entry-desc  { font-size: 8.5pt; margin-top: 3px; opacity: .85; line-height: 1.5; }
.resume-skill-tag   { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 7.5pt; font-weight: 600; margin: 2px; }
.resume-bullet      { padding-left: 12px; position: relative; }
.resume-bullet::before { content: '•'; position: absolute; left: 0; }

/* ══════════════════════════════════════════════════════
   TEMPLATE 1: MODERN (purple sidebar)
   ══════════════════════════════════════════════════════ */
.tpl-modern { display: grid; grid-template-columns: 65mm 1fr; }

.tpl-modern .sidebar {
  padding: 24px 16px;
  color: #fff;
  min-height: 297mm;
}
.tpl-modern .main-col { padding: 28px 22px; }

/* Photo */
.tpl-modern .photo-wrap {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.5);
  overflow: hidden;
  margin: 0 auto 14px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800;
}
.tpl-modern .name { font-size: 22pt; font-weight: 800; text-align: center; line-height: 1.2; margin-bottom: 3px; }
.tpl-modern .title-role { text-align: center; font-size: 9pt; opacity: .8; margin-bottom: 18px; }

.tpl-modern .sidebar-section { margin-bottom: 16px; }
.tpl-modern .sidebar-section-title {
  font-size: 7.5pt; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  opacity: .7; margin-bottom: 6px; padding-bottom: 3px; border-bottom: 1px solid rgba(255,255,255,.25);
}
.tpl-modern .contact-item { display: flex; align-items: center; gap: 6px; font-size: 8pt; margin-bottom: 5px; opacity: .9; word-break: break-all; }
.tpl-modern .skill-bar-wrap { margin-bottom: 6px; }
.tpl-modern .skill-bar-label { font-size: 8pt; margin-bottom: 2px; opacity: .9; }
.tpl-modern .skill-bar-track { height: 4px; background: rgba(255,255,255,.25); border-radius: 2px; }
.tpl-modern .skill-bar-fill  { height: 100%; background: rgba(255,255,255,.85); border-radius: 2px; }
.tpl-modern .lang-item { display: flex; justify-content: space-between; font-size: 8pt; margin-bottom: 4px; opacity: .9; }

.tpl-modern .resume-section-title { border-bottom: 2px solid; padding-bottom: 4px; }
.tpl-modern .main-name-mobile { display: none; }

/* ══════════════════════════════════════════════════════
   TEMPLATE 2: CLASSIC (top header, clean)
   ══════════════════════════════════════════════════════ */
.tpl-classic { padding: 0; }

.tpl-classic .header-band {
  padding: 24px 28px 20px;
  border-bottom: 3px solid;
}
.tpl-classic .name { font-size: 24pt; font-weight: 800; letter-spacing: -.01em; }
.tpl-classic .title-role { font-size: 10pt; margin-top: 2px; opacity: .7; }
.tpl-classic .contact-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 10px; font-size: 8pt; opacity: .8;
}
.tpl-classic .contact-row span { display: flex; align-items: center; gap: 4px; }

.tpl-classic .body-grid { display: grid; grid-template-columns: 1fr 52mm; gap: 0; }
.tpl-classic .main-col  { padding: 20px 20px 20px 28px; }
.tpl-classic .side-col  { padding: 20px 16px 20px 12px; border-left: 1px solid #e5e7eb; }
.tpl-classic .resume-section-title { border-bottom: 1.5px solid; padding-bottom: 3px; }

.tpl-classic .skill-chip {
  display: inline-block; padding: 2px 9px;
  border: 1px solid; border-radius: 4px;
  font-size: 7.5pt; font-weight: 600; margin: 2px;
}

/* ══════════════════════════════════════════════════════
   TEMPLATE 3: MINIMAL (pure white, typography-first)
   ══════════════════════════════════════════════════════ */
.tpl-minimal { padding: 36px 40px; }

.tpl-minimal .name {
  font-size: 26pt; font-weight: 800; letter-spacing: -.02em;
  line-height: 1.1; margin-bottom: 4px;
}
.tpl-minimal .title-role { font-size: 11pt; font-weight: 400; opacity: .55; margin-bottom: 12px; }
.tpl-minimal .contact-row {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 7.5pt; color: #666; margin-bottom: 24px;
  padding-bottom: 14px; border-bottom: 1px solid #e5e7eb;
}
.tpl-minimal .contact-row span { display: flex; align-items: center; gap: 4px; }
.tpl-minimal .resume-section-title { font-size: 7.5pt; letter-spacing: .14em; color: #888; margin-bottom: 8px; }
.tpl-minimal .resume-section { margin-bottom: 20px; }
.tpl-minimal .entry-grid { display: grid; grid-template-columns: 24mm 1fr; gap: 8px; margin-bottom: 10px; }
.tpl-minimal .entry-date { font-size: 7.5pt; color: #999; padding-top: 1px; line-height: 1.4; }
.tpl-minimal .skill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-minimal .skill-item { font-size: 8pt; background: #f3f4f6; padding: 2px 9px; border-radius: 4px; }

/* ══════════════════════════════════════════════════════
   PRINT STYLES — clean A4 output
   ══════════════════════════════════════════════════════ */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { margin: 0 !important; background: #fff !important; }
  .resume-paper {
    width: 210mm !important;
    min-height: 297mm !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    page-break-after: always;
    transform: none !important;
  }
  .no-print, .builder-form, .builder-toolbar, .navbar, .footer { display: none !important; }
  .builder-preview { padding: 0 !important; background: #fff !important; }
}

/* ══════════════════════════════════════════════════════
   Template gallery cards (public /templates page)
   ══════════════════════════════════════════════════════ */
.tpl-gallery-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .2s ease;
  cursor: pointer;
  background: var(--bg);
}
.tpl-gallery-card:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(124,58,237,.2); transform: translateY(-3px); }
.tpl-gallery-preview {
  height: 280px;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
}
.tpl-gallery-preview .resume-paper { transform: scale(0.38); transform-origin: top center; pointer-events: none; }
.tpl-gallery-label { padding: 1rem; border-top: 1px solid var(--border); }
.tpl-gallery-label h3 { font-size: .95rem; margin-bottom: .2rem; }
.tpl-gallery-label p  { font-size: .8rem; color: var(--text-muted); margin: 0; }
