/* Bloky stránek vytvořených ve Správci webu (1. 11. 2026). Barvy a písmo navazují na css/style.css. */
.cms-page .cms-block { margin: 0 0 1.75rem; }
.cms-page .cms-block:last-child { margin-bottom: 0; }

.cms-subtitle { font-size: 1.35rem; color: #1a365d; margin: .5rem 0 0; }

.cms-text { background: #f7fafc; padding: 1.5rem 2rem; border-radius: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.cms-text p { margin: 0 0 1.1rem; }
.cms-text p:last-child, .cms-text ul:last-child, .cms-text ol:last-child { margin-bottom: 0; }
.cms-text h2, .cms-text h3, .cms-text h4 { color: #1a365d; margin: 1.2rem 0 .6rem; line-height: 1.3; }
.cms-text h2:first-child, .cms-text h3:first-child, .cms-text h4:first-child { margin-top: 0; }
.cms-text ul, .cms-text ol { margin: 0 0 1.1rem 1.4rem; padding: 0; }
.cms-text li { margin-bottom: .35rem; }
.cms-text a { color: #406bae; text-decoration: underline; text-underline-offset: 2px; }
.cms-text blockquote { margin: 0 0 1.1rem; padding: .6rem 1.1rem; border-left: 4px solid #406bae; background: #fff; }

/* obrázek */
.cms-image { margin: 0; text-align: center; }
.cms-image img { max-width: 100%; height: auto; border-radius: 10px; }
.cms-image.cms-size-medium img { max-width: 640px; width: 100%; }
.cms-image.cms-size-small img { max-width: 360px; width: 100%; }
.cms-image figcaption { margin-top: .5rem; color: #424f68; font-size: .95rem; }

/* galerie */
.cms-gallery { display: grid; gap: .75rem; grid-template-columns: repeat(3, 1fr); }
.cms-gallery.cms-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cms-gallery.cms-cols-4 { grid-template-columns: repeat(4, 1fr); }
.cms-gallery figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #e2e8f0; }
.cms-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.cms-gallery a:hover img, .cms-gallery a:focus img { transform: scale(1.04); }
@media (max-width: 700px) { .cms-gallery, .cms-gallery.cms-cols-3, .cms-gallery.cms-cols-4 { grid-template-columns: repeat(2, 1fr); } }

/* galerie letáků a plakátů: celé náhledy na výšku, po kliknutí zvětšené přes stránku */
.cms-gallery.cms-letaky { align-items: start; gap: 1rem; }
.cms-letaky figure { aspect-ratio: auto; overflow: visible; background: none; border-radius: 0; }
.cms-letaky a { display: block; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); cursor: zoom-in; line-height: 0; }
.cms-letaky img { width: 100%; height: auto; object-fit: contain; }
.cms-letaky a:hover img, .cms-letaky a:focus img { transform: none; }
.cms-letaky a:hover, .cms-letaky a:focus { box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
@media (max-width: 560px) { .cms-gallery.cms-letaky, .cms-gallery.cms-letaky.cms-cols-3, .cms-gallery.cms-letaky.cms-cols-4 { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; } }
.cms-lb-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(10, 20, 40, .9); z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 1rem; cursor: zoom-out; }
.cms-lb-overlay[hidden] { display: none; }
.cms-lb-overlay img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; background: #fff; border-radius: 6px; cursor: default; }
.cms-lb-close { position: absolute; top: .75rem; right: .75rem; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: #1a365d; font-size: 2rem; line-height: 1; cursor: pointer; }
.cms-lb-close:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
body.cms-lb-open { overflow: hidden; }

/* video */
.cms-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.cms-video-frame iframe, .cms-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cms-transcript { margin-top: .75rem; background: #f7fafc; border-radius: 8px; padding: .75rem 1rem; }
.cms-transcript summary { cursor: pointer; font-weight: 600; color: #1a365d; }

/* tlačítko a soubor */
.cms-button { margin: 0; }
.btn.btn-secondary { background: #fff; color: #406bae; border: 2px solid #406bae; }
.btn.btn-secondary:hover { background: #eef3fa; }
.cms-file { margin: 0; }
.cms-file a { display: inline-flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; color: #1a365d; font-weight: 600; text-decoration: none; background: #f7fafc; padding: .8rem 1.1rem; border-radius: 10px; border: 1px solid #e2e8f0; }
.cms-file a:hover { border-color: #406bae; }
.cms-file-meta, .cms-file-note { color: #424f68; font-weight: 400; font-size: .9rem; }
.cms-file-note { display: block; margin-top: .3rem; }

/* sloupce */
.cms-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .cms-columns { grid-template-columns: 1fr; } }

/* kontakt a mapa */
.cms-contact { background: #f7fafc; border-left: 4px solid #406bae; border-radius: 8px; padding: 1rem 1.25rem; line-height: 1.6; }
.cms-contact-name { font-weight: 700; color: #1a365d; }
.cms-contact-role, .cms-contact-note { color: #424f68; }
.cms-contact a, .cms-map a:not(.btn) { color: #406bae; }
.cms-map { background: #f7fafc; border-radius: 12px; padding: 1.25rem 1.5rem; }
.cms-map-title { font-weight: 700; color: #1a365d; }
.cms-map-note { color: #424f68; margin-top: .25rem; }
.cms-map p { margin: .75rem 0 0; }

/* oznámení / leták */
.cms-notice { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); background: #eef3fa; border: 2px solid #406bae; border-radius: 14px; padding: 1.25rem; }
.cms-notice.cms-tone-warning { background: #fff8e6; border-color: #e0a800; }
.cms-notice.cms-tone-success { background: #eaf7ef; border-color: #2f9e5f; }
.cms-notice-img img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 0 auto; }
.cms-notice-title { margin: 0 0 .5rem; color: #1a365d; font-size: 1.4rem; }
.cms-notice .cms-text { background: transparent; padding: 0; }
@media (min-width: 800px) { .cms-notice:has(.cms-notice-img) { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; } }

/* rozbalovací otázky */
.cms-acc-item { border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: .6rem; background: #fff; }
.cms-acc-item summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 600; color: #1a365d; }
.cms-acc-item .cms-text { background: transparent; padding: 0 1.1rem 1rem; }

.cms-divider { border: 0; border-top: 2px solid #e2e8f0; margin: 2rem 0; }

/* Úvodní stránka: oddíly spravované ze Správce webu */
.logo-nabidka-grid:has(> .logo-nabidka-item:only-child) { grid-template-columns: 1fr; }
.cms-zone.cms-page .cms-block { margin-bottom: 1.25rem; }
.cms-zone-pod { max-width: 960px; margin: 1.5rem auto 0; }

/* vysoký leták se nesmí roztáhnout přes celou obrazovku */
.cms-notice-img img { width: auto; max-width: 100%; max-height: 85vh; }
.cms-image img { max-height: 90vh; width: auto; max-width: 100%; }
.cms-image img { height: auto; }
