/* Plaváčkův průvodce Karlovými Vary */

:root {
  --paper: #f2f6f4;
  --card: #ffffff;
  --ink: #16241f;
  --muted: #485b54;
  --green: #17453a;
  --green-deep: #0f2f27;
  --teal: #2e8a82;
  --link: #1b6760;
  --ochre: #c27a2c;
  --ochre-ink: #8a4f10;
  --rose: #f0dcd7;
  --rose-ink: #5c2a22;
  --line: rgba(23, 69, 58, .18);
  --head: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail: 4.5rem;
  --bar-h: 3.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.68 var(--body);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--green); text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }
.container { width: min(100% - 2rem, 76rem); margin-inline: auto; }
.vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: .75rem; top: -4rem; z-index: 100; background: var(--card); color: var(--ink);
  padding: .7rem 1rem; border-radius: .5rem; font-weight: 600;
}
.skip:focus { top: .75rem; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Odkaz mimo web: šipka */
/* \2060 (word joiner) drží šipku u posledního slova, aby se nikdy nezalomila sama na další řádek */
a.ext::after { content: "\2060\2197"; margin-left: .15em; font-size: .85em; }
.btn.ext::after { margin-left: .35em; }

/* Tlačítka */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3rem; padding: .7rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--solid { background: var(--green); color: #fff; }
.btn--solid:hover { background: var(--green-deep); color: #fff; }
.btn--light { background: #fff; color: var(--green-deep); }
.btn--light:hover { background: var(--rose); color: var(--green-deep); }
.btn--line { border-color: var(--green); color: var(--green); background: transparent; }
.btn--line:hover { background: var(--green); color: #fff; }
.hero :focus-visible, .foot :focus-visible { outline-color: #fff; }

/* ---------------------------------------------------------------- Hero */
.hero {
  position: relative; isolation: isolate; display: grid; align-items: end;
  min-height: clamp(30rem, 82svh, 50rem); color: #fff; overflow: hidden; background: var(--green-deep);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(15, 47, 39, .94) 0%, rgba(15, 47, 39, .62) 34%, rgba(15, 47, 39, .08) 68%, rgba(15, 47, 39, 0) 100%);
}
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__in { padding-block: 5rem 3.25rem; }
.hero__title {
  margin: 0; max-width: 16ch; font: 600 clamp(2.6rem, 8.2vw, 5.6rem)/1 var(--head);
  letter-spacing: -.02em; text-wrap: balance; font-optical-sizing: auto;
}
.hero__sub { margin: 1.1rem 0 0; max-width: 32ch; font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.4; color: #e6efeb; }
.hero__cta { margin: 2rem 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .hero__img { animation: hero-settle 2.4s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__title, .hero__sub, .hero__cta { animation: hero-rise 1s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__sub { animation-delay: .15s; }
  .hero__cta { animation-delay: .3s; }
}
@keyframes hero-settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes hero-rise { from { opacity: 0; transform: translateY(1.2rem); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Úvod */
.intro { display: grid; gap: 2rem; padding-block: 3rem 3.5rem; align-items: center; }
.intro__lead {
  margin: 0; max-width: 34ch; font: 400 clamp(1.35rem, 2.6vw, 1.8rem)/1.4 var(--head);
  color: var(--green); text-wrap: pretty;
}
.pdf {
  display: flex; gap: 1.25rem; align-items: center; padding: 1.1rem 1.25rem 1.1rem 1.1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 1.1rem;
}
.pdf__thumb {
  width: 6.5rem; flex: none; border-radius: .25rem; background: #fff;
  box-shadow: 0 .15rem .15rem rgba(15, 47, 39, .1), 0 .8rem 1.4rem -.4rem rgba(15, 47, 39, .35);
  transform: rotate(-2.5deg);
}
.pdf__thumb--blank {
  display: grid; place-items: center; aspect-ratio: 1 / 1.41; font: 700 1.1rem var(--head); color: var(--green);
  border: 2px solid var(--green);
}
.pdf__t { margin: 0 0 .25rem; font: 600 1.35rem/1.2 var(--head); }
.pdf__p { margin: 0 0 .4rem; font-size: 1rem; line-height: 1.5; color: var(--muted); }
.pdf__meta { margin: 0 0 .9rem; font-size: .9rem; color: var(--muted); }
@media (min-width: 56rem) {
  .intro { grid-template-columns: 1.15fr 1fr; gap: 4rem; }
}
@media (max-width: 22rem) {
  .pdf { flex-direction: column; align-items: flex-start; }
  .pdf__thumb { width: 5.5rem; }
}

/* ------------------------------------------------------- Rozvržení trasy */
.layout { display: block; }
.side { margin-bottom: 2rem; }
.js .side { display: none; }

@media (min-width: 68.75rem) {
  .layout { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 3.5rem; }
  .js .side, .side { display: block; margin: 0; }
  .side { position: sticky; top: 1.25rem; align-self: start; max-height: calc(100svh - 2.5rem); overflow: auto; scrollbar-width: thin; padding-block: .25rem .5rem; }
}

/* Navigace: vlastní seznam zastavení */
.route-nav { position: relative; font-size: .975rem; line-height: 1.3; }
.route-nav__title { margin: 0 0 .9rem; font: 600 1.2rem/1.2 var(--head); }
.route-nav__group + .route-nav__group { margin-top: 1.25rem; }
.route-nav__part { margin: 0 0 .35rem; font: italic 500 1rem/1.3 var(--head); color: var(--ochre-ink); }
.route-nav__list { list-style: none; margin: 0; padding: 0; position: relative; }
.route-nav__list::before {
  content: ""; position: absolute; left: .83rem; top: 1rem; bottom: 1rem; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--teal) 0 5px, transparent 5px 9px);
}
.route-nav__list a {
  position: relative; display: flex; align-items: center; gap: .7rem; min-height: 2.75rem; padding: .3rem .4rem .3rem 0;
  color: var(--ink); text-decoration: none; border-radius: .5rem;
}
.route-nav__list a:hover .route-nav__t { text-decoration: underline; text-underline-offset: .2em; }
.route-nav__n {
  position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--teal); color: var(--green);
  font: 600 .8rem/1 var(--head); box-shadow: 0 0 0 3px var(--paper);
}
.route-nav__n--end { background: var(--teal); }
.route-nav a[aria-current="location"] { font-weight: 650; }
.route-nav a[aria-current="location"] .route-nav__n { background: var(--green); border-color: var(--green); color: #fff; }
.route-nav a[aria-current="location"] .route-nav__n--end { background: var(--green); }

/* ---------------------------------------------------------------- Zastavení */
.route { min-width: 0; padding-bottom: 1rem; }
.part {
  position: relative; z-index: 2; margin: 0 0 2.75rem; padding: 1.25rem 1.5rem;
  background: var(--rose); border-radius: 1.1rem; color: var(--rose-ink);
}
.part__t { margin: 0; font: 600 1.55rem/1.2 var(--head); }
.part__n { margin: .3rem 0 0; font-size: 1rem; line-height: 1.5; }
.stop + .part { margin-top: 0; }

.stop {
  position: relative; display: block; scroll-margin-top: 4.5rem; padding-bottom: 4.25rem;
}
.stop__rail { position: absolute; left: 0; top: 0; }
.badge {
  position: relative; z-index: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--green); color: #fff; font: 600 1.15rem/1 var(--head);
  box-shadow: 0 0 0 .3rem var(--paper);
}
.stop--end .badge { width: 1.4rem; height: 1.4rem; margin: .65rem; background: var(--teal); }
.stop__head { min-height: 2.75rem; padding-left: 3.6rem; margin-bottom: 1.25rem; }
.stop__ord { margin: 0; font: italic 500 1.05rem/1.3 var(--head); color: var(--ochre-ink); }
.stop__title {
  margin: .1rem 0 0; font: 600 clamp(1.65rem, 3.4vw, 2.4rem)/1.12 var(--head);
  letter-spacing: -.01em; text-wrap: balance; color: var(--green-deep);
}
.stop--end .stop__head { padding-left: 3.6rem; }

@media (min-width: 46rem) {
  .stop { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .stop__rail { position: relative; }
  .stop__rail::before {
    content: ""; position: absolute; left: calc(1.375rem - 1px); top: 1.5rem; bottom: -4.25rem; width: 2px;
    background: repeating-linear-gradient(to bottom, var(--teal) 0 7px, transparent 7px 14px);
  }
  .stop--end .stop__rail::before { display: none; }
  .stop__head { padding-left: 0; }
  .stop--end .stop__head { padding-left: 0; }
  .stop__title { padding-top: .1rem; }
}

.stop__body { min-width: 0; container-type: inline-size; }
.stop__wide { margin: 0 0 1.75rem; }
.stop__wide img { width: 100%; border-radius: .9rem; box-shadow: 0 .8rem 1.6rem -.8rem rgba(15, 47, 39, .45); }

.stop__grid { display: grid; gap: 1.5rem; }
.stop__media { display: grid; gap: 1.25rem; align-content: start; }
.photo { margin: 0; }
.photo img { width: 100%; border-radius: .9rem; }
.photo--arch img { width: 100%; max-width: 26rem; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 12rem 12rem .9rem .9rem; box-shadow: 0 1rem 1.8rem -1rem rgba(15, 47, 39, .55); }
@container (min-width: 44rem) {
  .stop__grid { grid-template-columns: minmax(0, 1fr) 19rem; gap: 2.5rem; }
  .stop__grid--solo { grid-template-columns: minmax(0, 1fr); }
  .stop__media { position: sticky; top: 1.5rem; }
  .photo--arch img { aspect-ratio: 4 / 5; }
}
@container (max-width: 43.99rem) {
  .stop__media { order: -1; }
}

/* Text článku */
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { max-width: 62ch; margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose strong { font-weight: 650; }
.prose h3 { margin: 1.6em 0 .5em; font: 600 1.3rem/1.25 var(--head); color: var(--green-deep); }
.prose blockquote {
  max-width: 58ch; margin: 0 0 1.4em; padding: .2rem 0 .2rem 1.1rem; border-left: 3px solid var(--ochre);
  font: italic 400 1.25rem/1.55 var(--head); color: var(--green-deep);
}

/* Mapa */
.map {
  display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; align-items: center; max-width: 36rem;
  margin: 1.75rem 0 0; padding: 1rem 1.15rem; background: var(--card); border: 1px solid var(--line);
  border-left: 5px solid var(--teal); border-radius: .75rem;
}
.map > .ico { width: 1.75rem; height: 1.75rem; color: var(--teal); grid-row: span 2; }
.map__t { margin: 0; font-weight: 650; }
.map .btn { grid-column: 2; justify-self: start; min-height: 2.75rem; margin-top: .35rem; }

/* Předchozí / další */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pager__a { display: flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .4rem .2rem; color: var(--ink); text-decoration: none; line-height: 1.25; }
.pager__a small { display: block; font-size: .8rem; color: var(--muted); }
.pager__a--next { text-align: right; margin-left: auto; }
.pager__a:hover span { text-decoration: underline; text-underline-offset: .2em; }
.pager__a .ico { color: var(--teal); }

/* ---------------------------------------------------------------- Autor */
.author { background: var(--rose); color: var(--rose-ink); padding-block: 3.25rem; margin-top: 1rem; }
.author a { color: var(--rose-ink); }
.author a:hover { color: #000; }
.author__t { margin: 0 0 1rem; font: 600 1.6rem/1.2 var(--head); }
.author .prose p { max-width: 64ch; }

/* ---------------------------------------------------------------- Patička */
.foot { background: var(--green-deep); color: #dbe8e3; padding-block: 3.5rem 1.75rem; }
.foot a { color: #fff; }
.foot a:hover { color: var(--rose); }
.foot__share { display: flex; justify-content: center; }
.share { position: relative; }
.share > summary { list-style: none; }
.share > summary::-webkit-details-marker { display: none; }
.share__panel {
  position: absolute; left: 50%; bottom: calc(100% + .75rem); z-index: 5; transform: translateX(-50%);
  width: min(18rem, calc(100vw - 2rem)); padding: .5rem; background: #fff; color: var(--ink); border-radius: 1rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .4);
}
.share__list { list-style: none; margin: 0; padding: 0; }
.share__list a, .share__copy {
  display: flex; width: 100%; align-items: center; min-height: 2.9rem; padding: .5rem .9rem; border: 0; border-radius: .6rem;
  background: none; color: var(--ink); font: 500 1rem var(--body); text-align: left; text-decoration: none; cursor: pointer;
}
.share__list a:hover, .share__copy:hover { background: var(--paper); color: var(--green-deep); }
.share__list :focus-visible { outline-color: var(--ochre); }
.share__msg { margin: 0; padding: 0 .9rem; min-height: 0; font-size: .9rem; color: var(--link); }
.share__msg:not(:empty) { padding-block: .35rem .5rem; }
.social { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.social a {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .5rem 1.15rem;
  border: 1.5px solid rgba(255, 255, 255, .35); border-radius: 999px; text-decoration: none; font-weight: 600;
}
.social a:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }
.social a::after { display: none; }
.foot__bar {
  display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: center;
  margin: 3rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .95rem;
}
.foot__bar p { margin: 0; }
.foot__credit { order: 1; }
.foot__copy { order: 2; margin-inline: auto; color: #b9cdc6; }
.foot__top { order: 3; }
@media (max-width: 40rem) {
  .foot__bar { flex-direction: column; align-items: flex-start; }
  .foot__copy { margin-inline: 0; }
  .foot__credit { order: 1; } .foot__copy { order: 2; } .foot__top { order: 3; }
}

/* ------------------------------------------------- Horní lišta (mobil/tablet) */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; gap: .75rem;
  height: var(--bar-h); padding: 0 .75rem; background: var(--green-deep); color: #fff;
  transform: translateY(-100%); transition: transform .25s ease; visibility: hidden;
}
.bar.is-on { transform: none; visibility: visible; }
.bar__btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1rem; border: 1.5px solid rgba(255, 255, 255, .45);
  border-radius: 999px; background: none; color: #fff; font: 600 1rem var(--body); cursor: pointer;
}
.bar__btn:hover { background: rgba(255, 255, 255, .12); }
.bar__now { min-width: 0; margin: 0; display: flex; gap: .5rem; align-items: baseline; font-size: .975rem; line-height: 1.2; }
.bar__n { flex: none; font: 600 1rem var(--head); color: #f3c98d; }
.bar__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .18); }
.bar__prog span { display: block; height: 100%; width: 0; background: #f3c98d; }
@media (min-width: 68.75rem) { .bar { display: none; } }

.sheet {
  width: min(26rem, 100%); max-width: 100%; max-height: 100svh; height: 100svh; margin: 0 auto 0 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
}
.sheet::backdrop { background: rgba(15, 47, 39, .6); }
.sheet__in { padding: 1rem 1.25rem 2rem; }
.sheet__close {
  display: block; margin: 0 0 1rem auto; min-height: 2.75rem; padding: 0 1.1rem; border: 1.5px solid var(--green); border-radius: 999px;
  background: none; color: var(--green); font: 600 1rem var(--body); cursor: pointer;
}
.sheet .route-nav { font-size: 1.05rem; }

/* ---------------------------------------------------------------- Tisk */
@media print {
  .bar, .side, .share, .pager, .skip, .hero__cta, .pdf, .map .btn { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .hero { min-height: 0; color: #000; background: none; }
  .hero::after, .hero__img { display: none; }
  .hero__title { font-size: 26pt; } .hero__sub { color: #000; }
  .layout { display: block; }
  .stop { display: block; padding-bottom: 1.5rem; break-inside: avoid-page; }
  .stop__rail { display: none; } .stop__head { padding-left: 0; }
  .stop__grid { grid-template-columns: 1fr 12rem; }
  .part, .author { background: none; border: 1px solid #999; color: #000; }
  .foot { background: none; color: #000; padding-top: 1rem; } .foot a { color: #000; }
  .social, .foot__top { display: none; }
}
