/* Ostatnie poprawki układu podstrony Pokrycia dachowe — 2026-08-01. */

/* 01: zwarty układ bez klasycznych punktorów. */
.roof-detailed-page .roof-offer-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4.4vw, 58px);
  align-items: center;
}

.roof-detailed-page .roof-offer-copy .roof-section-heading {
  margin-bottom: 0;
}

.roof-detailed-page .roof-offer-copy .roof-benefit-note {
  margin-top: 20px;
}

.roof-detailed-page .roof-offer-services {
  padding: 22px;
  border: 1px solid var(--roof-line);
  border-radius: 16px;
  background: var(--roof-soft);
}

.roof-detailed-page .roof-offer-services .roof-list-intro {
  margin: 0 0 12px;
}

.roof-detailed-page .roof-offer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.roof-detailed-page .roof-offer-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--roof-line);
  border-radius: 12px;
  background: #fff;
}

.roof-detailed-page .roof-offer-list li:last-child {
  grid-column: 1 / -1;
}

.roof-detailed-page .roof-offer-list li > span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--roof-yellow);
  color: var(--roof-ink);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.roof-detailed-page .roof-offer-list li > p {
  margin: 0;
  color: var(--roof-graphite);
  font-size: .78rem;
  line-height: 1.43;
  text-align: left;
}

/* 02: nagłówek nad całością, porównanie wyceny po lewej, lista projektu po prawej. */
.roof-detailed-page #wycena .roof-section-heading {
  margin-bottom: 20px;
}

.roof-detailed-page #wycena .roof-valuation-grid {
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 3.6vw, 44px);
  align-items: stretch;
}

.roof-detailed-page #wycena .roof-valuation-aside {
  display: flex;
  flex-direction: column;
}

.roof-detailed-page #wycena .roof-aside-cta {
  margin-top: auto;
}

.roof-detailed-page .roof-valuation-steps {
  padding: 20px 22px;
  border: 1px solid var(--roof-line);
  border-radius: 14px;
  background: #fff;
}

.roof-detailed-page .roof-valuation-steps .roof-list-intro {
  margin: 0;
}

.roof-detailed-page .roof-valuation-steps .roof-steps {
  margin-top: 11px;
}

/* 04 i 05: jedna płynna kolumna eliminuje puste miejsca tworzone przez nierówne wiersze siatki. */
.roof-detailed-page .roof-product-copy .roof-product-list {
  grid-template-columns: 1fr;
  gap: 9px;
}

/* Oddzielny układ mobilny nie dziedziczy mechaniki tabeli. */
.roof-detailed-page .roof-compare-mobile {
  display: none;
}

@media (min-width: 981px) {
  /* Hero 1:1 z Kostką brukową — te same proporcje, typografia i rytm pionowy. */
  .roof-detailed-page .materials-hero-inner {
    grid-template-columns: minmax(0, .96fr) minmax(460px, 1.04fr);
  }

  .roof-detailed-page .materials-hero-copy {
    justify-content: center;
    padding: 24px clamp(34px, 4.6vw, 60px);
  }

  .roof-detailed-page .materials-hero .materials-kicker {
    margin: 0 0 15px;
  }

  body.roof-detailed-page main .materials-hero h1:not(.visually-hidden) {
    max-width: 760px;
    font-size: clamp(1.65rem, 2.2vw, 2.5rem);
  }

  .roof-detailed-page .materials-hero-copy > p:not(.materials-kicker) {
    max-width: 690px;
    margin: 18px 0 0;
    font-size: .84rem;
    line-height: 1.56;
  }

  .roof-detailed-page .materials-hero-copy > p:not(.materials-kicker) ~ p:not(.materials-kicker) {
    margin-top: 8px;
  }

  .roof-detailed-page .roof-hero-cta {
    margin-top: 24px;
  }

  .roof-detailed-page .roof-hero-cta p {
    font-size: .84rem;
    line-height: 1.56;
  }
}

@media (max-width: 980px) {
  .roof-detailed-page .roof-offer-layout,
  .roof-detailed-page #wycena .roof-valuation-grid {
    grid-template-columns: 1fr;
  }

  .roof-detailed-page .roof-offer-layout {
    gap: 24px;
  }
}

@media (max-width: 700px) {
  .roof-detailed-page .roof-offer-services,
  .roof-detailed-page .roof-valuation-steps {
    padding: 18px;
  }

  .roof-detailed-page .roof-offer-list {
    grid-template-columns: 1fr;
  }

  .roof-detailed-page .roof-offer-list li:last-child {
    grid-column: auto;
  }

  /* Mobilne porównanie jako pionowe karty, bez przewijania i przycinania. */
  .roof-detailed-page .roof-table-wrap {
    display: none;
  }

  .roof-detailed-page .roof-compare-mobile {
    display: grid;
    width: 100%;
    gap: 14px;
  }

  .roof-detailed-page .roof-compare-mobile-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--roof-line);
    border-radius: 14px;
    background: #fff;
  }

  .roof-detailed-page .roof-compare-mobile-card h4 {
    margin: 0;
    padding: 12px 15px;
    background: var(--roof-graphite);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .roof-detailed-page .roof-compare-mobile-card dl {
    margin: 0;
  }

  .roof-detailed-page .roof-compare-mobile-card dl > div {
    padding: 14px 15px 15px;
    border-bottom: 1px solid var(--roof-line);
  }

  .roof-detailed-page .roof-compare-mobile-card dl > div:last-child {
    border-bottom: 0;
  }

  .roof-detailed-page .roof-compare-mobile-card dt {
    margin: 0 0 6px;
    color: var(--roof-ink);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .025em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .roof-detailed-page .roof-compare-mobile-card dd {
    margin: 0;
    color: var(--roof-graphite);
    font-size: .8rem;
    line-height: 1.55;
  }
}

/* Dolny baner: pojedyncze hasło w jednej poziomej linii. */
.roof-detailed-page .roof-final-cta-inner > .roof-final-copy {
  max-width: none;
  display: block;
}

.roof-detailed-page .roof-final-cta .roof-final-copy h2 {
  max-width: none;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .roof-detailed-page .roof-final-cta .roof-final-copy h2 {
    white-space: normal;
  }
}
