/* ---------- BASE LAYOUT ---------- */
body {
  background: #f3f4f6;
  color: #111;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

.container {
  max-width: 1300px;
  margin: 20px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 20px;
}

.flex {
  display: flex;
  gap: 20px;
}

/* LEFT COLUMN */
.left {
  width: 40%;
  max-height: 90vh;
  overflow-y: auto;
  padding-right: 10px;
  border-right: 1px solid #ddd;
}

/* RIGHT COLUMN */
.right {
  width: 60%;
  max-height: 90vh;
  overflow-y: auto;
}

/* ---------- FORM ELEMENTS ---------- */
label {
  font-size: 0.85rem;
  margin-top: 10px;
  display: block;
  color: #444;
}

input,
textarea,
select {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

textarea {
  resize: vertical;
}

button {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  margin-top: 10px;
}

button:hover {
  background: #1d4ed8;
}

/* ---------- PREVIEW AREA ---------- */
#cvPreviewWrapper {
  background: #eee;
  padding: 15px;
  border-radius: 8px;
}

#cvPreview {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  min-height: 500px;
  position: relative; /* Needed for drag‑and‑drop elements */
}

/* ---------- CV STRUCTURE ---------- */
.cv-header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.cv-name {
  font-size: 1.6rem;
  font-weight: bold;
}

.cv-title {
  font-size: 1rem;
  color: #555;
}

.cv-contact {
  font-size: 0.85rem;
  margin-top: 6px;
  color: #444;
}

.cv-section {
  margin-top: 14px;
}

.cv-section-title {
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  margin-bottom: 4px;
}

.cv-list {
  padding-left: 18px;
  margin-top: 4px;
}

.cv-paragraph {
  white-space: pre-line;
}

/* ---------- SIGNATURE ---------- */
.cv-signature {
  margin-top: 25px;
  max-width: 200px;
}

/* ---------- QR CODE ---------- */
.qr-code {
  width: 120px;
  height: 120px;
}

/* ---------- DRAGGABLE ELEMENTS ---------- */
.draggable {
  position: absolute;
  cursor: grab;
}

.draggable:active {
  cursor: grabbing;
}

/* ---------- TEMPLATE 1 — CLASSIC ---------- */
.template1 {
  border-left: 4px solid #2563eb;
  padding-left: 15px;
}

/* ---------- TEMPLATE 2 — TWO COLUMN ---------- */
.template2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.template2 .cv-header {
  grid-column: 1 / span 2;
}
.template2 .cv-section {
  margin-top: 10px;
}

/* ---------- TEMPLATE 3 — LEFT ACCENT ---------- */
.template3 {
  border-left: 8px solid #10b981;
  padding-left: 18px;
}

/* ---------- TEMPLATE 4 — TOP BAR ---------- */
.template4 {
  border-top: 8px solid #f97316;
  padding-top: 18px;
}

/* ---------- TEMPLATE 5 — MINIMAL (SERIF) ---------- */
.template5 {
  font-family: Georgia, serif;
  border: 1px solid #aaa;
  padding: 20px;
}

/* ---------- TEMPLATE 6 — BOXED ---------- */
.template6 {
  border: 2px solid #000;
  padding: 25px;
}

/* ---------- TEMPLATE 7 — TIMELINE EXPERIENCE ---------- */
.template7 .cv-section.experience li {
  position: relative;
  padding-left: 15px;
}
.template7 .cv-section.experience li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  background: #2563eb;
  border-radius: 50%;
}

/* ---------- TEMPLATE 8 — MODERN DOUBLE BAR ---------- */
.template8 {
  border-top: 4px solid #4f46e5;
  border-bottom: 4px solid #4f46e5;
  padding: 20px 0;
}

/* ---------- TEMPLATE 9 — COMPACT ---------- */
.template9 {
  font-size: 0.85rem;
  padding: 10px;
}
.template9 .cv-header .cv-name {
  font-size: 1.3rem;
}

/* ---------- TEMPLATE 10 — BOLD HEADER ---------- */
.template10 .cv-header {
  background: #111;
  color: #fff;
  padding: 12px;
  margin: -20px -20px 10px -20px;
}
.template10 .cv-contact {
  color: #ddd;
}

/* ---------- PROFILE PHOTO BASE ---------- */
.cv-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  border: none;
  transition: all 0.25s ease;
}

/* ---------- PHOTO SHAPES ---------- */
.photo-square {
  border-radius: 4px;
}

.photo-rounded {
  border-radius: 12px;
}

.photo-circle {
  border-radius: 50%;
}

/* ---------- PHOTO BORDER STYLES ---------- */
.photo-border-none {
  border: none;
}

.photo-border-thin {
  border: 2px solid #444;
}

.photo-border-thick {
  border: 5px solid #222;
}

.photo-border-dashed {
  border: 3px dashed #444;
}

.photo-border-glow {
  border: 3px solid #2563eb;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.7);
}

/* ---------- DRAG & DROP PHOTO MODE ---------- */
.draggable-photo {
  position: absolute;
  cursor: grab;
  z-index: 50;
}

.draggable-photo:active {
  cursor: grabbing;
}

/* When drag mode is OFF, photo stays in header */
.photo-locked {
  position: static !important;
  cursor: default !important;
  z-index: auto !important;
}

/* ========================= */
/* FULL-WIDTH CROPPING PANEL */
/* ========================= */

.crop-panel {
  position: fixed;
  left: 0;
  bottom: -100%;
  width: 100%;
  height: 70vh;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: bottom 0.35s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.crop-panel.open {
  bottom: 0;
}

.crop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #2563eb;
  color: #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.crop-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.crop-content {
  display: flex;
  height: 100%;
  padding: 15px;
  gap: 20px;
}

/* Image area */
.crop-image-area {
  flex: 2;
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
  border-radius: 8px;
}

#cropImage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}

/* Simple crop box */
.crop-box {
  position: absolute;
  border: 2px dashed #2563eb;
  background: rgba(37, 99, 235, 0.1);
  width: 200px;
  height: 200px;
  top: calc(50% - 100px);
  left: calc(50% - 100px);
  cursor: move;
}

/* Controls */
.crop-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crop-label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.advanced-controls {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.advanced-controls input[type="range"] {
  width: 100%;
}

.crop-apply-btn {
  margin-top: auto;
  padding: 10px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.crop-apply-btn:hover {
  background: #059669;
}

/* ========================= */
/* SIGNATURE + QR CODE STYLES */
/* ========================= */

.cv-signature {
  max-width: 220px;
  margin-top: 25px;
  display: block;
}

.qr-code {
  width: 120px;
  height: 120px;
  display: block;
}

/* Free-floating QR mode */
.qr-draggable {
  position: absolute;
  cursor: grab;
  z-index: 60;
}

.qr-draggable:active {
  cursor: grabbing;
}

            body {
              margin: 0;
              font-family: Arial, Helvetica, sans-serif;
            }

            .topnav {
              overflow: hidden;
              background-color: #ffffff;
            }

            .topnav a {
              float: left;
              color: #1a1a1a;
              text-align: center;
              padding: 12px 14px;
              text-decoration: none;
              font-size: 17px;
            }

            .topnav a:hover {
              background-color: #ddd;
              color: black;
            }

            .topnav a.active {
              background-color: #ffffff;
              color: black;
            }
								   
            .topnav-right {
              float: right;
            }

            .imager img {
              border: 1px solid #ddd;
              width: 150px;
              border-radius: 10%;
              margin: 20px;
            }

            .imager img:hover {
              box-shadow: 0 0 2px 1px rgba(151, 161, 165, 0.5);
									   
            }    
