/* ==========================================================
   STRONA GŁÓWNA OFERTY MIESZKANIOWEJ
   ========================================================== */

.home-page {
  --home-navy: #0d3566;
  --home-navy-dark: #08284e;
  --home-amber: #e59400;
  --home-amber-soft: #fff7e8;
  --home-blue-soft: #f4f7fb;
  --home-line: #d7e1ed;
  --home-muted: #64778e;
  --home-green: #267a3e;
  --home-green-soft: #edf8f0;

  width: 100%;
  color: var(--home-navy);
}

.home-page *,
.home-page *::before,
.home-page *::after {
  box-sizing: border-box;
}

/* Logo w headerze jest globalnym powrotem do strony głównej. */
.header-home-link {
  color: inherit;
  text-decoration: none;
}

.header-home-link:focus-visible {
  outline: 2px solid #e59400;
  outline-offset: 5px;
  border-radius: 6px;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--home-navy);
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.home-kicker::before {
  content: "";
  width: 3px;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--home-amber);
}

/* Hero - świadomie lżejsze od sekcji aktualnej oferty. */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(330px, 0.78fr);
  gap: clamp(1.25rem, 3vw, 2.35rem);
  align-items: center;
  padding: clamp(1rem, 2vw, 1.45rem) clamp(1.35rem, 3vw, 2.35rem);
  margin: 0 0 clamp(1.35rem, 2.8vw, 2rem);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 12%, rgba(229, 148, 0, 0.10), transparent 31%),
    linear-gradient(135deg, #f7f9fc 0%, #ffffff 74%);
  border: 1px solid #e1e8f1;
}

.home-hero__copy {
  max-width: 680px;
}

.home-hero h1 {
  max-width: 650px;
  margin: 0.38rem 0 0.48rem;
  color: #173f70;
  font-size: clamp(1.9rem, 3.15vw, 2.95rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.home-hero__copy > p {
  max-width: 620px;
  margin: 0;
  color: #5c7087;
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  line-height: 1.48;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.82rem;
}

.home-primary-link,
.home-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.66rem 1.05rem;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.home-primary-link {
  color: #ffffff;
  background: var(--home-navy);
  border: 1px solid var(--home-navy);
}

.home-primary-link:hover,
.home-primary-link:focus-visible {
  background: var(--home-navy-dark);
  border-color: var(--home-navy-dark);
}

.home-secondary-link {
  color: var(--home-navy);
  background: #ffffff;
  border: 1px solid #bfd0e4;
}

.home-secondary-link:hover,
.home-secondary-link:focus-visible {
  border-color: var(--home-navy);
}

.home-hero__summary {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.9rem;
  padding-left: clamp(1rem, 2.2vw, 1.55rem);
  border-left: 1px solid #d8e2ee;
}

.home-hero__stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  padding: 0.28rem 0;
}

.home-hero__stat + .home-hero__stat {
  border-top: 0;
}

.home-hero__stat strong {
  color: var(--home-amber);
  font-size: clamp(1.65rem, 2.2vw, 2rem);
  line-height: 1;
}

.home-hero__stat span {
  color: #244870;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-hero__summary > p {
  grid-column: 1 / -1;
  margin: 0.18rem 0 0;
  color: var(--home-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* Sekcje */
.home-section {
  scroll-margin-top: 105px;
  margin-bottom: clamp(1.75rem, 3vw, 2.55rem);
}

.home-section__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 0.7rem;
}

.home-section__header h2 {
  position: relative;
  margin: 0;
  padding-left: 0.82rem;
  color: var(--home-navy);
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  line-height: 1.12;
}

.home-section__header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.08em;
  width: 4px;
  height: 0.9em;
  border-radius: 999px;
  background: var(--home-amber);
}

.home-section__header > p {
  max-width: 510px;
  justify-self: end;
  margin: 0;
  color: var(--home-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.home-investment-groups {
  display: grid;
  gap: 1.05rem;
}

.home-investment-group {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(285px, 0.66fr) minmax(0, 1.55fr);
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 17px;
  background: #ffffff;
}

.home-investment-group--przygotowanie {
  border-color: #e3dccb;
}

.home-investment-group__visual {
  position: relative;
  min-height: 255px;
  overflow: hidden;
  background: #eef3f8;
  text-decoration: none;
}

.home-investment-group__visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 255px;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.home-investment-group__visual:hover img,
.home-investment-group__visual:focus-visible img {
  transform: scale(1.018);
}

.home-investment-group__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 255px;
  color: #8194aa;
  background: linear-gradient(135deg, #eef3f8, #f9fbfd);
}

.home-investment-group__placeholder svg {
  width: 60px;
  height: 60px;
}

/* Panel promocyjny w sekcji realizacji.
   Korzysta z rzeczywistego zdjęcia inwestycji i nie wymaga osobnej grafiki banerowej. */
.home-promo-visual__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 78%, rgba(229, 148, 0, 0.20), transparent 30%),
    linear-gradient(90deg, rgba(5, 31, 61, 0.90) 0%, rgba(5, 31, 61, 0.78) 43%, rgba(5, 31, 61, 0.16) 76%, rgba(5, 31, 61, 0) 100%),
    linear-gradient(0deg, rgba(5, 31, 61, 0.16), rgba(5, 31, 61, 0));
}

.home-promo-visual__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(76%, 310px);
  padding: clamp(1.15rem, 2.4vw, 1.75rem);
  color: #ffffff;
  pointer-events: none;
}

.home-promo-visual__content > small {
  margin-bottom: 0.35rem;
  color: #f7ad28;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-promo-visual__content > strong {
  max-width: 250px;
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.home-promo-visual__street {
  margin-top: 0.45rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 650;
}

.home-promo-visual__count,
.home-promo-visual__note {
  margin-top: 0.72rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  line-height: 1.35;
}

.home-promo-visual__note {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.home-promo-visual__note::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f7a614;
  flex: 0 0 auto;
}

.home-promo-price {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.85rem;
  padding: 0.65rem 0.78rem 0.7rem;
  border: 1px solid rgba(247, 173, 40, 0.72);
  border-left-width: 3px;
  border-radius: 10px;
  background: rgba(6, 38, 73, 0.50);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(2px);
}

.home-promo-price em {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.68rem;
  font-style: normal;
  letter-spacing: 0.01em;
}

.home-promo-price > span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.34rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 650;
}

.home-promo-price b {
  color: #f7a614;
  font-size: clamp(1.75rem, 2.7vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.home-promo-price small {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-investment-group--przygotowanie .home-investment-group__visual,
.home-investment-group--przygotowanie .home-investment-group__visual img,
.home-investment-group--przygotowanie .home-investment-group__placeholder {
  min-height: 225px;
}

.home-investment-group__content {
  min-width: 0;
  padding: clamp(1.05rem, 2vw, 1.45rem) clamp(1.1rem, 2.2vw, 1.65rem);
}

.home-investment-group__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  padding-bottom: 0.62rem;
  border-bottom: 1px solid #e0e8f1;
}

.home-investment-group__header h3 {
  margin: 0;
  color: var(--home-navy);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.18;
}

.home-investment-group__header p {
  margin: 0.24rem 0 0;
  color: var(--home-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.home-investment-list {
  min-width: 0;
}

.home-investment-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.68fr) minmax(330px, 1.45fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.1rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #e7edf4;
}

.home-investment-row:last-child {
  border-bottom: 0;
  padding-bottom: 0.15rem;
}

.home-investment-row:hover .home-investment-row__main strong,
.home-investment-row:focus-visible .home-investment-row__main strong,
.home-investment-row:hover .home-investment-row__cta,
.home-investment-row:focus-visible .home-investment-row__cta {
  color: var(--home-amber);
}

.home-investment-row:focus-visible {
  outline: 2px solid var(--home-amber);
  outline-offset: 4px;
  border-radius: 6px;
}

.home-investment-row__main {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.home-investment-row__main strong {
  color: var(--home-navy);
  font-size: 1rem;
  line-height: 1.25;
  transition: color 0.18s ease;
}

.home-investment-row__main small {
  color: var(--home-muted);
  font-size: 0.74rem;
  line-height: 1.38;
}

.home-investment-row__availability {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 0.42rem;
}

.home-offer-stat {
  min-width: 0;
  flex: 1 1 104px;
  max-width: 150px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.42rem;
  align-items: center;
  padding: 0.46rem 0.52rem;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.home-offer-stat__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--home-amber-soft);
}

.home-offer-stat__icon img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.home-offer-stat__text {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.3rem;
  align-items: baseline;
}

.home-offer-stat__text strong {
  color: var(--home-navy);
  font-size: 1.05rem;
  line-height: 1;
}

.home-offer-stat__text small {
  min-width: 0;
  color: #536a84;
  font-size: 0.66rem;
  line-height: 1.2;
}

.home-offer-stat__text em {
  grid-column: 1 / -1;
  margin-top: 0.12rem;
  color: var(--home-muted);
  font-size: 0.61rem;
  font-style: normal;
  line-height: 1.2;
}

.home-offer-stat--reserved {
  border-color: #efd9ad;
  background: #fffaf0;
}

.home-offer-stat--soldout {
  border-color: #e2e6eb;
  background: #f6f8fa;
}

.home-offer-stat--soldout .home-offer-stat__icon,
.home-offer-stat--soldout .home-offer-stat__text strong {
  opacity: 0.58;
}

.home-offer-stat--planned,
.home-offer-stat--updating {
  background: #f5f8fc;
}

.home-investment-row__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--home-navy);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.18s ease;
}

/* Pomocnicze wejścia */
.home-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--home-line);
  margin-top: 0.45rem;
}

.home-next__item {
  min-width: 0;
  padding: 1.5rem clamp(1rem, 3vw, 2.2rem) 0.7rem 0;
}

.home-next__item + .home-next__item {
  padding-left: clamp(1rem, 3vw, 2.2rem);
  border-left: 1px solid var(--home-line);
}

.home-next__item h2 {
  margin: 0.3rem 0 0.35rem;
  color: var(--home-navy);
  font-size: 1.28rem;
}

.home-next__item p {
  max-width: 460px;
  margin: 0 0 0.6rem;
  color: var(--home-muted);
  font-size: 0.86rem;
  line-height: 1.48;
}

.home-next__item a {
  color: var(--home-navy);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.home-next__item a:hover,
.home-next__item a:focus-visible {
  color: var(--home-amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================
   RESPONSYWNOŚĆ STRONY GŁÓWNEJ
   Desktop pozostaje bazą. Poniżej dopasowujemy trzy grupy:
   tablet poziomy, tablet pionowy i telefon.
   ========================================================== */

/* Tablet poziomy / mniejszy laptop */
@media (max-width: 1180px) and (min-width: 901px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.66fr);
    gap: 1.2rem;
    padding: 1rem 1.35rem;
    margin-bottom: 1.35rem;
  }

  .home-hero h1 {
    max-width: 560px;
    font-size: clamp(2rem, 3.2vw, 2.55rem);
  }

  .home-hero__summary {
    gap: 0.35rem 0.7rem;
    padding-left: 1rem;
  }

  .home-section {
    margin-bottom: 1.45rem;
  }

  .home-section__header {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.68fr);
    gap: 0.85rem;
    margin-bottom: 0.42rem;
  }

  .home-investment-group {
    grid-template-columns: minmax(245px, 0.58fr) minmax(0, 1.42fr);
  }

  /* Tablet poziomy: wysokość karty ma wynikać z treści po prawej,
     a nie z minimalnej wysokości grafiki. */
  .home-investment-group__visual {
    min-height: 0;
    height: auto;
    align-self: stretch;
  }

  .home-investment-group__visual img,
  .home-investment-group__placeholder,
  .home-investment-group--przygotowanie .home-investment-group__visual,
  .home-investment-group--przygotowanie .home-investment-group__visual img,
  .home-investment-group--przygotowanie .home-investment-group__placeholder {
    min-height: 0;
  }

  .home-investment-group__visual img,
  .home-investment-group__placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .home-investment-group__content {
    padding: 0.72rem 0.9rem;
  }

  .home-investment-group__header {
    gap: 0.3rem 0.8rem;
    padding-bottom: 0.42rem;
  }

  .home-investment-group__header h3 {
    font-size: 1.28rem;
  }

  .home-investment-group__header p {
    margin-top: 0.12rem;
    line-height: 1.3;
  }

  .home-promo-visual__content {
    width: min(88%, 295px);
    padding: 0.78rem 0.9rem;
  }

  .home-promo-visual__content > strong {
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  }

  .home-promo-price {
    margin-top: 0.48rem;
    padding: 0.42rem 0.56rem 0.46rem;
  }

  .home-promo-price b {
    font-size: clamp(1.55rem, 2.35vw, 1.95rem);
  }

  .home-investment-row {
    grid-template-columns: minmax(122px, 0.5fr) minmax(0, 1.42fr) auto;
    gap: 0.5rem;
    padding: 0.44rem 0;
  }

  .home-investment-row__main strong {
    font-size: 0.93rem;
  }

  .home-investment-row__availability {
    gap: 0.32rem;
  }

  .home-offer-stat {
    flex-basis: 92px;
    max-width: 136px;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 0.28rem;
    padding: 0.3rem 0.34rem;
  }

  .home-offer-stat__icon {
    width: 22px;
    height: 22px;
  }

  .home-offer-stat__icon img {
    width: 18px;
    height: 18px;
  }

  .home-offer-stat__text strong {
    font-size: 0.98rem;
  }

  .home-offer-stat__text small {
    font-size: 0.6rem;
  }

  .home-investment-row__cta {
    font-size: 0.74rem;
  }
}

/* Tablet pionowy, również większe tablety w pionie */
@media (max-width: 1280px) and (orientation: portrait) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    margin-bottom: 1.25rem;
  }

  .home-hero__copy {
    max-width: 760px;
  }

  .home-hero h1 {
    max-width: 660px;
    margin-top: 0.3rem;
    font-size: clamp(2rem, 5.4vw, 2.65rem);
  }

  .home-hero__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 1rem;
    padding: 0.62rem 0 0;
    border-left: 0;
    border-top: 1px solid #d8e2ee;
  }

  .home-hero__summary > p {
    grid-column: 1 / -1;
    margin-top: 0.05rem;
  }

  .home-section {
    margin-bottom: 1.65rem;
  }

  .home-section__header {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    align-items: start;
    margin-bottom: 0.55rem;
  }

  .home-section__header > p {
    max-width: 680px;
    justify-self: start;
  }

  .home-investment-group {
    grid-template-columns: 1fr;
  }

  .home-investment-group__visual,
  .home-investment-group__visual img,
  .home-investment-group__placeholder,
  .home-investment-group--przygotowanie .home-investment-group__visual,
  .home-investment-group--przygotowanie .home-investment-group__visual img,
  .home-investment-group--przygotowanie .home-investment-group__placeholder {
    min-height: 180px;
    max-height: 210px;
  }

  .home-promo-visual__overlay {
    background:
      radial-gradient(circle at 18% 78%, rgba(229, 148, 0, 0.18), transparent 29%),
      linear-gradient(90deg, rgba(5, 31, 61, 0.92) 0%, rgba(5, 31, 61, 0.76) 38%, rgba(5, 31, 61, 0.08) 76%, rgba(5, 31, 61, 0) 100%);
  }

  .home-promo-visual__content {
    width: min(60%, 390px);
    padding: 1.05rem 1.2rem;
  }

  .home-investment-group__content {
    padding: 0.78rem 0.86rem;
  }

  /* Tablet pionowy: treść ma wyznaczać szerokość wiersza.
     Dostępność dostaje elastyczną kolumnę, dzięki czemu CTA i statystyki
     nie wypychają karty poza kontener. */
  .home-investment-row {
    grid-template-columns: minmax(130px, 0.5fr) minmax(0, 1fr);
    grid-template-areas:
      "main availability"
      "cta availability";
    gap: 0.2rem 0.55rem;
    padding: 0.52rem 0;
  }

  .home-investment-row__main {
    grid-area: main;
  }

  .home-investment-row__availability {
    grid-area: availability;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
  }

  .home-offer-stat {
    width: 100%;
    max-width: none;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 0.3rem;
    padding: 0.34rem 0.38rem;
  }

  .home-offer-stat__icon {
    width: 24px;
    height: 24px;
  }

  .home-offer-stat__icon img {
    width: 20px;
    height: 20px;
  }

  .home-investment-row__cta {
    grid-area: cta;
    justify-self: start;
    align-self: start;
    font-size: 0.73rem;
  }

  .home-investment-group--przygotowanie .home-investment-row {
    grid-template-columns: minmax(0, 1fr) minmax(105px, 135px);
    grid-template-areas:
      "main availability"
      "main cta";
  }

  .home-investment-group--przygotowanie .home-investment-row__availability {
    grid-template-columns: 1fr;
  }

  .home-investment-group--przygotowanie .home-investment-row__cta {
    justify-self: end;
  }

  /* Na tablecie pionowym sekcja pomocnicza nie konkuruje o szerokość. */
  .home-next {
    grid-template-columns: 1fr;
    margin-top: 0.2rem;
  }

  .home-next__item {
    padding: 0.9rem 0;
  }

  .home-next__item + .home-next__item {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--home-line);
  }
}

/* Telefon i małe tablety */
@media (max-width: 640px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 0.72rem;
    padding: 0.9rem;
    margin-bottom: 1.2rem;
    border-radius: 14px;
  }

  .home-kicker {
    font-size: 0.68rem;
  }

  .home-hero h1 {
    margin: 0.28rem 0 0.38rem;
    font-size: clamp(1.78rem, 8.5vw, 2.15rem);
    line-height: 1.04;
  }

  .home-hero__copy > p {
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .home-hero__actions {
    gap: 0.5rem;
    margin-top: 0.68rem;
  }

  .home-primary-link,
  .home-secondary-link {
    min-height: 40px;
    padding: 0.58rem 0.82rem;
    font-size: 0.84rem;
  }

  .home-hero__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.6rem;
    padding-top: 0.58rem;
  }

  .home-hero__stat {
    gap: 0.42rem;
    padding: 0.16rem 0;
  }

  .home-hero__stat + .home-hero__stat {
    border-top: 0;
  }

  .home-hero__stat strong {
    font-size: 1.55rem;
  }

  .home-hero__stat span {
    font-size: 0.78rem;
  }

  .home-hero__summary > p {
    grid-column: 1 / -1;
    font-size: 0.7rem;
  }

  .home-section {
    scroll-margin-top: 88px;
    margin-bottom: 1.45rem;
  }

  .home-section__header {
    grid-template-columns: 1fr;
    gap: 0.22rem;
    margin-bottom: 0.5rem;
  }

  .home-section__header h2 {
    padding-left: 0.7rem;
    font-size: clamp(1.55rem, 7vw, 1.85rem);
  }

  .home-section__header > p {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .home-investment-groups {
    gap: 0.8rem;
  }

  .home-investment-group {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .home-investment-group__visual,
  .home-investment-group__visual img,
  .home-investment-group__placeholder {
    min-height: 170px;
    max-height: 195px;
  }

  .home-investment-group--przygotowanie .home-investment-group__visual,
  .home-investment-group--przygotowanie .home-investment-group__visual img,
  .home-investment-group--przygotowanie .home-investment-group__placeholder {
    min-height: 140px;
    max-height: 160px;
  }

  .home-promo-visual__overlay {
    background:
      linear-gradient(90deg, rgba(5, 31, 61, 0.94) 0%, rgba(5, 31, 61, 0.80) 48%, rgba(5, 31, 61, 0.12) 100%);
  }

  .home-promo-visual__content {
    width: min(84%, 330px);
    padding: 0.85rem;
  }

  .home-promo-visual__content > small {
    margin-bottom: 0.22rem;
    font-size: 0.61rem;
  }

  .home-promo-visual__content > strong {
    max-width: 220px;
    font-size: 1.55rem;
  }

  .home-promo-visual__street {
    margin-top: 0.3rem;
    font-size: 0.82rem;
  }

  .home-promo-price {
    gap: 0.12rem;
    margin-top: 0.52rem;
    padding: 0.44rem 0.55rem 0.48rem;
    border-radius: 8px;
  }

  .home-promo-price em {
    font-size: 0.6rem;
  }

  .home-promo-price b {
    font-size: 1.55rem;
  }

  .home-promo-price small {
    font-size: 0.72rem;
  }

  .home-promo-visual__note,
  .home-promo-visual__count {
    margin-top: 0.46rem;
    font-size: 0.69rem;
  }

  .home-investment-group__content {
    padding: 0.78rem 0.8rem 0.72rem;
  }

  .home-investment-group__header {
    gap: 0.25rem;
    padding-bottom: 0.48rem;
  }

  .home-investment-group__header h3 {
    font-size: 1.22rem;
  }

  .home-investment-group__header p {
    margin-top: 0.18rem;
    font-size: 0.72rem;
  }

  .home-investment-row {
    grid-template-columns: 1fr;
    gap: 0.46rem;
    padding: 0.68rem 0;
  }

  .home-investment-row__main {
    gap: 0.12rem;
  }

  .home-investment-row__main strong {
    font-size: 0.94rem;
  }

  .home-investment-row__main small {
    font-size: 0.69rem;
  }

  .home-investment-row__availability {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
  }

  .home-offer-stat {
    max-width: none;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 0.16rem;
    justify-items: center;
    padding: 0.38rem 0.2rem;
    text-align: center;
    border-radius: 8px;
  }

  .home-offer-stat__icon {
    width: 25px;
    height: 25px;
  }

  .home-offer-stat__icon img {
    width: 21px;
    height: 21px;
  }

  .home-offer-stat__text {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .home-offer-stat__text strong {
    font-size: 0.98rem;
  }

  .home-offer-stat__text small {
    font-size: 0.57rem;
    line-height: 1.12;
  }

  .home-offer-stat__text em {
    font-size: 0.55rem;
  }

  .home-investment-row__cta {
    justify-self: end;
    margin-top: 0;
    font-size: 0.74rem;
  }

  /* Inwestycja w przygotowaniu na telefonie jest prostszym,
     pionowym teaserem. Nie przenosimy desktopowej geometrii wiersza. */
  .home-investment-group--przygotowanie .home-investment-group__content {
    padding: 0.68rem 0.72rem 0.7rem;
  }

  .home-investment-group--przygotowanie .home-investment-group__header {
    padding-bottom: 0.38rem;
  }

  .home-investment-group--przygotowanie .home-investment-group__header h3 {
    font-size: 1.08rem;
  }

  .home-investment-group--przygotowanie .home-investment-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "main"
      "availability"
      "cta";
    gap: 0.34rem;
    padding: 0.5rem 0 0.08rem;
  }

  .home-investment-group--przygotowanie .home-investment-row__availability {
    display: flex;
    width: auto;
    justify-self: start;
  }

  .home-investment-group--przygotowanie .home-offer-stat {
    width: auto;
    max-width: 150px;
    grid-template-columns: 23px auto;
    padding: 0.32rem 0.48rem;
  }

  .home-investment-group--przygotowanie .home-offer-stat__text {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .home-investment-group--przygotowanie .home-investment-row__cta {
    justify-self: start;
    white-space: normal;
  }

  .home-next {
    grid-template-columns: 1fr;
    margin-top: 0.2rem;
  }

  .home-next__item,
  .home-next__item + .home-next__item {
    padding: 1rem 0;
    border-left: 0;
  }

  .home-next__item + .home-next__item {
    border-top: 1px solid var(--home-line);
  }
}

/* Bardzo wąski telefon: przyciski jeden pod drugim, dostępność 2 + 1. */
@media (max-width: 420px) {
  .home-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-primary-link,
  .home-secondary-link {
    width: 100%;
  }

  .home-investment-row__availability {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-offer-stat:nth-child(3):last-child {
    grid-column: 1 / -1;
    grid-template-columns: 25px auto;
    justify-content: center;
    text-align: left;
  }

  .home-offer-stat:nth-child(3):last-child .home-offer-stat__text {
    justify-items: start;
  }
}
