/* Mobilní rozložení tvoří základ; původní desktopové styly ho přepíší od 1024 px. */
* { margin: 0; padding: 0; }
body { font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 16px; line-height: 1.55; color: #111; }
a { color: #a91319; }
img { max-width: 100%; height: auto; }
div#desktop { background: #e61e26; min-height: 100vh; }
div.wrap-980px { width: auto; margin: 0 auto; padding: 12px; }
div#page { width: auto; margin: 0; }
div#page_content { margin: 0; }
section { min-height: 0; }
img#head_pic { display: none; }
.mobile-brand { padding: 20px 16px; background: #fff7d4; border-radius: 6px; text-align: center; }
.brand-name { font-size: 24px; font-weight: bold; }
.brand-offer { font-size: 26px; font-weight: bold; line-height: 1.2; margin: 8px 0; }
.call-button { display: block; margin-top: 16px; padding: 12px; border-radius: 6px; color: #fff; background: #a91319; font-size: 20px; font-weight: bold; text-decoration: none; }
.box { padding: 16px; margin: 16px 0; background: #fafafa; border: 1px solid #d6d6d6; border-radius: 6px; box-shadow: 2px 1px 5px #808080; }
.box-head, .box-galery, .box-contact { width: auto; }
.box-head { min-height: 0; display: flow-root; }
.box-head h1, .nadpis1 { font-size: 24px; line-height: 1.25; margin-bottom: 12px; }
.nadpis1 { text-align: center; color: #fff; margin-top: 24px; }
.service-intro { margin-bottom: 12px; }
ul.levy, ul.pravy { width: auto; float: none; list-style: none; }
ul.levy li, ul.pravy li { padding: 0 0 8px 20px; background: url('../img/design/bg-li.gif') no-repeat 0 8px; }
.box-left, .box-right { position: static; float: none; width: auto; height: auto; }
.box-left h2.title, .box-right h2.title { font-size: 22px; line-height: 1.3; color: #a91319; margin-bottom: 12px; }
p.descript { min-height: 0; padding: 12px; background: #f0f0f0; }
img.platform-picture { display: block; margin: 16px auto; cursor: zoom-in; }
.platform-features { margin-left: 20px; }
.platform-features li { padding-bottom: 6px; }
.box-galery { margin-top: 16px; height: auto; }
.gallery-title { font-size: 22px; line-height: 1.3; text-align: center; padding-bottom: 16px; }
/* Galerie zůstává kompletní a počet sloupců se přizpůsobuje dostupné šířce. */
.hoverbox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; }
.hoverbox a { display: block; }
.hoverbox img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.hoverbox .preview { display: none; }
.box-contact { height: auto; font-size: 16px; background: #f0f0f0 url('../img/design/mini-hero-bg.png') repeat; overflow-wrap: anywhere; }
.contact-title { font-size: 22px; margin-bottom: 12px; }
.box-contact a { display: inline-block; padding: 8px 0; }
/* Z jedné tabulky vznikají na mobilu karty, bez druhé kopie ceníku. */
.price-table { width: 100%; border-collapse: collapse; }
.price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.price-table, .price-table tbody, .price-table tr, .price-table tbody th, .price-table td { display: block; }
.price-table tr { margin-bottom: 16px; border: 1px solid #d6d6d6; border-radius: 4px; overflow: hidden; background: #fff; }
.price-table tbody th { padding: 12px; background: #f2dddc; text-align: left; }
.price-table td { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid #d6d6d6; }
.price-table td > span:last-child { flex-shrink: 0; font-weight: bold; }
.mobile-price-label { text-align: left; }
.price-note { margin: 12px 0; }
.WordSection2 { margin-top: 20px; }
/* Staré odsazení vložené z Wordu by na úzkém displeji vytlačovalo text. */
@media (max-width: 1023px) {
    *, *::before, *::after { box-sizing: border-box; }
    .WordSection2 p { margin-left: 0 !important; text-indent: 0 !important; }
    .WordSection2 span { font-size: 20px !important; }
    .platform-picture:focus-visible { outline: 3px solid #a91319; outline-offset: 3px; }
}
@media (min-width: 600px) and (max-width: 1023px) {
    div.wrap-980px { padding: 20px; }
    .hoverbox { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Mobilní doplňky a společná pravidla nezasahují do původního desktopového vzhledu. */
@media (min-width: 1024px) {
    body { line-height: normal; color: #000; }
    a { color: #0000ee; }
    img#head_pic { display: inline; max-width: none; }
    .mobile-brand, .mobile-price-label { display: none; }
    .box { border-radius: 0; }
    img.platform-picture { display: inline; margin: 0; }
    .platform-features li { padding-bottom: 0; }
    .hoverbox { display: block; }
    .hoverbox a { display: inline; }
    .hoverbox img { display: inline; width: 162px; height: 121px; max-width: none; aspect-ratio: auto; object-fit: fill; border-radius: 0; }
    .price-table { display: table; }
    .price-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: table-header-group; }
    .price-table tbody { display: table-row-group; }
    .price-table tr { display: table-row; }
    .price-table tr { margin: 0; border: 0; border-radius: 0; overflow: visible; background: transparent; }
    .price-table tbody th, .price-table td { display: table-cell; }
    .price-table tbody th { background: transparent; padding: 10px; }
    .price-table td > span:last-child { font-weight: normal; }
    .WordSection2 { margin-top: 0; }
    .nadpis1 { color: #000; margin-top: 0; }
    .box-contact { overflow-wrap: normal; }
    .box-contact a { display: inline; padding: 0; }
    .contact-title { margin-bottom: 0; }
    .box-head h1, .nadpis1, .box-left h2.title, .box-right h2.title, .gallery-title { line-height: normal; }
}
/* Nativní dialog zajišťuje zavření klávesou Escape a vrácení fokusu. */
#image-viewer { position: fixed; inset: 0; margin: auto; width: min(94vw, 1000px); max-height: 94dvh; padding: 16px; border: 0; border-radius: 8px; background: #fff; box-sizing: border-box; }
#image-viewer::backdrop { background: rgb(0 0 0 / 80%); }
.viewer-close { display: block; margin: 0 0 12px auto; padding: 12px 16px; border: 0; border-radius: 4px; background: #a91319; color: #fff; font-size: 16px; cursor: pointer; }
.viewer-image { display: block; width: auto; max-width: 100%; max-height: 70dvh; height: auto; margin: auto; object-fit: contain; }
.viewer-caption { margin-top: 12px; text-align: center; }
button:focus-visible, a:focus-visible { outline: 3px solid #245dc1; outline-offset: 3px; }
