/* Pohotovost webu, 3. 12. 2026: obsah stránek se v telefonu vejde na šířku displeje.
   Všechno platí jen do šířky 767 px, na počítači se nic nemění. */
@media (max-width: 767px) {
  #content main { overflow-wrap: break-word; }
  #content main img { max-width: 100%; height: auto; }
  /* text zarovnaný do bloku dělá v úzkém displeji velké mezery mezi slovy */
  #content main .text-justify, #content main [style*="justify"] { text-align: left !important; }

  /* tabulky z editoru stránek: bez posouvání do strany, text se zalamuje */
  #content main .table-responsive { overflow-x: visible; border: 0; }
  #content main .table-responsive > .table { width: 100% !important; table-layout: fixed; }
  #content main .table-responsive > .table > thead > tr > th,
  #content main .table-responsive > .table > tbody > tr > th,
  #content main .table-responsive > .table > tbody > tr > td,
  #content main .table-responsive > .table > tfoot > tr > td { white-space: normal; overflow-wrap: anywhere; padding-left: 4px; padding-right: 4px; }

  /* úvod a Zabezpečovací systémy: sloupce pod sebou, nadpis vždy nad svým obsahem */
  #index #content main .table-responsive > .table > tbody,
  #article-578074 #content main .table-responsive > .table > tbody { display: flex; flex-direction: column; }
  #index #content main .table-responsive > .table > tbody > tr,
  #article-578074 #content main .table-responsive > .table > tbody > tr { display: contents; }
  #index #content main .table-responsive > .table > tbody > tr > td,
  #article-578074 #content main .table-responsive > .table > tbody > tr > td { display: block; width: auto !important; padding-left: 0; padding-right: 0; }
  #index #content main .table-responsive > .table > tbody > tr > td:nth-child(2),
  #article-578074 #content main .table-responsive > .table > tbody > tr > td:nth-child(2) { order: 2; }
  #article-578074 #content main .table-responsive > .table > tbody > tr > td:nth-child(3) { order: 3; }
  #article-578074 #content main .table-responsive > .table > tbody > tr > td:nth-child(4) { order: 4; }
  #index #content main .table-responsive > .table > tbody > tr:first-child > td:nth-child(2) { padding-top: 16px; }
  #article-578074 #content main .table-responsive > .table > tbody > tr:first-child > td { padding-top: 18px; padding-bottom: 0; }

  /* Podlahy Quick-Step a Nástěnné klimatizace: karty (fotka, nadpis, text) pod sebou ve stejném pořadí jako na počítači */
  #article-477765 #content main .table-responsive > .table > tbody > tr > td,
  #article-520064 #content main .table-responsive > .table > tbody > tr:has(ul) > td { display: block; width: auto !important; padding-left: 0; padding-right: 0; }
  /* Nástěnné klimatizace: model a jeho parametry drží pohromadě, čára jen mezi modely, prázdné buňky (ke stažení) nedělají díru */
  #article-520064 #content main .table-responsive > .table,
  #article-520064 #content main .table-responsive > .table > tbody,
  #article-520064 #content main .table-responsive > .table > tbody > tr:has(ul) { display: block; }
  #article-520064 #content main .table-responsive > .table > tbody > tr:not(:has(ul)) { display: flex; gap: 16px; border-top: 1px solid #ddd; }
  #article-520064 #content main .table-responsive > .table > tbody > tr:not(:has(ul)) > td { display: block; width: auto !important; border: 0; padding-left: 0; padding-right: 0; }
  #article-520064 #content main .table-responsive > .table > tbody > tr:has(ul) > td + td { border-top: 0; padding-top: 0; }
  #article-520064 #content main .table-responsive > .table > tbody > tr:nth-child(2) > td:first-child,
  #article-520064 #content main .table-responsive > .table > tbody > tr:nth-child(4) > td:first-child { display: none; }

  /* Sinclair: čtyři dlaždice značky 2 × 2, ke stažení vždy název a pod ním jeho náhled; slova se nelámou */
  #article-516687 #content main .table-responsive > .table > tbody > tr > td { overflow-wrap: normal; }
  #article-516687 #content main .table-responsive > .table > tbody > tr > td:empty { display: none; }
  #article-516687 #content main .table-responsive > .table > tbody > tr:first-child > td:has(h1) { display: block; flex: 0 0 50%; width: 50% !important; border: 0; }
  #article-516687 #content main .table-responsive > .table > tbody > tr:first-child:has(h1) { display: flex; flex-wrap: wrap; }
  #article-516687 #content main .table-responsive > .table > tbody > tr > td h1 { font-size: 20px; line-height: 1.3; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody { display: flex; flex-direction: column; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody > tr { display: contents; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody > tr > td { display: block; width: auto !important; padding-left: 0; padding-right: 0; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody > tr > td:nth-child(2) { order: 2; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody > tr > td:nth-child(3) { order: 3; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody > tr > td:nth-child(4) { order: 4; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody > tr:first-child > td { border-top: 1px solid #ddd; padding-top: 12px; padding-bottom: 4px; }
  #article-516687 #content main .table-responsive > .table:not(:has(h1)) > tbody > tr:last-child > td { border-top: 0; padding-top: 0; padding-bottom: 12px; }

  /* výpis stránek v rubrice: o 5 px širší než displej, obsah zůstává na stejném místě */
  #content main .media-list { margin-left: -15px; margin-right: -15px; }
  #content main .media-list > .media { padding-left: 15px; padding-right: 15px; }

  /* soubory ke stažení */
  /* řádek = název souboru přes celou šířku, pod ním datum, typ a velikost ve stejných sloupcích jako záhlaví */
  #content main #table-downloads > thead > tr,
  #content main #table-downloads > tbody > tr { display: flex; flex-wrap: wrap; border-top: 1px solid #ddd; }
  #content main #table-downloads > thead > tr > th,
  #content main #table-downloads > tbody > tr > td { display: block; border: 0; padding: 4px 6px 4px 0; white-space: nowrap; }
  #content main #table-downloads > thead > tr > th:first-child,
  #content main #table-downloads > tbody > tr > td:first-child { flex: 0 0 100%; white-space: normal; padding-top: 8px; }
  #content main #table-downloads > thead > tr > th:nth-child(2),
  #content main #table-downloads > tbody > tr > td:nth-child(2) { flex: 0 0 110px; }
  #content main #table-downloads > thead > tr > th:nth-child(3),
  #content main #table-downloads > tbody > tr > td:nth-child(3) { flex: 0 0 50px; }
  #content main #table-downloads > thead > tr > th:nth-child(4),
  #content main #table-downloads > tbody > tr > td:nth-child(4) { flex: 0 0 105px; }
  #content main #table-downloads > tbody > tr > td:last-child { padding-bottom: 8px; flex-grow: 1; }
}
