/* ============ Основа (mobile-first) ============ */
:root {
  --accent: #0b6e4f;
  --accent-dark: #084d38;
  --accent-light: #e6f4ef;
  --ink: #1a2330;
  --ink-soft: #55627a;
  --line: #e3e8ef;
  --bg: #f6f8fa;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(16, 42, 67, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============ Хедър ============ */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  text-decoration: none;
}

.logo span { color: var(--ink); }

/* ============ Херо ============ */
.hero {
  padding: 28px 0 8px;
  text-align: center;
}

.hero h1 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 8px;
}

.hero p {
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 560px;
  font-size: 0.95rem;
}

/* ============ Карта на калкулатора ============ */
.calc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin: 20px 0 28px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg);
  border-radius: 10px;
  padding: 5px;
  margin-bottom: 18px;
}

.mode-switch label {
  text-align: center;
  padding: 9px 6px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}

.mode-switch input { position: absolute; opacity: 0; }

.mode-switch input:checked + span { color: #fff; }

.mode-switch label:has(input:checked) {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(11, 110, 79, 0.3);
}

.field { margin-bottom: 14px; }

.field > label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.field input[type='number'],
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-family: inherit;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.field input[type='number']:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.15);
}

.amount-input { position: relative; }

.options-row {
  display: grid;
  gap: 12px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ============ Резултати ============ */
.results { margin-top: 20px; }

.empty-hint {
  margin-top: 16px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  background: var(--accent-light);
  border-radius: 10px;
  padding: 14px;
}

.net-highlight {
  text-align: center;
  background: var(--accent-light);
  border-radius: 12px;
  padding: 18px 12px;
}

.net-highlight .label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
}

.net-highlight .value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-dark);
  line-height: 1.2;
  margin-top: 4px;
}

.net-highlight .sub {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-dark);
  opacity: 0.7;
  margin-top: 2px;
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.summary-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.summary-box .label {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.summary-box .value {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2px;
}

.notice {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #8a5a00;
  background: #fff7e6;
  border: 1px solid #f0dfb8;
  border-radius: 8px;
  padding: 8px 12px;
}

/* Разгъваема разбивка */
details.breakdown {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

details.breakdown summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--accent-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.breakdown summary::-webkit-details-marker { display: none; }

details.breakdown summary::after {
  content: '▾';
  transition: transform 0.2s;
  color: var(--ink-soft);
}

details.breakdown[open] summary::after { transform: rotate(180deg); }

.breakdown-inner { padding: 0 14px 14px; overflow-x: auto; }

table.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.breakdown-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

table.breakdown-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

table.breakdown-table td:nth-child(2),
table.breakdown-table td:nth-child(3),
table.breakdown-table th:nth-child(2),
table.breakdown-table th:nth-child(3) {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table.breakdown-table tr.total td {
  font-weight: 700;
  border-bottom: none;
  background: var(--bg);
}

table.breakdown-table tr.result td {
  font-weight: 800;
  color: var(--accent-dark);
  border-bottom: none;
}

.table-caption {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 14px 0 4px;
}

/* ============ Рекламни слотове ============ */
.ad-slot {
  min-height: 90px;
  margin: 24px 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8c0cc;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============ Съдържание ============ */
.content { padding-bottom: 20px; }

.content h2 {
  font-size: 1.3rem;
  margin: 34px 0 12px;
  line-height: 1.35;
}

.content h3 {
  font-size: 1.05rem;
  margin: 22px 0 8px;
}

.content p, .content li {
  color: #333d4d;
  font-size: 0.96rem;
}

.content ul { padding-left: 22px; }

/* ============ FAQ ============ */
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 0 16px;
}

.faq summary {
  font-weight: 600;
  padding: 14px 0;
  cursor: pointer;
  font-size: 0.95rem;
}

.faq p { margin: 0 0 14px; }

/* ============ Футър ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  margin-top: 30px;
  padding: 24px 0 32px;
}

.site-footer p {
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin: 6px 0;
}

/* ============ По-големи екрани ============ */
@media (min-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.05rem; }
  .calc-card { padding: 28px; }
  .options-row { grid-template-columns: 1fr 1fr; align-items: start; }
  .net-highlight .value { font-size: 2.8rem; }
  .content h2 { font-size: 1.45rem; }
}
