/* Myrhorod: tile theme (own code, same look as the 2013 page) */
html { font-size: 10px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
* { box-sizing: border-box; }
body { margin: 0 auto; padding: 6rem 0 2rem; max-width: 34rem; background: #cacaca; color: #999; font: 300 2rem/1.4 'Lato', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 600; margin: 0; padding: 0; }
h1 { font-size: 3.2rem; } h2 { font-size: 2.8rem; } h3 { font-size: 2.4rem; }
p { margin: 0; padding-top: 1rem; font-size: 2rem; font-weight: 300; }
a { color: #f66; text-decoration: none; }
a:hover { color: #fff; }
em { font-style: normal; color: #f66; }
.block em { color: #ff8a8a; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #ffb35c; outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 1rem; top: -6rem; z-index: 10000; padding: 1rem 1.6rem; background: #f66; color: #fff; font-weight: 700; }
.skip:focus { top: 5.5rem; color: #fff; }

/* top menu */
.topnav { position: fixed; top: 0; left: 0; width: 100%; height: 4.5rem; background: rgba(33, 50, 65, .94); z-index: 9999; }
.topnav ul { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }
.topnav a { display: flex; align-items: center; justify-content: center; gap: .8rem; height: 4.5rem; min-width: 4.5rem; padding: 0 1rem; color: #fff; opacity: .85; font-size: 1.5rem; font-weight: 600; transition: opacity .2s, background .2s; }
.topnav a:hover, .topnav a:focus-visible, .topnav a[aria-current="true"] { opacity: 1; color: #fff; }
.topnav a.home { background: #f66; opacity: 1; padding: 0 1.4rem; }
.topnav svg { width: 2.6rem; height: 2.6rem; flex-shrink: 0; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topnav .lbl { display: none; }
@media (min-width: 62.66em) { .topnav .lbl { display: inline; } .topnav a:not(.home) { padding: 0 1.4rem; } }

/* tile grid */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: dense; margin: 0; padding: 0; list-style: none; }
.tile { padding: .5rem; transition: opacity .4s, transform .4s; }
.tile.hide { display: none; }
.tile.pop { animation: pop .45s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
.block { position: relative; height: 100%; background: #335065; overflow: hidden; color: #c4ccd3; }
.text .block { padding: 2rem; }
.text h3 { font-weight: 300; }
.text h2 { font-weight: 100; }
.big .block { padding: 2rem; }
.big .t { color: #dfe4e8; margin-bottom: .5em; font-size: 3.2rem; font-weight: 600; }
.big .lead { padding: 0; font-size: 2.8rem; font-weight: 100; line-height: 1.2em; }
.square .block { aspect-ratio: 1; }
.logo .block { background: #f66; display: grid; place-items: center; }
.logo .block { padding: 0; }
.logo img { width: 100%; height: 100%; object-fit: cover; }

/* photo tiles with a caption that appears on hover/focus */
.photo .block { aspect-ratio: 1; }
.photo img, .link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo figure { margin: 0; height: 100%; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem; background: rgba(0, 0, 0, .7); color: #ccc; font-size: 1.8rem; line-height: 1.35; opacity: 0; transform: translateY(1rem); transition: opacity .25s, transform .25s; }
.photo .block:hover figcaption, .photo .block:focus-within figcaption, .photo .block:focus figcaption { opacity: 1; transform: none; }

/* labelled image tiles (sanatoriums, travel, photos) */
.link .block { aspect-ratio: 1; }
.link h3 { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 2rem; font-weight: 600; font-size: 2rem; line-height: 1.1; color: #fff; background: rgba(0, 0, 0, .25); text-shadow: 1px 1px 0 rgba(0, 0, 0, .8); }
.link h3 a { color: #fff; }
.link h3 a::after { content: ''; position: absolute; inset: -100vmax 0 0; }
.link h3 small { display: block; margin-top: .5rem; font-size: 1.4rem; font-weight: 400; color: #ffd0d0; }
.link .block::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0); transition: background .2s; pointer-events: none; }
.link .block:hover::after { background: rgba(255, 255, 255, .07); }

/* side tab and footer */
.back { position: fixed; right: 0; top: 50%; z-index: 9000; padding: .8rem 1.4rem; background: #f66; color: #fff; font-size: 1.3rem; font-weight: 700; }
.back:hover { background: #fff; color: #f66; }
.foot { padding: 1.5rem .5rem 0; font-size: 1.3rem; color: #444; }
.foot p { padding-top: .4rem; font-size: 1.3rem; }
.foot a { color: #9b2c2c; text-decoration: underline; }

/* columns, like the original: 1 / 2 / 3 / 4 / 5 */
@media (min-width: 40em) {
  body { max-width: 62rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big { grid-column: span 2; grid-row: span 2; }
  .big .block { padding: 4rem; aspect-ratio: 1; }
  .big .lead { font-size: 4.4rem; }
  .text.square .block, .text .block { aspect-ratio: 1; }
}
@media (min-width: 62.66em) {
  body { max-width: 94rem; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile { padding: 1rem; }
  .big .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .big .lead { font-size: 5.2rem; }
}
@media (min-width: 78.32em) {
  body { max-width: 125.3rem; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .big .lead { font-size: 5.6rem; }
}
@media (min-width: 93.98em) {
  body { max-width: 149.3rem; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .big .lead { font-size: 6rem; }
}
@media (max-width: 39.99em) {
  .back { top: auto; bottom: 1.2rem; }
  .topnav a { min-width: 0; flex: 1; padding: 0; }
  .topnav a.home { flex: 0 0 5.6rem; }
}
.foot .back { color: #fff; text-decoration: none; }
.foot .back:hover { color: #f66; }

/* language switch */
.topnav .lang-li { margin-left: auto; }
.topnav .lang { opacity: 1; font-weight: 700; letter-spacing: .05em; border-left: 1px solid rgba(255, 255, 255, .15); }

/* wide tiles */
.wide { grid-column: 1 / -1; }
.half .block { aspect-ratio: auto; }
@media (min-width: 40em) { .half { grid-column: span 2; } .half .block { aspect-ratio: 2 / 1; } }

/* small info tiles */
.info .block { padding: 2rem; }
.kind { display: inline-block; margin-bottom: .8rem; padding: .2rem .8rem; background: #f66; color: #1b1b1b; font-size: 1.2rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.info h3 { font-size: 2.2rem; font-weight: 600; color: #fff; }
.info p { font-size: 1.6rem; line-height: 1.45; }
.info a { color: #ffc2c2; text-decoration: underline; }
.info a:hover { color: #fff; }

/* history line */
.tl .block { padding: 2rem; }
.tl h2 { color: #fff; font-weight: 300; font-size: 2.8rem; margin-bottom: 1.4rem; }
.tl-years { display: flex; gap: .6rem; overflow-x: auto; padding: 0 0 1rem; margin: 0 0 1.4rem; list-style: none; border-bottom: 2px solid rgba(255, 255, 255, .12); scrollbar-width: thin; }
.tl-years button { flex: 0 0 auto; min-height: 4.4rem; padding: .6rem 1.2rem; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #dfe4e8; font: 600 1.5rem 'Lato', Arial, sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.tl-years button:hover { background: rgba(255, 255, 255, .1); }
.tl-years button[aria-selected="true"] { background: #f66; border-color: #f66; color: #1b1b1b; }
.tl-panel { display: grid; grid-template-columns: 1fr; gap: 1.6rem; align-items: start; min-height: 18rem; }
.tl-panel[hidden] { display: none; }
.tl-panel h3 { color: #fff; font-weight: 600; font-size: 2.6rem; }
.tl-panel h3 em { display: block; font-size: 1.6rem; font-weight: 400; }
.tl-panel p { font-size: 1.8rem; }
.tl-panel ul { margin: 1rem 0 0; padding-left: 2rem; font-size: 1.7rem; }
.tl-nav { display: flex; gap: .8rem; margin-top: 1.6rem; }
.tl-nav button, .car-btn { min-width: 4.4rem; min-height: 4.4rem; border: 0; border-radius: 50%; background: #f66; color: #1b1b1b; font: 700 2rem 'Lato', Arial, sans-serif; cursor: pointer; }
.tl-nav button:hover, .car-btn:hover { background: #fff; }
@media (min-width: 62.66em) { .tl .block { padding: 3rem 4rem; } .tl-panel { grid-template-columns: 1fr 1.4fr; gap: 3rem; } }

/* photo carousel */
.car .block { padding: 0; aspect-ratio: auto; }
.car-view { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #213241; }
@media (min-width: 40em) { .car-view { aspect-ratio: 2 / 1; } }
.car-slides { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; transition: transform .55s ease; }
.car-slides li { flex: 0 0 100%; height: 100%; position: relative; }
.car-slides img { width: 100%; height: 100%; object-fit: cover; }
.car-slides figure { margin: 0; height: 100%; }
.car-slides figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 2rem 2.4rem; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; font-size: 1.9rem; font-weight: 600; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.car-prev { left: 1.2rem; } .car-next { right: 1.2rem; }
.car-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 2rem; }
.car-bar h2 { font-size: 2rem; color: #fff; font-weight: 600; }
.car-dots { display: flex; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.car-dots button { width: 2.4rem; height: 2.4rem; padding: 0; border: 0; background: transparent; cursor: pointer; }
.car-dots button::before { content: ''; display: block; width: 1rem; height: 1rem; margin: auto; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.car-dots button[aria-current="true"]::before { background: #f66; transform: scale(1.3); }
.car-count { font-size: 1.5rem; color: #dfe4e8; white-space: nowrap; }

/* did you know */
.dyk .block { display: flex; flex-direction: column; padding: 2rem; }
.dyk .kind { align-self: flex-start; }
.dyk-facts { flex: 1; margin: 0; padding: 0; list-style: none; }
.dyk-facts li { font-size: 2rem; font-weight: 300; color: #eef1f3; }
.dyk-facts li[hidden] { display: none; }
.dyk button { align-self: flex-start; margin-top: 1.2rem; min-height: 4.4rem; padding: 0 1.6rem; border: 0; background: #f66; color: #1b1b1b; font: 700 1.5rem 'Lato', Arial, sans-serif; cursor: pointer; }
.dyk button:hover { background: #fff; }

/* map */
.map .block { padding: 0; }
.map iframe { display: block; width: 100%; height: 100%; min-height: 30rem; border: 0; }
.dyk-facts em { color: #ffb3b3; }
.tl { order: -1; }
/* Ukrainian page: Lato has no Cyrillic letters, so the whole page uses Fira Sans (same light, open style) */
html[lang="uk"] body, html[lang="uk"] body * { font-family: 'Fira Sans', Arial, sans-serif; }
