/* =============================================================================
   cv.molnarg.com – online önéletrajz stíluslap
   Képernyőn: A4-szerű "lap" egy eszköztárral. Nyomtatáskor (Ctrl+P): tiszta A4,
   gombok és keretek nélkül, 2 oldalra tördelve.
   ============================================================================= */
:root {
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: #e6f5f3;
  --text: #1f2a2e;
  --muted: #5b6b6f;
  --line: #dbe5e3;
  --page-bg: #eef3f2;
  --sheet: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Nyelvváltás: csak az aktív nyelv látszik ---------- */
html[lang="hu"] .en,
html[lang="en"] .hu { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page-bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 0.4em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Eszköztár ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem max(1rem, calc((100vw - 210mm) / 2));
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tb-back { font-weight: 600; font-size: 0.95rem; }
.tb-right { display: flex; align-items: center; gap: 0.6rem; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.lang-switch button {
  border: 0; background: transparent; padding: 0.4rem 0.8rem; font: inherit; font-weight: 600;
  font-size: 0.88rem; color: var(--muted); cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.tb-print {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 10px; padding: 0.4rem 0.9rem; font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer; text-decoration: none;
}
.tb-print:hover { background: var(--accent-dark); }
.tb-print svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Lap ---------- */
.sheet {
  width: min(100% - 2rem, 210mm);
  margin: 1.5rem auto 3rem;
  padding: 14mm 14mm 10mm;
  background: var(--sheet);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 40px -18px rgba(15, 60, 55, .35);
  position: relative;
  overflow: hidden;
}
.sheet::before { /* a régi CV türkiz sávjára utaló díszítés */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--accent), #2dd4bf 60%, var(--accent));
}

/* ---------- Fejléc ---------- */
.cv-header { display: flex; align-items: center; gap: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--accent-soft); }
.photo {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover; flex: none;
  border: 4px solid var(--accent);
}
.head-text h1 { font-size: 2rem; font-weight: 800; letter-spacing: 0.01em; text-transform: uppercase; color: #2b3437; }
.title { color: var(--accent-dark); font-weight: 600; margin: 0.15rem 0 0.6rem; }
.contact { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.9rem; }
.contact li { display: inline-flex; align-items: center; gap: 0.4rem; }
.contact svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.contact a { color: var(--text); }

/* ---------- Blokkok ---------- */
.block { margin-top: 1.1rem; }
.block h2 {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-dark);
  margin-bottom: 0.6rem;
}
.block h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.profile p { color: #34413f; text-align: justify; hyphens: auto; }

.cols { display: grid; grid-template-columns: 1fr 62mm; gap: 8mm; }
.col-side .block:first-child { margin-top: 1.1rem; }

.entry { position: relative; padding-left: 1rem; margin-bottom: 0.8rem; break-inside: avoid; page-break-inside: avoid; }
.entry::before {
  content: ""; position: absolute; left: 0; top: 0.42rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.entry::after {
  content: ""; position: absolute; left: 3px; top: 1rem; bottom: -0.6rem; width: 1px; background: var(--line);
}
.entry:last-child::after { display: none; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.entry h3 { font-size: 1rem; font-weight: 700; color: #26302f; }
.date { flex: none; font-size: 0.82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.org { color: var(--accent-dark); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.entry ul { margin-top: 0.15rem; }
.entry ul li, .dots li { position: relative; padding-left: 0.95rem; font-size: 0.9rem; color: #34413f; }
.entry ul li::before, .dots li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.55em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.entry p { font-size: 0.9rem; color: #34413f; }

/* ---------- Oldalsáv ---------- */
.col-side h4, .sport h4 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
  margin: 0.6rem 0 0.35rem;
}
.col-side h4:first-of-type { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.chips li {
  font-size: 0.8rem; padding: 0.12rem 0.5rem; border-radius: 6px;
  background: var(--accent-soft); color: #1e4a45; border: 1px solid #cbe9e4;
}
.kv li { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.88rem; padding: 0.2rem 0; border-bottom: 1px dashed var(--line); }
.kv li:last-child { border-bottom: 0; }
.kv strong { font-weight: 600; }
.kv li > span { color: var(--muted); text-align: right; }
.awards li { font-size: 0.84rem; padding: 0.25rem 0 0.25rem 0.95rem; position: relative; color: #34413f; line-height: 1.4; }
.awards li::before { content: ""; position: absolute; left: 0.1rem; top: 0.68em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.awards b { color: var(--accent-dark); }

/* ---------- Sport ---------- */
.sport-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.sport h4:first-child { margin-top: 0; }
.sport p { font-size: 0.9rem; color: #34413f; }
.tl li { display: grid; grid-template-columns: 7.2rem 1fr; gap: 0.5rem; font-size: 0.88rem; padding: 0.15rem 0; color: #34413f; }
.tl .date { font-size: 0.8rem; }

.cv-footer { margin-top: 1.4rem; padding-top: 0.6rem; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); text-align: center; }

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .sheet { width: 100%; margin: 0; border-radius: 0; padding: 1.25rem 1rem 1.5rem; box-shadow: none; }
  .cv-header { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .photo { width: 92px; height: 92px; }
  .head-text h1 { font-size: 1.6rem; }
  .cols, .sport-grid { grid-template-columns: 1fr; gap: 0; }
  .profile p { text-align: left; }
  .toolbar { padding-inline: 1rem; }
  .tb-print span { display: none !important; }
  .entry-head { flex-direction: column; gap: 0; }
  .tl li { grid-template-columns: 1fr; gap: 0; padding: 0.3rem 0; }
  .tb-back { font-size: 0.85rem; }
}

/* =============================================================================
   NYOMTATÁS / PDF – Ctrl+P → "Mentés PDF-ként", A4, margók: alapértelmezett
   (a "Fejlécek és láblécek" opciót érdemes kikapcsolni a nyomtatási ablakban)
   ============================================================================= */
@page { size: A4; margin: 11mm 12mm; }

@media print {
  html, body { background: #fff !important; }
  body { font-size: 9.6pt; line-height: 1.38; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .toolbar { display: none !important; }
  .sheet {
    width: auto; margin: 0; padding: 0; box-shadow: none; border-radius: 0; overflow: visible;
  }
  .sheet::before { display: none; }
  a { color: inherit !important; text-decoration: none !important; }

  .cv-header { gap: 5mm; padding-bottom: 3mm; }
  .photo { width: 26mm; height: 26mm; border-width: 1mm; }
  .head-text h1 { font-size: 20pt; }
  .title { margin-bottom: 1.5mm; }
  .contact { font-size: 8.8pt; gap: 1mm 5mm; }
  .contact svg { width: 3.4mm; height: 3.4mm; }

  .block { margin-top: 3.2mm; }
  .block h2 { font-size: 9.5pt; margin-bottom: 1.8mm; }
  .cols { grid-template-columns: 1fr 55mm; gap: 6mm; }
  .entry { margin-bottom: 2.4mm; }
  .entry h3 { font-size: 10pt; }
  .entry ul li, .dots li, .entry p, .sport p { font-size: 9pt; }
  .date { font-size: 8.4pt; }
  .org { font-size: 9pt; margin-bottom: 0.6mm; }
  .chips li { font-size: 8pt; padding: 0.2mm 1.6mm; }
  .kv li, .awards li { font-size: 8.6pt; }
  .awards li { padding-top: 0.6mm; padding-bottom: 0.6mm; }
  .entry::before { width: 2mm; height: 2mm; top: 1.3mm; }
  .entry ul li::before, .dots li::before, .awards li::before { width: 1.5mm; height: 1.5mm; }

  /* A sport szekció a 2. oldalon folytatódik (nincs kényszerített törés) */
  .sport { margin-top: 5mm; }
  .sport-grid { grid-template-columns: 1fr 1fr; gap: 8mm; }
  .tl li { grid-template-columns: 26mm 1fr; font-size: 8.8pt; }

  .entry, .col-side .block, .sport-grid > div { break-inside: avoid; page-break-inside: avoid; }
  h2, h3, h4 { break-after: avoid; page-break-after: avoid; }
  .cv-footer { font-size: 7.5pt; margin-top: 6mm; }
}
