* {
  box-sizing: border-box;
}

:root {
  --blue: #0f3f75;
  --blue-dark: #0b2850;
  --green: #2f8f6b;
  --green-soft: #e7f5ee;
  --blue-soft: #e8f1fb;
  --text: #172033;
  --muted: #5d6b7a;
  --card: #ffffff;
  --shadow: 0 14px 35px rgba(15, 35, 60, 0.13);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: #f6f9fc;
}

/* ===== NAWIGACJA / STRONA GŁÓWNA ===== */

.top-nav {
  min-height: 76px;
  padding: 0 44px;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 18px rgba(15, 35, 60, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--blue);
  font-size: 30px;
  font-weight: 800;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e7f5ee, #dcecff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 23px;
}

.hero {
  min-height: calc(100vh - 76px);
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.70) 0%,
      rgba(255, 255, 255, 0.34) 42%,
      rgba(255, 255, 255, 0.04) 100%
    ),
    url("assets/tlo-uzdrowisko.png");
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px 6vw 44px;
}

.hero-text {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-text h1 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(42px, 5.4vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.65);
}

.hero-text p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: 21px;
  line-height: 1.45;
  color: #243246;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.8);
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
  transform: translateY(-100px);
}

.home-card {
  display: block;
  min-height: 150px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(4px);
  border-radius: 18px;
  padding: 20px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.home-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 42px rgba(15, 35, 60, 0.20);
}

.card-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  font-weight: 800;
}

.card-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.card-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.home-card h2 {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 19px;
}

.home-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 14px;
}

/* ===== PODSTRONY / OGÓLNE ===== */

.page-header {
  background: #243b6b;
  color: white;
  padding: 32px 20px;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.page-header p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

.container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px 48px;
}

.container a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.container a:hover {
  text-decoration: underline;
}

.small {
  color: #64748b;
  font-size: 13px;
}

.content-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d9e5ea;
  border-radius: 22px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 10px 30px rgba(26, 59, 88, 0.08);
}

.content-card h2 {
  margin-top: 0;
  color: #17324d;
}

.content-card p {
  line-height: 1.6;
}

/* ===== NAGŁÓWEK ARTYKUŁU ===== */

.article-hero {
  min-height: 320px;
  background:
    linear-gradient(
      rgba(12, 34, 68, 0.58),
      rgba(12, 34, 68, 0.62)
    ),
    url("assets/park.png");
  background-size: cover;
  background-position: center;
  display: block;
  color: white;
  padding: 0;
}

.article-hero-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 64px 24px;
  box-sizing: border-box;
}

.article-hero h1 {
  width: 100%;
  max-width: none;
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1.12;
  color: white;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.25);
  letter-spacing: -0.02em;
}

.article-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.08rem;
  line-height: 1.55;
}

.article-hero .eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

/* ===== KARTY / FAQ ===== */

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.question-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #dbe6ef;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(26, 59, 88, 0.08);
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.question-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(26, 59, 88, 0.13);
}

.question-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #17324d;
}

.question-card p {
  margin: 0;
  color: #546173;
  line-height: 1.5;
}

.question-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eaf2ff;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  flex-shrink: 0;
}

.question-card-muted {
  opacity: 0.75;
}

.strong-question {
  width: 42px;
  height: 42px;
  color: #173b75;
  background: #edf4ff;
  font-weight: 800;
  font-size: 1.35rem;
  border: 1px solid #d2def0;
  margin-bottom: 14px;
}

.free-icon {
  color: #2e8b57;
  font-weight: 700;
  font-size: 1.1rem;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.summary-card {
  background: #ffffff;
  border: 1px solid #dbe6ef;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 12px 32px rgba(26, 59, 88, 0.08);
}

.summary-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eaf2ff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.summary-card h2 {
  margin: 0 0 6px;
  color: #17324d;
  font-size: 1.1rem;
}

.summary-card p {
  margin: 0;
  color: #546173;
}

/* ===== FILTRY / KONTROLKI ===== */

.controls {
  display: flex;
  gap: 12px;
  margin: 18px 0 16px;
  flex-wrap: wrap;
}

.controls input,
.controls select {
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  background: white;
}

.controls input {
  flex: 1;
  min-width: 260px;
}

.controls select {
  min-width: 240px;
}

.summary {
  margin-bottom: 12px;
  font-weight: bold;
}

/* ===== TABELE OGÓLNE ===== */

.table-wrapper {
  background: white;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

thead {
  background: #e8eefc;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 14px;
  color: #1e3a8a;
}

td {
  font-size: 14px;
}

tr:hover {
  background: #f8fafc;
}

.amount {
  white-space: nowrap;
  font-weight: bold;
}

/* ===== TABELA DOPŁAT / WSPÓLNY WYGLĄD ===== */

.payments-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #b9c8dc;
  border-radius: 16px;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.payments-table thead {
  background: transparent;
}

.payments-table thead th,
.payments-table thead .table-main-head,
.payments-table thead .payments-group {
  background: #dce8f8;
  color: #0b2850;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: left;
  padding: 14px 14px;
  border-right: 1px solid #b9c8dc;
  border-bottom: 1px solid #b9c8dc;
  vertical-align: middle;
}

.payments-table thead th:last-child {
  border-right: none;
}

.payments-table tbody td {
  background: #ffffff;
  color: #1d2f4a;
  font-family: Arial, sans-serif;
  font-size: 0.94rem;
  line-height: 1.45;
  padding: 15px 14px;
  border-right: 1px solid #d3dce9;
  border-bottom: 1px solid #d3dce9;
  vertical-align: top;
}

.payments-table tbody td:last-child {
  border-right: none;
}

.payments-table tbody tr:last-child td {
  border-bottom: none;
}

.payments-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

.payments-table tbody tr:hover td {
  background: #f1f6fd;
}

/* ===== KALKULATOR NFZ ===== */

.calculator-card {
  max-width: 1120px;
  margin: 0 auto 48px;
  padding: 28px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #d5e1ee;
  box-shadow: 0 14px 38px rgba(15, 44, 82, 0.08);
}

.calculator-card h2 {
  margin-top: 0;
  margin-bottom: 14px;
  color: #062b4f;
  font-size: 1.65rem;
}

.calculator-card > p {
  max-width: 920px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ===== POLA WYBORU KALKULATORA ===== */

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.calculator-grid-location {
  grid-template-columns: 1fr 1fr 1.4fr;
}

.calculator-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 800;
  color: #082b4d;
}

.calculator-grid select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #c5d3e5;
  border-radius: 12px;
  background: #ffffff;
  color: #0d2038;
  font-size: 0.98rem;
  font-family: inherit;
}

.calculator-grid select:focus {
  outline: 2px solid #8fb6e8;
  border-color: #6d9bd8;
}

/* ===== INFO O WYBRANYM SANATORIUM ===== */

.selected-sanatorium-info {
  margin: 8px 0 24px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f3f7fd;
  border: 1px solid #d5e1ee;
  color: #334966;
  line-height: 1.55;
  font-size: 0.96rem;
}

.selected-sanatorium-info strong {
  display: inline-block;
  margin-bottom: 4px;
  color: #062b4f;
}

/* ===== KAFELKI WYNIKÓW ===== */

.calculator-result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
  align-items: stretch;
  margin: 26px 0 24px;
}

.result-box {
  min-height: 112px;
  height: 112px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f4f8fe;
  border: 1px solid #c9d9ec;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-box span {
  display: block;
  margin-bottom: 10px;
  color: #425877;
  font-size: 0.88rem;
  line-height: 1.25;
  font-weight: 400;
}

.result-box strong {
  color: #0b4078;
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 900;
}

.result-box.private {
  background: #fff7ed;
  border-color: #f3cf9f;
}

.result-box.private strong {
  color: #9a4b00;
}

.result-box.highlight {
  background: #e8f7ef;
  border-color: #b8dfca;
}

.result-box.highlight strong {
  color: #087044;
}

/* Kafelki prywatnych średnich mają ten sam rozmiar i font */
.private-result-group {
  display: block;
}

.private-result-group .result-box {
  width: 100%;
  min-height: 112px;
  height: 112px;
}

.result-box.private-small {
  padding: 16px 18px;
}

.result-box.private-small span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.88rem;
  line-height: 1.25;
  font-weight: 400;
  color: #425877;
}

.result-box.private-small strong {
  color: #9a4b00;
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 900;
}

/* Układ kafelków */
.result-nfz-days {
  grid-column: 1;
  grid-row: 1;
}

.result-private-days {
  grid-column: 1;
  grid-row: 2;
}

.result-patient-total {
  grid-column: 2;
  grid-row: 1;
}

.result-nfz-daily {
  grid-column: 3;
  grid-row: 1;
}

.result-nfz-total {
  grid-column: 4;
  grid-row: 1;
}

.result-total-value {
  grid-column: 5;
  grid-row: 1;
}

.private-result-group.result-private-daily {
  grid-column: 3;
  grid-row: 2;
}

.private-result-group.result-private-total {
  grid-column: 4;
  grid-row: 2;
}

.result-private-note {
  grid-column: 5;
  grid-row: 2;
  margin: 0;
  padding: 4px 4px 0;
  color: #6b5a42;
  font-size: 0.78rem;
  line-height: 1.35;
  align-self: start;
}

/* ===== TABELA WYLICZEŃ KALKULATORA ===== */

.calculation-table-wrapper {
  margin-top: 22px;
  overflow-x: auto;
}

.calculation-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}

.calculation-table th,
.calculation-table td {
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.calculation-table th:nth-child(1),
.calculation-table td:nth-child(1) {
  width: 28%;
}

.calculation-table th:nth-child(2),
.calculation-table td:nth-child(2) {
  width: 30%;
  text-align: center;
  font-weight: 800;
  color: #073b73;
  line-height: 1.35;
}

.calculation-table th:nth-child(3),
.calculation-table td:nth-child(3) {
  width: 42%;
  text-align: center;
  line-height: 1.35;
}

.calculation-table td:nth-child(2),
.calculation-table td:nth-child(3) {
  font-size: 0.92rem;
}

.calculator-note {
  margin-top: 18px;
  color: #49617f;
  line-height: 1.55;
}

/* ===== RESPONSYWNOŚĆ ===== */

@media (min-width: 1100px) {
  .article-hero h1 {
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .top-nav {
    padding: 18px 22px;
  }

  .brand {
    font-size: 25px;
  }

  .hero {
    min-height: auto;
    padding: 36px 20px 28px;
    gap: 34px;
  }

  .hero-cards {
    grid-template-columns: 1fr 1fr;
  }

  .faq-grid,
  .summary-cards {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .calculator-grid,
  .calculator-grid-location,
  .calculator-result-grid {
    grid-template-columns: 1fr;
  }

  .calculator-card {
    padding: 20px;
  }

  .result-nfz-days,
  .result-private-days,
  .result-patient-total,
  .result-nfz-daily,
  .result-nfz-total,
  .result-total-value,
  .private-result-group.result-private-daily,
  .private-result-group.result-private-total,
  .result-private-note {
    grid-column: auto;
    grid-row: auto;
  }

  .result-box,
  .private-result-group .result-box,
  .result-box.highlight {
    height: auto;
    min-height: 100px;
  }

  .result-box strong,
  .result-box.private-small strong {
    font-size: 1.25rem;
  }

  .result-private-note {
    margin-top: -4px;
  }
}

@media (max-width: 760px) {
  .article-hero {
    min-height: 280px;
  }

  .article-hero-inner {
    padding: 46px 20px;
  }

  .article-hero h1 {
    white-space: normal;
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  .article-hero p {
    font-size: 1rem;
  }
}

@media (max-width: 560px) {
  .hero-cards {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 38px;
  }

  .hero-text p:not(.eyebrow) {
    font-size: 17px;
  }

  .faq-grid,
  .summary-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== Porównanie NFZ vs prywatnie — wyróżniony wniosek ===== */

.comparison-box {
  margin: 32px 0 30px;
  padding: 22px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  border: 2px solid #b9d2ef;
  box-shadow: 0 12px 30px rgba(15, 44, 82, 0.10);
}

.comparison-box span {
  display: block;
  margin-bottom: 10px;
  color: #425877;
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comparison-box strong {
  display: block;
  margin-bottom: 10px;
  color: #0b4078;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.15;
}

.comparison-box p {
  margin: 0;
  max-width: 900px;
  color: #17324d;
  font-size: 1.02rem;
  line-height: 1.55;
}

/* gdy prywatnie wychodzi drożej */
.comparison-box.more-private {
  background: linear-gradient(135deg, #fff7ed, #fff1df);
  border-color: #f0bd7a;
}

.comparison-box.more-private strong {
  color: #9a4b00;
}

/* gdy NFZ wychodzi wyżej */
.comparison-box.more-nfz {
  background: linear-gradient(135deg, #e8f7ef, #ddf2e7);
  border-color: #9fd4b7;
}

.comparison-box.more-nfz strong {
  color: #087044;
}

/* gdy jest równo */
.comparison-box.same-price {
  background: linear-gradient(135deg, #f4f8fe, #eef6ff);
  border-color: #c9d9ec;
}

@media (max-width: 700px) {
  .comparison-box {
    margin: 24px 0 24px;
    padding: 18px 16px;
    border-radius: 18px;
  }

  .comparison-box strong {
    font-size: 1.55rem;
  }

  .comparison-box p {
    font-size: 0.95rem;
  }
}
/* ===== Główne porównanie NFZ vs prywatnie ===== */

.comparison-box {
  margin: 38px 0 46px;
  padding: 26px 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7ed, #fff1df);
  border: 2px solid #f0bd7a;
  box-shadow: 0 14px 34px rgba(120, 70, 20, 0.12);
}

.comparison-box span {
  display: block;
  margin-bottom: 10px;
  color: #7a4a12;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-box strong {
  display: block;
  margin-bottom: 10px;
  color: #9a4b00;
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1.1;
}

.comparison-box p {
  margin: 0;
  max-width: 920px;
  color: #17324d;
  font-size: 1.05rem;
  line-height: 1.55;
}

.comparison-box.more-private {
  background: linear-gradient(135deg, #fff7ed, #fff1df);
  border-color: #f0bd7a;
}

.comparison-box.more-private span {
  color: #7a4a12;
}

.comparison-box.more-private strong {
  color: #9a4b00;
}

.comparison-box.more-nfz {
  background: linear-gradient(135deg, #e8f7ef, #ddf2e7);
  border-color: #9fd4b7;
}

.comparison-box.more-nfz span {
  color: #12633f;
}

.comparison-box.more-nfz strong {
  color: #087044;
}

.comparison-box.same-price {
  background: linear-gradient(135deg, #f4f8fe, #eef6ff);
  border-color: #c9d9ec;
}

.comparison-box.same-price span {
  color: #425877;
}

.comparison-box.same-price strong {
  color: #0b4078;
}

/* ===== Tabelka szczegółów — mniejsza i niżej ===== */

.calculation-table-wrapper {
  margin-top: 48px;
}

.calculation-table {
  font-size: 0.86rem;
}

.calculation-table th,
.calculation-table td {
  padding: 9px 11px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.calculation-table th:nth-child(1),
.calculation-table td:nth-child(1) {
  width: 28%;
}

.calculation-table th:nth-child(2),
.calculation-table td:nth-child(2) {
  width: 22%;
}

.calculation-table th:nth-child(3),
.calculation-table td:nth-child(3) {
  width: 50%;
}

@media (max-width: 700px) {
  .comparison-box {
    margin: 28px 0 34px;
    padding: 18px 16px;
  }

  .comparison-box strong {
    font-size: 1.55rem;
  }

  .comparison-box p {
    font-size: 0.95rem;
  }

  .calculation-table-wrapper {
    margin-top: 34px;
  }
}
/* ===== Tymczasowe ukrywanie sekcji ===== */

.hidden-feature {
  display: none !important;
}

/* ===== DESKTOP FIX — porządkowanie kalkulatora ===== */

@media (min-width: 901px) {
  .calculator-card {
    max-width: 1180px;
    padding: 34px 36px 32px;
  }

  .calculator-card h2 {
    font-size: 1.85rem;
    margin-bottom: 10px;
  }

  .calculator-card > p {
    max-width: 940px;
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.65;
    color: #203854;
  }

  .calculator-card > p:nth-of-type(2) {
    margin-bottom: 28px;
  }

  /* oba rzędy pól mają mieć taki sam układ */
  .calculator-grid,
  .calculator-grid-location {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 24px;
    align-items: end;
    margin: 20px 0;
  }

  .calculator-grid-location {
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e1eaf4;
  }

  .calculator-grid label {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.25;
    color: #062b4f;
  }

  .calculator-grid select {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 10px 42px 10px 14px;
    border-radius: 12px;
    font-size: 0.98rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* żeby długie nazwy sanatoriów nie wyglądały jak błąd układu */
  #sanatoriumSelect,
  #roomSelect,
  #stayTypeSelect {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* lepszy odstęp między formularzem a wynikami */
  .calculator-result-grid {
    margin-top: 34px;
  }

  /* kafelki wyników bardziej równe wizualnie */
  .result-box,
  .private-result-group .result-box {
    min-height: 116px;
    height: 116px;
    padding: 17px 18px;
  }

  .result-box span,
  .result-box.private-small span {
    min-height: 34px;
    display: block;
  }

  .result-box strong,
  .result-box.private-small strong {
    font-size: 1.42rem;
  }

  .result-private-note {
    padding-top: 10px;
    font-size: 0.78rem;
    line-height: 1.45;
  }
}
/* ===== DESKTOP FIX — porządkowanie kalkulatora ===== */

@media (min-width: 901px) {
  .calculator-card {
    max-width: 1180px;
    padding: 34px 36px 32px;
  }

  .calculator-card h2 {
    font-size: 1.85rem;
    margin-bottom: 10px;
  }

  .calculator-card > p {
    max-width: 940px;
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.65;
    color: #203854;
  }

  .calculator-card > p:nth-of-type(2) {
    margin-bottom: 28px;
  }

  .calculator-grid,
  .calculator-grid-location {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 24px;
    align-items: end;
    margin: 20px 0;
  }

  .calculator-grid-location {
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e1eaf4;
  }

  .calculator-grid label {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.25;
    color: #062b4f;
  }

  .calculator-grid select {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 10px 42px 10px 14px;
    border-radius: 12px;
    font-size: 0.98rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #sanatoriumSelect,
  #roomSelect,
  #stayTypeSelect {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .calculator-result-grid {
    margin-top: 34px;
  }

  .result-box,
  .private-result-group .result-box {
    min-height: 116px;
    height: 116px;
    padding: 17px 18px;
  }

  .result-box span,
  .result-box.private-small span {
    min-height: 34px;
    display: block;
  }

  .result-box strong,
  .result-box.private-small strong {
    font-size: 1.42rem;
  }

  .result-private-note {
    padding-top: 10px;
    font-size: 0.78rem;
    line-height: 1.45;
  }
}
/* ===== RAMKI SEKCJI KALKULATORA — stabilna wersja ===== */

@media (min-width: 901px) {
  .calculator-grid-location,
  .calculator-grid:not(.calculator-grid-location),
  .calculator-result-grid {
    position: relative;
    border: 2px solid #b8cbe2;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 10px 26px rgba(11, 40, 80, 0.055);
  }

  .calculator-grid-location {
    margin-top: 34px;
    margin-bottom: 24px;
    padding: 34px 24px 24px;
  }

  .calculator-grid:not(.calculator-grid-location) {
    margin-top: 34px;
    margin-bottom: 34px;
    padding: 34px 24px 24px;
  }

  .calculator-result-grid {
    margin-top: 42px;
    padding: 36px 24px 26px;
  }

  .calculator-grid-location::before,
  .calculator-grid:not(.calculator-grid-location)::before,
  .calculator-result-grid::before {
    position: absolute;
    top: -15px;
    left: 22px;
    z-index: 2;
    padding: 5px 16px;
    background: #ffffff;
    color: #0b2850;
    border: 1px solid #b8cbe2;
    border-radius: 999px;
    box-shadow: 0 5px 14px rgba(11, 40, 80, 0.08);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    pointer-events: none;
  }

  .calculator-grid-location::before {
    content: "Lokalizacja i ośrodek";
  }

  .calculator-grid:not(.calculator-grid-location)::before {
    content: "Rodzaj pobytu i pokój";
  }

  .calculator-result-grid::before {
    content: "Wynik kalkulacji";
  }

  .calculator-grid-location::after,
  .calculator-grid:not(.calculator-grid-location)::after,
  .calculator-result-grid::after {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 0;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, #0b2850, #315f99, #d9a441);
    opacity: 0.55;
    pointer-events: none;
  }
}
/* ===== Źródła cen prywatnych ===== */

.private-sources-details {
  margin-top: 18px;
  border-top: 1px solid #dbe6ef;
  padding-top: 14px;
  color: #405773;
  font-size: 0.88rem;
}

.private-sources-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f3f75;
  font-weight: 800;
  list-style: none;
}

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

.private-sources-details summary::after {
  content: "▾";
  font-size: 0.8rem;
  color: #6f8fb7;
  transition: transform 0.15s ease;
}

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

.private-sources-content {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #f8fbff;
}

.private-sources-content p {
  margin: 0 0 10px;
  line-height: 1.45;
  color: #49617f;
}

.private-sources-list {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 32px;
}

.private-sources-list li {
  break-inside: avoid;
  margin-bottom: 7px;
  line-height: 1.35;
}

.private-sources-list a {
  color: #0f3f75;
  font-weight: 600;
  text-decoration: none;
}

.private-sources-list a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .private-sources-list {
    columns: 1;
  }

  .private-sources-content {
    padding: 12px;
  }
}
/* ===== Dyskretna lista źródeł cen prywatnych ===== */

.private-sources-details {
  margin-top: 18px;
  border-top: 1px solid #dbe6ef;
  padding-top: 14px;
  color: #405773;
  font-size: 0.84rem;
}

.private-sources-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f3f75;
  font-weight: 800;
  list-style: none;
}

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

.private-sources-details summary::after {
  content: "▾";
  font-size: 0.72rem;
  color: #6f8fb7;
  transition: transform 0.15s ease;
}

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

.private-sources-content {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #f8fbff;
}

.private-sources-content p {
  margin: 0 0 10px;
  line-height: 1.45;
  color: #49617f;
  font-size: 0.82rem;
}

.private-sources-list {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 28px;
  font-size: 0.78rem;
}

.private-sources-list li {
  break-inside: avoid;
  margin-bottom: 6px;
  line-height: 1.35;
}

.private-sources-list a {
  color: #0f3f75;
  font-weight: 600;
  text-decoration: none;
}

.private-sources-list a:hover {
  text-decoration: underline;
}

.private-sources-toggle {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: #0f3f75;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.private-sources-toggle:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .private-sources-list {
    columns: 1;
  }
}
/* ===== Dyskretna lista źródeł cen prywatnych ===== */

.private-sources-details {
  margin-top: 18px;
  border-top: 1px solid #dbe6ef;
  padding-top: 14px;
  color: #405773;
  font-size: 0.84rem;
}

.private-sources-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f3f75;
  font-weight: 800;
  list-style: none;
}

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

.private-sources-details summary::after {
  content: "▾";
  font-size: 0.72rem;
  color: #6f8fb7;
  transition: transform 0.15s ease;
}

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

.private-sources-content {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #f8fbff;
}

.private-sources-content p {
  margin: 0 0 10px;
  line-height: 1.45;
  color: #49617f;
  font-size: 0.82rem;
}

.private-sources-list {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 28px;
  font-size: 0.78rem;
}

.private-sources-list li {
  break-inside: avoid;
  margin-bottom: 6px;
  line-height: 1.35;
}

.private-sources-list a {
  color: #0f3f75;
  font-weight: 600;
  text-decoration: none;
}

.private-sources-list a:hover {
  text-decoration: underline;
}

.private-sources-toggle {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: #0f3f75;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.private-sources-toggle:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .private-sources-list {
    columns: 1;
  }
}
/* ===== Ładniejszy pasek rozwijania źródeł ===== */

.private-sources-details {
  margin-top: 22px;
  border-top: 1px solid #dbe6ef;
  padding-top: 16px;
}

.private-sources-details summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #b8cbe2;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: #0b2850;
  box-shadow: 0 8px 22px rgba(11, 40, 80, 0.07);
  list-style: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.private-sources-details summary:hover {
  transform: translateY(-1px);
  border-color: #7fa0c8;
  box-shadow: 0 12px 28px rgba(11, 40, 80, 0.11);
}

.private-sources-summary-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #e8f1fb;
  color: #0f3f75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  font-family: Georgia, serif;
}

.private-sources-details summary strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
}

.private-sources-details summary small {
  display: block;
  margin-top: 2px;
  color: #5f7188;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
}

.private-sources-details summary::after {
  content: "▾";
  margin-left: 6px;
  color: #0f3f75;
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}

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

.private-sources-details[open] summary {
  border-color: #315f99;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
}

.private-sources-content {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #dbe6ef;
  border-radius: 16px;
  background: #f8fbff;
}

@media (max-width: 700px) {
  .private-sources-details summary {
    width: 100%;
    border-radius: 18px;
    align-items: flex-start;
  }

  .private-sources-details summary::after {
    margin-left: auto;
    padding-top: 4px;
  }
}
/* ===== FIX — długie opisy w kafelkach cen prywatnych ===== */

@media (min-width: 901px) {
  .private-result-group .result-box,
  .result-box.private-small {
    min-height: 132px;
    height: auto;
    padding: 16px 18px 18px;
  }

  .result-box.private-small span,
  .private-result-group .result-box span {
    min-height: 54px;
    margin-bottom: 8px;
    font-size: 0.78rem;
    line-height: 1.22;
    display: block;
  }

  .result-box.private-small strong,
  .private-result-group .result-box strong {
    display: block;
    font-size: 1.34rem;
    line-height: 1.15;
  }
}

/* ===== FIX — długie opisy w kafelkach cen prywatnych ===== */

@media (min-width: 901px) {
  .private-result-group .result-box,
  .result-box.private-small {
    min-height: 132px;
    height: auto;
    padding: 16px 18px 18px;
  }

  .result-box.private-small span,
  .private-result-group .result-box span {
    min-height: 54px;
    margin-bottom: 8px;
    font-size: 0.78rem;
    line-height: 1.22;
    display: block;
  }

  .result-box.private-small strong,
  .private-result-group .result-box strong {
    display: block;
    font-size: 1.34rem;
    line-height: 1.15;
  }
}
