.gallery-page {
  padding-top: 120px;
  background: var(--cream-2);
}

body:has(.gallery-page) .site-header {
  background: rgba(31, 51, 40, .96);
  backdrop-filter: blur(10px);
}

.gallery-hero {
  padding: 24px 0 55px;
  text-align: center;
}

.gallery-hero h1 {
  margin: 10px auto 24px;
  max-width: 760px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 700;
  line-height: .95;
}

.gallery-hero p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
}

.gallery-section {
  padding: 10px 0 110px;
}

.gallery-topic {
  margin-bottom: 74px;
  padding: 25px;
  
  border-radius: 15px;
}

.gallery-topic:last-child {
  margin-bottom: 0;
}

.gallery-topic-head {
  margin-bottom: 24px;
  text-align: center;
}

.gallery-topic-head h2 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 700;
  line-height: 1;
  color: var(--green);
}

.gallery-topic-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.gallery-slider-wrap {
  position: relative;
}

.gallery-grid {
  display: flex;
  gap: 18px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.gallery-grid::-webkit-scrollbar {
  display: none;
}

.gallery-grid.is-centered {
  justify-content: center;
}

.gallery-grid img {
  display: block;
  flex: 0 0 calc((100% - 54px) / 4);
  min-width: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(31, 51, 40, .09);
  scroll-snap-align: start;
}

.gallery-slider-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(31, 51, 40, .18);
  border-radius: 50%;
  color: var(--green);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 28px rgba(31, 51, 40, .15);
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.gallery-slider-arrow:hover:not(:disabled) {
  background: var(--white);
  transform: translateY(-50%) scale(1.05);
}

.gallery-slider-arrow:disabled {
  opacity: .38;
  cursor: default;
}

.gallery-slider-arrow.is-hidden {
  display: none;
}

.gallery-slider-arrow-left {
  left: -18px;
}

.gallery-slider-arrow-right {
  right: -18px;
}

.gallery-slider-arrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.gallery-slider-arrow-left::before {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.gallery-slider-arrow-right::before {
  transform: rotate(45deg);
  margin-right: 4px;
}

/* =========================================================
   CTA BANNER
========================================================= */

.cta-home {
  padding: 95px 0;
  color: rgba(255,255,255,.85);
  background: var(--green);
  text-align: center;
}

.cta-home h2 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 700;
  line-height: .95;
  color: var(--white);
}

.cta-home p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: rgba(255,255,255,.78);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 980px) {
  .gallery-page {
    padding-top: 105px;
  }

  .gallery-grid img {
    flex-basis: calc((100% - 18px) / 2);
  }
}

@media (max-width: 640px) {
  .gallery-page {
    padding-top: 112px;
  }

  .gallery-hero {
    padding: 10px 0 40px;
    text-align: center;
  }

  .gallery-hero h1 {
    font-size: 42px;
  }

  .gallery-topic {
    margin-bottom: 54px;
    padding: 18px;
  }

  .gallery-grid {
    gap: 14px;
  }

  .gallery-grid img {
    flex-basis: 100%;
  }

  .gallery-slider-arrow {
    width: 40px;
    height: 40px;
  }

  .gallery-slider-arrow-left {
    left: -12px;
  }

  .gallery-slider-arrow-right {
    right: -12px;
  }

  .cta-home {
    padding: 55px 0;
  }

  .hero-actions {
    justify-content: center;
  }
}

.gallery-empty {
  margin: 0;
  padding: 28px;
  border: 1px solid rgba(31, 51, 40, .12);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

/* Samsung Internet / automaticky dark mode: sipky galerie jako SVG obrazek,
   aby se jejich tah neprebarvoval spolu s currentColor. */
.gallery-slider-arrow {
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 22px 22px !important;
  forced-color-adjust: none;
  -webkit-print-color-adjust: exact;
}

.gallery-slider-arrow::before {
  content: none !important;
  display: none !important;
}

.gallery-slider-arrow-left {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 4L7 12L15 20' fill='none' stroke='%23c8a464' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

.gallery-slider-arrow-right {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4L17 12L9 20' fill='none' stroke='%23c8a464' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
