/* MyMotoTrip – moto zápisník */
:root {
  --paper: #f6f2ea;
  --paper-2: #ece6da;
  --card: #fffdf9;
  --ink: #1c1915;
  --ink-2: #4a443b;
  --muted: #7a7266;
  --line: #ddd5c6;
  --accent: #d9541e;
  --accent-ink: #b23f0f;
  --dark: #1c1915;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 25, 21, .06), 0 8px 24px -12px rgba(28, 25, 21, .18);
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-ui: "Barlow", system-ui, -apple-system, sans-serif;
  --f-text: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 var(--f-ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.02; letter-spacing: .005em; margin: 0; text-wrap: balance; }
small { font-size: .75em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.icon { flex: none; vertical-align: -0.15em; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 242, 234, .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: .01em; }
.logo-sm { font-size: 22px; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 10px 14px; border-radius: 999px; color: var(--ink-2); transition: background .2s var(--ease), color .2s var(--ease); }
.nav a:hover { background: rgba(28, 25, 21, .06); color: var(--ink); }
.nav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .i-close { display: none; }

/* header nad fotkou (úvod, detail tripu) */
.site-header.is-overlay { position: absolute; left: 0; right: 0; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.site-header.is-overlay .nav a { color: rgba(255, 255, 255, .88); }
.site-header.is-overlay .nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.site-header.is-overlay .nav a.active { color: #fff; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; padding: 8px 12px 16px; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(0,0,0,.3); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s; }
  .nav a, .site-header.is-overlay .nav a { color: var(--ink); padding: 14px 12px; font-size: 18px; border-radius: 10px; }
  .nav a.active, .site-header.is-overlay .nav a.active { box-shadow: none; background: rgba(217, 84, 30, .1); color: var(--accent-ink); }
  body.menu-open .nav { opacity: 1; transform: none; visibility: visible; transition: opacity .2s var(--ease), transform .2s var(--ease); }
  body.menu-open .nav-toggle .i-open { display: none; }
  body.menu-open .nav-toggle .i-close { display: block; }
  body.menu-open .site-header.is-overlay { background: var(--paper); color: var(--ink); }
}

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 16px/1 var(--f-ui); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s var(--ease), background .2s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); }
.btn-ghost { border-color: var(--line); background: var(--card); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--accent-ink); white-space: nowrap; }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.eyebrow { font: 600 13px/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; opacity: .85; }

/* ---------- hero ---------- */
.hero, .trip-hero { position: relative; min-height: min(88vh, 780px); display: flex; align-items: flex-end; color: #fff; background: var(--dark); overflow: hidden; }
.trip-hero { min-height: min(72vh, 640px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.15) 55%, rgba(0,0,0,.78) 100%); }
.hero-content { position: relative; padding-top: calc(var(--header-h) + 40px); padding-bottom: clamp(36px, 7vh, 72px); }
.hero-title { font-size: clamp(44px, 8vw, 104px); text-transform: uppercase; max-width: 14ch; margin-bottom: 18px; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.trip-hero .hero-title { max-width: 18ch; font-size: clamp(40px, 7vw, 88px); }
.hero-lead { font: 400 clamp(17px, 2vw, 20px)/1.5 var(--f-text); max-width: 54ch; margin: 0 0 26px; color: rgba(255,255,255,.9); }
.hero-empty { min-height: 60vh; background: radial-gradient(circle at 70% 20%, #3a3128, var(--dark)); }
.trip-hero.no-image { min-height: auto; background: var(--paper); color: var(--ink); }
.trip-hero.no-image .hero-content { padding-top: 48px; padding-bottom: 24px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500; font-size: 15px; margin-bottom: 22px; opacity: .85; }
.back:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: -1px; transform: translateY(-50%); max-width: 1000px; box-shadow: var(--shadow); padding: 0; }
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); max-width: 760px; }
.stats > div { background: var(--card); padding: 20px 16px; text-align: center; }
.stats strong { display: block; font: 700 clamp(30px, 4vw, 44px)/1 var(--f-display); }
.stats span { font-size: 14px; color: var(--muted); }
@media (max-width: 640px) {
  .stats, .stats.stats-3 { grid-template-columns: repeat(2, 1fr); transform: none; margin: 24px auto 0; width: calc(100% - 40px); }
  .stats.stats-3 > div:last-child { grid-column: span 2; }
}

/* ---------- sections ---------- */
.section { padding-top: 32px; padding-bottom: 72px; }
.section-tight { padding-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(32px, 4vw, 44px); text-transform: uppercase; }
.section-head h2 small { font: 500 16px var(--f-ui); color: var(--muted); vertical-align: middle; margin-left: 6px; }
.section-dark { background: var(--dark); color: #f4efe6; padding-top: 72px; }
.section-dark .link-more { color: #ff8a55; }
.section-dark .card { background: #27231e; border-color: #3a342c; }
.section-dark .card-excerpt, .section-dark .card-meta, .section-dark .card-stats { color: #b9b0a2; }

.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head h1 { font-size: clamp(48px, 8vw, 88px); text-transform: uppercase; }
.page-cover { border-radius: var(--radius); width: 100%; max-height: 520px; object-fit: cover; margin-bottom: 32px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 28px 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 3 / 2; background: var(--paper-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-placeholder { display: grid; place-items: center; height: 100%; color: var(--muted); }
.badge { position: absolute; top: 12px; left: 12px; font: 600 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }
.badge-planned { background: #f5c04a; color: #2a2108; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 600 12.5px/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.section-dark .card-meta { color: #ff8a55; }
.card-title { font-size: 28px; text-transform: uppercase; }
.card-excerpt { margin: 0; color: var(--ink-2); font: 400 16px/1.5 var(--f-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-stats { margin-top: auto; padding-top: 8px; display: flex; gap: 16px; font-size: 14.5px; color: var(--muted); }
.card-stats span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- filters ---------- */
.filters { display: grid; gap: 12px; margin-bottom: 28px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip small { opacity: .6; font-size: 12px; }
.empty { padding: 40px 0; font-size: 18px; color: var(--muted); }

/* ---------- trip detail ---------- */
.facts { display: flex; flex-wrap: wrap; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: -36px; position: relative; box-shadow: var(--shadow); padding: 0; max-width: 1176px; overflow: hidden; }
.trip-hero.no-image + .facts { margin-top: 0; }
.facts > div { flex: 1 1 160px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 16px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts .icon { grid-row: span 2; color: var(--accent); width: 22px; height: 22px; }
.facts .k { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts .v { font-weight: 600; font-size: 16px; }
@media (max-width: 760px) { .facts { margin: 16px 20px 0; width: auto; } }

.trip-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 24px; }
@media (min-width: 1000px) { .trip-layout:has(.trip-aside) { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; } }
.trip-aside { display: flex; flex-direction: column; gap: 14px; align-self: start; }
@media (min-width: 1000px) { .trip-aside { position: sticky; top: calc(var(--header-h) + 20px); } }
.aside-title { font-size: 24px; text-transform: uppercase; margin-top: 12px; }
.highlights { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.highlights li { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 500; font-size: 15px; }
.highlights .icon { color: var(--accent); }

.prose { font: 400 19px/1.7 var(--f-text); color: #2a2620; max-width: 68ch; }
.prose-center { margin: 0 auto; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose .lead { font-size: 22px; line-height: 1.55; color: var(--ink); }
.prose h2, .prose h3 { font-family: var(--f-display); text-transform: uppercase; margin: 1.8em 0 .5em; color: var(--ink); }
.prose h2 { font-size: 34px; }
.prose h3 { font-size: 26px; }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose img { border-radius: 10px; margin: 1.5em 0; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font: 400 14px var(--f-ui); color: var(--muted); margin-top: 6px; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.prose li { margin: .25em 0; }
.prose table { border-collapse: collapse; width: 100%; font: 400 16px var(--f-ui); margin: 1.5em 0; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
@media (max-width: 640px) { .prose { font-size: 18px; } .prose .lead { font-size: 20px; } }

/* ---------- map ---------- */
.map { height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); z-index: 0; }
.map-tall { height: min(62vh, 560px); }
.leaflet-container { font-family: var(--f-ui); }
.leaflet-popup-content a { font-weight: 600; color: var(--accent-ink); }

/* ---------- gallery + lightbox ---------- */
.gallery { columns: 3 260px; column-gap: 12px; }
.gallery-item { display: block; margin-bottom: 12px; break-inside: avoid; border-radius: 10px; overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.gallery-item img { width: 100%; transition: transform .5s var(--ease), opacity .3s; }
.gallery-item:hover img { transform: scale(1.03); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12, 10, 8, .96); display: grid; grid-template-rows: auto 1fr; opacity: 0; transition: opacity .2s var(--ease); touch-action: pan-y; }
.lightbox.open { opacity: 1; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #ddd; font-size: 15px; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 12px 16px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.lb-btn { width: 48px; height: 48px; border-radius: 999px; border: 0; background: rgba(255,255,255,.1); color: #fff; display: inline-grid; place-items: center; cursor: pointer; transition: background .15s; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
@media (max-width: 640px) { .lb-prev, .lb-next { display: none; } }

/* ---------- pager, footer, misc ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 72px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; transition: border-color .15s; }
.pager a:hover { border-color: var(--ink-2); }
.pager small { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.pager span { font: 700 22px/1.1 var(--f-display); text-transform: uppercase; }
.pager-next { text-align: right; align-items: flex-end; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager-next { text-align: left; align-items: flex-start; } }

.preview-bar { position: relative; z-index: 60; background: #f5c04a; color: #2a2108; text-align: center; padding: 10px 16px; font-weight: 500; }
.preview-bar a { font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; margin-top: 24px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.footer-inner p { margin: 6px 0 0; color: var(--ink-2); }
.section-dark + .site-footer, main:has(> .section-dark:last-child) + .site-footer { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
