/* =============================================================
   BodyTop — cennik.css
   Style unikalne dla podstrony Cennik: kotwice, dwa poziomy
   sekcji (treningi personalne / karnety rodzinne), siatka kart
   karnetów, karta wyróżniona i notka pod cennikiem.
   Komponenty wspólne (.card, .btn, .stripe) zostają w base.css.
   ============================================================= */

/* ---------- Kotwice w nagłówku podstrony ---------- */
.price-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
  /* Wchodzą razem z resztą nagłówka (keyframe bt-rise z base.css) */
  animation: bt-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.34s;
}

.price-anchors a {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--line);
  /* Kotwice nie mają klasy .btn, ale wyglądają jak przyciski — stąd ten
     sam eliptyczny kształt. Padding poziomy podbity, żeby tekst nie
     wchodził w łuk (pionowy zostaje — to niski element nawigacyjny). */
  padding: 0.75em 1.8em;
  border-radius: 999px;
  transform: skewX(var(--skew));
  transition: color 0.18s ease, border-color 0.18s ease,
    background-color 0.18s ease, translate 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.price-anchors a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--panel-hover);
  translate: 0 -2px;
}

/* Kotwica kliknięta / aktualnie wybrana — ramka i tekst na żółto */
.price-anchors a:active,
.price-anchors a.is-active {
  color: var(--accent-active);
  border-color: var(--accent-active);
  background: var(--panel-hover);
}

.price-anchors a:focus-visible {
  outline: 2px solid var(--accent-active);
  outline-offset: 3px;
}

/* ---------- Sekcje główne ---------- */
/* Druga sekcja dostaje ciemniejszy odcień niż karty (--panel),
   żeby karnety rodzinne czytelnie odcinały się od treningów. */
.price-section--alt {
  background: #141414;
  border-block: 1px solid var(--line);
}

/* Offset pod przyklejony header — kotwice nie chowają nagłówków */
.price-section,
.price-sub {
  scroll-margin-top: 90px;
}

.price-section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.price-section-head h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
}

.price-section-rule {
  width: 110px;
  margin-top: 1.2rem;
}

/* ---------- Podsekcje (indywidualny / grupowy) ---------- */
.price-sub + .price-sub {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.price-sub-title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  margin-bottom: 1.5rem;
}

/* Krótka ukośna belka — sygnalizuje niższy poziom niż nagłówek sekcji */
.price-sub-title::before {
  content: "";
  flex: none;
  width: 28px;
  height: 4px;
  background: var(--accent);
  transform: skewX(var(--skew));
}

/* ---------- Siatka karnetów ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 1.9rem 1.6rem 1.7rem;
}

/* Uwaga na specyficzność: base.css ustawia .card p (0,1,1),
   więc wnętrze karty adresujemy przez .price-card <klasa>. */
.price-card .price-name {
  font-size: 1.02rem;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.1rem;
  /* Nazwy są różnej długości — rezerwujemy 2 wiersze, żeby ceny
     w jednym rzędzie stały na tej samej wysokości. */
  min-height: 2.3em;
}

/* Cena — punkt ciężkości karty */
.price-card .price-value {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.5rem, 4.2vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  white-space: nowrap;
}

.price-card .price-value span {
  font-size: 0.4em;
  letter-spacing: 0;
  color: var(--accent);
}

.price-card .price-meta {
  margin-top: 0.6rem;
  margin-bottom: 1.6rem;
  font-size: 0.82rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* margin-top:auto dosuwa przycisk do dołu — przyciski w rzędzie
   są równo, niezależnie od długości nazwy karnetu. */
.price-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- Karta wyróżniona (delikatna obwódka w kolorze akcentu) ---------- */
.price-card--featured {
  border-color: var(--accent);
  border-top-color: var(--accent);
}

.price-card--featured:hover {
  border-color: var(--accent-hover);
  border-top-color: var(--accent-hover);
}

/* Karta cennika po kliknięciu / zaznaczona — ramka na żółto.
   Wyższa specyficzność niż :hover powyżej, więc wygrywa. */
.price-card:active,
.price-card.is-selected,
.price-card--featured:active,
.price-card--featured.is-selected {
  border-color: var(--accent-active);
  border-top-color: var(--accent-active);
}

/* ---------- Notka pod cennikiem ---------- */
.price-note {
  margin-top: 2.2rem;
  padding: 1.1rem 1.4rem;
  border-left: 4px solid var(--accent);
  background: var(--panel);
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: none;
}

.price-note a {
  color: var(--text);
  font-weight: 600;
}

.price-note a:hover {
  color: var(--accent);
}

.price-note a:active {
  color: var(--accent-active);
}

/* ---------- Responsywność ---------- */
@media (max-width: 960px) {
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .price-grid {
    grid-template-columns: 1fr;
  }

  /* Jedna kolumna — nazwy mieszczą się w wierszu, rezerwa zbędna */
  .price-card .price-name {
    min-height: 0;
  }

  .price-anchors a {
    flex: 1 1 auto;
    text-align: center;
  }
}
