:root {
  --green: #29372c;
  --dark: #202c22;
  --gold: #b89a61;
  --paper: #f3f0e8;
  --paper-dark: #e8e4d9;
  --text: #292b27;
  --white: #fff;
  --border: #ddd7c9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: #435746; }

header {
  background: var(--green);
  color: white;
  padding: 18px 5%;
  border-bottom: 4px solid var(--gold);
  position: relative;
  z-index: 10;
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

/* Logo a název webu */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: bold;
  min-width: 0;
}

/* Responzivní logo */
header .brand img {
  display: block;
  width: clamp(52px, 9vw, 110px);
  height: auto;
  max-width: none;
  flex: 0 0 auto;
  object-fit: contain;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
}

.brand:hover {
  color: #e2c58a;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

nav a {
  color: white;
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  color: #e2c58a;
}

.hero {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 78px 20px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.15;
  margin: 10px 0;
}

.hero p { color: #e0dfd5; }

.button {
  display: inline-block;
  background: var(--gold);
  color: #20251f;
  padding: 12px 24px;
  margin-top: 15px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-weight: bold;
  border: 0;
  cursor: pointer;
  border-radius: 8px 8px 8px 8px;
}

.button:hover { background: #d0b47d; }

.container {
  max-width: 1100px;
  margin: auto;
  padding: 48px 20px;
}

.page-title {
  text-align: center;
  margin-bottom: 32px;
}

.page-title h1,
h2, h3 {
  color: var(--green);
}

.page-title h1 {
  font-weight: normal;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.2;
}

.intro {
  max-width: 700px;
  margin: auto;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.card {
  background: white;
  border: 1px solid var(--border);
  min-width: 0;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-dark);
}

.card-content { padding: 20px; }
.card h3 { margin-top: 0; }

.about {
  background: var(--paper-dark);
  text-align: center;
  padding: 35px 20px;
}

.contact { text-align: center; }

.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 25px 0;
}

.filters button {
  padding: 9px 15px;
  border: 1px solid var(--gold);
  background: white;
  color: var(--green);
  cursor: pointer;
  font: inherit;
}

.filters button.active,
.filters button:hover {
  background: var(--green);
  color: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item {
  display: block;
  padding: 0;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  min-width: 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-dark);
}

.gallery-item:hover { outline: 2px solid var(--gold); }

.gallery-caption {
  display: block;
  padding: 12px 15px;
}

.gallery-caption strong {
  display: block;
  color: var(--green);
}

[hidden] { display: none !important; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .93);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 25px;
}

.lightbox.open { display: flex; }

.lightbox figure {
  margin: 0;
  max-width: 1000px;
  max-height: 90vh;
  text-align: center;
  color: white;
}

.lightbox img {
  max-height: 75vh;
  width: auto;
  max-width: 100%;
  margin: auto;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  top: 12px;
  right: 22px;
  font-size: 36px;
  background: transparent;
  color: white;
  border: 0;
  cursor: pointer;
}

.visitor-counter {
  margin-top: 14px;
  color: #e0dfd5;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.visitor-counter strong { color: #e2c58a; }

footer {
  background: var(--green);
  color: white;
  text-align: center;
  padding: 24px 16px;
  font: 14px/1.7 Arial, sans-serif;
}

footer p { margin: 4px; }
footer a { color: #e2c58a; }

@media (max-width: 700px) {
  header {
    padding: 14px 4%;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand {
    font-size: clamp(18px, 5vw, 23px);
    gap: 10px;
  }

  header .brand img {
    width: clamp(48px, 14vw, 76px);
    height: auto;
  }

  nav {
    gap: 12px;
    max-width: 100%;
  }

  .hero {
    padding: 58px 20px;
  }

  .grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.contact a.facebook-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #b49a61;
  background: transparent;
  border: 1px solid #b49a61;
  border-radius: 50%;
  text-decoration: none;
  transition: color 0.2s ease,
              background-color 0.2s ease,
              border-color 0.2s ease;
}

.contact a.facebook-icon:hover {
  color: #fff;
  background-color: #303b2b;
  border-color: #fff;
}

/* Globální responzivní rozložení stránky – footer vždy dole */
html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > header,
body > footer {
  flex-shrink: 0;
}

body > main {
  flex: 1 0 auto;
}

/* Název fotografie je ve výchozím stavu skrytý. */
#lightboxCaption[hidden] {
  display: none !important;
}

/* Informační tlačítko v okně galerie */
#lightbox .lightbox-info {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* Název se zobrazí pouze po kliknutí na ⓘ */
#lightboxCaption:not([hidden]) {
  display: block;
  margin-top: 12px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  text-align: center;
  border-radius: 6px;
}

/* Informační ikona v okně zvětšené fotografie */
#lightbox figure {
  position: relative;
  padding-bottom: 4px;
}

#lightbox .lightbox-info {
  position: absolute;
  top: auto;
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.8);
  color: white;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

#lightbox .lightbox-info:hover {
  background: var(--green);
  border-color: var(--gold);
}

#lightbox .lightbox-info:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

#lightboxCaption[hidden] {
  display: none !important;
}

#lightboxCaption:not([hidden]) {
  display: block;
  max-width: min(90vw, 700px);
  margin: 14px auto 0;
  padding: 10px 16px;
  border: 1px solid rgba(184, 154, 97, 0.6);
  border-radius: 6px;
  background: rgba(32, 44, 34, 0.95);
  color: white;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.gallery-caption {
  display: none !important;
}