/* ============================================================
 EL-HYDRO • LAYOUT PREMIUM 2026/2027 • ETAP 1
 Standard bazowy: 1320 px, bez modyfikowania źródłowego CSS.
 Dotyczy wyłącznie rozpoznanych ramek i oznaczonych klas.
 Wersja 1.0.1 | 2026-11-13
 ============================================================ */

:root {
  --elh-layout-max: 1320px;
  --elh-layout-gap: clamp(18px, 2.2vw, 28px);
}

/* I. Rozpoznane ramki istniejących stron — nie header, stopka,
   wyskakujące okna ani wewnętrzne karty 850 px. */
body.page-id-18 div.elementor.elementor-18,
body.page-id-20 div.elementor.elementor-20,
body.page-id-3846 div.elementor.elementor-3846,
body.page-id-61 div.elementor.elementor-61,
body.page-id-3747 article.el-cennik,
body.page-id-5082 .page--content,
body.page-id-42 .page--content,
body.page-id-5478 .elh-ns-page,
body.page .elh-premium-frame,
body .elh-sl-archive-wrap {
  box-sizing: border-box !important;
  width: calc(100% - 32px) !important;
  max-width: var(--elh-layout-max) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Kontener kontaktu wewnątrz szerokiej ramki. */
body.page-id-42 .elh-kontakt-frame.wp-block-group {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Blog: zachowanie osobnego filtra kanonicznego ze starego CSS. */
html:has(head link[rel="canonical"][href$="/blog/"])
  body div.elementor[data-elementor-type="wp-page"],
html:has(head link[rel="canonical"][href$="/blog/"])
  body div.elementor[data-elementor-post-type="page"] {
  box-sizing: border-box !important;
  width: calc(100% - 32px) !important;
  max-width: var(--elh-layout-max) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* II. Odstępy — bez naruszania dotychczasowej kompensacji
   slidera na komputerach i przesunięcia strony Nowa Sól. */
@media (min-width: 1025px) {
  body.page-id-18 div.elementor.elementor-18,
  body.page-id-20 div.elementor.elementor-20,
  body.page-id-3846 div.elementor.elementor-3846,
  body.page-id-61 div.elementor.elementor-61,
  body.page-id-3747 article.el-cennik,
  body.page-id-5082 .page--content,
  body.page-id-42 .page--content,
  body.page .elh-premium-frame {
    padding-left: clamp(28px, 3vw, 40px) !important;
    padding-right: clamp(28px, 3vw, 40px) !important;
  }
}

/* III. Tablet — szerokie, lecz bezpieczne ramki. */
@media (min-width: 769px) and (max-width: 1024px) {
  body.page-id-18 div.elementor.elementor-18,
  body.page-id-20 div.elementor.elementor-20,
  body.page-id-3846 div.elementor.elementor-3846,
  body.page-id-61 div.elementor.elementor-61,
  body.page-id-3747 article.el-cennik,
  body.page-id-5082 .page--content,
  body.page-id-42 .page--content,
  body.page-id-5478 .elh-ns-page,
  body.page .elh-premium-frame,
  body .elh-sl-archive-wrap {
    width: calc(100% - 24px) !important;
    max-width: none !important;
  }

  body.page-id-18 div.elementor.elementor-18,
  body.page-id-20 div.elementor.elementor-20,
  body.page-id-3846 div.elementor.elementor-3846,
  body.page-id-61 div.elementor.elementor-61,
  body.page-id-3747 article.el-cennik,
  body.page-id-5082 .page--content,
  body.page-id-42 .page--content,
  body.page .elh-premium-frame {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

/* IV. Telefon — prawie cała szerokość, bez bocznego przewijania. */
@media (max-width: 768px) {
  body.page-id-18 div.elementor.elementor-18,
  body.page-id-20 div.elementor.elementor-20,
  body.page-id-3846 div.elementor.elementor-3846,
  body.page-id-61 div.elementor.elementor-61,
  body.page-id-3747 article.el-cennik,
  body.page-id-5082 .page--content,
  body.page-id-42 .page--content,
  body.page-id-5478 .elh-ns-page,
  body.page .elh-premium-frame,
  body .elh-sl-archive-wrap {
    width: calc(100% - 12px) !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  body.page-id-18 div.elementor.elementor-18,
  body.page-id-20 div.elementor.elementor-20,
  body.page-id-3846 div.elementor.elementor-3846,
  body.page-id-61 div.elementor.elementor-61,
  body.page-id-3747 article.el-cennik,
  body.page-id-5082 .page--content,
  body.page-id-42 .page--content,
  body.page .elh-premium-frame {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body .elh-sl-archive-inner {
    box-sizing: border-box;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Stary awaryjny breakout +50 px może wywołać overflow po
     poszerzeniu rodzica. Utrzymujemy kartę w nowej szerokości. */
  body.page-id-5082 .elh-awaria-page {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* V. Przyszłe strony: klasa ramki i opcjonalna siatka 70/30.
   To klasy opt-in, nie wymuszają kolumn na każdej stronie. */
.elh-layout-70-30 {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: var(--elh-layout-gap);
  align-items: start;
}
.elh-layout-70-30 > * { min-width: 0; }
@media (max-width: 991px) {
  .elh-layout-70-30 { grid-template-columns: minmax(0, 1fr); }
}

/* VI. HERO NA CAŁĄ SZEROKOŚĆ EKRANU — aktywacja świadoma.
   W Elementorze nadać klasę elh-hero-fullbleed bez kropki
   ZEWNĘTRZNEMU kontenerowi slidera; nie jego ruchomej ścieżce.
   Nie włączamy automatycznie, bo może objąć miniatury. */
body.page-id-18 .elh-hero-fullbleed {
  position: relative !important;
  box-sizing: border-box !important;
  width: 100vw !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
body.page-id-18 .elh-hero-fullbleed > .elementor-container,
body.page-id-18 .elh-hero-fullbleed > .e-con-inner {
  width: 100% !important;
  max-width: none !important;
}

/* Nie ustawiamy wszędzie height / background-size:cover,
   bo wymaga to znajomości kodu i obrazów faktycznego slidera. */


/* ============================================================
 VII. STRONA GŁÓWNA — WSPÓLNA RAMKA OD DRUGIEJ SEKCJI

 Struktura potwierdzona w nawigatorze Elementor:
 1) sekcja: slider Premium + HTML (5 kafelków)
 2) sekcja: dwa widgety HTML — początek zawartości w ramce
 3+) dalsze sekcje: jedna wizualnie ciągła ramka 1320 px

 Bez zmian HTML slidera, shortcode'ów i sekcji. Uwzględniamy
 zarówno klasyczny wrapper `.elementor-section-wrap`, jak i
 sekcje jako bezpośrednie dzieci `.elementor-18`.
 ============================================================ */

/* Białej ramki nie umieszczamy już na całym Elementorze. */
body.page-id-18 div.elementor.elementor-18 {
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 24px !important;
  margin-bottom: 36px !important;
  width: calc(100% - 32px) !important;
  max-width: var(--elh-layout-max) !important;
}

/* Sekcji 1 nie nadpisujemy ani nie wprowadzamy jej w ramkę. */

/* Wszystkie sekcje od drugiej: spójne boki i białe tło ramki. */
body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:nth-child(n+2),
body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:nth-child(n+2) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-left: clamp(12px, 3vw, 40px) !important;
  padding-right: clamp(12px, 3vw, 40px) !important;
  border-left: 1px solid rgba(0,115,230,.15) !important;
  border-right: 1px solid rgba(0,115,230,.15) !important;
  background-color: #ffffff;
}

/* Pierwsza sekcja w ramce — zaokrąglona górna krawędź. */
body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:nth-child(2),
body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:nth-child(2) {
  margin-top: 28px !important;
  padding-top: 36px !important;
  border-top: 1px solid rgba(0,115,230,.15) !important;
  border-radius: 16px 16px 0 0 !important;
  box-shadow: 0 -8px 25px rgba(0,115,230,.055);
}

/* Ostatnia sekcja domyka ramkę. */
body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:last-child:not(:first-child),
body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:last-child:not(:first-child) {
  padding-bottom: 36px !important;
  border-bottom: 1px solid rgba(0,115,230,.15) !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: 0 14px 30px rgba(0,115,230,.12);
}

/* Szerokości wewnętrznego kontenera sekcji (klasyczne sekcje). */
body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:nth-child(n+2) > .elementor-container,
body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:nth-child(n+2) > .elementor-container {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

/* Ważne: sekcja 2 i dalsze mogą zawierać własne tła/karty.
   Nie nadpisujemy `background-image`, overflow ani kolumn widgetów. */
@media (min-width: 769px) and (max-width: 1024px) {
  body.page-id-18 div.elementor.elementor-18 { width: calc(100% - 24px) !important; }
  body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:nth-child(n+2),
  body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:nth-child(n+2) {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}
@media (max-width: 768px) {
  body.page-id-18 div.elementor.elementor-18 {
    width: calc(100% - 12px) !important;
    margin-top: 12px !important;
    margin-bottom: 24px !important;
  }
  body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:nth-child(n+2),
  body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:nth-child(n+2) {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:nth-child(2),
  body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:nth-child(2) {
    margin-top: 14px !important;
    padding-top: 16px !important;
  }
  body.page-id-18 div.elementor.elementor-18 > .elementor-section-wrap > .elementor-top-section:last-child:not(:first-child),
  body.page-id-18 div.elementor.elementor-18 > .elementor-top-section:last-child:not(:first-child) {
    padding-bottom: 18px !important;
  }
}
