/* S2S Website CMS V9.6.5 — CV template stability and content-flow hotfix
   Keeps every A4 template inside its own grid, wraps hostile/long text safely,
   and prevents decorative sidebars/photos from colliding with real CV data. */

.cv-paper{
  box-sizing:border-box;
  overflow:hidden;
  position:relative;
  contain:layout paint;
}
.cv-paper>*,
.cv-paper main,
.cv-paper aside,
.cv-paper header,
.cv-paper section,
.cv-paper .entry,
.cv-paper .entry-head,
.cv-paper .entry-head>*{
  min-width:0;
  max-width:100%;
}
.cv-paper .cv-name,
.cv-paper .cv-role,
.cv-paper .section-title,
.cv-paper .body-text,
.cv-paper .contact-line,
.cv-paper .entry-title,
.cv-paper .entry-meta,
.cv-paper .skill,
.cv-paper .skill b,
.cv-paper .simple-list,
.cv-paper .bullet-list{
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}
.cv-paper .body-text{white-space:pre-wrap}
.cv-paper .contact-line{white-space:normal;line-height:1.45}
.cv-paper .entry-head{flex-wrap:wrap;align-items:flex-start;row-gap:2px}
.cv-paper .entry-head>.entry-meta{margin-left:auto;max-width:46%;text-align:right}
.cv-paper .skillbar{width:100%;max-width:100%;overflow:hidden}
.cv-paper section{margin-bottom:7mm}
.cv-paper .section-title{margin-bottom:7px}
.cv-paper .entry{margin-bottom:9px}

/* Every template uses minmax(0,...) so long words/URLs can never widen A4. */
.template-modern{grid-template-columns:62mm minmax(0,1fr)!important;align-items:stretch}
.template-modern .sidecol{padding:16mm 8mm 13mm!important;overflow:hidden}
.template-modern .maincol{padding:15mm 13mm!important}
.template-modern .main-head{margin-bottom:9mm!important}

.template-classic{padding:14mm 15mm!important}
.template-classic .classic-head{padding-bottom:7mm!important;margin-bottom:7mm!important}
.template-classic .classic-body{grid-template-columns:minmax(0,1fr) 52mm!important;gap:10mm!important}
.template-classic .rightcol{padding-left:6mm!important}
.template-classic .classic-contact{max-width:165mm;margin-inline:auto}

.template-minimal{padding:15mm 16mm!important}
.template-minimal .minimal-head{gap:8mm!important;margin-bottom:9mm!important}
.template-minimal .minimal-head>*{min-width:0}
.template-minimal .minimal-grid{grid-template-columns:minmax(0,1.16fr) minmax(0,.84fr)!important;gap:11mm!important}

.template-executive .exec-head{grid-template-columns:minmax(0,1fr) auto!important;padding:13mm 15mm 10mm!important;gap:8mm!important}
.template-executive .exec-body{grid-template-columns:minmax(0,1fr) 54mm!important;padding:11mm 15mm 14mm!important;gap:11mm!important}
.template-executive .exec-head .contact-line{display:inline-block;margin-right:8px;max-width:100%;vertical-align:top}

.template-teal_gold{grid-template-columns:57mm minmax(0,1fr)!important;padding-top:48mm!important;align-items:stretch}
.template-teal_gold .tg-head{grid-template-columns:34mm minmax(0,1fr)!important;right:12mm!important;gap:8mm!important}
.template-teal_gold .tg-head .cv-name{font-size:24px!important;letter-spacing:.08em!important}
.template-teal_gold .tg-side{padding:16mm 7mm 12mm!important;overflow:hidden}
.template-teal_gold .tg-main{padding:9mm 12mm 14mm!important}

.template-charcoal_pro{grid-template-columns:58mm minmax(0,1fr)!important;align-items:stretch}
.template-charcoal_pro .cp-side{padding:11mm 7mm 13mm!important;overflow:hidden}
.template-charcoal_pro .cp-main{padding:14mm 13mm!important}
.template-charcoal_pro .side-name{margin-bottom:9mm!important}

.template-gold_geometry{grid-template-columns:60mm minmax(0,1fr)!important;align-items:stretch}
/* Photo occupies roughly 12–45mm; content must begin below it, never behind it. */
.template-gold_geometry .gg-side{padding:52mm 7mm 12mm!important;overflow:hidden;z-index:1}
.template-gold_geometry .gg-side .cv-photo-frame{top:10mm!important;left:13mm!important;width:34mm!important;height:34mm!important}
.template-gold_geometry .gg-main{padding:13mm 12mm 15mm!important;overflow:hidden}
.template-gold_geometry .gg-name{margin-bottom:9mm!important}
.template-gold_geometry .gg-main .section-title{padding-left:6mm!important}

.template-navy_manager{grid-template-columns:55mm minmax(0,1fr)!important;align-items:stretch}
.template-navy_manager .nm-side{padding:10mm 7mm 13mm!important;overflow:hidden}
.template-navy_manager .nm-main{padding:14mm 12mm!important;overflow:hidden}

.template-navy_curve{grid-template-columns:62mm minmax(0,1fr)!important;align-items:stretch}
.template-navy_curve .nc-side{padding:12mm 7mm 13mm!important;overflow:hidden;position:relative}
.template-navy_curve .nc-main{padding:14mm 12mm!important;overflow:hidden}
.template-navy_curve .nc-side .cv-photo-frame{margin-bottom:18mm!important}
.template-navy_curve .nc-name{margin-bottom:8mm!important}

/* Sidebars are narrow by design: reduce only their detail text, never the main CV. */
.template-modern .sidecol .contact-line,
.template-teal_gold .tg-side .contact-line,
.template-charcoal_pro .cp-side .contact-line,
.template-gold_geometry .gg-side .contact-line,
.template-navy_manager .nm-side .contact-line,
.template-navy_curve .nc-side .contact-line{font-size:8.7px!important}

/* Export/print uses the exact same resilient layout as the live preview. */
.cv-export-surface .cv-paper{overflow:hidden!important}
@media print{
  .cv-paper{overflow:hidden!important;contain:none!important}
}
