/* ---------------------------------------------
   DiPStrategy -- Tools & Kalkulator
   style/tools-calculator.css
   --------------------------------------------- */

.tc-hero {
  background:
    radial-gradient(circle at 82% 18%, #1a4f94 0%, rgba(26,79,148,0) 30%),
    linear-gradient(135deg, #0b2a4f 0%, var(--navy) 48%, #061b35 100%);
  padding: 180px 56px 100px;
  position: relative;
  overflow: hidden;
}

.tc-hero-pattern {
  position: absolute; inset: 0;
  background-image: url('../assets/pattern-01.png');
  background-repeat: repeat;
  opacity: 0.5; z-index: 0;
  pointer-events: none;
}

.tc-hero-inner {
  position: relative; z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
}

.tc-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 20px;
}

.tc-h1 {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1.08;
  color: #fff;
  margin-bottom: 18px;
}

.tc-h1 span { color: var(--lime); }

.tc-hero-desc {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  max-width: 620px;
}

/* --- BODY --- */
.tc-body {
  background: var(--cream);
  padding: 72px 56px 140px;
}

.tc-body-inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* --- Tabs --- */
.tc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.tc-tab-btn {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(9,53,100,0.15);
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tc-tab-btn:hover { border-color: var(--navy); }

.tc-tab-btn.active {
  background: var(--navy);
  color: var(--lime);
  border-color: var(--navy);
}

/* --- Card --- */
.tc-panel { display: none; }
.tc-panel.active { display: block; animation: fadeUp 0.35s ease; }

.tc-card {
  position: relative;
  background: var(--navy);
  border-radius: 20px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  overflow: hidden;
}

.tc-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/pattern-01.png');
  background-repeat: repeat;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

.tc-card > div {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  .tc-card { grid-template-columns: 1fr; padding: 28px; }
}

.tc-card-title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  margin-bottom: 6px;
}

.tc-card-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin-bottom: 24px;
}

.tc-field {
  margin-bottom: 18px;
}

.tc-field label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  margin-bottom: 8px;
}

.tc-field .tc-hint {
  display: block;
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
  line-height: 1.5;
}

.tc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.tc-input-wrap:focus-within { border-color: var(--lime); }

.tc-input-prefix {
  padding: 0 0 0 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.4);
}

.tc-field input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 14px;
}

.tc-field input::placeholder { color: rgba(255,255,255,0.3); }

.tc-field select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.tc-field select option { background: #05213F; color: #fff; }

.tc-btn {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--navy);
  background: var(--lime);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  margin-top: 8px;
}

.tc-btn:hover { background: #f0ff50; transform: translateY(-1px); }

/* --- Result side --- */
.tc-result {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tc-result-empty {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  text-align: center;
  line-height: 1.7;
}

.tc-stat {
  margin-bottom: 20px;
}

.tc-stat:last-child { margin-bottom: 0; }

.tc-stat-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}

.tc-stat-value {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 28px;
  color: var(--lime);
  line-height: 1.2;
}

.tc-stat-value.tc-sub { font-size: 18px; color: #fff; }

/* --- Allocation bar (budget split per channel) --- */
.tc-alloc-row {
  margin-bottom: 16px;
}

.tc-alloc-row:last-child { margin-bottom: 0; }

.tc-alloc-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.tc-alloc-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.tc-alloc-figures {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

.tc-alloc-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.tc-alloc-fill {
  height: 100%;
  background: var(--lime);
  border-radius: 999px;
}

.tc-verdict {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}

.tc-verdict.good  { background: rgba(222,255,45,0.15); color: var(--lime); }
.tc-verdict.warn  { background: rgba(255,180,45,0.15); color: #ffc94d; }
.tc-verdict.bad   { background: rgba(255,80,80,0.15);  color: #ff8a8a; }

.tc-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 20px 0;
}

/* --- Info strip under card --- */
.tc-info-strip {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

@media (max-width: 560px) {
  .tc-info-strip { grid-template-columns: 1fr; }
}

.tc-info-item {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
}

.tc-info-item h4 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 6px;
}

.tc-info-item p {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: rgba(9,53,100,0.65);
  line-height: 1.6;
}

/* --- Cross-link strip back to Tools Hub --- */
.tc-more-tools {
  margin-top: 20px;
  background: #fff;
  border: 1px dashed rgba(9,53,100,0.2);
  border-radius: 14px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tc-more-tools p {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: rgba(9,53,100,0.7);
}

.tc-more-tools a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.tc-more-tools a:hover { text-decoration: underline; }

/* --- Tools Hub: tool cards grid --- */
.tc-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.tc-tool-card {
  position: relative;
  display: block;
  background: var(--navy);
  border-radius: 20px;
  padding: 32px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s;
}

.tc-tool-card:hover { transform: translateY(-3px); }

.tc-tool-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/pattern-01.png');
  background-repeat: repeat;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

.tc-tool-card-inner {
  position: relative;
  z-index: 1;
}

.tc-tool-card-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 14px;
}

.tc-tool-card-title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  margin-bottom: 10px;
}

.tc-tool-card-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin-bottom: 20px;
}

.tc-tool-card-cta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── High contrast mode ──────────────────────────
   .tc-body carries a cream background, so the site's HC script tags it
   .hc-cream-bg and forces every descendant to black text — including the
   dark navy cards nested inside it. Pull those back to white, and give the
   white-background cards explicit black (plain white bg isn't auto-detected). */
html[data-hc="1"] .tc-card,
html[data-hc="1"] .tc-card *,
html[data-hc="1"] .tc-tool-card,
html[data-hc="1"] .tc-tool-card *,
html[data-hc="1"] .tc-result,
html[data-hc="1"] .tc-result * {
  color: #fff !important;
}

html[data-hc="1"] .tc-info-item,
html[data-hc="1"] .tc-info-item *,
html[data-hc="1"] .tc-more-tools,
html[data-hc="1"] .tc-more-tools * {
  color: #000 !important;
}
