/* ══════════════════════════════════════════════════════
   Vaicon Barcode Generator — main.css
   ══════════════════════════════════════════════════════ */

:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #e8eef5;
  --primary: #1a4f8a;
  --primary-light: #2d6cc0;
  --primary-dark: #0f2f55;
  --accent: #00c896;
  --accent2: #ff6b35;
  --text: #1a2332;
  --text-muted: #5a6a80;
  --text-light: #8a9bb0;
  --border: #d1dce8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(26,79,138,0.10);
  --shadow-lg: 0 12px 48px rgba(26,79,138,0.15);
}

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

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.7;
}

/* ── SIDEBAR ── */
.image-button { border: none; background: none; cursor: pointer; }
.image-button img { width: 42px; transition: transform 0.2s ease; }
.image-button:active img { transform: scale(0.95); }

.sidebar {
  position: fixed;
  top: 0; right: -280px;
  width: 260px;
  height: 100vh;
  background: var(--primary);
  color: #fff;
  padding: 60px 20px 20px;
  z-index: 200;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}
.sidebar.active { right: 0; }
.sidebar h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.2); color: #fff; }
.sidebar p { margin-bottom: 8px; }
.sidebar a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; display: block; padding: 4px 0; }
.sidebar a:hover { color: var(--accent); }

/* ── HEADER ── */
header {
  background-color: #0F2F55;
  padding: 0 clamp(16px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.logo img { height: 44px; width: auto; }
nav { display: flex; align-items: center; gap: 16px; }
nav a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: color .2s; }
nav a:hover { color: #fff; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 0.78rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 4px 10px; border-radius: 100px; transition: all .2s; white-space: nowrap;
}
.lang-switch:hover { color: #fff; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.08); }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 50px clamp(16px, 4vw, 48px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(0,200,150,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(255,107,53,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(0,200,150,0.2); border: 1px solid rgba(0,200,150,0.5);
  color: var(--accent); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px; margin-bottom: 20px; position: relative;
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: #fff; line-height: 1.15; margin-bottom: 16px; position: relative;
}
.hero p { color: rgba(255,255,255,0.75); font-size: clamp(0.95rem, 2vw, 1.1rem); max-width: 560px; margin: 0 auto 20px; position: relative; }
.hero-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; position: relative; }
.hero-pill { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.9); font-size: 0.78rem; font-weight: 500; padding: 5px 14px; border-radius: 100px; }

/* ── BREADCRUMB ── */
.breadcrumb { max-width: 1100px; margin: 16px auto 0; padding: 0 clamp(16px, 4vw, 40px); font-size: 0.78rem; color: var(--text-light); }
.breadcrumb a { color: var(--primary-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* ── MAIN LAYOUT ── */
.main-wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 80px; }

/* ── TOOL CARD ── */
.tool-card {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 4vw, 48px);
  margin-top: -40px;
  position: relative; z-index: 2;
  animation: fadeUp .5s ease both;
}
.tool-card-title {
  font-size: 1.05rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 28px; display: flex; align-items: center; gap: 10px;
}
.tool-card-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── TOOL GRID ── */
.tool-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
@media (max-width: 768px) { .tool-grid { grid-template-columns: 1fr; } }

/* ── BARCODE PREVIEW ── */
.barcode-preview {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: border-color .2s;
}
.barcode-preview:hover { border-color: var(--primary-light); }
#barcode-svg { max-width: 100%; height: auto; }
#barcode-error {
  display: none;
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── INPUT ROW ── */
.input-row { display: flex; gap: 12px; margin-bottom: 20px; align-items: flex-end; flex-wrap: wrap; }
.input-row .input-group { flex: 1; min-width: 180px; }

/* ── DOWNLOAD BUTTONS ── */
.dl-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.btn-dl {
  padding: 11px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  text-align: center;
}
.btn-dl:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,79,138,0.3); }
.btn-dl:active { transform: translateY(0); }
.btn-dl.outline { background: transparent; color: var(--primary); }
.btn-dl.outline:hover { background: var(--surface2); }

/* ── SETTINGS PANEL ── */
.settings-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.settings-panel h3 {
  font-size: 0.9rem; font-weight: 600; color: var(--primary-dark);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 7px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input,
.input-wrap select {
  width: 100%; height: 44px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 14px;
  font-family: 'Sora', sans-serif; font-size: 0.95rem; font-weight: 500;
  color: var(--text); background: #fff; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap input:focus,
.input-wrap select:focus { border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(45,108,192,0.12); }
.input-wrap input[type="range"] {
  height: auto; padding: 0; border: none; background: transparent; box-shadow: none;
  accent-color: var(--primary);
}
.input-wrap input[type="color"] {
  height: 44px; width: 100%; padding: 4px; cursor: pointer;
}

.range-row { display: flex; align-items: center; gap: 10px; }
.range-val { font-size: 0.85rem; font-weight: 600; color: var(--primary); min-width: 32px; text-align: right; }

/* ── TOGGLE CUSTOM ── */
.toggle-custom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-top: 1px solid var(--border);
  cursor: pointer; margin-top: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--primary-dark);
  user-select: none;
}
.toggle-custom .arrow { font-size: 0.7rem; color: var(--primary-light); transition: transform .25s; }
.toggle-custom.open .arrow { transform: rotate(180deg); }
#custom-panel { display: none; padding-top: 16px; }
#custom-panel.open { display: block; }

/* ── TRUST BADGES ── */
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.trust-badge { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 100px; padding: 6px 14px; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }

/* ── HOW-TO STEPS ── */
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
@media (max-width: 640px) { .steps-row { grid-template-columns: 1fr; } }
.step-card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border-top: 3px solid var(--primary-light); text-align: center; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-dark); color: #fff; font-weight: 700; font-size: 0.9rem; margin-bottom: 14px; }
.step-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.step-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--primary-dark); margin-bottom: 8px; }
.step-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── USE CASES ── */
.usecases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 48px; }
.usecase-card { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border-left: 3px solid var(--accent); }
.usecase-card .uc-icon { font-size: 1.6rem; margin-bottom: 10px; display: block; }
.usecase-card h3 { font-size: 0.88rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.usecase-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }

/* ── CONTENT SECTION ── */
.content-section { background: var(--surface); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); margin-top: 48px; }
.content-section h2 { font-family: 'DM Serif Display', serif; font-size: 1.6rem; color: var(--primary-dark); margin: 32px 0 12px; line-height: 1.25; }
.content-section h2:first-of-type { margin-top: 0; }
.content-section h3 { font-size: 1.05rem; font-weight: 600; color: var(--primary); margin: 22px 0 8px; }
.content-section p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 14px; }
.content-section ul { padding-left: 20px; margin-bottom: 14px; }
.content-section li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 6px; }
.content-section strong { color: var(--text); }

/* ── FAQ ── */
.faq-section { background: var(--surface); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); margin-top: 48px; }
.section-head { font-family: 'DM Serif Display', serif; font-size: 1.55rem; color: var(--primary-dark); margin-bottom: 24px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 0.95rem; font-weight: 600; color: var(--primary-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; user-select: none; }
.faq-q .arrow { flex-shrink: 0; font-size: 0.7rem; transition: transform .25s; color: var(--primary-light); }
.faq-item.open .arrow { transform: rotate(180deg); }
.faq-a { display: none; padding-top: 12px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* ── FEEDBACK CARD ── */
.fb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; max-width: 640px; margin: 48px auto 0; box-shadow: var(--shadow); line-height: 1.6; }
.fb-icon { width: 44px; height: 44px; background: #E6F1FB; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; }
.fb-icon svg { width: 22px; height: 22px; }
.fb-title { font-size: 17px; font-weight: 600; color: #111; margin: 0 0 .5rem; }
.fb-subtitle { font-size: 14px; color: #555; margin: 0 0 1.5rem; }
.fb-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 1.25rem; }
.fb-support { font-size: 13px; color: #666; margin: 0; }
.fb-support a { color: var(--primary-dark); text-decoration: none; font-weight: 600; }
.fb-support a:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer { background-color: #0F2F55; color: rgba(255,255,255,0.7); padding: 40px clamp(16px, 4vw, 48px); margin-top: 80px; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; max-width: 280px; margin-top: 12px; }
.footer-col h4 { color: #fff; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 14px; }
.footer-col a { display: block; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.83rem; margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1100px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; text-align: center; }

/* ── ANIMATION ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
