/* style.css — מחשבון פטור ממס בהתחדשות עירונית | lendover.co.il */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --copper:       #B8743D;
  --copper-dark:  #9A5F2E;
  --copper-light: #F5E9DC;
  --teal:         #5BC8C4;
  --teal-light:   #E0F7F6;
  --charcoal:     #3C3C3C;
  --text:         #2C2C2C;
  --text-muted:   #777777;
  --bg:           #F0EDE6;
  --bg-white:     #FFFFFF;
  --border:       #E2DDD6;
  --red:          #C0392B;
  --green:        #2E7D52;
  --radius:       4px;
  --shadow:       0 2px 12px rgba(0,0,0,0.08);
}

html { font-size: 16px; }
body {
  font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  padding-bottom: 48px;
}

/* Navbar */
nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 8px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-app-brand, .nav-site-brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.nav-app-logo { width: auto; height: 132px; object-fit: contain; display: block; }
.nav-site-brand { opacity: 0.8; transition: opacity 0.2s; }
.nav-site-brand:hover { opacity: 1; }
.nav-site-logo { height: 96px; width: auto; }

/* Hero */
.hero {
  background: var(--charcoal);
  color: #fff; text-align: center;
  padding: 28px 24px 24px;
}
.hero h1 { font-size: 1.7rem; font-weight: 700; margin-bottom: 8px; }
.hero p  { font-size: 1rem; color: rgba(255,255,255,0.75); font-weight: 300; }

/* Container */
.container { max-width: 720px; margin: 28px auto 0; padding: 0 16px; }

/* Progress */
.progress { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.progress-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-white); border: 1.5px solid var(--border);
  color: var(--text-muted); font-size: 0.9rem; font-weight: 700;
}
.progress-dot.is-active { background: var(--copper); border-color: var(--copper); color: #fff; }
.progress-dot.is-done { background: var(--copper-light); border-color: var(--copper); color: var(--copper-dark); }

/* Section title */
.section-title {
  font-size: 1.1rem; font-weight: 700; color: var(--charcoal);
  margin-bottom: 18px; padding-bottom: 10px; position: relative;
}
.section-title::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 40px; height: 2px; background: var(--copper);
}

/* Card / wizard step */
.card {
  background: var(--bg-white);
  border-top: 3px solid var(--copper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px; margin-bottom: 20px;
}
.wizard-step { display: none; }
.wizard-step.is-active { display: block; }

/* Choice grid */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.choice {
  padding: 18px 14px;
  background: var(--bg-white);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Heebo', sans-serif; font-size: 0.98rem; font-weight: 600;
  color: var(--text); cursor: pointer; transition: all 0.15s;
}
.choice:hover { border-color: var(--copper); }
.choice.is-selected { background: var(--copper-light); border-color: var(--copper); color: var(--copper-dark); }

/* Form */
.field-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.field-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.field-group input[type=number] {
  padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Heebo', sans-serif; font-size: 1rem;
  color: var(--text); background: var(--bg-white);
  transition: border-color 0.15s;
}
.field-group input[type=number]:focus { outline: none; border-color: var(--copper); }
.field-group input.is-invalid { border-color: var(--red); }
.field-row { display: flex; gap: 14px; }
.field-row .field-group { flex: 1; }
.hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.field-error { font-size: 0.76rem; color: var(--red); font-weight: 600; }

.levy-check { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; cursor: pointer; margin-bottom: 12px; }
.levy-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--copper); cursor: pointer; }

/* Wizard nav */
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.btn-primary {
  padding: 11px 32px;
  background: var(--copper); color: #fff; border: none; border-radius: var(--radius);
  font-family: 'Heebo', sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover:not(:disabled) { background: var(--copper-dark); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary {
  padding: 10px 24px;
  background: transparent; color: var(--copper);
  border: 1.5px solid var(--copper); border-radius: var(--radius);
  font-family: 'Heebo', sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.btn-secondary:hover { background: var(--copper-light); }

/* Result blocks */
.result-block { margin-top: 22px; }
.result-block:first-child { margin-top: 0; }
.result-block h3 {
  font-size: 0.95rem; font-weight: 700; color: var(--copper-dark); margin-bottom: 8px;
}
.result-line {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 4px; border-bottom: 1px dashed var(--border); font-size: 0.9rem;
}
.result-line .lbl { color: var(--text); }
.result-line .lbl small { color: var(--text-muted); font-size: 0.78rem; }
.result-line .amt { font-weight: 700; color: var(--charcoal); white-space: nowrap; }
.result-line.is-max { background: var(--copper-light); border-radius: var(--radius); }
.result-line.is-max .amt { color: var(--copper-dark); }
.result-line.is-muted { opacity: 0.6; }
.result-line.is-fail .amt { color: var(--red); }
.result-line.is-ok .amt { color: var(--green); }

/* Grand total / split */
.split-box {
  display: flex; justify-content: space-between; align-items: center;
  border-radius: var(--radius); padding: 14px 20px; margin-top: 12px;
}
.split-exempt { background: var(--teal-light); border: 1px solid var(--teal); }
.split-taxable { background: #FEF0F0; border: 1px solid #F5BCBC; }
.split-box .sb-label { font-size: 0.95rem; font-weight: 600; }
.split-exempt .sb-label { color: #1E5C59; }
.split-taxable .sb-label { color: var(--red); }
.split-box .sb-amount { font-size: 1.6rem; font-weight: 800; }
.split-exempt .sb-amount { color: #1E5C59; }
.split-taxable .sb-amount { color: var(--red); }
.split-box .sb-amount small { font-size: 0.85rem; font-weight: 500; }

/* Notes */
.note {
  background: #FEF6ED; border: 1px solid #F0C68A;
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 0.84rem; color: #8A5A1A; margin-top: 14px; line-height: 1.5;
}
.disclaimer {
  font-size: 0.78rem; color: var(--text-muted);
  margin-top: 18px; line-height: 1.6;
}
#export-pdf-btn, #reset-btn { display: block; width: 100%; margin-top: 14px; }

/* About / footer */
.about-tool {
  max-width: 860px; margin: 40px auto 0; padding: 0 20px 40px;
  text-align: right; color: #444; line-height: 1.7;
}
.about-tool h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: #1a2b4a; }
.about-tool h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--charcoal); }
.about-tool p { margin-bottom: 8px; }
.about-tool ul { padding-right: 20px; margin: 0; }
.about-tool li { margin-bottom: 7px; }
.seo-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin: 22px 0 26px;
}
.seo-grid > div, .faq-list details, .service-bridge {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.faq-list {
  display: grid; gap: 10px; margin: 14px 0 22px;
}
.faq-list summary {
  color: var(--charcoal);
  cursor: pointer;
  font-weight: 700;
}
.faq-list details[open] summary { margin-bottom: 8px; color: var(--copper-dark); }
.service-bridge {
  border-right: 4px solid var(--copper);
  margin: 22px 0;
}
footer {
  text-align: center; padding: 20px; font-size: 0.82rem;
  color: #888; border-top: 1px solid #eee; margin-top: 20px;
}
footer a, .about-tool a { color: #1a6fb5; text-decoration: none; }

/* Responsive */
@media (max-width: 540px) {
  nav { padding: 10px 16px; }
  .nav-app-logo { height: 94px; }
  .nav-site-logo { height: 68px; }
  .hero { padding: 24px 14px 20px; }
  .hero h1 { font-size: 1.3rem; }
  .card { padding: 18px 16px; }
  .choice-grid { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
  .split-box .sb-amount { font-size: 1.35rem; }
  .seo-grid { grid-template-columns: 1fr; }
  .seo-grid > div, .faq-list details, .service-bridge { padding: 15px 16px; }
}

/* v4 — mode switcher + developer mode */
.mode-switcher {
  display: flex; justify-content: center; gap: 0;
  background: var(--bg-white); border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.mode-tab {
  padding: 14px 28px;
  background: transparent; color: var(--text-muted);
  border: none; border-bottom: 3px solid transparent;
  font-family: 'Heebo', sans-serif; font-size: 0.98rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.mode-tab:hover { color: var(--copper); }
.mode-tab.is-active { color: var(--copper-dark); border-bottom-color: var(--copper); }
.mode-pane { display: none; }
.mode-pane.is-active { display: block; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; cursor: pointer;
  color: var(--text-muted); transition: all 0.15s; margin-bottom: 14px;
}
.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--copper); background: var(--copper-light); color: var(--copper-dark);
}
.dropzone p { margin: 0; font-size: 0.95rem; }

.upload-guide {
  background: #FBF8F3;
  border: 1px solid var(--border);
  border-right: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.upload-guide h3 {
  font-size: 0.98rem;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.upload-guide p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.55;
  margin-bottom: 10px;
}
.upload-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.upload-guide strong {
  display: block;
  color: var(--copper-dark);
  font-size: 0.84rem;
  margin-bottom: 6px;
}
.upload-guide ul {
  margin: 0;
  padding-right: 18px;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.7;
}
.upload-guide-note {
  margin-top: 10px;
  margin-bottom: 0 !important;
}

.mapping-row {
  display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px;
  padding: 10px 8px; border-bottom: 1px solid var(--border);
  align-items: center;
}
.mapping-row:first-child { font-weight: 700; color: var(--copper-dark); background: var(--copper-light); }
.mapping-row select {
  padding: 8px 10px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Heebo', sans-serif; font-size: 0.92rem; background: var(--bg-white);
}
.mapping-row .preview {
  font-size: 0.85rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.kpi-card {
  background: var(--copper-light); border: 1px solid var(--copper);
  border-radius: var(--radius); padding: 14px 16px;
}
.kpi-card .kpi-label { font-size: 0.78rem; color: var(--copper-dark); font-weight: 600; margin-bottom: 4px; }
.kpi-card .kpi-value { font-size: 1.5rem; font-weight: 800; color: var(--charcoal); }
.kpi-card .kpi-value small { font-size: 0.85rem; font-weight: 500; }
.kpi-card.kpi-danger { background: #FEF0F0; border-color: #F5BCBC; }
.kpi-card.kpi-danger .kpi-label { color: var(--red); }
.kpi-card.kpi-success { background: var(--teal-light); border-color: var(--teal); }
.kpi-card.kpi-success .kpi-label { color: #1E5C59; }
.kpi-card.kpi-warning { background: #FEF6ED; border-color: #F0C68A; }
.kpi-card.kpi-warning .kpi-label { color: #8A5A1A; }

.results-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 14px; }
.results-table th, .results-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: right;
  vertical-align: top;
}
.results-table th { background: var(--copper-light); color: var(--copper-dark); font-weight: 700; white-space: nowrap; }
.results-table tr.row-taxable { background: #FEF0F0; }
.results-table tr.row-exempt { background: var(--teal-light); }
.results-table tr.row-incomplete { background: #FEF6ED; }
.results-table tr.row-partial-result { border-right: 4px solid #F0C68A; }
.results-table .num { white-space: nowrap; font-weight: 600; }
.results-table-wrap { overflow-x: auto; max-height: 70vh; }

/* Developer mode: wider container, room for big result tables. */
#mode-developer .container { max-width: 1280px; }
@media (max-width: 1320px) {
  #mode-developer .container { max-width: calc(100vw - 32px); }
}
