/* Samota Křemen – veřejný web. Mobile-first, bez frameworku, bez externích fontů (GDPR). */
:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #efeae0;
  --ink: #26261f;
  --muted: #6b6a5e;
  --line: #e2dccf;
  --green: #3f5a36;
  --green-ink: #2f4528;
  --green-soft: #e3ebdc;
  --accent: #a8733d;
  --free: #dce9d2;
  --tentative: #efc95e;
  --booked: #b5523f;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(38 38 31 / 6%), 0 6px 24px rgb(38 38 31 / 6%);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--sans);
  padding-bottom: 72px; /* místo pro spodní lištu na mobilu */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.45rem, 4vw, 1.9rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hlavička ---------- */
.announcement { background: var(--green); color: #fff; text-align: center; padding: 8px var(--gutter); font-size: .95rem; }
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgb(247 244 238 / 92%); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { height: 44px; width: auto; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .01em; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.main-nav { display: none; }
.main-nav.open {
  display: block; position: fixed; inset: 64px 0 0; background: var(--bg); padding: 12px var(--gutter) 96px; overflow-y: auto;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 14px 4px; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.35rem; color: var(--ink); text-decoration: none;
}
.main-nav a[aria-current="page"] { color: var(--green); }
.main-nav .nav-cta { display: none; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .nav-toggle { display: none; }
  .main-nav, .main-nav.open { display: block; position: static; padding: 0; background: none; overflow: visible; }
  .main-nav ul { display: flex; gap: 4px; align-items: center; }
  .main-nav a { border: 0; padding: 8px 12px; font: 500 .98rem var(--sans); border-radius: 999px; }
  .main-nav a:hover { background: var(--surface-2); }
  .main-nav a[aria-current="page"] { background: var(--green-soft); }
  .main-nav .nav-cta { display: block; }
  .main-nav .nav-cta a { background: var(--green); color: #fff; padding: 8px 16px; }
  .main-nav .nav-cta a:hover { background: var(--green-ink); }
}

/* ---------- Spodní lišta (mobil) ---------- */
.action-bar {
  position: fixed; inset: auto 0 0 0; z-index: 50; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.action-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
  font-size: .78rem; font-weight: 600; color: var(--ink); text-decoration: none; border-radius: 10px;
}
.action-bar a:active { background: var(--surface-2); }
.action-bar svg { width: 22px; height: 22px; stroke: var(--green); }
@media (min-width: 900px) { .action-bar { display: none; } }

/* ---------- Tlačítka a formuláře ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--green); background: var(--green); color: #fff;
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--green-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); color: var(--green-ink); }
.btn-light { background: #fff; color: var(--green-ink); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
input, textarea, select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; gap: 0 14px; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -5000px; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--green-soft); margin: 1em 0; }
.notice.error { background: #f6e1dc; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

/* ---------- Úvod ---------- */
.hero { position: relative; min-height: min(78vh, 640px); display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0%) 35%, rgb(20 24 16 / 72%)); z-index: -1; }
.hero .wrap { padding-bottom: 40px; padding-top: 80px; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 9vw, 4.2rem); margin-bottom: .2em; }
.hero p { font-size: clamp(1.05rem, 3vw, 1.3rem); max-width: 36em; margin-bottom: 1.2em; opacity: .95; }
.hero-plain { padding: 48px 0 16px; }

.tiles { display: grid; gap: 14px; margin: 32px 0; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  display: block; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; color: var(--ink); transition: transform .15s ease;
}
.tile:hover { transform: translateY(-2px); color: var(--ink); }
.tile img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.tile-body { padding: 14px 16px 18px; }
.tile h3 { margin: 0 0 4px; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

.section { padding: 24px 0; }
.split { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 3fr 2fr; } }

/* ---------- Obsah stránek ---------- */
.page-head { padding: 32px 0 8px; }
.page-head .lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.page-hero { margin: 8px 0 24px; border-radius: var(--radius); overflow: hidden; }
.page-hero img { width: 100%; max-height: 460px; object-fit: cover; }
.prose { max-width: 760px; }
.prose img { border-radius: 12px; margin: 1em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.block-wide { max-width: var(--max); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 1em 0 2em; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 10px; margin: 0; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin: 1em 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; border: 0; background-size: cover; background-position: center; cursor: pointer; }
.video-play span {
  display: inline-flex; width: 72px; height: 72px; border-radius: 50%; background: rgb(0 0 0 / 65%); color: #fff;
  align-items: center; justify-content: center; font-size: 28px;
}
.map-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgb(10 10 8 / 92%); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-height: 92vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; font-size: 26px; background: #fff; cursor: pointer; }

/* ---------- Kalendář obsazenosti ---------- */
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; margin: 8px 0 14px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.cal-scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(100%, 340px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; overscroll-behavior-x: contain;
}
.cal-scroller > * { scroll-snap-align: start; }
@media (min-width: 900px) {
  .cal-scroller { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
}
.cal-month { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.cal-month h3 { margin: 0 0 10px; font-size: 1.1rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { font-size: .72rem; text-align: center; color: var(--muted); padding-bottom: 2px; }
.cal-day {
  --m: var(--free); --e: var(--free);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px;
  font-size: .88rem; font-weight: 600; color: var(--ink); text-decoration: none;
  background: linear-gradient(135deg, var(--m) 49.5%, var(--e) 50.5%);
}
.cal-day.past { opacity: .4; }
.cal-day.today { outline: 2px solid var(--ink); outline-offset: -2px; }
.m-tentative { --m: var(--tentative); } .e-tentative { --e: var(--tentative); }
.m-booked { --m: var(--booked); } .e-booked { --e: var(--booked); }
.m-booked.e-booked { color: #fff; }
.cal-day.inquiry::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #2b6cb0; position: absolute; transform: translate(10px, 10px); }
.cal-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-nav .btn { min-height: 40px; padding: 0 14px; }

/* ---------- Aktuality ---------- */
.news-list { display: grid; gap: 16px; }
@media (min-width: 700px) { .news-list { grid-template-columns: repeat(2, 1fr); } }
.news-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--ink); }
.news-card img { aspect-ratio: 16 / 9; object-fit: cover; }
.news-card .body { padding: 16px; }
.news-card time { font-size: .85rem; color: var(--muted); }
.news-card h3 { margin: 4px 0 6px; }
.fb-box { margin: 24px 0; }

/* ---------- Patička ---------- */
.site-footer { margin-top: 56px; background: #2b3326; color: #e9e6dc; padding: 40px 0 32px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; margin-top: 0; font-size: 1.15rem; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; } }
.site-footer input { background: rgb(255 255 255 / 8%); border-color: rgb(255 255 255 / 25%); color: #fff; }
.site-footer input::placeholder { color: rgb(255 255 255 / 60%); }
.site-footer .btn { background: #fff; color: var(--green-ink); border-color: #fff; }
.social { display: flex; gap: 10px; margin-top: 10px; }
.social a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / 25%); border-radius: 999px; text-decoration: none; }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / 15%); display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; color: #b9b5a8; font-size: .85rem; }
.footer-bottom a { color: #b9b5a8; }
