/* =========================================================
   NILE BRIDGE GROUP — CV Builder Stylesheet
   File: css/cv-builder.css
   Extends: css/style.css (do not modify style.css)
   ========================================================= */

/* ---------------------------------------------------------
   1. CV BUILDER PAGE — SHARED UTILITIES
   --------------------------------------------------------- */

/* Page top padding (accounts for fixed navbar) */
.cvb-page-top {
  padding-top: var(--nav-height);
}

/* Inline strong accent */
.cvb-accent {
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------------------------------------------------------
   2. INFO CARDS — "What is a Lebenslauf" Section
   --------------------------------------------------------- */
.cvb-info-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.cvb-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.cvb-info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.cvb-info-card:hover::before {
  transform: scaleX(1);
}

.cvb-info-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-light)
  );
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  flex-shrink: 0;
}

.cvb-info-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-white);
}

.cvb-info-card h3 {
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.cvb-info-card p {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------
   3. COMPARISON TABLE — Kenyan vs German CV
   --------------------------------------------------------- */
.cvb-comparison {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-12);
}

.cvb-comparison-title {
  font-size: var(--text-xl);
  color: var(--color-primary);
  text-align: center;
  padding: var(--space-8) var(--space-8) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.cvb-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cvb-comparison-col {
  padding: var(--space-8);
}

.cvb-comparison-col--kenyan {
  border-right: 1px solid var(--color-border);
  background: #fffbf5;
}

.cvb-comparison-col--german {
  background: #f0f4ff;
}

.cvb-comparison-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border);
}

.cvb-flag {
  font-size: 1.8rem;
  line-height: 1;
}

.cvb-comparison-header strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--color-primary);
  font-weight: 700;
}

.cvb-comparison-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.cvb-comparison-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Minus icon for Kenyan column */
.cvb-comparison-list--minus li::before {
  content: '✕';
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 1px;
}

/* Plus icon for German column */
.cvb-comparison-list--plus li::before {
  content: '✓';
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 1px;
}

/* ---------------------------------------------------------
   4. KEY SECTIONS EXPLAINED
   --------------------------------------------------------- */
.cvb-sections-explained {
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  border: 1px solid var(--color-border);
}

.cvb-sections-explained h3 {
  font-size: var(--text-2xl);
  color: var(--color-primary);
}

.cvb-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.cvb-section-item {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  transition: all var(--transition-normal);
}

.cvb-section-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cvb-section-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.6;
  line-height: 1;
  flex-shrink: 0;
  min-width: 36px;
}

.cvb-section-content h4 {
  font-size: var(--text-base);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.cvb-section-content h4 span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.cvb-section-content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: var(--space-2);
}

/* ---------------------------------------------------------
   5. DEMO CV VIEWER
   --------------------------------------------------------- */
.cvb-demo-notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(201, 149, 42, 0.08);
  border: 1px solid rgba(201, 149, 42, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.cvb-demo-notice svg {
  stroke: var(--color-accent);
  flex-shrink: 0;
}

.cvb-demo-notice strong {
  color: var(--color-primary);
}

.cvb-demo-wrapper {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
}

.cvb-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.cvb-demo-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  font-family: var(--font-display);
}

.cvb-demo-viewer {
  background: #525659;
  position: relative;
}

.cvb-demo-viewer iframe {
  display: block;
  width: 100%;
  min-height: 900px;
  border: none;
}

/* Fallback message inside iframe */
.cvb-demo-viewer .cvb-demo-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16);
  text-align: center;
  background: var(--color-white);
  min-height: 400px;
}

.cvb-demo-viewer .cvb-demo-fallback svg {
  width: 60px;
  height: 60px;
  stroke: var(--color-text-muted);
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.cvb-demo-viewer .cvb-demo-fallback p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.cvb-demo-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.cvb-demo-footer p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  text-align: center;
}

/* ---------------------------------------------------------
   6. CTA COUNTER BADGE
   --------------------------------------------------------- */
.cvb-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(8px);
}

.cvb-counter-badge svg {
  stroke: var(--color-accent-light);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   7. BUILDER PAGE — LAYOUT (lebenslauf.html)
   --------------------------------------------------------- */

/* Minimal header for builder page */
.cvb-builder-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.cvb-builder-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto;
  gap: var(--space-4);
}

.cvb-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.cvb-back-link:hover {
  color: var(--color-primary);
  background: var(--color-bg);
}

.cvb-back-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cvb-builder-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.cvb-builder-title span {
  color: var(--color-accent);
}

.cvb-builder-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Language Toggle */
.cvb-lang-toggle {
  display: flex;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  padding: 3px;
  gap: 3px;
}

.cvb-lang-btn {
  padding: var(--space-1) var(--space-4);
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-display);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}

.cvb-lang-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.cvb-lang-btn:hover:not(.active) {
  background: var(--color-border);
  color: var(--color-text);
}

/* Download button in header */
.cvb-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55rem 1.25rem;
  background: var(--color-accent);
  color: var(--color-white);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.cvb-download-btn:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--color-white);
}

.cvb-download-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cvb-download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Reset button */
.cvb-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cvb-reset-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: rgba(239, 68, 68, 0.05);
}

.cvb-reset-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------
   8. BUILDER — MAIN TWO-COLUMN LAYOUT
   --------------------------------------------------------- */
.cvb-main {
  margin-top: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-height));
  background: var(--color-bg);
}

/* Form panel */
.cvb-form-panel {
  padding: var(--space-6);
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Scrollbar styling for form panel */
.cvb-form-panel::-webkit-scrollbar {
  width: 5px;
}
.cvb-form-panel::-webkit-scrollbar-track {
  background: var(--color-bg);
}
.cvb-form-panel::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
.cvb-form-panel::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Preview panel */
.cvb-preview-panel {
  background: #525659;
  padding: var(--space-6);
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
  display: flex;
  flex-direction: column;
}

/* Progress bar under builder header */
.cvb-progress-bar {
  height: 3px;
  background: var(--color-border);
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 999;
}

.cvb-progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  width: 0%;
}

/* ---------------------------------------------------------
   9. FORM SECTIONS (Accordion cards)
   --------------------------------------------------------- */
.cvb-form-section {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.cvb-form-section:focus-within {
  box-shadow: var(--shadow-md);
  border-color: rgba(201, 149, 42, 0.3);
}

/* Section header (clickable accordion trigger) */
.cvb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  user-select: none;
  background: var(--color-white);
  transition: background var(--transition-fast);
  gap: var(--space-3);
}

.cvb-section-header:hover {
  background: var(--color-bg);
}

.cvb-section-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cvb-section-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-light)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cvb-section-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-white);
}

.cvb-section-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.cvb-section-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.cvb-section-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Optional badge */
.cvb-optional-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Chevron toggle */
.cvb-chevron {
  width: 20px;
  height: 20px;
  stroke: var(--color-text-muted);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.cvb-form-section.open .cvb-chevron {
  transform: rotate(180deg);
}

/* Section body */
.cvb-section-body {
  display: none;
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
  flex-direction: column;
  gap: var(--space-4);
}

.cvb-form-section.open .cvb-section-body {
  display: flex;
}

/* ---------------------------------------------------------
   10. HINT BOX
   --------------------------------------------------------- */
.cvb-hint {
  display: flex;
  gap: var(--space-3);
  background: linear-gradient(
    135deg,
    rgba(10, 31, 68, 0.03),
    rgba(201, 149, 42, 0.06)
  );
  border: 1px solid rgba(201, 149, 42, 0.2);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.cvb-hint-icon {
  font-size: 1rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.cvb-hint-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.cvb-hint-text strong {
  color: var(--color-primary);
  display: block;
  margin-bottom: 2px;
  font-size: var(--text-xs);
}

/* ---------------------------------------------------------
   11. FORM ELEMENTS
   --------------------------------------------------------- */
.cvb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.cvb-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}

.cvb-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cvb-form-group.full {
  grid-column: 1 / -1;
}

.cvb-form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cvb-form-label .cvb-label-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-muted);
  opacity: 0.7;
  font-size: 0.7rem;
}

.cvb-input,
.cvb-textarea,
.cvb-select {
  padding: 0.6rem var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-white);
  transition: all var(--transition-fast);
  width: 100%;
}

.cvb-input:focus,
.cvb-textarea:focus,
.cvb-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.08);
}

.cvb-input::placeholder,
.cvb-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.55;
}

.cvb-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.cvb-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Char counter for textarea */
.cvb-char-count {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 2px;
}

.cvb-char-count.warning {
  color: var(--color-error);
}

/* ---------------------------------------------------------
   12. PHOTO UPLOAD
   --------------------------------------------------------- */
.cvb-photo-area {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.cvb-photo-preview {
  width: 90px;
  height: 116px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.cvb-photo-preview:hover {
  border-color: var(--color-accent);
  background: rgba(201, 149, 42, 0.04);
}

.cvb-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.cvb-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  text-align: center;
}

.cvb-photo-placeholder svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-text-muted);
  opacity: 0.4;
}

.cvb-photo-placeholder span {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.cvb-photo-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cvb-photo-note {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: rgba(201, 149, 42, 0.06);
  border: 1px solid rgba(201, 149, 42, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  line-height: 1.6;
}

.cvb-photo-note strong {
  color: var(--color-primary);
}

.cvb-photo-remove {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-error);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-main);
  text-decoration: underline;
  transition: opacity var(--transition-fast);
}

.cvb-photo-remove:hover {
  opacity: 0.7;
}

/* ---------------------------------------------------------
   13. BULLET POINT INPUTS (Competencies, Responsibilities)
   --------------------------------------------------------- */
.cvb-bullet-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cvb-bullet-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cvb-bullet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-left: var(--space-1);
}

.cvb-bullet-input {
  flex: 1;
  padding: 0.5rem var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-white);
  transition: all var(--transition-fast);
}

.cvb-bullet-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.07);
}

.cvb-bullet-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.cvb-bullet-remove {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.8rem;
  line-height: 1;
}

.cvb-bullet-remove:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: rgba(239, 68, 68, 0.05);
}

.cvb-add-bullet-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: transparent;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-main);
  width: 100%;
  justify-content: center;
  margin-top: var(--space-1);
}

.cvb-add-bullet-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(201, 149, 42, 0.04);
}

.cvb-add-bullet-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------
   14. ENTRY CARDS (Work, Education, Certifications, etc.)
   --------------------------------------------------------- */
.cvb-entry-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}

.cvb-entry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.cvb-entry-card-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cvb-entry-card-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
}

.cvb-entry-actions {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.cvb-entry-remove {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
}

.cvb-entry-remove:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: rgba(239, 68, 68, 0.05);
}

.cvb-add-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cvb-add-entry-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(201, 149, 42, 0.04);
}

.cvb-add-entry-btn svg {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------
   15. LANGUAGE LEVEL SELECTOR
   --------------------------------------------------------- */
.cvb-language-entry {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.5fr auto;
  gap: var(--space-2);
  align-items: end;
}

/* ---------------------------------------------------------
   16. RECOGNITION STATUS SECTION
   --------------------------------------------------------- */
.cvb-recognition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* ---------------------------------------------------------
   17. SKILL LEVEL DOTS
   --------------------------------------------------------- */
.cvb-skill-entry {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--space-3);
}

.cvb-skill-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
}

.cvb-skill-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.cvb-skill-dot:hover {
  border-color: var(--color-accent);
  background: rgba(201, 149, 42, 0.2);
}

.cvb-skill-dot.filled {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ---------------------------------------------------------
   18. PREVIEW PANEL
   --------------------------------------------------------- */
.cvb-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.cvb-preview-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cvb-preview-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s infinite;
}

.cvb-preview-download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cvb-preview-download:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
}

.cvb-preview-download svg {
  width: 14px;
  height: 14px;
}

/* A4 Paper wrapper */
.cvb-a4-wrapper {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.cvb-a4-wrapper::-webkit-scrollbar {
  width: 5px;
}

.cvb-a4-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
}

/* ---------------------------------------------------------
   19. CV PAGE — THE ACTUAL CV DOCUMENT PREVIEW
   --------------------------------------------------------- */
.cv-page {
  width: 210mm;
  min-height: 297mm;
  background: white;
  padding: 18mm 20mm 20mm 20mm;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 9.5pt;
  color: #1a202c;
  line-height: 1.55;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  transform-origin: top center;
  /* Scale is set by JS based on container width */
}

/* CV Header */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 7mm;
  padding-bottom: 5mm;
  border-bottom: 2.5px solid #0A1F44;
  gap: 5mm;
}

.cv-name-block {
  flex: 1;
}

.cv-name-block h1 {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 20pt;
  font-weight: 800;
  color: #0A1F44;
  margin-bottom: 1.5mm;
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.cv-name-subtitle {
  font-size: 10pt;
  color: #4a5568;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 3mm;
}

.cv-contact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 3mm 6mm;
  margin-top: 2mm;
}

.cv-contact-item {
  display: flex;
  align-items: center;
  gap: 1.5mm;
  font-size: 8pt;
  color: #4a5568;
}

.cv-contact-item svg {
  width: 9pt;
  height: 9pt;
  stroke: #C9952A;
  flex-shrink: 0;
}

.cv-photo {
  width: 33mm;
  height: 42mm;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.cv-photo-placeholder {
  width: 33mm;
  height: 42mm;
  border-radius: 3px;
  border: 1px dashed #cbd5e0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  flex-shrink: 0;
  display: none;
  /* Only shown if explicitly set */
}

/* CV Section */
.cv-section {
  margin-bottom: 5mm;
}

.cv-section-title {
  font-size: 8.5pt;
  font-weight: 800;
  color: #0A1F44;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding-bottom: 1.5mm;
  margin-bottom: 2.5mm;
  border-bottom: 1.5px solid #C9952A;
  display: flex;
  align-items: center;
  gap: 2mm;
}

/* Tabular row layout */
.cv-row {
  display: flex;
  padding: 1mm 0;
  gap: 4mm;
}

.cv-row-date {
  width: 38mm;
  flex-shrink: 0;
  font-size: 8.5pt;
  color: #4a5568;
  font-weight: 500;
  padding-top: 0.5mm;
  line-height: 1.4;
}

.cv-row-label {
  width: 38mm;
  flex-shrink: 0;
  font-size: 8.5pt;
  font-weight: 600;
  color: #4a5568;
  padding-top: 0.5mm;
}

.cv-row-content {
  flex: 1;
  font-size: 9pt;
  line-height: 1.55;
}

/* Entry (work / education) */
.cv-entry {
  display: flex;
  gap: 4mm;
  padding: 2mm 0;
  border-bottom: 0.5px solid #f0f0f0;
}

.cv-entry:last-child {
  border-bottom: none;
}

.cv-entry-date {
  width: 38mm;
  flex-shrink: 0;
  font-size: 8.5pt;
  color: #4a5568;
  font-weight: 500;
  line-height: 1.4;
  padding-top: 0.5mm;
}

.cv-entry-body {
  flex: 1;
}

.cv-entry-title {
  font-weight: 700;
  font-size: 9.5pt;
  color: #0A1F44;
  margin-bottom: 0.5mm;
}

.cv-entry-org {
  font-weight: 500;
  color: #C9952A;
  font-size: 8.5pt;
  margin-bottom: 0.5mm;
}

.cv-entry-meta {
  font-size: 8pt;
  color: #718096;
  font-style: italic;
  margin-bottom: 1.5mm;
}

.cv-entry-responsibilities {
  margin-top: 1.5mm;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8mm;
}

.cv-entry-responsibilities li {
  font-size: 8.5pt;
  color: #4a5568;
  display: flex;
  align-items: flex-start;
  gap: 2mm;
  line-height: 1.5;
}

.cv-entry-responsibilities li::before {
  content: '▸';
  color: #C9952A;
  font-size: 7pt;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Competency bullets */
.cv-competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5mm 4mm;
}

.cv-competency-item {
  font-size: 8.5pt;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 2mm;
}

.cv-competency-item::before {
  content: '•';
  color: #C9952A;
  font-size: 10pt;
  flex-shrink: 0;
}

/* Skill dots on CV */
.cv-skill-row {
  display: flex;
  align-items: center;
  gap: 4mm;
  padding: 0.8mm 0;
}

.cv-skill-name {
  width: 38mm;
  font-size: 8.5pt;
  font-weight: 500;
  flex-shrink: 0;
}

.cv-skill-dots {
  display: flex;
  gap: 2px;
}

.cv-skill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #0A1F44;
}

.cv-skill-dot.filled {
  background: #0A1F44;
}

/* Recognition badge */
.cv-recognition-text {
  font-size: 8.5pt;
  color: #4a5568;
  line-height: 1.6;
}

.cv-recognition-status {
  display: inline-block;
  background: rgba(10, 31, 68, 0.07);
  color: #0A1F44;
  border-radius: 3px;
  padding: 0.5mm 2mm;
  font-size: 8pt;
  font-weight: 600;
  margin-bottom: 1mm;
}

/* CV Signature */
.cv-signature-section {
  margin-top: 8mm;
  padding-top: 4mm;
  border-top: 1px solid #e2e8f0;
}

.cv-signature-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 10mm;
}

.cv-signature-place {
  font-size: 8.5pt;
  color: #4a5568;
}

.cv-signature-block {
  text-align: center;
}

.cv-signature-underline {
  width: 55mm;
  border-bottom: 1px solid #1a202c;
  padding-bottom: 1mm;
  margin-bottom: 1mm;
}

.cv-signature-label {
  font-size: 7.5pt;
  color: #718096;
}

/* ---------------------------------------------------------
   20. PDF GENERATION LOADING OVERLAY
   --------------------------------------------------------- */
.cvb-pdf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 68, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.cvb-pdf-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cvb-pdf-overlay-box {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-12);
  text-align: center;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.cvb-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: cvb-spin 0.8s linear infinite;
}

@keyframes cvb-spin {
  to { transform: rotate(360deg); }
}

.cvb-pdf-overlay-box h4 {
  color: var(--color-primary);
  font-size: var(--text-lg);
}

.cvb-pdf-overlay-box p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------------------------------------------------------
   21. MOBILE PREVIEW MODAL
   --------------------------------------------------------- */
.cvb-mobile-preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 68, 0.7);
  z-index: 2000;
  overflow-y: auto;
  padding: var(--space-4);
}

.cvb-mobile-preview-modal.open {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cvb-mobile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  margin-bottom: var(--space-4);
}

.cvb-mobile-modal-header span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
}

.cvb-mobile-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--color-white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.cvb-mobile-modal-close:hover {
  background: rgba(255,255,255,0.25);
}

.cvb-mobile-modal-content {
  width: 100%;
  max-width: 600px;
  background: #525659;
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

/* Mobile sticky download bar */
.cvb-mobile-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  z-index: 500;
  gap: var(--space-3);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
}

/* ---------------------------------------------------------
   22. RESPONSIVE — CV BUILDER
   --------------------------------------------------------- */
@media (max-width: 1200px) {
  .cvb-main {
    grid-template-columns: 1fr;
  }

  .cvb-form-panel {
    max-height: none;
    position: static;
    overflow-y: visible;
  }

  .cvb-preview-panel {
    display: none; /* Hidden on mobile, shown via modal */
  }

  .cvb-mobile-sticky {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Add bottom padding to form so sticky bar doesn't cover content */
  .cvb-form-panel {
    padding-bottom: 80px;
  }
}

@media (max-width: 768px) {
  /* Comparison table stacks */
  .cvb-comparison-grid {
    grid-template-columns: 1fr;
  }

  .cvb-comparison-col--kenyan {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  /* Sections grid stacks */
  .cvb-sections-grid {
    grid-template-columns: 1fr;
  }

  /* Form rows stack */
  .cvb-form-row,
  .cvb-form-row-3 {
    grid-template-columns: 1fr;
  }

  .cvb-language-entry {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .cvb-recognition-grid {
    grid-template-columns: 1fr;
  }

  .cvb-builder-title {
    display: none;
  }

  .cvb-builder-header-actions {
    gap: var(--space-2);
  }

  .cvb-back-link span {
    display: none;
  }
}

@media (max-width: 480px) {
  .cvb-sections-explained {
    padding: var(--space-6) var(--space-4);
  }

  .cvb-comparison {
    border-radius: var(--radius-lg);
  }

  .cvb-comparison-col {
    padding: var(--space-5);
  }

  .cvb-photo-area {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------------------------------------------------------
   23. PRINT STYLES (used during PDF generation)
   --------------------------------------------------------- */
@media print {
  .cvb-builder-header,
  .cvb-form-panel,
  .cvb-preview-toolbar,
  .cvb-mobile-sticky,
  .whatsapp-float {
    display: none !important;
  }

  .cvb-main {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .cvb-preview-panel {
    display: block;
    background: white;
    padding: 0;
    max-height: none;
    overflow: visible;
  }

  .cv-page {
    transform: none !important;
    box-shadow: none !important;
    width: 100%;
    padding: 20mm;
  }
}

/* .......................................................
CV HERO
*/
/* ---------------------------------------------------------
   CV BUILDER PAGE HERO
   --------------------------------------------------------- */
.page-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 31, 68, 0.88) 0%,
    rgba(10, 31, 68, 0.72) 55%,
    rgba(10, 31, 68, 0.58) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-16)) var(--container-pad) var(--space-16);
  width: 100%;
}

.page-hero-inner {
  max-width: 720px;
}

.page-hero .section-label {
  display: inline-block;
  margin-bottom: var(--space-4);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-hero h1 {
  color: var(--color-white);
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  max-width: 760px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.75;
  max-width: 620px;
  margin: 0;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.72);
}

.page-hero-breadcrumb a {
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.25s ease;
}

.page-hero-breadcrumb a:hover {
  color: var(--color-accent);
}

.page-hero-breadcrumb span[aria-current="page"] {
  color: rgba(255, 255, 255, 0.82);
}

/* Responsive */
@media (max-width: 768px) {
  .page-hero {
    min-height: 60vh;
  }

  .page-hero-content {
    padding: calc(var(--nav-height) + var(--space-10)) var(--container-pad) var(--space-10);
  }

  .page-hero h1 {
    margin-bottom: var(--space-4);
  }

  .page-hero p {
    line-height: 1.65;
  }

  .page-hero-actions {
    margin-top: var(--space-6);
  }

  .page-hero-actions .btn {
    width: 100%;
  }
}