/* Wersja na telefon i wąskie tablety (dodana przy publikacji; projekt z Claude Design ma układ tylko na komputer).
   Na szerokim ekranie te reguły nie działają — wygląd na komputerze bez zmian.
   Projekt ma wiele stylów wpisanych bezpośrednio w elementy (style="…"), dlatego część reguł celuje w nie selektorem atrybutu i !important. */

@media (max-width: 760px) {
  html, body { overflow-x: hidden; }

  /* Odstępy od krawędzi ekranu */
  .container, .container-wide { padding-left: 16px !important; padding-right: 16px !important; }
  section { padding-top: 56px !important; padding-bottom: 56px !important; }

  /* Siatki kolumn → jedna kolumna */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="display: grid"] { gap: 20px !important; }
  [style*="display: flex"] { flex-wrap: wrap; }

  /* Stałe szerokości i wysokości z projektu */
  [style*="width: "][style*="px"]:not(img):not(svg):not(button):not(.lang-btn) { max-width: 100% !important; }
  p[style*="width:"], p[style*="width: "] { width: auto !important; height: auto !important; }
  [style*="height: 420px"], [style*="height: 460px"], [style*="height: 480px"], [style*="height: 520px"] { height: auto !important; }
  .ph { min-height: 260px; }

  /* Większe odstępy i wypełnienia z projektu → mniejsze */
  [style*="padding: 40px"], [style*="padding: 48px"], [style*="padding: 56px"], [style*="padding: 64px"] { padding: 24px !important; }
  [style*="margin-top: 72px"], [style*="margin-top: 96px"] { margin-top: 40px !important; }

  /* Nawigacja: logo + przełącznik języka w pierwszym wierszu, linki zawijane pod spodem */
  .nav-inner { flex-wrap: wrap; row-gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .nav .logo img { height: 52px !important; }
  .nav-links { flex-wrap: wrap; width: 100%; order: 3; gap: 2px 4px; justify-content: flex-start; }
  .nav-links .nav-link { padding: 8px 10px; font-size: 14px; }
  .nav-links a[href^="tel:"] { white-space: nowrap; }
  .nav-links > div[style*="border-left"] { border-left: 0 !important; margin-left: 0 !important; padding-left: 0 !important; }

  /* Ozdobniki wystające poza kartę */
  .pillar-card-pro-decor { max-width: 100%; overflow: hidden; }

  /* Duże nagłówki */
  h1, .display, .h1 { font-size: clamp(34px, 9vw, 44px) !important; line-height: 1.08 !important; }
  h2, .h2 { font-size: clamp(28px, 7.5vw, 36px) !important; line-height: 1.12 !important; }

  /* Przyciski obok siebie → mogą przejść do nowej linii */
  .btn { white-space: normal; }
}

@media (max-width: 760px) {
  /* Kalendarz BDO: pionowa linia osi czasu przecinała tekst po złożeniu kolumn */
  [style*="left: 120px"][style*="width: 1px"] { display: none; }
  /* Pusta przestrzeń w karcie ankiety */
  [style*="min-height: 3"], [style*="min-height: 4"] { min-height: 0 !important; }
}

/* Tablety i małe laptopy (projekt miał stałe szerokości liczone pod duży ekran) */
@media (max-width: 1100px) {
  html, body { overflow-x: hidden; }
  p[style*="width: "] { width: auto !important; height: auto !important; }
  .pillar-card-pro { overflow: hidden; }
}
@media (max-width: 900px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .nav-inner { flex-wrap: wrap; row-gap: 8px; }
  .nav-links { flex-wrap: wrap; }
}
@media (max-width: 900px) {
  [style*="height: 420px"], [style*="height: 460px"], [style*="height: 480px"], [style*="height: 520px"] { height: auto !important; }
  .ph { min-height: 300px; }
}

/* Przełącznik ECOSAFE ↔ Akademia: na telefonie z napisem „Akademia” (w projekcie sama ikonka) */
@media (max-width: 720px) {
  .bs-trigger-label { display: flex !important; }
  .bs-trigger { padding: 6px 12px 6px 6px !important; }
}
