/* "Skip to content" link (WCAG 2.4.1 Bypass Blocks) — first focusable element in <body>
   (see portal/frontend/index.php), off-screen until tabbed to so mouse users never see it.
   z-index above the sticky header (max 9999 elsewhere in this file) so it isn't hidden
   under it when focused while scrolled down. */
.mu-skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-100%);
  z-index: 10000;
  padding: 12px 20px;
  background: #c01b21;
  color: #fff;
  font: bold 15px/1.4 sans-serif;
  text-decoration: none;
}

.mu-skip-link:focus {
  transform: translateY(0);
}

/* Small breathing room below the header divider before the filter row — the .mu-meta block
   that used to sit here (aktuální počet sbírkových předmětů, now moved to the footer) provided
   this spacing incidentally via its own margin; overrides the base styles.css padding-top:0. */
.mu-collection {
  padding-top: 20px;
}

/* Match MUO: the filter row has its own centered 1080px wrapper and four columns on desktop. */
.mu-filter-fields--centered {
  max-width: 1080px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 860px) {
  .mu-filter-fields--centered>.col--6 {
    width: 25%;
  }
}

/* Sticky header (logo/search/nav) — toggled by @layout.latte's script via the
   stickySearchFilterEnabled admin setting. The spacer's height is set by that same script,
   matching the header's own height while it's pinned, so the page content directly below
   doesn't jump up by that amount when <header> leaves normal flow. <header> already spans
   full width outside of any .container, so position:fixed;left:0;width:100% is correct
   as-is — no need to also track/copy the element's own left/width like the old sticky filter
   row did (that one lived *inside* a centered, max-width .container). */
.mu-sticky-header-spacer {
  height: 0;
}

.header.mu-sticky-header--fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Homepage "Procházet vše" button, right below the filter row — .btn is inline-block by
   default (base styles.css), so centering needs a block-level text-align:center wrapper. */
.mu-browse-all {
  margin: 20px 0 0;
  text-align: center;
}

/* Nowhere on this page should text render ALL CAPS via CSS transform — the underlying labels
   (nav links, footer item count, "Detail" card action, autocomplete headings/categories/
   filters) are already written in natural case (first letter up, rest down) in their
   templates/PHP; these were the base styles.css / cards.css rules still forcing uppercase
   display over them regardless. */
.nav a,
.footer__info,
.mu-demo-card-action-label,
.mu-demo-collection-card-action-label,
.mu-search-suggest__heading,
.mu-search-suggest__category,
.mu-search-suggest__filter-label {
  text-transform: none;
}

/* base styles.css has both h1{text-transform:uppercase} (0,0,1) and, more specifically,
   .header h1{...text-transform:uppercase} (0,1,1) — a bare .mu-collection__logo override
   (0,1,0) would still lose to the latter, so matching its two-class specificity here. */
.header .mu-collection__logo {
  text-transform: none;
}

.mu-search-suggest__filter-value {
  text-transform: none !important;
}

/* Nav link hover + active-page indicator (is-active set server-side in @layout.latte via
   $presenter->isLinkCurrent(), matching each link's own destination/params). Reuses the same
   red already used elsewhere as an accent (logo dot, .is-selected select2 state). */
.nav a {
  position: relative;
  padding-bottom: 3px;
  transition: color 140ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: #c01b21;
}

.nav a.is-active {
  color: #c01b21;
  font-weight: 700;
}

.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #c01b21;
}

/* Jazykový přepínač — vlajka + dropdown (<details>/<summary>, viz @layout.latte), co
   nejméně místa v hlavičce. .nav li/.nav a base pravidla (inline-block, 40px mezera mezi
   <li>, podtržení is-active, ...) se kaskádují na VŠECHNY <li>/<a> uvnitř .nav včetně téhle
   položky, proto je potřeba je tady výslovně přebít. */
.mu-lang-switch {
  position: relative;
  /* .nav li+li má 40px mezeru — u posledního nav itemu (samotná vlajka) je zbytečně
     velká, dropdown má být co nejblíž předchozímu odkazu. */
  margin-left: 12px !important;
}

.mu-lang-switch__dropdown {
  display: inline-block;
}

.mu-lang-switch__dropdown>summary {
  list-style: none;
  cursor: pointer;
  /* Flags are emoji ({$localeFlags[...]} in @layout.latte), not <img> — their rendered size is
     just this font-size. */
  font-size: 24px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  user-select: none;
}

.mu-lang-switch__dropdown>summary::-webkit-details-marker,
.mu-lang-switch__dropdown>summary::marker {
  display: none;
  content: '';
}

.mu-lang-switch__dropdown>summary:hover,
.mu-lang-switch__dropdown[open]>summary {
  background: #f4ede1;
}

.mu-lang-switch__menu {
  position: absolute;
  z-index: 50;
  top: 100%;
  right: 0;
  left: auto;
  margin: 6px 0 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(32, 20, 10, 0.14);
  min-width: 0;
  white-space: nowrap;
}

.mu-lang-switch__menu li {
  display: block;
  margin: 0 !important;
}

/* The current-locale <li> (see @layout.latte's comment above the $enabledLocales loop) is
   hidden here by default since desktop already shows the current locale via <summary>; the
   mobile breakpoint below re-enables it (using !important there, not extra specificity, since
   this element also needs to win against .mu-lang-switch__menu li{display:block} — same
   underlying fight as this rule itself needing 2 classes, not 1, to beat that same 1-class+tag
   rule regardless of source order). */
.mu-lang-switch__menu .mu-lang-switch__item--current {
  display: none;
}

.mu-lang-switch__menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 24px;
  line-height: 1;
  border-radius: 4px;
  text-decoration: none;
}

.mu-lang-switch__menu a:hover,
.mu-lang-switch__menu a:focus-visible {
  background: #f4ede1;
}

/* Active-filter row's category label ("Materiál:" etc.) — same red + underline treatment as
   .nav a.is-active above (already bold via <strong>, so font-weight isn't repeated here). */
.mu-filter-label {
  position: relative;
  padding-bottom: 3px;
  color: #c01b21;
}

.mu-filter-label::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #c01b21;
}

/* "Kurátorský výběr"/"Kolekce" headings — overrides base styles.css's margin-bottom:45px,
   which left a much bigger gap before the item grid than the rest of the page's spacing. */
.mu-collection__title {
  margin-bottom: 15px;
}

/* a.btn.mu-browse-all__link (2 classes + tag) so this reliably wins over the base
   styles.css .btn rule's display:inline-block regardless of stylesheet load order. Without
   the flex actually taking effect, the SVG's default inline vertical-align:baseline sits its
   bottom edge on the text baseline instead of centering on the text — svg display:block +
   flex-shrink:0 is a second, independent safety net for the same reason.
   margin overrides .btn's own unconditional margin:30px 0 (base styles.css) — that plus this
   wrapper's own margin was stacking into a much bigger gap than intended before the next
   heading's own margin-top:25px (.mu-collection__title). */
a.btn.mu-browse-all__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.mu-browse-all__link svg {
  display: block;
  flex-shrink: 0;
}

/* Filter labels (Instituce, Typ sbírky, ...) — overrides base styles.css's
   text-transform:uppercase, which forced ALL CAPS display regardless of the underlying text
   case. The labels themselves (getEnumFilterLabels(), @fakeSelectMulti.latte) already use
   proper sentence case ("Typ sbírky", not "Typ Sbírky"), so text-transform: none is enough —
   text-transform: capitalize would wrongly capitalize every word instead of just the first.
   .select2/.select2-dropdown are select2's own uppercase rules for the same filter widgets
   (closed label + open option list) — without these too, opening a dropdown would jarringly
   switch back to ALL CAPS. */
.mu-select-false__input,
.mu-select-over__input,
.select2,
.select2-dropdown {
  text-transform: none;
}

/* select2.css's own .select2-container--default .select2-selection--single
   .select2-selection__placeholder{color:#999} (3 classes, specificity 0,3,0) beat the earlier
   attempt at this (.mu-js-select-search .select2-selection__placeholder, only 2 classes) —
   that's why it never visibly changed. Matching the exact selector + !important this time so
   it's not still a specificity gamble. */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #000 !important;
}

/* Highlighted (hovered, or moved onto via arrow keys) option in ANY select2 dropdown in this
   template — base styles.css explicitly zeroes this out (".select2-container--default
   .select2-results__option--highlighted.select2-results__option--selectable,
   .select2-container--default .select2-results__option--selected{background-color:transparent;
   color:#000}"), so there was no visual feedback at all for which option the mouse/keyboard was
   actually over. Deliberately unscoped to a specific dropdown's id/class — every select2 widget
   here benefits the same way, both the plain filter dropdowns (@fakeSelectMulti.latte) and the
   sort/page-limit ones above. Matches the base rule's own selector + !important (same
   specificity, 3 classes) rather than relying on cards.css's later load order to win. */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #f0f0f0 !important;
}

/* Tabbing into a filter dropdown (spravceSbirky/typSbirky/material/..., @fakeSelectMulti.latte)
   showed no focus ring at all — NOT select2's own doing (its bundled default theme sets no
   outline on .select2-selection--single at all). The culprit is this project's own
   ".select2 *{outline:none!important}" further down in the SHARED portal/frontend/css/styles.css
   (loaded site-wide via <link> in <head>, not template-specific) — it blanket-strips outline
   from every descendant of every select2 widget, and being !important it beats any plain
   outline rule regardless of specificity or source order.
   select2.min.js toggles a "select2-container--focus" class on the outer .select2-container on
   real DOM focus/blur of the visible .select2-selection span (confirmed in the bundled JS) —
   hook the outline off that. Needs !important too (to win the specificity tie-break against the
   other !important rule) and lives here in the template-scoped cards.css rather than in the
   shared styles.css, so it doesn't affect select2 widgets in other templates. Same outline style
   as this file's other :focus-visible rules (mu-switch checkbox above); container--focus itself
   isn't scoped to real keyboard-only focus like :focus-visible is, but select2's focus/blur pair
   only fires from actual focus/blur events, not from a mouse click held down, so a
   mouse-triggered false positive isn't a real risk here. */
.select2-container--default.select2-container--focus .select2-selection--single {
  outline: 2px solid #000 !important;
  outline-offset: 2px;
}

/* Same problem as the select2 filters above, different cause: the shared styles.css base rule
   "input:focus,select:focus,textarea:focus{border-color:#283441;outline:0}" swaps the 1px
   border from #3c4d60 to #283441 on focus — two dark navy shades close enough to be practically
   indistinguishable, so the native sort ("mu-sort-select"/"mu-collist-raz") and items-per-page
   ("mu-page-limit-top/bottom"/"mu-collist-pl") <select> dropdowns read as having no focus
   indicator at all. Both classes are also reused by other selects in this template (Collection.
   list.latte's institution filter, "mu-js-form-select"'s home in @pageLimit.latte) — harmless to
   cover those too, same fix either way. No !important needed here (unlike the select2 fix
   above): the base rule isn't !important, and a class selector already outranks its bare
   "select:focus" on specificity. */
.mu-js-form-select:focus-visible,
.mu-js-submit-collist:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Sort dropdowns ("Řazení:", #mu-sort-select on Front.list.latte; #mu-collist-raz on
   Collection.list.latte) group their asc/desc options under <optgroup label="Název/Autor/…">.
   #mu-collist-ins (Collection.list.latte's "Filtrování:" institution filter), #mu-collist-pl
   and [id^="mu-page-limit-"] (both "Počet na stránce:", the latter used twice per page via
   @pageLimit.latte's idSuffix "top"/"bottom") have no groups — just flat option lists — but
   share the same select2 init pattern and closed-control look for visual consistency (see the
   {* *} comment above each one's own <select>).
   All of these wrap their <select> in select2 via their own dedicated init call (not the shared
   mu-js-select class — see @pagination.latte's {* *} comment for why), so they can be styled
   below independently of both the plain native <select> AND the big bold/uppercase look base
   styles.css's sitewide ".select2" rule gives the OTHER filter dropdowns
   (@fakeSelectMulti.latte).
   The rules right below this comment only style the plain, un-enhanced <select>/<optgroup>,
   kept as a no-JS fallback (select2 requires JS; without it a dark-mode-OS user gets the
   browser's native popup, which ignores CSS color-scheme for the popup panel itself on macOS
   Safari/Chrome — color-scheme:light is still worth setting for the browsers that do honor it,
   just not a full fix there on its own). */
#mu-sort-select,
#mu-collist-raz,
#mu-collist-ins,
#mu-collist-pl,
[id^="mu-page-limit-"] {
  color-scheme: light;
}

#mu-sort-select optgroup,
#mu-collist-raz optgroup {
  font-weight: 700;
  font-style: normal;
  color: #111;
}

#mu-sort-select option,
#mu-collist-raz option {
  font-weight: 400;
}

/* The select2-enhanced version's closed control (see comment above) — restyled to match this
   template's plain input/select look (white background, #3c4d60 border, mu-icon-select.svg
   chevron, same as every other native <select> here) instead of inheriting the oversized
   bold-uppercase ".select2" rule meant for @fakeSelectMulti.latte's filter dropdowns.
   Scoped via "#id + .select2-container" (select2 always inserts its rendered container as the
   immediate next sibling of the original, now-hidden <select>) rather than a select2
   containerCssClass option — this vendored build (js/libs/select2/select2.min.js,
   4.1.0-beta.1) doesn't implement containerCssClass at all (confirmed by grepping the minified
   source: dropdownCssClass and selectionCssClass are both there, containerCssClass isn't), so
   passing it was a silent no-op and every rule below never matched anything.
   !important throughout because base styles.css fights back twice on this exact element:
   ".select2{...width:100%!important}" (sitewide, so any width here needs !important too to
   win), and separately ".select2-container--default .select2-selection--single{border:none;
   border-bottom:1px solid #737373}" — written for #mu-header-search's own select2 but with no
   parent scoping, so it lands on every select2 widget on the page; even with the ID-anchored
   selector below reliably outranking it on specificity, !important is kept for consistency with
   this file's other select2-vs-base-styles.css fights above (the focus-outline overrides). */
#mu-sort-select+.select2-container,
#mu-collist-raz+.select2-container,
#mu-collist-ins+.select2-container,
#mu-collist-pl+.select2-container,
[id^="mu-page-limit-"]+.select2-container {
  vertical-align: middle;
  margin-left: 6px !important;
  width: auto !important;
}

#mu-sort-select+.select2-container .select2-selection--single,
#mu-collist-raz+.select2-container .select2-selection--single,
#mu-collist-ins+.select2-container .select2-selection--single,
#mu-collist-pl+.select2-container .select2-selection--single,
[id^="mu-page-limit-"]+.select2-container .select2-selection--single {
  background-color: #fff !important;
  border: 1px solid #3c4d60 !important;
  border-radius: 0 !important;
  height: auto !important;
}

#mu-sort-select+.select2-container .select2-selection__rendered,
#mu-collist-raz+.select2-container .select2-selection__rendered,
#mu-collist-ins+.select2-container .select2-selection__rendered,
#mu-collist-pl+.select2-container .select2-selection__rendered,
[id^="mu-page-limit-"]+.select2-container .select2-selection__rendered {
  color: #000 !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  line-height: 1.75rem !important;
  padding: 4px 25px 4px 7px !important;
}

/* .mu-sort-select-label/.mu-sort-select-direction — the <span>/<svg> built by both selects'
   templateSelection callbacks, showing "Autor ↑" (group name + direction arrow) instead of the
   raw option text ("Vzestupně"), which on its own doesn't say what field it's sorted BY once
   the dropdown is closed. is-desc just reuses the one up-arrow SVG rotated 180°, rather than
   drawing a second icon for "down". */
#mu-sort-select+.select2-container .mu-sort-select-label,
#mu-collist-raz+.select2-container .mu-sort-select-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#mu-sort-select+.select2-container .mu-sort-select-direction,
#mu-collist-raz+.select2-container .mu-sort-select-direction {
  flex-shrink: 0;
}

#mu-sort-select+.select2-container .mu-sort-select-direction.is-desc,
#mu-collist-raz+.select2-container .mu-sort-select-direction.is-desc {
  transform: rotate(180deg);
}

#mu-sort-select+.select2-container .select2-selection__arrow,
#mu-collist-raz+.select2-container .select2-selection__arrow,
#mu-collist-ins+.select2-container .select2-selection__arrow,
#mu-collist-pl+.select2-container .select2-selection__arrow,
[id^="mu-page-limit-"]+.select2-container .select2-selection__arrow {
  top: 0;
  right: 0;
  width: 25px;
  height: 100%;
  background: url(../img/mu-icon-select.svg) center right 5px no-repeat !important;
}

#mu-sort-select+.select2-container .select2-selection__arrow b,
#mu-collist-raz+.select2-container .select2-selection__arrow b,
#mu-collist-ins+.select2-container .select2-selection__arrow b,
#mu-collist-pl+.select2-container .select2-selection__arrow b,
[id^="mu-page-limit-"]+.select2-container .select2-selection__arrow b {
  display: none;
}

/* select2's own base theme sets .select2-dropdown{z-index:1051} — while scrolled with the
   sticky header active (.header.mu-sticky-header--fixed{z-index:100}, see near the top of this
   file), 1051 let the (now taller, since max-height:none above) open dropdown render on TOP of
   the header instead of sliding behind it. 90 keeps it comfortably under the header's 100 but
   still above ordinary in-page content (item grid/cards top out around 30-50 elsewhere here). */
.mu-sort-select-dropdown {
  border: 1px solid #3c4d60;
  border-radius: 0;
  font-size: 0.875rem;
  min-width: 220px;
  z-index: 90;
}

/* Base styles.css caps every select2 results list at max-height:200px (its own vendored
   default theme) or 500px (this project's own override, meant for #mu-header-search's longer
   suggestion list) with overflow-y:auto — both are too short for this dropdown's 5 groups
   (11 rows total), forcing an internal scrollbar even though the list easily fits a normal
   viewport on its own. Scoped to just this dropdown so #mu-header-search keeps its own cap.
   !important because ".select2-container--default .select2-results>.select2-results__options"
   is 3 classes (0,3,0) — higher specificity than this rule's 2 classes (0,2,0), so without it
   the base rule wins regardless of cards.css loading after it (same recurring fight as this
   file's other select2-vs-base-styles.css overrides above). */
.mu-sort-select-dropdown .select2-results__options {
  max-height: none !important;
}

.mu-sort-select-dropdown .select2-results__option {
  padding: 6px 10px;
  white-space: nowrap;
}

.mu-sort-select-dropdown .select2-results__group {
  font-weight: 700;
  color: #111;
  padding: 6px 10px;
}

/* "Počet na stránce:" (#mu-collist-pl / [id^=mu-page-limit-]) — its own dropdownCssClass rather
   than reusing .mu-sort-select-dropdown above: that one's min-width:220px (sized for "Autor"/
   "Inventární číslo" text) left a mostly-empty box around this list's 3 short options
   ("12"/"24"/"36"), with the digits looking lost inside all that spare width.
   No min-width here at all — select2's width:'resolve' (see the init calls in @pageLimit.latte/
   Collection.list.latte) already sizes the dropdown to the closed control's own (already
   content-sized) width, so the panel naturally stays exactly as narrow as the numbers need.
   Font-size deliberately left unset (inherits the page's normal size, same as everywhere else)
   — an earlier version bumped it to 1.125rem, which read as oversized rather than helpful. */
.mu-page-limit-select-dropdown {
  border: 1px solid #3c4d60;
  border-radius: 0;
  z-index: 90;
}

.mu-page-limit-select-dropdown .select2-results__option {
  padding: 8px 16px;
  white-space: nowrap;
}

.mu-demo-card-link,
.mu-demo-collection-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.mu-demo-card,
.mu-demo-collection-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 26px rgba(32, 20, 10, 0.10);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.mu-demo-card-link:hover .mu-demo-card,
.mu-demo-card-link:focus .mu-demo-card,
.mu-demo-card-link:focus-visible .mu-demo-card,
.mu-demo-collection-card-link:hover .mu-demo-collection-card,
.mu-demo-collection-card-link:focus .mu-demo-collection-card,
.mu-demo-collection-card-link:focus-visible .mu-demo-collection-card {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(32, 20, 10, 0.16);
}

.mu-demo-card-image,
.mu-demo-collection-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: -12px -12px 14px -12px;
}

.mu-demo-card-image {
  height: 320px;
}

.mu-demo-collection-card-image {
  height: 380px;
}

/* The "no photo" fallback (portal logo, @listItem.latte) only — real item photos keep filling
   the card edge-to-edge via the plain rule below. Specificity (0,2,1) so it reliably wins over
   that rule's width/max-width/max-height regardless of source order. */
.mu-demo-card-image img.mu-demo-card-image__placeholder {
  width: calc(100% - 10px);
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
}

.mu-demo-card-image img,
.mu-demo-collection-card-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.mu-demo-card-body,
.mu-demo-collection-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mu-demo-card-body {
  justify-content: flex-start;
}

/* Long titles (including a single very long unspaced "word", which -webkit-line-clamp alone
   won't wrap on its own) truncate to an ellipsis after 2 lines instead of overflowing past the
   card's edge into whatever sits next to it. word-break lets a too-long word itself break
   rather than forcing the line wider than the card. */
.mu-demo-card-title,
.mu-demo-collection-card-title {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.mu-demo-card-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.9em;
}

.mu-demo-collection-card-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  min-height: 3.2em;
}

.mu-demo-card-meta {
  margin: 0;
  color: #6f655c;
  line-height: 1.45;
  min-height: 2.1em;
}

.mu-demo-collection-card-meta {
  margin: 0;
  color: #6f655c;
  line-height: 1.45;
  min-height: 2.2em;
}

.mu-demo-card-action,
.mu-demo-collection-card-action {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.mu-demo-card-link:hover .mu-demo-card-action,
.mu-demo-card-link:focus .mu-demo-card-action,
.mu-demo-card-link:focus-visible .mu-demo-card-action,
.mu-demo-collection-card-link:hover .mu-demo-collection-card-action,
.mu-demo-collection-card-link:focus .mu-demo-collection-card-action,
.mu-demo-collection-card-link:focus-visible .mu-demo-collection-card-action {
  opacity: 1;
  transform: translateY(0);
}

.mu-demo-card-action-label,
.mu-demo-collection-card-action-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 10px 16px;
  border: 0;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mu-demo-card-column,
.mu-demo-collection-card-column {
  display: flex;
  margin-bottom: 12px;
}

.mu-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 14px 30px rgba(32, 20, 10, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.mu-back-to-top--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.94);
}

.mu-back-to-top:hover,
.mu-back-to-top:focus,
.mu-back-to-top:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(32, 20, 10, 0.28);
  background: #000;
  color: #fff;
}

.mu-back-to-top svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .mu-back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .mu-back-to-top svg {
    width: 24px;
    height: 24px;
  }
}

.mu-sticky-search-spacer {
  height: 0;
}

.mu-sticky-search {
  position: relative;
  z-index: 30;
  background: #fff;
  padding-top: 6px;
  padding-bottom: 6px;
  transition: top 180ms ease, left 180ms ease, width 180ms ease, padding-top 180ms ease, padding-bottom 180ms ease;
  will-change: top, left, width, padding-top, padding-bottom;
}

.mu-sticky-search--fixed {
  position: fixed;
  top: 0;
  z-index: 25;
  box-sizing: border-box;
  padding-top: 2px;
  padding-bottom: 2px;
  background: #fff;
}

.mu-sticky-search--fixed .mu-search {
  margin-top: 0;
  margin-bottom: 0;
}

.mu-sticky-search--fixed .mu-filter {
  margin-top: 0;
  margin-bottom: 0;
}

.mu-sticky-search--fixed .mu-filter p {
  margin-top: 0;
  margin-bottom: 2px;
  line-height: 1.2;
}

/* "Zrušit filtr" (X) icon — was a plain background-image (base styles.css), which only lets
   hover affect the WHOLE link (its old a:hover{opacity:.7} faded the label text too). Using
   the SVG as a mask instead of a background-image lets its color be set (and changed on
   hover) via background-color, entirely independent of the label text's own color. */
.mu-filter a {
  background: none;
  position: relative;
}

.mu-filter a::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 0;
  width: 20px;
  height: 20px;
  background-color: #000;
  -webkit-mask-image: url(../img/mu-filter-off.svg);
  mask-image: url(../img/mu-filter-off.svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.mu-filter a:hover,
.mu-filter a:focus {
  opacity: 1;
}

.mu-filter a:hover::after,
.mu-filter a:focus::after {
  background-color: #c01b21;
}

/* "vymazat vše" is a plain text link, not a filter-removal chip — base styles.css already
   excludes it from the old background-image icon (.mu-filter__reset a{background:none}); this
   is the same exclusion for the ::after replacement above. */
.mu-filter__reset a::after {
  content: none;
}

.mu-search-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  /* No backdrop-filter here on purpose: blurring a backdrop behind a looping CSS animation
     is a known trigger for compositor ghosting/double-rendering glitches in some browsers —
     a plain higher-opacity tint gives a similar "dimmed" look without that risk. */
  background: rgba(250, 248, 244, 0.88);
}

.mu-search-loading[hidden] {
  display: none;
}

.mu-search-loading__spinner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 6px solid rgba(17, 17, 17, 0.14);
  border-top-color: #111;
  animation: mu-search-loading-spin 0.9s linear infinite;
}

.mu-search-loading__text {
  margin: 0;
  color: #111;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@keyframes mu-search-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .mu-meta .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .mu-meta .row>.col {
    flex: 1 1 280px;
    min-width: 0;
  }

  .mu-meta .mu-meta__last {
    align-items: flex-start;
  }

  .mu-meta .mu-meta__number,
  .mu-meta .mu-meta__checkbox,
  .mu-meta .mu-meta__page,
  .mu-meta .mu-meta__paging {
    margin-top: 0;
    margin-bottom: 6px;
  }

  .mu-meta .mu-meta__page,
  .mu-meta .mu-meta__paging {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (max-width: 860px) {
  .mu-meta .row>.col {
    flex-basis: 100%;
  }

  .mu-meta .mu-meta__last {
    margin-top: 2px;
  }
}

/* "Nalezeno předmětů", the "Pouze s obrázkem" switch and "Řazení: ..." are three separate <p>
   siblings inside one flex row (base styles.css .col{display:flex;align-items:center}) — that
   only centers each <p>'s own box on the row's cross-axis, and each box's height differs
   (plain text line-height vs. the switch's 22px track vs. the <select>'s native rendered
   height), so their TEXT ended up sitting at different vertical offsets despite the boxes
   themselves being centered. Forcing all three to the same flex/min-height/margin recipe makes
   their text/controls land on the same line — desktop only (min-width mirrors the 1200px
   collapse breakpoint used elsewhere in this file), so it doesn't fight the existing mobile
   margin-bottom:6px stacking rule further down for the same three selectors. */
@media (min-width: 1201px) {

  /* Base .mu-meta__number{padding-right:40px} used to be the only thing separating these three
     items — fine between item 1 and 2, but nothing at all separated item 2 (checkbox) from
     item 3 (sort), so once their own margin:0 above stopped providing incidental horizontal
     space, "Pouze s obrázkem" ran straight into "Řazení:". gap on the shared flex row (.col)
     covers all three consistently instead of patching each one individually. */
  .mu-meta .row>.col {
    gap: 32px;
  }

  .mu-meta__number,
  .mu-meta__checkbox,
  .mu-meta__sort {
    display: flex !important;
    align-items: center !important;
    min-height: 28px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
  }

  .mu-meta__sort select {
    vertical-align: middle;
    margin-left: 6px;
  }
}

/* "Nalezeno předmětů:" — the label is now its own <label class="mu-meta__label"> (see
   @pagination.latte) instead of being plain inline text directly followed by {$itemsCount}, so
   there's no longer a whitespace text node between them for the browser to collapse into a gap;
   margin-right recreates that gap explicitly. */
.mu-meta__label {
  margin-right: 6px;
}

.mu-meta__checkbox .mu-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.mu-meta__checkbox .mu-switch input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.mu-meta__checkbox .mu-switch__track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #c9c4bd;
  transition: background-color 140ms ease;
  flex: 0 0 38px;
}

.mu-meta__checkbox .mu-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 140ms ease;
}

.mu-meta__checkbox .mu-switch input[type='checkbox']:checked+.mu-switch__track {
  background: #111;
}

.mu-meta__checkbox .mu-switch input[type='checkbox']:checked+.mu-switch__track::after {
  transform: translateX(16px);
}

.mu-meta__checkbox .mu-switch input[type='checkbox']:focus-visible+.mu-switch__track {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.mu-meta__checkbox .mu-switch__text {
  line-height: 1.2;
}

.mu-search {
  position: relative;
}

/* Anchor for the viewport-centered search below — .header spans the full viewport width
   (unlike its child .header .container, which is max-width'd and centered), so an absolutely
   positioned child of it centers on the SCREEN. The sticky variant
   (.header.mu-sticky-header--fixed, position:fixed) is already a containing block on its own,
   this covers the normal in-flow state. */
.header {
  position: relative;
}

/* Centered on the viewport, not in the leftover flex gap between logo and nav — as a flex
   item of .header .container (justify-content:space-between), "margin: 0 auto" could only
   ever center it between its siblings, so it sat off-center whenever the logo and nav had
   different widths. Taken out of flow instead and pinned to the middle of .header (full
   viewport width, see above); logo and nav then split the row's far left/right between
   themselves via the container's own space-between. Overrides the base .mu-search rule's
   margin:25px auto (would shift the absolute box 25px down) and its flex sizing (moot out
   of flow — width has to be explicit now). Can overlap the logo/nav on viewports just above
   the 1200px breakpoint if those grow unusually wide; below it the search returns to normal
   flow on its own full row (see the media block further down). */
.mu-header-search {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  margin: 0;
}

/* The base .mu-search input rule has no explicit width, only max-width:100% — fine when the
   input is the sole content of a .col wrapper sized by the grid, but here it left the input
   at its intrinsic (~10 char) width while .mu-header-search itself grew, stranding the
   absolutely-positioned button (anchored to .mu-header-search's own right edge) far past the
   input's actual right edge. width:100% ties them back together. Height/padding shrunk to fit
   the header's shorter row instead of the original 68px designed for the tall in-page bar. */
/* box-sizing:border-box explicitly, not inherited — base styles.css's own reset pattern is
   "html{box-sizing:border-box} *,:after,:before{box-sizing:inherit}", but this input still
   computed content-box (confirmed via getComputedStyle during a live viewport-overflow
   investigation), meaning something breaks that inherit chain before it reaches here. Without
   this, width:100% resolves to the CONTENT width, and padding-right:88px + padding-left:2px +
   the 2px border each side (4px) all add ON TOP of that — 92px more than the parent
   (.mu-header-search) actually has, which is exactly what was pushing the input (and the whole
   header row on narrow/stacked viewports where .mu-header-search takes the full row) past the
   container's right edge. */
.mu-header-search input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  font-size: 1rem;
  padding-right: 88px;
}

.mu-header-search button {
  height: 46px;
  width: 46px;
  right: 0;
}

/* The clear (X) button sits between the input's text and the "Vyhledat" button — its own
   width isn't part of the .mu-search-suggest/.mu-header-search button rules above, so it's
   positioned independently: vertically centered, just left of the submit button's 46px.
   Scoped as ".mu-header-search .mu-search-clear" (0,2,0), not bare ".mu-search-clear" (0,1,0)
   — this button is itself a <button> inside .mu-search/.mu-header-search, so the base
   ".mu-search button"/".mu-header-search button" rules above (0,1,1 each) would otherwise win
   and silently reskin it as a second, stacked copy of the submit button (same 46x46, right:0,
   magnifying-glass background) hidden right underneath the real one. */
.mu-header-search .mu-search-clear {
  position: absolute;
  top: 50%;
  right: 52px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mu-header-search .mu-search-clear:hover {
  color: #b91c1c;
}

.mu-header-search .mu-search-clear[hidden] {
  display: none;
}

/* Shared styles.css has ".mu-search button:focus{outline:none}" — strips focus from every
   button in the search form (submit "Vyhledat" and the clear/X button above), same underlying
   problem as the sort/per-page selects fixed above, different rule. #mu-header-search's ID
   selector (1,1,1) beats ".mu-search button:focus" (0,2,1) outright, no !important needed. */
#mu-header-search button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* 860px was too narrow a cutoff — logo + search + all 4 nav links (which have their own
   wrapping <ul> with no line-wrap guard of their own) were already overlapping/breaking well
   before that, e.g. around ~1000px viewport width. 1200px gives the row enough room to
   comfortably fit on one line above this breakpoint. */
@media (max-width: 1200px) {
  .header .container {
    flex-wrap: wrap;
    /* Below this breakpoint nav collapses away (hamburger is position:fixed, out of flow —
       see further down) and search drops to its own line (below), leaving just the logo as
       the only real flex item left in this row — center it instead of it sitting at the
       far left from the base stylesheet's justify-content:space-between. */
    justify-content: center;
  }

  .mu-header-search {
    /* Back into normal flow — the desktop rule above pins it to the viewport center, which
       makes no sense once it has its own full-width row down here.
       position:relative, NOT static — .mu-header-search .mu-search-clear (the "X" button) and
       the submit button are both position:absolute, anchored to whichever ancestor is the
       nearest *positioned* one. static would drop that role to .header{position:relative}
       instead (the next one up), so the clear button ended up pinned near the top of the whole
       header — nowhere near the input, which by this point has dropped to its own row below.
       left/top MUST also be reset here, not just transform — the desktop rule above sets
       left:50%;top:50% unconditionally (not inside its own media query), and those keep
       applying under position:relative same as under position:absolute (only position:static
       ignores them). Missing this the first time round left them active, shifting the relatively
       positioned box ~50% of the container's width to the right of its normal-flow position —
       exactly enough to push it (and the whole row) past the container's right edge. */
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: auto;
    order: 1;
    flex-basis: 100%;
    max-width: none;
    margin: 10px 0;
  }
}

/* .mu-header-search's fixed 560px width (see the rule above the 1200px breakpoint block) is
   viewport-centered but doesn't participate in .header .container's flex layout at all
   (position:absolute) — logo and nav still need to fit in whatever's left on either side of
   that centered 560px box. Comfortable from ~1450px up; measured (via headless screenshots at
   1210/1280/1350/1400/1420/1450px) that the search box's left/right edges actually start
   touching/overlapping "Kolekce"/"Nápověda" text anywhere in the ~1201-1400px range, e.g. still
   touching at 1400px, clear again by 1420px — this narrower width closes that whole gap. */
@media (min-width: 1201px) and (max-width: 1450px) {
  .mu-header-search {
    width: 300px;
  }

  /* positionSuggestBox() in @layout.latte sets #mu-search-suggest's left/width inline to
     exactly match the input's own getBoundingClientRect() — with the 300px-narrowed input
     above, that shrank the suggestion panel to match, cramming its thumbnail+text result rows
     and "Zúžit podle" facet list into a much tighter box than at any other viewport width.
     !important is required here (not just higher specificity) because these are plain inline
     styles set via element.style.*, which normally beat any stylesheet rule regardless of
     selector specificity — only !important can still override an inline style. Recentering via
     left:50%+transform (rather than reusing the JS's own rect.left) keeps it visually matching
     the same centered position it has outside this breakpoint range. */
  .mu-search-suggest {
    left: 50% !important;
    width: 560px !important;
    transform: translateX(-50%);
  }
}

/* Hamburger toggle — hidden on desktop (this rule), shown only below the header's own 1200px
   wrap breakpoint (next rule), where "Kolekce / Instituce / O portálu / Nápověda" no longer
   comfortably fits as a plain inline list next to the logo. No border/background (plain icon
   button) — and, below the breakpoint, position:fixed at a set viewport corner rather than a
   flex item's natural position: the header's own children (logo/search/nav) can still wrap
   onto multiple lines at very narrow widths, which was carrying the toggle along with them
   (winding up centered above the logo instead of pinned to a corner). .mu-nav-close (the X,
   shown instead of this while the overlay is open — see JS) uses the exact same fixed
   coordinates so the icon appears to just swap in place, not jump elsewhere. */
.mu-nav-toggle,
.mu-nav-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: #000;
  cursor: pointer;
}

@media (max-width: 1200px) {

  .mu-nav-toggle,
  .mu-nav-menu.is-open .mu-nav-close {
    display: inline-flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 210;
  }

  /* On desktop .mu-nav-menu is just a plain wrapper around .nav's <ul> (no visual styling of
     its own) — below the breakpoint it becomes the hidden-until-opened full-screen overlay. */
  .mu-nav-menu {
    display: none;
  }

  .mu-nav-menu.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #fff;
    overflow-y: auto;
    padding: 16px;
  }

  .mu-nav-menu ul {
    display: flex;
    flex-direction: column;
    margin: 56px 0 0;
    padding: 0;
  }

  .mu-nav-menu li {
    display: block;
  }

  .mu-nav-menu li+li {
    margin-left: 0;
  }

  .mu-nav-menu a {
    display: block;
    padding: 16px 8px;
    font-size: 1.25rem;
    border-bottom: 1px solid #eee3d4;
  }

  /* Language switcher: flags side by side instead of a dropdown. Desktop's
     .mu-lang-switch__menu (position:absolute;top:100%;right:0) is anchored to
     .mu-lang-switch{position:relative} — fine in the normal nav bar, but inside the mobile
     full-screen overlay (.mu-nav-menu.is-open, position:fixed;inset:0) the other-locale flags
     ended up rendered far from the current one instead of right next to it.
     Tried forcing <summary> to join the <ul> in one flex row first (hiding neither, just
     restyling both) — abandoned after getComputedStyle kept showing <summary>'s display as
     "list-item" no matter what display value was set on it, even as a flex item of a flex
     parent: browsers keep that as a special case tied to the disclosure-widget's own internal
     rendering, not something author CSS can reliably override. Hiding <summary> outright and
     duplicating the current locale's flag as a plain <li> inside .mu-lang-switch__menu (see
     @layout.latte) sidesteps that entirely — everything visible here is now a normal <li> in a
     flex row, no <summary> quirks left to fight. */
  .mu-lang-switch {
    margin-left: 0 !important;
  }

  .mu-lang-switch__dropdown>summary {
    display: none;
  }

  /* .mu-lang-switch .mu-lang-switch__menu (2 classes), not bare .mu-lang-switch__menu (1 class)
     — .mu-nav-menu ul{display:flex;flex-direction:column} (1 class + tag = higher specificity
     than a single class) was winning the flex-direction fight despite loading later, keeping
     this <ul> a column and stacking the flags vertically instead of side by side. */
  .mu-lang-switch .mu-lang-switch__menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 8px;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
  }

  /* The current-locale <li> (hidden by default, see the unconditional rule above) is shown
     again here — !important since it's the same .mu-lang-switch__menu li{display:block}
     specificity fight as everywhere else in this block, and simplest to just match the
     established pattern rather than chase a selector precise enough to out-specificity it. */
  .mu-lang-switch__item--current {
    display: block !important;
  }

  /* .mu-lang-switch__flag-box is the single shared class on BOTH the current locale's <span>
     and every other locale's <a> (see @layout.latte) — one rule covers sizing/position for
     both instead of needing near-duplicate rules per element type. border included here (not
     just on the "active" rule below) so every box is the same overall dimensions whether or
     not its border is actually visible — otherwise the active one would be 2x4px bigger and
     shift its neighbours. .mu-lang-switch prefix (not bare .mu-lang-switch__flag-box) for the
     same specificity-safety reason as the flex-direction fix above — .mu-lang-switch__menu
     li{display:block} and the unconditional .mu-lang-switch__menu a rule are both 1 class + 1
     tag; matching that with 2 classes here avoids another silent loss. */
  .mu-lang-switch .mu-lang-switch__flag-box {
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 32px;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: 4px;
  }

  /* Current locale gets the accent-red border + a background (same #f4ede1 as the other
     locales' own :hover/:focus-visible below, so it reads as "this one is the active choice"
     rather than a mismatched one-off color) — the other flags stay plain/transparent by
     default, only picking up that same background on hover/focus. */
  .mu-lang-switch__item--current .mu-lang-switch__flag-box {
    background: #f4ede1;
    border-color: #c01b21;
  }
}

.mu-search-suggest {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #d7cdc1;
  box-shadow: 0 14px 30px rgba(32, 20, 10, 0.14);
  max-height: min(78vh, 720px);
  overflow-y: auto;
}

.mu-search-suggest__panel {
  display: flex;
  flex-direction: column;
}

.mu-search-suggest__section {
  padding: 10px 0;
}

.mu-search-suggest__section+.mu-search-suggest__section {
  border-top: 1px solid #eee3d4;
}

.mu-search-suggest__heading {
  padding: 0 16px 8px;
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8b7763;
  font-weight: 700;
}

.mu-search-suggest__loading {
  padding: 10px 12px;
  font-size: 13px;
  color: #7a6a5a;
}

.mu-search-suggest__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mu-search-suggest__item,
.mu-search-suggest__result,
.mu-search-suggest__filter,
.mu-search-suggest__cta {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0;
  outline: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
  text-align: left;
  text-indent: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: normal !important;
  cursor: pointer;
  box-sizing: border-box;
  overflow: visible;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
  transform: none !important;
  font-family: inherit !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  border-radius: 0 !important;
}

.mu-search-suggest__item {
  border: 0 !important;
  background: transparent !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
  color: #1e1813 !important;
  padding: 7px 16px !important;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mu-search-suggest__item *,
.mu-search-suggest__result *,
.mu-search-suggest__filter *,
.mu-search-suggest__cta * {
  text-indent: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: inherit;
  position: static !important;
  float: none !important;
  transform: none !important;
}

.mu-search-suggest__item:hover,
.mu-search-suggest__item:focus,
.mu-search-suggest__item:focus-visible,
.mu-search-suggest__result:hover,
.mu-search-suggest__result:focus,
.mu-search-suggest__result:focus-visible,
.mu-search-suggest__filter:hover,
.mu-search-suggest__filter:focus,
.mu-search-suggest__filter:focus-visible,
.mu-search-suggest__cta:hover,
.mu-search-suggest__cta:focus,
.mu-search-suggest__cta:focus-visible {
  background: #e9e9e9 !important;
}

.mu-search-suggest__category {
  flex: 0 0 108px;
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a6a5a;
}

/* Same 2-line ellipsis truncation as .mu-search-suggest__result-title above — min-width:0
   overrides the flex item's default min-width:auto, which would otherwise let a long unbroken
   value push the row wider instead of wrapping/clamping. */
.mu-search-suggest__value {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.15;
  color: #1e1813;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.mu-search-suggest__value mark {
  background: #ffe59b;
  padding: 0 1px;
}

.mu-search-suggest__results {
  display: grid;
  gap: 2px;
  padding: 0 10px;
}

.mu-search-suggest__result {
  border: none !important;
  background: transparent !important;
  padding: 6px 4px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  text-align: left;
  align-items: start;
}

.mu-search-suggest__thumb {
  width: 56px;
  height: 56px;
  border: 1px solid #e1d4c3;
  background: #f0e8dc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #8d7965;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mu-search-suggest__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mu-search-suggest__result-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Same 2-line ellipsis truncation as .mu-demo-card-title on the item cards — long titles
   (including a single very long unspaced "word") would otherwise overflow past the suggestion
   row's edge instead of stopping at it. */
.mu-search-suggest__result-title {
  font-size: 14px;
  line-height: 1.25;
  color: #1e1813;
  font-weight: 700;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.mu-search-suggest__result-title mark,
.mu-search-suggest__filter-value mark {
  background: #ffe59b;
  padding: 0 1px;
}

.mu-search-suggest__result-meta,
.mu-search-suggest__result-note {
  font-size: 12px;
  line-height: 1.25;
  color: #6b5d50;
}

.mu-search-suggest__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 10px;
}

.mu-search-suggest__filter {
  border: none !important;
  background: transparent !important;
  padding: 6px 4px !important;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 160px;
  max-width: calc(50% - 4px);
  width: calc(50% - 4px) !important;
}

.mu-search-suggest__filter-label {
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b7763;
}

.mu-search-suggest__filter-value {
  font-size: 13px;
  line-height: 1.2;
  color: #1e1813;
}

.mu-search-suggest__section--cta {
  padding: 10px;
}

/* Bez ".mu-search .mu-search-suggest" prefixu (dřív vyžadoval, aby #mu-search-suggest byl
   doslovný potomek .mu-search — po přesunu boxu mimo transformované .mu-header-search (viz
   @layout.latte, oprava position:fixed containing blocku) už neplatí a pravidlo by tiše
   přestalo sedět; !important výše i tady stejně zaručuje dost specificity bez něj). */
.mu-search-suggest__cta {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #111 !important;
  background: #fff !important;
  color: #1e1813 !important;
  box-shadow: none !important;
  padding: 14px 18px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.mu-search-suggest__cta::before {
  content: '';
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}

.mu-search-suggest__cta:hover,
.mu-search-suggest__cta:focus,
.mu-search-suggest__cta:focus-visible {
  background: #faf7f3 !important;
  border-color: #111 !important;
  box-shadow: none !important;
  color: #1e1813 !important;
}

@media (max-width: 680px) {
  .mu-search-suggest__result {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .mu-search-suggest__thumb {
    width: 44px;
    height: 44px;
  }

  .mu-search-suggest__filter {
    min-width: 0;
    max-width: 100%;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .mu-search-suggest__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .mu-search-suggest__category {
    flex-basis: auto;
  }
}

.mu-collection__list p {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0;
}

/* ============================================================================
   Detail předmětu (demo-test2) — dvousloupcové rozložení: galerie vlevo,
   informační panel vpravo (bílá karta, stejný vizuální jazyk jako mu-demo-card:
   bez border-radius, měkký teplý stín, béžové akcenty). Vše scopováno pod
   .mu-detail*, aby to neovlivnilo ostatní stránky šablony.
   ========================================================================== */

.mu-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: start;
  margin-top: 8px;
}

.mu-detail-gallery__main {
  position: relative;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(32, 20, 10, 0.10);
}

.mu-detail-gallery__main a {
  display: block;
}

/* Bottom row of the main photo box: photo prev/next arrows dead-center, CC license badge on
   the right. 3-column grid (equal 1fr flanks) rather than flex+margin:auto so the arrows stay
   on the TRUE center of the box no matter how wide the license badge is (or that the left
   column is empty). The arrows used to float over the photo's left/right edges (absolute,
   vertically centered) — moved down here per request so they sit under the image on the same
   line as the license. */
.mu-detail-gallery__footer {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.mu-detail-gallery__footer-arrows {
  grid-column: 2;
  display: flex;
  gap: 12px;
}

/* Photo prev/next — cycle through the item's photos inside the main preview (JS swaps the
   image/link/license, see the inline script below the gallery markup); distinct from
   .mu-detail-nav, which navigates between whole ITEMS, not photos within one item. */
.mu-detail-gallery__arrow {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(32, 20, 10, 0.18);
  transition: background-color 140ms ease, color 140ms ease;
}

.mu-detail-gallery__arrow:hover,
.mu-detail-gallery__arrow:focus-visible {
  background: #000;
  color: #fff;
}

/* Na prvním fotu se schovává levá šipka, na posledním pravá (bez wrap-aroundu).
   visibility (ne display:none), aby zbývající šipka nepoposkočila do středu — při
   opakovaném klikání tak tlačítko zůstává pod kurzorem. */
.mu-detail-gallery__arrow--hidden {
  visibility: hidden;
}

.mu-detail-gallery__main img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  margin: 0 auto;
}

/* Without this, the box shrinks down to barely more than the logo's own height (~100px),
   looking like a squashed sliver next to the much taller info panel — a generous min-height
   with the logo centered inside gives it a normal photo-sized presence instead. */
.mu-detail-gallery__main--placeholder {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.mu-detail-gallery__license {
  grid-column: 3;
  text-align: right;
}

/* .mu-detail-gallery__main img above targets ANY <img> inside the main photo container,
   including this CC badge (a sibling nested in .mu-detail-gallery__license) — that stretched
   the ~88x31 badge to width:100%, blowing it up huge/blocky. More specific selector to win
   back a normal, small badge size, same as the ones next to attachments. */
.mu-detail-gallery__main .mu-detail-gallery__license img {
  width: auto;
  height: auto;
  max-width: 88px;
  max-height: none;
  display: inline-block;
}

/* "Obrázek v originální velikosti" (admin > Nastavení portálu > Obecné, imageOriginalSizeEnabled):
   místo roztažení na šířku boxu se hlavní foto ukáže ve své skutečné velikosti (width: auto).
   Obrázek i footer (šipky + licence) tečou normálně od shora, takže licence sedí hned pod
   obrázkem — box ho těsně obepne, žádná mezera mezi obrázkem a licencí. min-height drží
   minimální velikost boxu jen u opravdu malých fotek (přebytek se pak objeví až dole pod
   licencí, ne nad ní). Vodorovné vycentrování obstará zděděné margin: 0 auto z pravidla výš;
   max-width a zděděný max-height: 72vh / object-fit: contain brání přetečení u velkých fotek. */
.mu-detail-gallery__main--original-size {
  min-height: 320px;
}

.mu-detail-gallery__main--original-size img {
  width: auto;
  max-width: 100%;
}

/* Single scrollable row instead of a wrapping grid — with a lot of extra images this keeps
   the strip a fixed height instead of growing the page taller and taller; horizontal scroll
   (mouse wheel/trackpad/touch drag) takes over once thumbnails no longer fit. */
.mu-detail-gallery__thumbs {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #d8c9b3 transparent;
  /* "Chytnout a táhnout" myší na desktopu — mobil scrolluje nativním touch gestem beze
     změny, drag handling (mousedown/mousemove) je jen ve Front.detail.latte skriptu. */
  cursor: grab;
}

/* Nastaveno JS (mousedown/mouseup) po dobu tažení — grabbing kurzor, vypnutý scroll-snap
   (jinak by "trhal" ručně nastavovaný scrollLeft ke snap bodům při každém mousemove) a
   žádný výběr textu/obrázků při rychlém tažení přes miniatury. */
.mu-detail-gallery__thumbs.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.mu-detail-gallery__thumbs::-webkit-scrollbar {
  height: 6px;
}

.mu-detail-gallery__thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.mu-detail-gallery__thumbs::-webkit-scrollbar-thumb {
  background: #d8c9b3;
}

.mu-detail-gallery__thumb {
  display: block;
  flex: 0 0 115px;
  aspect-ratio: 1 / 1;
  background: #fff;
  padding: 6px;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(32, 20, 10, 0.10);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  scroll-snap-align: start;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}

.mu-detail-gallery__thumb:hover,
.mu-detail-gallery__thumb:focus-visible {
  box-shadow: 0 8px 18px rgba(32, 20, 10, 0.16);
}

.mu-detail-gallery__thumb--active {
  border-color: #000;
}

.mu-detail-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Sticky, aby při dlouhé galerii vlevo zůstaly informace na očích; top počítá
   s výškou připnuté hlavičky (sticky header ~90px + rezerva). */
.mu-detail-panel {
  background: #fff;
  padding: 24px 26px;
  box-shadow: 0 10px 26px rgba(32, 20, 10, 0.10);
  position: sticky;
  top: 110px;
}

/* Titulek + sdílet/kopírovat na jednom řádku, tlačítka úplně vpravo — align-items:
   flex-start místo center, protože dlouhý víceřádkový titulek by jinak tlačítka
   vertikálně "utopil" doprostřed celého bloku místo k jeho první řádce. */
.mu-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
}

.mu-detail-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.mu-detail-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  /* Zarovnat vizuální střed ikon s první řádkou titulku (1.5rem * 1.25 line-height). */
  margin-top: 2px;
}

/* Bublina "Zkopírováno" nad tlačítkem kopírovat (@shareActions.latte) — position:relative
   na .mu-detail-actions výše je pro ni containing block, right:0 ji drží nad copy
   tlačítkem (poslední v řadě) bez ohledu na to, jestli je share tlačítko zrovna vidět. */
.mu-detail-copy-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  padding: 5px 10px;
  background: #1e1813;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 5px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.mu-detail-copy-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 10px;
  border: 5px solid transparent;
  border-top-color: #1e1813;
}

.mu-detail-copy-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mu-detail-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #6b5d50;
  border-radius: 6px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.mu-detail-action:hover,
.mu-detail-action:focus-visible {
  background: #f4ede1;
  color: #1e1813;
}

.mu-detail-action.is-copied {
  color: #1a7a3c;
}

.mu-detail-author {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 500;
  color: #6b5d50;
}

.mu-detail-meta {
  border-top: 1px solid #eadfce;
}

.mu-detail-meta__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 2px 16px;
  padding: 8px 0;
  border-bottom: 1px solid #f0e8dc;
  font-size: 0.875rem;
  line-height: 1.4;
}

.mu-detail-meta__label {
  color: #7a6a5a;
}

.mu-detail-meta__value {
  color: #1e1813;
  word-break: break-word;
}

/* Inventární číslo / signatura — identifikátory zvýrazněné jako štítek */
.mu-detail-meta__value--badge {
  justify-self: start;
  background: #f5eee6;
  border: 1px solid #eadfce;
  padding: 1px 8px;
  font-weight: 600;
}

.mu-detail-section-title {
  margin: 22px 0 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7a6a5a;
}

/* Přílohy/Související are full-width page sections below the two-column layout, not sub-labels
   inside the info panel (Popis/Kolekce) — they read as major section breaks, so they get more
   visual weight than the panel's compact beige labels. */
.mu-detail-section-title--large {
  margin: 0 0 14px;
  font-size: 1.25rem;
  letter-spacing: normal;
  color: #000;
}

.mu-detail-description__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #1e1813;
  word-break: break-word;
}

.mu-detail-description__text p {
  margin: 0 0 10px;
}

.mu-detail-collections__chips {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* A plain bordered text box (the old look) read as a static label, not a link to another
   collection — the box icon (same glyph used for "kolekce" elsewhere) plus a light fill and
   hover lift now signal "clickable" the same way the card links above do. */
.mu-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #eadfce;
  background: #faf6ee;
  padding: 5px 12px;
  font-size: 0.8125rem;
  color: #000;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(32, 20, 10, 0.06);
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.mu-detail-chip svg {
  flex-shrink: 0;
  color: #a9835a;
  transition: color 140ms ease;
}

.mu-detail-chip:hover,
.mu-detail-chip:focus-visible {
  background: #000;
  color: #fff;
  border-color: #000;
  box-shadow: 0 8px 18px rgba(32, 20, 10, 0.16);
  transform: translateY(-2px);
}

.mu-detail-chip:hover svg,
.mu-detail-chip:focus-visible svg {
  color: #fff;
}

.mu-detail-attachments,
.mu-detail-related {
  margin-top: 36px;
}

.mu-detail-attachments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Two separate <ul> elements (docs, then media) instead of relying on flex-wrap/order to force
   a line break — reliable regardless of how much width the first row's content fills. */
.mu-detail-attachments__list--media {
  margin-top: 14px;
}

.mu-detail-attachment {
  font-size: 0.9375rem;
}

/* Document/link attachments — icon + name + extension badge, one card-style row */
.mu-detail-attachment:not(.mu-detail-attachment--audio):not(.mu-detail-attachment--video) {
  flex: 1 1 280px;
  max-width: 360px;
}

.mu-detail-attachment__link {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #eadfce;
  background: #fff;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.mu-detail-attachment__link:hover,
.mu-detail-attachment__link:focus-visible {
  background: #f5eee6;
  box-shadow: 0 6px 16px rgba(32, 20, 10, 0.10);
}

.mu-detail-attachment__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f5eee6;
  color: #6b5d50;
}

.mu-detail-attachment__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mu-detail-attachment__ext {
  flex: 0 0 auto;
  border: 1px solid #eadfce;
  padding: 1px 7px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #7a6a5a;
}

/* Audio — same tile as the video thumbnail (box, hover lift, shared play overlay from
   .mu-detail-video-thumb__play), just a light background with a big music-note icon instead
   of a seeked video frame. Clicking opens the fancybox lightbox with the hidden
   .mu-detail-audio-lightbox block (inline content) — see the bind script in Front.detail.latte. */
.mu-detail-attachment--audio {
  flex: 0 0 auto;
}

.mu-detail-video-thumb--audio {
  background: #f5eee6;
  border: 1px solid #eadfce;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d8c9b3;
}

.mu-detail-audio-thumb__icon {
  display: inline-flex;
}

/* Fancybox inline dialog with the native audio player — hidden (display:none inline style)
   while parked in the attachment list, fancybox moves it into the dialog on open. */
.mu-detail-audio-lightbox {
  background: #fff;
  width: min(92vw, 560px);
  padding: 24px 28px;
}

.mu-detail-audio-lightbox__title {
  margin: 0 0 14px;
  font-weight: 600;
}

.mu-detail-audio-lightbox audio {
  display: block;
  width: 100%;
}

/* Video — small preview thumbnail with a centered play button, opens in the fancybox
   lightbox (data-fancybox + data-type="video") instead of an inline native player. The
   "#t=0.5" source hash asks the browser to seek there while only loading metadata, so a real
   frame shows instead of a blank/black box — no server-side thumbnail generation needed. */
.mu-detail-attachment--video {
  flex: 0 0 auto;
}

.mu-detail-video-thumb {
  position: relative;
  display: block;
  width: 240px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  /* background: #1e1813; */
  box-shadow: 0 10px 26px rgba(32, 20, 10, 0.10);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.mu-detail-video-thumb:hover,
.mu-detail-video-thumb:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(32, 20, 10, 0.18);
}

.mu-detail-video-thumb__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.mu-detail-video-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(20, 14, 8, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
}

.mu-detail-attachment__name--video {
  display: block;
  margin-top: 8px;
  max-width: 240px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Související — stejné karty jako ve výpisu, jen menší obrázková zóna */
.mu-detail-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.mu-detail-related__card .mu-demo-card-image {
  height: 190px;
}

.mu-detail-related__card .mu-demo-card-title {
  font-size: 0.875rem;
  min-height: 0;
}

@media (max-width: 1000px) {
  .mu-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .mu-detail-panel {
    position: static;
  }

  .mu-detail-gallery__main--placeholder {
    min-height: 260px;
  }
}

/* Výpis institucí — 3 karty na řádek, reuse mu-demo-collection-card* (stejný vizuál jako
   karty kolekcí: bílá karta, stín, "Detail" popup na hover), jen vlastní grid wrapper místo
   neznámého .col/.row systému (ten je definován v externím base styles.css mimo tento repo,
   viz komentáře výše u .mu-meta) — grid dává přesnou kontrolu nad 3 sloupci bez závislosti
   na tom, jak přesně .col--N tam venku počítá šířky. */
.mu-institutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}

@media (max-width: 860px) {
  .mu-institutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .mu-institutions-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Detail kolekce — přebírá dvousloupcový jazyk detailu předmětu (mu-detail-*); tady jen
   nadpis sekce s předměty pod layoutem, který si musí udělat vlastní odstup od panelu/galerie
   (na detailu předmětu tu roli hraje margin-top na .mu-detail-attachments/.mu-detail-related). */
.mu-coldetail-items-title {
  margin-top: 36px;
}

/* Detail předmětu — floating předchozí/následující šipky po stranách viewportu, stejný vizuální
   jazyk jako .mu-back-to-top (bílý kruh, box-shadow, invert na hover). Fixed k viewportu (ne k
   .mu-detail-panel), takže zůstávají na místě i při scrollu dlouhou galerií/popisem. */
.mu-detail-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 14px 30px rgba(32, 20, 10, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.mu-detail-nav--prev {
  left: 20px;
}

.mu-detail-nav--next {
  right: 20px;
}

.mu-detail-nav:hover,
.mu-detail-nav:focus,
.mu-detail-nav:focus-visible {
  box-shadow: 0 18px 36px rgba(32, 20, 10, 0.26);
  background: #000;
  color: #fff;
}

@media (max-width: 1000px) {
  .mu-detail-nav {
    width: 44px;
    height: 44px;
  }

  .mu-detail-nav--prev {
    left: 10px;
  }

  .mu-detail-nav--next {
    right: 10px;
  }

  .mu-detail-nav svg {
    width: 20px;
    height: 20px;
  }
}