/* =====================================================================
   Likteņa matricas kalkulators — dizains 1:1 pēc paraugs.png
   Gaišā tēma (krēms/balts/indigo), kā blmatrica.lv references.
   ===================================================================== */

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

:root {
  --accent: #4841df;       /* indigo akcents */
  --ink: #1a1a1a;
  --muted: #555;
  --hero-bg: #eae6e0;      /* krēmkrāsas augšdaļa */
  --line: #000;
  --cta-bg: #e3e0db;
}

body {
  font-family: "Montserrat", -apple-system, Arial, sans-serif;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
}

/* ---- Augšējā navigācija ---- */
.calc-topnav {
  background: var(--hero-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
}
.calc-topnav .brand {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid #c9c4ba; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--muted);
}
.calc-topnav .nav-right { display: flex; gap: 1.5rem; font-size: 0.9rem; }
.calc-topnav .nav-right a { color: var(--ink); text-decoration: none; }
.calc-topnav .nav-right a:hover { color: var(--accent); }

/* ---- Hero (virsraksts) ---- */
.calc-hero {
  background: var(--hero-bg);
  text-align: center;
  padding: 2.5rem 1rem 4rem;
}
.calc-hero h1 {
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.calc-hero p { font-size: 1.05rem; color: var(--muted); margin-top: 0.6rem; }

/* ---- Galvenais konteiners (2 kolonnas) ---- */
.calc-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  justify-content: center;
}
.calc-left { flex: 0 0 auto; }
.calc-right { flex: 1; max-width: 480px; min-width: 340px; }

/* ---- Ievades lauki ---- */
.calc-inputs { margin-bottom: 1rem; }
.calc-input-row { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.4rem; }
.calc-input-row label { color: var(--accent); font-weight: 700; font-size: 0.95rem; min-width: 130px; }
.calc-input-row input {
  border: none;
  border-bottom: 2px solid var(--accent);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
  padding: 2px 4px;
  outline: none;
  background: transparent;
  width: 130px;
}
.calc-input-row input::placeholder { font-weight: 400; color: #aaa; }
.calc-input-row .age-box { font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--accent); min-width: 50px; padding: 2px 4px; }

/* ---- SVG matrica ---- */
.matrix-svg { width: 560px; max-width: 100%; height: auto; display: block; }
.matrix-svg text.val { font-family: Arial, sans-serif; font-weight: 700; text-anchor: middle; dominant-baseline: central; fill: #000; }
.matrix-svg text.age { font-family: Arial, sans-serif; fill: #333; }

/* ---- Apakšējie skaitļi (dzimtas spēks, kods, mērķi) ---- */
.calc-bottom { margin-top: 1.5rem; }
.calc-bottom-row { display: flex; gap: 2.5rem; align-items: baseline; margin-bottom: 1.2rem; flex-wrap: wrap; }
.calc-bottom-row .lbl { font-weight: 700; }
.calc-bottom-row .val { border-bottom: 1.5px solid #000; min-width: 60px; text-align: center; font-weight: 700; padding: 0 6px; }

.goals { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.goal-col { font-size: 0.85rem; }
.goal-col .goal-title { color: var(--accent); font-weight: 700; margin-bottom: 0.6rem; line-height: 1.3; }
.goal-pair { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.goal-pair .pair-lbl { font-weight: 700; min-width: 46px; }
.circle-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #000;
  font-weight: 700; font-size: 0.95rem;
}
.goal-pair-brace { display: flex; align-items: center; gap: 0.4rem; }
.goal-result { margin-left: 0.3rem; }

/* ---- Veselības karte (tabula) ---- */
.health-title { color: var(--accent); font-weight: 700; font-size: 1.7rem; text-align: center; margin-bottom: 1.2rem; letter-spacing: 0.02em; }
.health-table { width: 100%; border-collapse: separate; border-spacing: 4px; }
.health-table th, .health-table td { font-size: 0.85rem; }
.health-table .col-h { background: #e1e1e1; text-align: center; font-weight: 700; padding: 0.6rem; border-radius: 2px; }
.health-table .desc-h { background: #e1e1e1; padding: 0.6rem; font-weight: 700; }
.health-num {
  text-align: center; font-weight: 700; font-size: 1.05rem;
  width: 56px; height: 56px; vertical-align: middle;
  border: 2px solid; border-radius: 2px;
}
.health-desc { padding: 0.4rem 0.6rem; color: #fff; font-size: 0.72rem; line-height: 1.25; border-radius: 2px; }
.health-table tr.total td { background: #e1e1e1; font-weight: 700; }
.health-table tr.total .health-num { border: none; background: #e1e1e1; font-size: 1.2rem; }
.health-table tr.total .desc-total { background: #e1e1e1; text-align: center; font-weight: 700; font-size: 1.1rem; padding: 0.6rem; }

/* ---- CTA bloks ---- */
.calc-cta {
  max-width: 760px; margin: 1rem auto 4rem; background: var(--cta-bg);
  text-align: center; padding: 3rem 2rem; border-radius: 2px;
}
.calc-cta p { font-size: 1.05rem; color: #333; margin: 0.3rem 0; }
.calc-cta .cta-btn {
  display: inline-block; margin-top: 1.5rem; padding: 0.9rem 2rem;
  border: 1px solid #999; border-radius: 30px; color: #333; text-decoration: none;
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; background: #f0eeea;
  transition: background 0.15s;
}
.calc-cta .cta-btn:hover { background: #fff; }

/* ---- PDF poga ---- */
.pdf-row { text-align: center; margin: 1.5rem 0; }
.pdf-btn {
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  padding: 0.8rem 2rem; font-size: 0.95rem; font-family: inherit; cursor: pointer;
  border-radius: 2px; transition: 0.2s;
}
.pdf-btn:hover { background: transparent; color: var(--accent); }

/* ---- Atvērto jautājumu piezīme ---- */
.calc-note { max-width: 1180px; margin: 0 auto 2rem; padding: 0 1.5rem; font-size: 0.8rem; color: #999; }

/* ---- Responsīvs ---- */
@media (max-width: 1000px) {
  .calc-main { flex-direction: column; align-items: center; }
  .calc-right { max-width: 560px; width: 100%; }
}
@media (max-width: 640px) {
  .calc-hero h1 { font-size: 1.9rem; }
  .matrix-svg { width: 100%; }
  .calc-topnav { padding: 0.8rem 1rem; }
  .calc-topnav .nav-right { gap: 0.8rem; font-size: 0.78rem; }
  .goals { gap: 1.5rem; }
}
