:root {
  --bg: #FFFFFF;
  --bg-soft: #F5F7FA; 
  --ink: #0B0C0E;
  --ink-soft: #5B616B;
  --line: rgba(11, 12, 14, 0.10);
  --accent: #1CA8EB;
  --accent-blue: #2490FD;
  --accent-hover: #1796d4;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF0FF;
  --surface: #FFFFFF;
  --surface-2: #F2F4F7;
  --green: #12B76A;
  --green-soft: #E7F9F1;
  --red: #F04438;
  --red-soft: #FEECEB;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-top: 100px;
  line-height: 1.5;
}

::selection {
  background: var(--accent-blue);
  color: #ffffff;
}

.hidden {
  display: none !important;
}

/* ---------- TIPOGRÁFIA ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'League Gothic', cursive, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

p {
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--ink);
}

.hero-inner p {
  color: var(--ink-soft);
}

/* ---------- KONTÉNER ---------- */
.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 20px 100px;
}

/* ---------- HEADER & NAV ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 100px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

/* Amikor a modal nyitva van, a header semmilyen körülmények között nem látszódhat */
body.modal-open header {
  display: none !important;
}

.logo-mark img {
  height: 38px;
  width: auto;
  display: block;
  transition: transform 0.2s ease;
}

.logo-mark img:hover {
  transform: scale(1.02);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
}

nav ul li {
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

nav ul li a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
  text-transform: uppercase;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.2s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--accent);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* ---------- HAMBURGER MENU ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- GLOBÁLIS GOMBOK ---------- */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-blue);
  color: #ffffff;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(36, 144, 253, 0.3);
  transition: all 0.2s ease;
  text-align: center;
}

.cta-button:hover {
  background-color: #1a78d6;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(36, 144, 253, 0.4);
}

.btn-secondary {
  background-color: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #e2e6ea;
}

/* ---------- HERO & INFO SECTIONS ---------- */
section.hero {
  background: transparent;
  padding: 40px 20px 10px;
}

.hero-inner, .info-inner, .mode-inner {
  max-width: 920px;
  margin: 0 auto;
}

.hero-inner span {
  color: var(--accent-blue);
}

.info-section, .mode-section {
  padding: 20px 20px 10px;
}

.info-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.info-grid {
  margin-top: 15px; 
  display: flex; 
  flex-direction: column; 
  gap: 12px;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.info-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.info-card .tag {
  font-size: 13px;
  letter-spacing: .08em;
  background: var(--accent-soft);
  color: var(--accent-blue);
  border-radius: 5px;
  padding: 2px 7px;
  margin-right: 6px;
}

.info-card p {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.info-subgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

.info-subgrid div {
  background: var(--bg); 
  border: 1px solid var(--line);  
  border-radius: 12px;
  padding: 14px;
}

.info-highlight {
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.contact-card {
  text-align: center;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  background: #25D366;
  border: 1px solid #25D366;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 16px;
  transition: opacity 0.2s;
}

.whatsapp-btn:hover {
  opacity: .9;
}

/* ---------- MODE SELECTOR (OPȚIUNEA A / B) ---------- */
.mode-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 50px;
}

.mode-card {
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  cursor: pointer;
  transition: border-color .15s, transform .1s, background .15s;
  position: relative;
}

.mode-card:hover {
  border-color: #c7d3f5;
}

.mode-card.active {
  border-color: var(--accent-blue);
  background: var(--accent-soft);
}

.mode-card .check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #ffffff;
}

.mode-card.active .check {
  border-color: var(--accent-blue);
  background: var(--accent-blue) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'><path d='M7.5 13.5L4 10l-1.4 1.4L7.5 16.3 17.4 6.4 16 5z'/></svg>") no-repeat center;
  background-size: 13px;
}

.mode-card .tag2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 8px;
  display: block;
}

.mode-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

.note {
  font-size: 12px; 
  color: var(--accent); 
  font-weight: bold;
  display: block;
  margin-top: 4px;
}

/* ---------- STEPPER ROUTE ---------- */
.route {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 18px;
  margin-top: 24px;
}

.stop-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stop-rail .line {
  position: absolute;
  top: 14px;
  bottom: -14px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--line);
}

.stop-rail:last-child .line {
  display: none;
}

.stop-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  z-index: 1;
  transition: all .25s ease;
  flex-shrink: 0;
}

.stop-marker.done {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
}

section.stop {
  padding-bottom: 40px;
}

.stop-head {
  padding-top: 2px;
  margin-bottom: 16px;
}

.stop-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.stop-title {
  font-size: 22px;
  font-weight: 700;
}

.stop-sub {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-top: 4px;
  line-height: 1.5;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(11, 12, 14, .03);
}

/* ---------- INPUT MEZŐK ---------- */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field.span2 {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

label .opt {
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 12px;
}

input[type=text], input[type=email], input[type=tel], select, .select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, background .15s;
}

input:focus, select:focus, .select:focus {
  border-color: var(--accent-blue);
  background: #ffffff;
}

input.err {
  border-color: var(--red);
  background: var(--red-soft);
}

.auto-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.auto-chip {
  flex: 1;
  min-width: 180px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.auto-chip .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.auto-chip .v {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  color: var(--accent-blue);
  font-weight: 600;
}

textarea{
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select {
  cursor: pointer;
}

/* ---------- DROPZONE (FÁJL FELTÖLTÉS & ELŐNÉZET) ---------- */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dropzone {
  border: 1.5px dashed #C7CDD6;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .15s, background .15s;
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}

.dropzone:hover {
  border-color: var(--accent-blue);
}

.dropzone.has-file {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-soft);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.dropzone .lbl {
  font-size: 13px;
  font-weight: 600;
}

.dropzone .sub {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.dropzone img,
.dropzone .preview-img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
  border-radius: 8px;
  pointer-events: none;
}

/* ---------- RADIO OPTIONS ---------- */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.radio-option:hover {
  border-color: var(--accent-blue);
  background: #ffffff;
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.radio-option span {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}

/* ---------- REVIEW LIST ---------- */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--surface-2);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 13.5px;
}

.review-row .k { 
  color: var(--ink-soft); 
  font-weight: 500; 
}

.review-row .v { 
  font-family: 'IBM Plex Mono', monospace; 
  color: var(--ink); 
  font-weight: 600; 
  text-align: right; 
  word-break: break-all; 
}

/* ---------- CANVAS (ALÁÍRÁS) ---------- */
.signature-container {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

#signatureCanvas {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  touch-action: none;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z'/></svg>") 0 24, pointer;
  width: 100%;
  height: 150px;
}

.btn-clear {
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-end;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-clear:hover {
  background: var(--red-soft);
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ==========================================
   MODAL & SZERZŐDÉS ELŐNÉZET
   ========================================== */
body.modal-open {
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  z-index: 100000 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  padding: 10px;
}

.modal-content-large {
  background-color: #f8f9fa;
  margin: 1vh auto;
  padding: 20px;
  border-radius: 14px;
  width: 96%;
  max-width: 960px;
  height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.close-btn {
  font-size: 32px;
  font-weight: bold;
  float: right;
  cursor: pointer;
  line-height: 20px;
  color: var(--ink-soft);
  transition: color 0.15s;
}

.modal-content-large h2 {
  color: var(--accent-blue);
}

.close-btn:hover {
  color: var(--ink);
}

.tab-buttons {
  margin: 15px 0 10px 0;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  z-index: 2;
}

.tab-btn {
  padding: 10px 20px;
  border: 1px solid #ccc;
  background-color: #e9ecef;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  font-weight: bold;
  transition: all 0.15s;
}

.tab-btn.active {
  background-color: #fff;
  border-bottom: 2px solid var(--accent-blue);
  color: var(--accent-blue);
}

/* DOCX PREVIEW CONTAINER */
.docx-render-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--surface-2);
  padding: 15px;
  border-radius: 8px;
}

.docx-render-container .docx-wrapper {
  background-color: transparent !important;
  padding: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.docx-render-container .docx-wrapper > section.docx {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
  margin: 0 auto 15px auto !important;
  max-width: 100% !important;
  height: auto !important;
  padding: 20px !important;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  flex-shrink: 0;
}

/* ---------- FOOTER ---------- */
footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 30px 20px;
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 40px;
}

footer img { 
  height: 40px; 
  width: auto; 
}

footer a { 
  color: var(--accent-blue); 
  text-decoration: none; 
  font-weight: 600; 
}

footer a:hover { 
  text-decoration: underline; 
}

/* ---------- MEDIA QUERIES (ÖSSZEVONT TÖRÉSPONTOK) ---------- */
@media (max-width: 900px) {
  header {
    padding: 0 20px;
    height: 80px;
  }

  body {
    padding-top: 80px;
  }

  .hamburger {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
  }

  nav.open,
  nav.active {
    right: 0 !important;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  nav ul li {
    font-size: 18px;
  }
}

@media (max-width: 768px) {

  footer { 
    flex-direction: column; 
    gap: 16px; 
    text-align: center; 
  }

  .docx-render-container .docx-wrapper > section.docx {
    padding: 12px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 700px) {
  .mode-grid { 
    grid-template-columns: 1fr;  
  }
}

@media (max-width: 640px) {
  .grid2,
  .upload-grid { 
    grid-template-columns: 1fr; 
  }
}

@media (max-width: 600px) {
  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  .modal-content-large {
    padding: 12px;
    height: 98vh;
    margin: 0.5vh auto;
  }

  .docx-render-container {
    padding: 6px;
  }
}

@media (max-width: 500px) {
  .review-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .route {
    grid-template-columns: 28px 1fr;
    column-gap: 12px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: 90%;
    padding-left: 5px;
  }

  .route {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 12px;
    margin-left: 0;
    padding-left: 0;
  }

  .stop-rail {
    grid-column: 1;
    align-items: center;
    justify-self: start;
    width: 28px;
  }

  section.stop {
    grid-column: 2;
    min-width: 0; /* Megakadályozza, hogy a kártyák széttolják a gridet */
  }
}