/* The strip on ssps.cz's Mapa školy page: the building choice with the same hover as the tour's
   own (a side widens to about 55/45 and shows more of its photo without enlarging it, the other
   dims, the gold bar grows and "Vstoupit" slides in), and on touch the invitation always shown.
   No label of its own: the school's page around it says what it is (Patrik, 16. 11.). */
@font-face { font-family: 'TT Polls'; font-weight: 700; font-display: swap; src: url('../fonts/TTPolls_Bold.woff2') format('woff2'); }
@font-face { font-family: 'Mona Sans'; font-weight: 600; font-display: swap; src: url('../fonts/mona-sans-600.ttf') format('truetype'); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: #22232A; }
body { font: 600 14px/1.3 'Mona Sans', system-ui, sans-serif; color: #fff; }
main { position: relative; display: flex; gap: 2px; height: 100%; min-height: 0; }

a {
  position: relative;
  flex: 1 1 0;
  display: block;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: #22232A;
  color: #fff;
  text-decoration: none;
  transition: flex-grow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
img { position: absolute; top: 0; left: 0; width: 55vw; max-width: none; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.35s; }
a:last-child:not(:first-of-type) img { left: auto; right: 0; }
a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(21, 22, 27, 0.8), rgba(21, 22, 27, 0) 62%); }
a:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }

.caption {
  position: absolute;
  z-index: 1;
  left: clamp(14px, 4vw, 28px);
  right: 12px;
  bottom: clamp(14px, 4vw, 26px);
  padding-left: 14px;
  transition: opacity 0.35s;
}
.caption::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #B38201; }
.name { display: block; font: 700 clamp(26px, 6vw, 46px)/1 'TT Polls', system-ui, sans-serif; overflow-wrap: anywhere; }
.go { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateX(-8px); transition: grid-template-rows 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.go > span { min-height: 0; overflow: hidden; }
.go > span > span { display: flex; align-items: center; gap: 8px; padding-top: 9px; font-size: 15px; }
.go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

a:hover img, a:focus-visible img { opacity: 1; }
a:hover .go, a:focus-visible .go { grid-template-rows: 1fr; opacity: 1; transform: none; }
main:hover a:not(:hover) img, main:has(a:focus-visible) a:not(:focus-visible) img { opacity: 0.38; }
main:hover a:not(:hover) .caption, main:has(a:focus-visible) a:not(:focus-visible) .caption { opacity: 0.7; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a:hover, a:focus-visible { flex-grow: 1.2222; }
}
@media (hover: none) {
  .go { grid-template-rows: 1fr; opacity: 1; transform: none; }
  main:hover a:not(:hover) img { opacity: 0.85; }
  main:hover a:not(:hover) .caption { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  a, img, .caption, .go { transition: none; }
}

/* Narrow: one above the other, each photo just filling its half. */
@media (max-width: 480px) {
  main { flex-direction: column; }
  a, a:hover, a:focus-visible { flex-grow: 1; }
  img, a:last-child:not(:first-of-type) img { left: 0; right: auto; width: 100%; }
  .name { font-size: 32px; }
  .go > span > span { padding-top: 6px; font-size: 14px; }
}
