/* foi-parcurs.ro — Non-critical CSS (loaded async) */

/* Dark flatpickr + misc (uses .dark-active class set by JS) */
.dark-active .flatpickr-calendar { background: #1e293b !important; box-shadow: 0 3px 13px rgba(0,0,0,0.4) !important; }
.dark-active .flatpickr-day { color: #e2e8f0; }
.dark-active .flatpickr-day:hover { background: #334155; border-color: #334155; }
.dark-active .flatpickr-day.today { border-color: #60a5fa; }
.dark-active .flatpickr-day.selected { background: #2563eb; border-color: #2563eb; color: #fff; }
.dark-active .flatpickr-day.prevMonthDay, .dark-active .flatpickr-day.nextMonthDay { color: #475569; }
.dark-active .flatpickr-months .flatpickr-month,
.dark-active .flatpickr-months .flatpickr-prev-month,
.dark-active .flatpickr-months .flatpickr-next-month { color: #e2e8f0; fill: #e2e8f0; }
.dark-active .flatpickr-current-month input.cur-year { color: #e2e8f0; }
.dark-active span.flatpickr-weekday { color: #94a3b8; }
.dark-active select option { background: #1e293b; color: #e2e8f0; }

/* ===== FORM CARD ===== */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.form-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-card-title svg {
  width: 18px;
  height: 18px;
  color: var(--blue-600);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.form-group input, .form-group select {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-800);
  background: var(--bg-card);
  transition: border-color 0.15s;
  width: 100%;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group input::placeholder { color: var(--gray-300); }

/* ===== ROUTES TABLE ===== */
.table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}
.routes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.routes-table th {
  background: var(--gray-50);
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--gray-500);
  white-space: nowrap;
}
.routes-table td {
  border: 1px solid var(--border);
  padding: 4px 6px;
}
.routes-table input, .routes-table select {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-800);
  background: transparent;
  width: 100%;
}
.routes-table input:focus, .routes-table select:focus {
  outline: none;
  border-color: var(--blue-600);
  background: var(--bg-card);
}
.routes-table .km-input { text-align: right; width: 70px; }
.routes-table .time-input { text-align: center; width: 60px; }
.routes-table .flatpickr-input { cursor: pointer; }
.flatpickr-calendar { font-family: 'DM Sans', sans-serif; }
.routes-table tfoot td {
  background: var(--gray-50);
  font-weight: 600;
  padding: 8px 10px;
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 10px 18px;
  transition: all 0.15s;
}
.btn { display: inline-flex; align-items: center; gap: 6px; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-sm svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--blue-600);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-700); }

.btn-outline {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn-danger {
  background: transparent;
  color: var(--gray-400);
  border: none;
  padding: 4px;
  border-radius: 4px;
}
.btn-danger:hover { color: var(--red-500); background: var(--red-50); }

.btn-download {
  background: var(--blue-600);
  color: #fff;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 8px;
}
.btn-download:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }

/* ===== SUMMARY ===== */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.summary-item { }
.summary-label { font-size: 12px; color: var(--gray-500); }
.summary-value { font-size: 15px; font-weight: 700; color: var(--gray-800); }

/* ===== PREMIUM BANNER ===== */
.premium-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e293b 100%);
  border-radius: var(--radius);
  padding: 32px;
  margin: 40px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.premium-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(59,130,246,0.1);
  border-radius: 50%;
  filter: blur(40px);
}
.premium-banner h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  position: relative;
}
.premium-banner > p {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 24px;
  position: relative;
}
.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}
.premium-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.premium-check {
  width: 20px;
  height: 20px;
  background: rgba(34,197,94,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.premium-check svg { width: 12px; height: 12px; color: #4ade80; }
.premium-item-text { font-size: 13px; color: #cbd5e1; line-height: 1.4; }

.premium-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
.btn-premium {
  background: var(--bg-card);
  color: var(--gray-900);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  font-family: 'Outfit', sans-serif;
}
.btn-premium:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,255,255,0.2); }
.btn-premium svg { width: 16px; height: 16px; }
.premium-price {
  font-size: 13px;
  color: #94a3b8;
}
.premium-price strong { color: #fbbf24; }

/* ===== SEO SECTIONS ===== */
/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}
.testimonial-stars svg {
  width: 16px;
  height: 16px;
  fill: #facc15;
  stroke: none;
}
.testimonial-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-700);
  margin-bottom: 16px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.testimonial-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-900);
}
.testimonial-role {
  font-size: 12px;
  color: var(--gray-400);
}
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

.seo-section {
  padding: 48px 0;
}
.seo-section h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 8px;
}
.seo-section > .container > p {
  text-align: center;
  color: var(--gray-500);
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto 32px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.step-num {
  width: 40px;
  height: 40px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.step-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--gray-500); }

/* Legal section */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.legal-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}
.legal-card p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
}

/* Why section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.why-card .icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.why-card .icon-wrap svg { width: 18px; height: 18px; }
.why-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.why-card p { font-size: 13px; color: var(--gray-500); line-height: 1.6; }

/* ===== FAQ ===== */
.faq-list { }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--bg-card);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-800);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-q:hover { background: var(--gray-50); }
.faq-q svg {
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.7;
  border-top: 1px solid var(--gray-100);
  padding-top: 12px;
  margin-top: -2px;
}
.faq-item.open .faq-a { display: block; }

/* ===== FOOTER (always dark, independent of theme) ===== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 24px;
  font-size: 13px;
  margin-top: 48px;
}
.site-footer a { color: #93c5fd; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #bfdbfe; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.footer-col h4 { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; color: #e2e8f0; margin-bottom: 10px; }
.footer-col p { margin-bottom: 0; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 16px; text-align: center; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ===== ERROR ===== */
.error-msg {
  background: var(--red-50);
  color: var(--red-500);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 10px;
  display: none;
}

/* ===== SETTINGS TOGGLES ===== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.setting-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.setting-item:hover { border-color: var(--blue-600); background: var(--blue-50); }
.setting-item.active { border-color: var(--blue-600); background: var(--blue-50); }
.setting-toggle {
  width: 36px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.setting-item.active .setting-toggle { background: var(--blue-600); }
.setting-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.setting-item.active .setting-toggle::after { transform: translateX(16px); }
.setting-label { font-size: 13px; font-weight: 500; color: var(--gray-700); line-height: 1.3; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .premium-grid { grid-template-columns: 1fr; }
  .form-card { padding: 16px; }
  .premium-banner { padding: 24px 16px; }
  .premium-banner h2 { font-size: 18px; }
  .routes-table input, .routes-table select { font-size: 12px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-result { flex-direction: column; }
  .toc-nav { flex-wrap: wrap; gap: 6px; }
  .toc-nav a { font-size: 12px; padding: 6px 10px; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 32px 0 24px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .seo-section { padding: 32px 0; }
  .seo-section h2 { font-size: 20px; }
  .faq-q { padding: 12px 14px; font-size: 13px; }
  .faq-a { padding: 0 14px 14px; font-size: 12px; }
  .footer-col h4 { font-size: 13px; }
  .site-footer { padding: 32px 0 20px; font-size: 12px; }
  .btn-download { font-size: 15px; padding: 12px; }
  .btn-row { flex-wrap: wrap; }
  .form-group input, .form-group select { font-size: 16px; height: 42px; }
}
@media (max-width: 400px) {
  .form-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .header-badge { font-size: 11px; padding: 3px 8px; }
  .logo { font-size: 17px; }
  .cta-metrics { grid-template-columns: 1fr !important; text-align: center !important; }
}

/* ===== PRINT ===== */
@media print {
  .skip-link, .toc-nav, .premium-banner, .premium-cta, .btn,
  .settings-grid, .site-footer, .seo-section, .btn-danger,
  .testimonials-grid, noscript { display: none !important; }
  body { font-size: 12px; }
  .form-card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .container { max-width: 100%; padding: 0; }
}

/* ===== CONTENT BLOCKS ===== */
.content-block { }
.content-block p { font-size: 14px; color: var(--gray-600); line-height: 1.8; margin-bottom: 12px; }
.content-block h3 { font-size: 16px; font-weight: 700; color: var(--gray-800); margin: 20px 0 8px; }

/* ===== CALCULATOR BOX ===== */
.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.calc-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.calc-item { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--gray-50); border-radius: 6px; font-size: 13px; }
.calc-item.calc-total { background: var(--gray-100); font-weight: 700; grid-column: span 2; }
.calc-label { color: var(--gray-600); }
.calc-value { font-weight: 600; color: var(--gray-800); }
.calc-result { display: flex; gap: 16px; margin-bottom: 12px; }
.calc-result-item { flex: 1; padding: 16px; border-radius: 8px; }
.calc-result-item.bad { background: var(--red-50); border: 1px solid #fecaca; }
.calc-result-item.good { background: var(--green-50); border: 1px solid #bbf7d0; }
.calc-result-item h3 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.calc-result-item.bad h3 { color: var(--red-500); }
.calc-result-item.good h3 { color: var(--green-600); }
.calc-result-item p { font-size: 12px; color: var(--gray-600); margin-bottom: 4px; }
.calc-result-item strong { color: var(--gray-800); }
.calc-note { font-size: 13px; color: var(--gray-500); font-style: italic; }

/* ===== MISTAKES LIST ===== */
.mistakes-list { }
.mistake-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.mistake-item:last-child { border-bottom: none; }
.mistake-num {
  width: 32px;
  height: 32px;
  background: var(--red-50);
  color: var(--red-500);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.mistake-item h3 { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.mistake-item p { font-size: 13px; color: var(--gray-500); line-height: 1.6; }

/* ===== TOC NAV ===== */
.toc-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px 0;
}
.toc-nav a {
  font-size: 12px;
  color: var(--gray-500);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.15s;
}
.toc-nav a:hover { color: var(--blue-600); border-color: var(--blue-600); background: var(--blue-50); }

/* ===== BACK TO TOP ===== */
#backToTop:hover {
  background: var(--blue-600) !important;
  color: #fff !important;
  border-color: var(--blue-600) !important;
}
@media (max-width: 640px) {
  #backToTop { bottom: 16px !important; right: 16px !important; width: 40px !important; height: 40px !important; }
}
