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

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

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

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

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

.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, .mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.info-card {
  background: var(--surface);
  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;
}

.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-card {
  background: var(--surface);
  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;
}

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

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

.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 {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(11, 12, 14, .03);
  width: 100%;
}

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

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

.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 {
  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 {
  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;
}

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

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

.dropzone {
  width: 100%;
  max-width: 100%;
  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;
}

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

.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;
  width: 100%;
}

#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%;
  max-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;
  flex-wrap: wrap;
  margin-top: 16px;
}

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

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

/* Amikor a modal nyitva van, a header garantáltan mögé kerül */
body.modal-open header {
  z-index: 1 !important;
}

.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;
  box-sizing: border-box;
}

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

@media (max-width: 600px) {
  .modal-content-large {
    padding: 12px;
    height: 98vh;
    margin: 0.5vh auto;
  }
}

.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);
}

/* KORÁBBI FÜLEK MEGTARTÁSA FIX POZÍCIÓBAN A DOKUMENTUM FELETT */
.tab-buttons {
  margin: 15px 0 10px 0;
  display: flex !important;
  gap: 10px;
  flex-shrink: 0 !important;
  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 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background-color: var(--surface-2);
  padding: 15px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}


@media (max-width: 600px) {
  .docx-render-container {
    padding: 6px;
  }
}

/* DOCX-PREVIEW KIRENDERELT MEGJELENÍTÉS SKÁLÁZÁSA (NINCS HORIZONTÁLIS OVERFLOW) */
.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;
  box-sizing: border-box !important;
  height: auto !important;
  padding: 20px !important;
}

@media (max-width: 768px) {
  .docx-render-container .docx-wrapper > section.docx {
    padding: 12px !important;
    font-size: 12px !important;
  }
}

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

@media (max-width: 480px) {
  .modal-actions {
    flex-direction: column;
  }
  .modal-actions button {
    width: 100%;
  }
}

.hidden {
  display: none !important;
}