/* ============================================================
   CALCOLATORI
   ============================================================ */

.calc-page-hero {
  padding: 100px 0 32px;
}
@media (max-width: 900px) {
  .calc-page-hero { padding: 84px 0 24px; }
}
.calc-page-hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin-top: 10px;
  line-height: 1.15;
}
.calc-page-hero .lead { font-size: 15px; }

.calc-section { padding: clamp(32px, 4vw, 48px) 0; border-top: 1px solid var(--hairline); }
.calc-section.bg-dark { border-top: none; border-bottom: 1px solid rgba(240,237,238,0.1); }

.calc-head { max-width: 760px; margin-bottom: 24px; }
.calc-head h1, .calc-head h2 {
  margin-top: 8px;
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.18;
  text-wrap: balance;
}
.calc-head h1 em, .calc-head h2 em { font-style: italic; color: var(--deep-crimson); font-weight: 400; }
.bg-dark .calc-head h1 em, .bg-dark .calc-head h2 em { color: var(--firebrick-red); }
.calc-head .lead { font-size: 15px; max-width: 62ch; }
.calc-assumption-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 300;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}
.calc-assumption-note strong { color: var(--deep-space-blue); font-weight: 700; }
.calc-assumption-note a { color: var(--deep-crimson); text-decoration: underline; }

/* SHELL */
.calc-shell {
  background: var(--platinum);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  padding: 26px 28px;
}
.calc-shell-dark {
  background: rgba(240, 237, 238, 0.04);
  border: 1px solid rgba(240, 237, 238, 0.12);
}
@media (max-width: 700px) {
  .calc-shell { padding: 20px 16px; }
}

/* FORM (riuso pattern esistente + variante compatta) */
.calc-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
}
.calc-form-compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.calc-field { display: flex; flex-direction: column; gap: 6px; }
.calc-field label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.bg-dark .calc-field label { color: rgba(240,237,238,0.7); }
.calc-field label small { opacity: 0.7; font-weight: 400; }

.calc-input-wrap {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--hairline-strong);
  border-radius: 7px;
  padding: 0 12px;
  height: 42px;
}
.bg-dark .calc-input-wrap {
  background: rgba(240,237,238,0.06);
  border-color: rgba(240,237,238,0.18);
}
.calc-input-wrap input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 16px;
  font-weight: 500;
  color: var(--deep-space-blue);
  padding: 0 6px;
}
.bg-dark .calc-input-wrap input { color: var(--platinum); }
.calc-prefix, .calc-suffix {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.bg-dark .calc-prefix, .bg-dark .calc-suffix { color: rgba(240,237,238,0.5); }

.freq-toggle {
  display: flex;
  border: 1px solid var(--hairline-strong);
  border-radius: 7px;
  overflow: hidden;
  height: 42px;
}
.freq-btn {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  background: white;
  padding: 0 10px;
  text-align: center;
  transition: all 0.2s;
}
.freq-btn:not(:first-child) {
  border-left: 1px solid var(--hairline-strong);
}
.freq-btn.active { background: var(--deep-space-blue); color: var(--platinum); }
.freq-btn.active:not(:first-child) { border-left-color: var(--deep-space-blue); }

.calc-btn { height: 42px; padding: 0 22px; font-size: 14px; white-space: nowrap; }

/* CHART (calcolatore 1) */
.calc-chart-wrap { margin-bottom: 22px; }
.calc-chart {
  width: 100%;
  height: auto;
  max-height: 220px;
  aspect-ratio: 600 / 240;
  overflow: visible;
}
.calc-chart-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-compound { background: var(--firebrick-red); }
.legend-simple { background: var(--silver); }

/* RESULT MINI CARDS (calcolatore 1) */
.calc-results-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 700px) {
  .calc-results-row { grid-template-columns: 1fr; }
}
.result-mini {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 14px;
  text-align: center;
}
.result-mini-highlight {
  background: var(--deep-space-blue);
  border-color: var(--deep-space-blue);
}
.result-mini-label {
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.result-mini-highlight .result-mini-label { color: rgba(240,237,238,0.65); }
.result-mini-value {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--deep-space-blue);
}
.result-mini-highlight .result-mini-value { color: var(--firebrick-red); }

.calc-note {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.5;
  max-width: 62ch;
}

/* CALCOLATORE COSTI (2) */
.calc-costi-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 700px) {
  .calc-costi-results { grid-template-columns: 1fr; }
}
.calc-costi-col {
  background: rgba(240, 237, 238, 0.04);
  border: 1px solid rgba(240, 237, 238, 0.14);
  border-radius: 8px;
  padding: 18px;
}
.calc-costi-period {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--firebrick-red);
  margin-bottom: 12px;
}
.calc-costi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(240, 237, 238, 0.1);
  font-size: 13px;
  color: rgba(240, 237, 238, 0.75);
}
.calc-costi-row strong { color: var(--platinum); font-size: 14px; }
.calc-costi-row:last-child { border-bottom: none; }
.calc-costi-loss strong { color: var(--firebrick-red); }

/* CALCOLATORE 3 - risultati (riuso pattern result-card gia' esistente nel sito) */
.calc-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .calc-results { grid-template-columns: 1fr; }
}
.result-card {
  background: white;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 18px;
  position: relative;
}
.result-strategy {
  border-color: var(--firebrick-red);
  border-width: 2px;
}
.result-badge {
  position: absolute;
  top: -11px;
  left: 18px;
  background: var(--firebrick-red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.result-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
}
.result-strategy .result-dot { background: var(--firebrick-red); }
.result-label {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.result-label small { opacity: 0.7; }
.result-value {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--deep-space-blue);
  margin-bottom: 4px;
}
.result-gain {
  font-size: 12px;
  color: var(--deep-crimson);
  font-weight: 500;
}

/* DISCLAIMER */
.calc-disclaimer-section { padding: 28px 0 48px; }
.calc-disclaimer-box {
  background: var(--linen, #ECE9E3);
  border-left: 3px solid var(--deep-crimson);
  border-radius: 4px;
  padding: 20px 22px;
}
.calc-disclaimer-box h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--deep-space-blue);
}
.calc-disclaimer-box p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 10px;
  max-width: none;
}
.calc-disclaimer-box p:last-child { margin-bottom: 0; }
.calc-disclaimer-box strong { color: var(--deep-space-blue); }
.calc-disclaimer-box a { color: var(--deep-crimson); font-weight: 500; text-decoration: underline; }

/* ============================================================
   CALCOLATORI — HUB PAGE (card introduttive)
   ============================================================ */

.calc-hub-hero {
  padding: 110px 0 50px;
  text-align: center;
}
@media (max-width: 900px) { .calc-hub-hero { padding: 90px 0 36px; } }

.calc-hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(114, 24, 23, 0.08);
  color: var(--deep-crimson);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.calc-hub-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}
.calc-hub-hero .lead { text-align: center; }

.calc-hub-grid-section { padding: 0 0 80px; }
.calc-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .calc-hub-grid { grid-template-columns: 1fr; gap: 18px; }
}

.calc-hub-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 30px 26px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.calc-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -24px rgba(0, 52, 89, 0.25);
}

.calc-hub-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.calc-hub-icon-1 { background: rgba(0, 52, 89, 0.08); color: var(--deep-space-blue); }
.calc-hub-icon-2 { background: rgba(223, 41, 53, 0.1); color: var(--firebrick-red); }
.calc-hub-icon-3 { background: rgba(114, 24, 23, 0.08); color: var(--deep-crimson); }

.calc-hub-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.calc-hub-card h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  line-height: 1.25;
}
.calc-hub-card > p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  font-weight: 300;
  margin-bottom: 16px;
}

.calc-hub-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.calc-hub-list li {
  font-size: 13px;
  color: var(--ink-soft);
  padding-left: 20px;
  position: relative;
}
.calc-hub-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--deep-crimson);
}

.calc-hub-btn {
  width: 100%;
  justify-content: center;
}

/* Link "torna a tutti i calcolatori" nelle pagine singole */
.calc-back-wrap { padding-top: 100px; }
@media (max-width: 900px) { .calc-back-wrap { padding-top: 84px; } }
.calc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  transition: color 0.2s;
}
.calc-back-link:hover { color: var(--deep-crimson); }

.calc-section-single { padding-top: 30px; }
