/* WSPÓLNE STYLE USŁUG — wczytaj po arkuszach motywu.
   Klasy bloków CMS: service-media, service-order-card, service-details.
   Kolejność w CMS: grafika → zamówienie → opis. */

/* Układ jest aktywny tylko w kontenerze z nowymi klasami bloków. */
#main-content .content-advanced-blocks:has(> .service-order-card):has(> .service-details) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "media" "order" "details";
  gap: 32px;
  width: 100%;
  margin: 0;
  align-items: start;
}
#main-content .content-advanced-blocks > :is(.service-media, .service-order-card, .service-details) {
  width: 100%; max-width: 100%; min-width: 0;
  margin: 0; box-sizing: border-box;
}
#main-content .service-media { grid-area: media; padding: 0; }
#main-content .service-order-card { grid-area: order; }
#main-content .service-details { grid-area: details; padding: 0; }
@media (min-width: 992px) {
  #main-content .content-advanced-blocks:has(> .service-order-card):has(> .service-details) {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    grid-template-areas: "media order" "details order";
    gap: 48px 24px;
  }
}

/* Wstęp tylko na stronach z nową kartą usługi. */
#main-content:has(.service-order-card) .service-description {
  width: auto; max-width: 80ch; margin: 20px 0 32px;
  color: #666666; font-size: 1rem; line-height: 1.6;
}
#main-content:has(.service-order-card) .service-description p { margin: 0 !important; }

/* Pojedyncza grafika — bez slidera, strzałek i miniatur. */
.service-media__frame {
  height: clamp(260px, 40vw, 430px);
  padding: 20px;
  border: 1px solid #909090;
  border-radius: 20px;
  background: #fff;
  box-sizing: border-box;
}
.service-media__image {
  display: block; width: 100%; height: 100%;
  max-width: 100%; object-fit: contain;
}

/* Wspólna typografia. */
.service-copy, .service-order, .service-office {
  color: #666666; font-family: inherit; font-size: .875rem; line-height: 1.65;
}
.service-copy *, .service-order *, .service-office * { box-sizing: border-box; }
body .content :is(.service-copy, .service-order, .service-office) :is(h2, h3, h4, p, ul, ol) {
  margin: 0 !important;
}
.service-copy :is(h2, h3, h4), .service-order :is(h2, h3), .service-office :is(h2, h3), .service-office strong {
  color: #0c1213; font-weight: 600; line-height: 1.5;
}
.service-copy h2, .service-order h2, .service-office h2 { font-size: 1.125rem; }
.service-copy h3, .service-order h3 { font-size: 1rem; }
.service-copy h4, .service-office h3 { font-size: .875rem; }
.service-copy a, .service-order a:not(.tm-button__link), .service-office a, .service-notice a {
  color: #0e7c37; text-decoration: underline;
  text-underline-offset: 3px; overflow-wrap: anywhere;
}
:is(.service-copy, .service-order, .service-office, .service-notice) a:focus-visible {
  outline: 3px solid #0e7c37; outline-offset: 3px;
}

/* Odstępy opisu — bez pustych akapitów i ręcznych przekładek. */
.service-copy, .service-section { display: grid; gap: 16px; min-width: 0; }
.service-copy { gap: 32px; }
body .content .service-copy > h2 + p { margin-top: -16px !important; }
.service-copy ul:not(.service-office__sector-list), .service-copy ol:not(.service-steps) { padding-left: 22px; }
.service-copy li + li { margin-top: 6px; }

/* Zestawienie parametrów. Nie dotyczy tabeli na stronie Big Bag. */
.service-table-wrap { border: 1px solid #dedede; border-radius: 12px; overflow: hidden; }
.service-copy .service-table {
  width: 100%; min-width: 0 !important; max-width: 100%; border-collapse: collapse; table-layout: fixed;
  background: #fff; font-size: .875rem; margin: 0;
}
.service-copy .service-table :is(th, td) {
  width: auto !important; padding: 14px;
  border: 0; border-bottom: 1px solid #dedede;
  color: #666666; background-color: transparent; text-align: left; vertical-align: top;
  overflow-wrap: anywhere; line-height: 1.6;
}
.service-copy .service-table thead th { color: #0c1213; background: #f5f5f5; font-weight: 600; }
.service-copy .service-table thead th:nth-child(1) { width: 18% !important; }
.service-copy .service-table thead th:nth-child(2) { width: 24% !important; }
.service-copy .service-table tbody th { color: #0c1213; font-weight: 600; }
.service-copy .service-table tbody tr:nth-child(even) { background: #fafafa; }
.service-copy .service-table tbody tr:last-child :is(th, td) { border-bottom: 0; }

/* Trzy kroki inspirowane referencją. */
.service-copy .service-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; list-style: none; padding: 0 !important;
}
.service-copy .service-steps > li {
  min-width: 0; margin: 0; padding: 18px;
  border: 1px dashed #909090; border-radius: 16px; background: #fff;
}
.service-steps__number {
  display: grid; place-items: center;
  width: 30px; height: 30px; margin-bottom: 14px;
  border-radius: 50%; background: #0e7c37; color: #fff; font-weight: 700;
}
body .content .service-copy .service-steps h4 { margin-bottom: 10px !important; }
@media (max-width: 599px) {
  .service-copy .service-steps { grid-template-columns: minmax(0, 1fr); }
  .service-copy .service-table :is(th, td) { padding: 10px 8px; }
}

/* Uniwersalne wyróżnienie terminu. */
.service-notice {
  background: #e7f4eb; border: 0; border-radius: 12px;
  padding: 24px; font-size: .875rem;
}
.service-notice .title-content-field__main { color: #0c1213; font-size: 1rem; }
.service-notice .title-content-field__secondary { color: #666666; line-height: 1.8; }

/* Karta zamówienia — istniejące przyciski strony. */
#main-content .service-order-card {
  padding: 24px; border: 1px solid #909090; border-radius: 20px;
  background: #fff; box-shadow: 0 8px 24px rgb(12 18 19 / 6%);
}
.service-order { display: grid; gap: 20px; min-width: 0; }
.service-order__summary { display: grid; gap: 4px; }
.service-order .service-order__value { color: #0e7c37; font-size: 2rem; font-weight: 700; line-height: 1.2; }
.service-order .service-order__facts { padding-left: 20px; }
#main-content .service-order-card .service-order__facts li {
  color: #666666; font-size: .875rem; line-height: 1.6;
}
.service-order__section { display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid #dedede; }
.service-order .tm-button, .service-order .tm-button__link { width: 100%; }
.service-order .tm-button__link {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 12px 16px; box-sizing: border-box;
  white-space: normal; text-align: center; line-height: 1.4; text-decoration: none;
}
.service-order .basic-portal-btn { color: #fff; background: #0e7c37; }
.service-order .basic-portal-btn:hover { color: #fff; background: #095525; }
.service-order .outlined-portal-btn { color: #0c1213; background: #fff; border: 1px solid #0c1213; }
.service-order .outlined-portal-btn:hover { color: #fff; background: #0c1213; }
.service-order__meta { color: #666666; font-size: .8125rem; }
.service-order__phone { font-weight: 600; }

/* Uniwersalny kontakt/BOK — div/span, bez znaczników usuwanych przez CMS. */
.service-office { background: #fff; }
.service-office .service-office__header { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #dedede; }
.service-office .service-office__columns {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px;
}
.service-office__columns > div { min-width: 0; }
body .content .service-office h3 { margin-bottom: 12px !important; }
body .content .service-office .service-office__contact-title { margin-top: 24px !important; }
.service-office .service-office__hours > div {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid #dedede;
}
.service-office__time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.service-office .service-office__sectors { margin-top: 28px; padding-top: 24px; border-top: 1px solid #dedede; }
.service-office .service-office__sector-list { list-style: none; padding: 0; }
.service-office .service-office__sector-list > li {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 9px 0;
}
@media (max-width: 480px) {
  .service-office .service-office__sector-list > li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .service-order .tm-button__link { transition: none; }
}

/* Galeria z wieloma zdjęciami, np. Big Bag — obsługa pozostaje w module CMS. */
.service-media .gsv { grid-template-rows: clamp(280px, 40vw, 430px) auto; }
.service-media .gsv__preview { padding: 20px 64px; }
.service-media .gsv__preview > img,
.service-media .gsv__preview > video {
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
}
.service-media .gsv__rest { height: auto; grid-auto-rows: 80px; }
.service-media .gsv__rest .img-wrap.active {
  box-shadow: none; outline: 2px solid #0e7c37; transform: none;
}
.service-copy .service-office .service-office__sector-list > li { margin: 0; }
body .content .service-copy .service-steps { margin: 0 !important; padding: 0 !important; }
body .content .service-copy .service-steps > li { margin: 0 !important; }
.service-spec .table-responsive:focus-visible { outline: 3px solid #0e7c37; outline-offset: 3px; }

/* Cennik w szerokiej części opisu; wspólny komponent usług. */
.service-pricing, #service-documents { scroll-margin-top: 32px; }
.service-prices-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px; min-width: 0;
}
.service-copy .service-price-card {
  display: grid; align-content: start; gap: 12px; min-width: 0;
  padding: 20px; background: #fff; border: 1px solid #dedede; border-radius: 16px;
  overflow-wrap: anywhere;
}
.service-copy .service-price-card h4 { font-size: 1rem; }
.service-copy .service-price-card__type { color: #0c1213; font-weight: 600; }
.service-price-card__amount { display: grid; gap: 5px; padding-top: 4px; }
.service-copy .service-price-card__gross {
  color: #0e7c37; font-size: 1.5rem; font-weight: 700; line-height: 1.4;
}
.service-price-card__gross span { font-size: .875rem; }
.service-copy .service-price-card__quote { color: #0e7c37; font-size: 1.125rem; font-weight: 700; }
.service-price-card__extra { padding-top: 12px; border-top: 1px solid #dedede; }

/* Dopisz na końcu CSS. HTML pozostaje bez zmian. */
#main-content .service-prices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

#main-content .service-prices-grid > .service-price-card {
  min-width: 0;
  align-content: start;
  gap: 12px;
  padding: 24px;
}

/* Wspólne wiersze wyrównują nagłówki, ceny i dopłaty pary kart.
   Wysokość wynika z treści, również po powiększeniu tekstu. */
@supports (grid-template-rows: subgrid) {
  #main-content .service-prices-grid > .service-price-card {
    grid-row: span 5;
    grid-template-rows: subgrid;
  }
}

#main-content .service-price-card__amount {
  align-content: start;
}

@media (max-width: 699px) {
  #main-content .service-prices-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #main-content .service-prices-grid > .service-price-card {
    grid-row: auto;
    grid-template-rows: none;
    padding: 20px;
  }
}

/* Etykiety kodów odpadów. */
.service-copy .service-waste-code {
  display: inline-block;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid #d5ddd7;
  border-radius: 6px;
  background: #f2f5f3;
  color: #26352b;
  font-size: .8125rem;
  line-height: 1.5;
}
.service-copy .service-waste-code strong {
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body .content .service-copy .service-waste-codes {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}
body .content .service-copy .service-waste-codes > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 !important;
}

body .content .service-office .service-office__hours + p {
  margin-top: 12px !important;
}