/* ==========================================================================
   Josef Kopeček — Personal Website
   css/style.css
   ========================================================================== */

/* ---------- Custom Properties --------------------------------------------- */
:root {
  --bg:         #ffffff;
  --bg-alt:     #f6f5f2;
  --text:       #1a1a1a;
  --text-muted: #717171;
  --border:     #e6e6e6;
  --accent:     #1a1a1a;

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-w:    1100px;
  --max-w-sm:  720px;
  --nav-h:      64px;
  --radius:      4px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);

  --gap:    clamp(1.5rem, 4vw, 3rem);
}

/* ---------- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { font-family: var(--font); }

/* ---------- Typography ---------------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.25rem); }
h4 { font-size: 1rem; }
p  { max-width: 65ch; }

/* ---------- Layout -------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}
.container--sm {
  max-width: var(--max-w-sm);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* ---------- Header / Navigation ------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
}

.logo {
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin-left: auto;
}

.site-nav a {
  padding: .35rem .65rem;
  font-size: .85rem;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--bg-alt);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ------------------------------------------------------ */
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }

.section-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.section-title { margin-bottom: var(--gap); }
.section-subtitle { color: var(--text-muted); margin-top: .5rem; margin-bottom: var(--gap); }

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  height: 88vh;
  min-height: 480px;
  max-height: 820px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,.65) 0%,
    rgba(0,0,0,.15) 55%,
    transparent 100%);
}

.hero-content {
  position: relative;
  color: #fff;
  padding: clamp(2rem, 5vw, 4rem);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: .75rem;
}

.hero-content p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  opacity: .85;
  max-width: 42ch;
  line-height: 1.5;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  opacity: .6;
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- Home intro strip ---------------------------------------------- */
.intro-strip {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--border);
}

.intro-strip .container {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.intro-strip p {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 55ch;
  flex: 1;
  min-width: 260px;
}

.intro-portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.intro-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex-shrink: 0;
}

.intro-link {
  font-size: .9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: gap .2s;
}

.intro-link:hover { gap: .65rem; }

/* ---------- Cards --------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s;
}

.card:hover .card-thumb img { transform: scale(1.04); }

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.card-date { font-size: .78rem; color: var(--text-muted); }

.card-tag {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .12rem .45rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.card h3 { font-size: 1.05rem; margin-top: .3rem; }

.card p {
  font-size: .875rem;
  color: var(--text-muted);
  flex: 1;
}

.card-link {
  font-size: .85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .75rem;
  transition: gap .2s;
}

.card-link:hover { gap: .5rem; }

/* ---------- About layout -------------------------------------------------- */
.about-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-photo {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg-alt);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h1 { margin-bottom: .5rem; }

.about-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.about-text p { margin-bottom: 1rem; color: var(--text-muted); text-align: justify; max-width: none; }
.about-text p:first-of-type { color: var(--text); }

.about-text blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: .95rem;
  text-align: justify;
  max-width: none;
}

/* ---------- Gallery grid -------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: .75rem;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4/3;
  background: var(--bg-alt);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s, opacity .25s;
}

.gallery-item:hover img {
  transform: scale(1.06);
  opacity: .9;
}

/* ---------- Lightbox ------------------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .15);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  transition: background .2s;
}

.lightbox-close:hover { background: rgba(255, 255, 255, .28); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .15);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.4rem;
  transition: background .2s;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .6);
  font-size: .8rem;
  letter-spacing: .05em;
}

/* ---------- Trip / Madeira detail ----------------------------------------- */
.trip-hero {
  position: relative;
  height: 55vh;
  min-height: 380px;
  max-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.trip-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.trip-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 65%);
}

.trip-hero-content {
  position: relative;
  color: #fff;
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: var(--max-w-sm);
  margin: 0 auto;
  width: 100%;
}

.trip-hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: .5rem;
}

.trip-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: 8px;
  margin: 2rem 0;
}

.trip-meta-item { display: flex; flex-direction: column; gap: .2rem; }

.trip-meta-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.trip-meta-value { font-size: .95rem; font-weight: 500; }

.trip-content { padding-bottom: clamp(3rem, 8vw, 6rem); }

.trip-content h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 .75rem;
}

.trip-content p {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.trip-photo {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.trip-photo img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  transition: opacity .2s;
}

.trip-photo:hover img { opacity: .93; }

/* ---------- Featured post ------------------------------------------------- */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}

.featured-post:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.featured-post-thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-alt);
  max-height: 260px;
}

.featured-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s;
}

.featured-post:hover .featured-post-thumb img {
  transform: scale(1.04);
}

.featured-post-body {
  padding: 1.4rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .5rem;
}

.featured-post-body h3 {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.25;
}

.featured-post-body p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: none;
}

.featured-post-body .card-link {
  margin-top: .5rem;
}

@media (max-width: 700px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-thumb { aspect-ratio: 16 / 9; }
}

/* ---------- Projects grid ------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.project-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: zoom-in;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s;
}

.project-card:hover .project-thumb img { transform: scale(1.04); }

.project-info { padding: 1rem 1.25rem 1.25rem; }
.project-info h3 { font-size: 1rem; margin-bottom: .3rem; }
.project-info p { font-size: .85rem; color: var(--text-muted); max-width: none; }

/* ---------- Apps list ----------------------------------------------------- */
.app-list { display: grid; gap: 1rem; max-width: 680px; }

.app-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  cursor: pointer;
}

.app-item:hover {
  border-color: #bbb;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.app-info { flex: 1; }
.app-info h3 { font-size: 1rem; margin-bottom: .2rem; }
.app-info p { font-size: .85rem; color: var(--text-muted); max-width: none; }

.app-arrow { color: var(--text-muted); flex-shrink: 0; }

/* ---------- Placeholder / Coming soon ------------------------------------- */
.coming-soon {
  text-align: center;
  padding: clamp(4rem, 12vw, 9rem) 1rem;
  color: var(--text-muted);
}

.coming-soon .section-label { justify-content: center; display: flex; }
.coming-soon h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: .5rem 0 1rem; color: var(--text); }
.coming-soon p { margin: 0 auto; }

/* ---------- Article carousel ---------------------------------------------- */
.article-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: flex-start;
  width: 300%;
  transition: transform .5s ease;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 calc(100% / 9);
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.carousel-btn:hover { background: rgba(255,255,255,.32); }
.carousel-btn--prev { left: 1.25rem; }
.carousel-btn--next { right: 1.25rem; }

.carousel-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .45rem;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ---------- Article page -------------------------------------------------- */
.article-page {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(4rem, 10vw, 7rem);
}

.article-inner {
  max-width: var(--max-w-sm);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  transition: color .15s;
}

.article-back:hover { color: var(--text); }

.article-header { margin-bottom: 2rem; }

.article-header .section-label { margin-bottom: .6rem; }

.article-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.article-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: none;
  text-align: justify;
}

.article-info-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: 8px;
  margin-bottom: 2.5rem;
}

.info-item { display: flex; flex-direction: column; gap: .2rem; }

.info-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.info-value { font-size: .95rem; font-weight: 500; }

.article-section { margin-bottom: 2rem; }

.article-section h2 {
  font-size: 1.35rem;
  margin-bottom: .75rem;
  margin-top: 2.5rem;
}

.article-section h3 {
  font-size: 1.05rem;
  margin-bottom: .6rem;
  margin-top: 1.75rem;
}

.article-section p {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: .85rem;
  line-height: 1.75;
  max-width: none;
  text-align: justify;
}

.article-photo {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.article-photo img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

.article-photo--last { margin-bottom: 0; }

/* ---------- Article equipment (details/summary) --------------------------- */
.article-equipment {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.article-equipment summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  user-select: none;
  background: var(--bg-alt);
}

.article-equipment summary::before {
  content: '▶';
  font-size: .65rem;
  transition: transform .2s;
  color: var(--text-muted);
}

.article-equipment[open] summary::before {
  transform: rotate(90deg);
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

.equipment-group h4 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}

.equipment-group ul {
  list-style: disc;
  padding-left: 1.1rem;
  display: grid;
  gap: .3rem;
}

.equipment-group ul li {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.equipment-group ul li a {
  color: #2563eb;
  text-decoration: underline;
}

/* ---------- Gear item (obrázek + text) ------------------------------------ */
/* ---------- Photo masonry ------------------------------------------------- */
.photo-masonry {
  columns: 3;
  column-gap: .75rem;
  margin-top: 2rem;
}

.photo-masonry-item {
  break-inside: avoid;
  margin-bottom: .75rem;
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: unset;
  background: none;
}

.photo-masonry-item img {
  width: 100%;
  height: auto;
  object-fit: unset;
  display: block;
  transition: opacity .25s;
}

.photo-masonry-item:hover img {
  opacity: .88;
  transform: none;
}

@media (max-width: 840px) {
  .photo-masonry { columns: 2; }
  /* Carousel: na mobilu zobrazujeme 1 snímek místo 3 → track musí být 9× šířka */
  .carousel-track { width: 900%; }
}

@media (max-width: 480px) {
  .photo-masonry { columns: 1; }
}

/* ---------- Scroll reveal ------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Gear item (obrázek + text) ------------------------------------ */
.gear-item {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.gear-img-link {
  flex-shrink: 0;
  width: 140px;
}

.gear-img-link img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.gear-item-text h3 {
  font-size: 1rem;
  margin-bottom: .5rem;
}

.gear-item-text h3 a {
  color: #2563eb;
  text-decoration: underline;
}

.gear-item-text p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: .5rem;
  text-align: justify;
}

.gear-list {
  list-style: disc;
  padding-left: 1.1rem;
  display: grid;
  gap: .4rem;
  margin-top: .5rem;
}

.gear-list li {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: justify;
}

@media (max-width: 520px) {
  .gear-item { flex-direction: column; }
  .gear-img-link { width: 100%; max-width: 180px; }
}

/* ---------- Article map --------------------------------------------------- */
.article-map {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-open-link {
  display: inline-block;
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: .5rem .75rem .5rem 0;
  letter-spacing: .01em;
  transition: color .15s;
}

.map-open-link:hover {
  color: var(--text);
}

.article-map iframe {
  display: block;
  width: 100%;
  height: 380px;
}

/* ---------- Footer -------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}

/* ---------- Utilities ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.3rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-family: var(--font);
  text-decoration: none;
}

.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: #333; }

.btn--outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn--outline:hover { background: var(--bg-alt); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 840px) {
  .nav-toggle { display: flex; }

  .site-nav {
    /* Absolute vůči .site-header (position: sticky) — vyhne se fixed/stacking context problémům */
    position: absolute;
    top: 100%;       /* těsně pod header lištou */
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
    z-index: 9999;
    /* Skryté: max-height + opacity */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height .3s ease, opacity .2s ease;
  }

  .site-nav.is-open {
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: .85rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .site-nav a:last-child { border-bottom: none; }

  .about-layout { grid-template-columns: 1fr; }

  .about-photo { max-width: 200px; aspect-ratio: 1/1; }

  .lightbox-nav { display: none; }
}

@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { max-height: 65vh; }
  .hero-content { padding: 1.5rem; }
  .trip-meta-bar { gap: 1rem; }
}
