/* ==========================================================================
   Sdílené moderní CSS základy pro Dětskou skupinu Bačkůrky
   - Century Gothic + geometrický fallback (dle zadání)
   - Modern Web Guidance:
     * prevent-page-scroll-under-modal-dialog (overscroll-behavior: contain)
     * improve-text-layout-and-legibility (text-wrap: balance & pretty)
     * soft-edge-content-fade (mask-image na 20položkovém proužku fotogalerie)
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: 'Century Gothic', 'Questrial', 'Nunito Sans', 'Futura', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.05rem; /* Čitelný webový ekvivalent 11pt Century Gothic */
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 58px; /* Místo pro plovoucí přepínač variant dole */
}

/* --- Modern Web Guidance: improve-text-layout-and-legibility --- */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  margin-top: 0;
}

p, blockquote, li, .pretty-text {
  text-wrap: pretty;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Modern Web Guidance: prevent-page-scroll-under-modal-dialog --- */
dialog:modal {
  overscroll-behavior: contain;
  border: none;
  padding: 0;
  max-width: min(760px, 92vw);
  max-height: 88vh;
  width: 100%;
  border-radius: 26px;
  background: var(--surface-card, #FAF7F2);
  color: var(--text-main, #3E2C1E);
  box-shadow: 0 24px 64px rgba(58, 40, 24, 0.24);
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(46, 33, 21, 0.52);
  backdrop-filter: blur(4px);
}

.dialog-inner {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  position: relative;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(110, 75, 42, 0.14);
  padding-bottom: 1rem;
  margin-bottom: 1.4rem;
}

.dialog-close-btn {
  appearance: none;
  border: 1px solid rgba(110, 75, 42, 0.22);
  background: #FFFFFF;
  color: #4A3525;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.dialog-close-btn:hover {
  background: #F4ECE1;
  transform: scale(1.05);
}

/* --- Ceník v modální podstránce --- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.price-card {
  background: #FFFFFF;
  border: 1px solid rgba(110, 75, 42, 0.15);
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.price-card.is-featured {
  background: #F4F9F0;
  border-color: #8FB37D;
}

.price-days {
  font-weight: 700;
  color: #5C4028;
  font-size: 1.05rem;
}

.price-amount {
  font-size: 1.45rem;
  font-weight: 700;
  color: #2E4A21;
  margin-top: 0.35rem;
}

.price-amount small {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.8;
}

.price-section-box {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(110, 75, 42, 0.14);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.15rem;
}

.price-section-box h4 {
  margin: 0 0 0.5rem;
  color: #5C4028;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.included-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.included-list li {
  margin-bottom: 0.45rem;
}

/* --- Formulář pro domluvení osobní schůzky --- */
.meeting-form {
  display: grid;
  gap: 1.2rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}

.form-field {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}

.form-field label {
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.38;
  color: #4A3525;
}

.form-field label .req {
  color: #B85A3A;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.4;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(110, 75, 42, 0.24);
  background-color: #FFFFFF;
  color: #2F2117;
  margin-top: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-field input,
.form-field select {
  height: 50px;
  min-height: 50px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #9E8C7C;
  opacity: 1;
}

/* Sjednocený vzhled <select> napříč macOS Safari, Chrome i Firefoxem */
.form-field select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236E4B2A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 18px 18px;
  text-overflow: ellipsis;
}

/* Pokud ještě není vybraná hodnota (placeholder option), sladíme barvu s placeholderem inputů */
.form-field select:invalid,
.form-field select.is-placeholder {
  color: #9E8C7C;
}

.form-field select option {
  color: #2F2117;
  background-color: #FFFFFF;
}

/* Modern Web Guidance: branded-select-styling (progresivní vylepšení pro prohlížeče s podporou base-select) */
@supports (appearance: base-select) {
  .form-field select,
  .form-field select::picker(select) {
    appearance: base-select;
  }

  .form-field select {
    background-image: none;
    padding-right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
  }

  .form-field select::picker-icon {
    color: #6E4B2A;
  }

  .form-field select::picker(select) {
    background-color: #FFFDF9;
    border: 1.5px solid rgba(110, 75, 42, 0.28);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 14px 34px rgba(47, 33, 23, 0.16);
    font-family: inherit;
  }

  .form-field select option {
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
  }

  .form-field select option:hover {
    background-color: #F4ECE1;
  }

  .form-field select option::checkmark {
    color: #6E985C;
  }
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #7FA66C;
  box-shadow: 0 0 0 3px rgba(143, 179, 125, 0.25);
}

/* Modern Web Guidance: select-menu-interaction (:user-invalid + fallback) */
.form-field input:user-invalid,
.form-field select:user-invalid,
.form-field input.user-invalid-fallback,
.form-field select.user-invalid-fallback,
.form-field [aria-invalid="true"] {
  border-color: #C94A38;
  background-color: #FFF8F6;
}

.form-errors {
  background: #FFF1EE;
  border: 1px solid #E29587;
  color: #8A281A;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  font-size: 0.92rem;
}

.form-success-card {
  background: #EFF7EA;
  border: 2px solid #8FB37D;
  border-radius: 20px;
  padding: 2rem 1.6rem;
  text-align: center;
  color: #2B421E;
}

.form-success-card p {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

/* --- 20položkový horizontální proužek fotogalerie + Soft Edge Content Fade --- */
.gallery-strip-wrapper {
  position: relative;
}

.gallery-strip-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.gallery-strip-buttons {
  display: flex;
  gap: 0.5rem;
}

.gallery-nav-btn {
  appearance: none;
  border: 1.5px solid rgba(110, 75, 42, 0.24);
  background: #FFFFFF;
  color: #4A3525;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.gallery-nav-btn:hover {
  background: #F3EAE0;
  transform: translateY(-1px);
}

.gallery-strip-track {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding: 0.5rem 2.2rem 1.25rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #C8A27A rgba(200, 162, 122, 0.15);
  /* Modern Web Guidance: soft-edge-content-fade */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

@supports (not (mask-image: linear-gradient(to right, black, transparent))) and (not (-webkit-mask-image: linear-gradient(to right, black, transparent))) {
  .gallery-strip-wrapper {
    position: relative;
  }
  .gallery-strip-wrapper::after {
    content: '';
    position: absolute;
    top: 3.2rem;
    bottom: 1.25rem;
    right: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(250, 247, 242, 0), rgba(250, 247, 242, 1));
    pointer-events: none;
  }
}

.gallery-strip-item {
  flex: 0 0 235px;
  scroll-snap-align: start;
  background: #FFFFFF;
  border: 1px solid rgba(110, 75, 42, 0.14);
  border-radius: 18px;
  padding: 0.55rem;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.gallery-strip-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(74, 53, 37, 0.12);
}

.gallery-thumb-wrap {
  position: relative;
  width: 100%;
  height: 156px;
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb-illustrated svg {
  width: 78%;
  height: 78%;
}

.gallery-num {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(47, 33, 23, 0.72);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.gallery-badge-prepare {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #5C4028;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.gallery-caption {
  padding: 0.65rem 0.4rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.gallery-cat {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7D5E42;
  font-weight: 700;
}

.gallery-title {
  font-size: 0.88rem;
  line-height: 1.35;
  color: #3B291B;
}

/* --- Lightbox --- */
.lightbox-media-frame {
  width: 100%;
  height: min(420px, 55vh);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.lightbox-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-media-svg svg {
  width: 220px;
  height: 170px;
}

.lightbox-meta {
  text-align: center;
}

.lightbox-counter {
  font-size: 0.85rem;
  color: #7D5E42;
  font-weight: 700;
}

.lightbox-nav-bar {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

/* --- Cookies lišta (dle zadání H) --- */
.cookie-banner {
  position: fixed;
  bottom: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, 94vw);
  background: #FFFDF9;
  border: 2px solid #C8A27A;
  border-radius: 22px;
  padding: 1.1rem 1.4rem;
  box-shadow: 0 18px 46px rgba(47, 33, 23, 0.22);
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-text {
  flex: 1 1 480px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #3E2C1E;
}

.cookie-links {
  margin-top: 0.35rem;
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.cookie-links a {
  color: #6E4B2A;
  font-weight: 700;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.cookie-btn-accept {
  background: #7FA66C;
  color: #FFFFFF;
  border: none;
  padding: 0.68rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cookie-btn-accept:hover {
  background: #6B9258;
}

.cookie-btn-settings {
  background: #F4ECE1;
  color: #4A3525;
  border: 1px solid rgba(110, 75, 42, 0.25);
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

/* --- Plovoucí přepínač 3 variant dole --- */
.variant-switcher-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2E2118;
  color: #FAF7F2;
  z-index: 1000;
  padding: 0.45rem 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  font-size: 0.84rem;
}

.vs-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.vs-home {
  color: #F9E398;
  text-decoration: none;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.vs-home:hover {
  background: rgba(255, 255, 255, 0.16);
}

.vs-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.vs-tab {
  color: #E6DDD3;
  text-decoration: none;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  transition: background-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.vs-tab:hover {
  background: rgba(255, 255, 255, 0.18);
}

.vs-tab.is-active {
  background: #A3C193;
  color: #1F2E18;
  font-weight: 700;
}

.vs-ref-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: #D8E6F3;
  font-size: 0.8rem;
  user-select: none;
  white-space: nowrap;
}

.vs-ref-toggle input {
  accent-color: #A3C193;
}

/* --- Interaktivní mapka v sekci Kontakt / Patička --- */
.map-embed-card {
  margin-top: 2rem;
  background: #FFFFFF;
  border: 2px solid rgba(110, 75, 42, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(74, 53, 37, 0.08);
}

.map-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: #FAF6EE;
  border-bottom: 1px solid rgba(110, 75, 42, 0.14);
  flex-wrap: wrap;
}

.map-card-address {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #3E2C1E;
  font-size: 0.98rem;
}

.map-pin-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E9F3DF;
  color: #4F7D3E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.map-external-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #7AA267;
  color: #FFFFFF !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  transition: background-color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.map-external-btn:hover {
  background: #638A50;
  transform: translateY(-1px);
}

.map-iframe-wrap {
  position: relative;
  width: 100%;
  height: 340px;
  background: #EAE3D5;
}

.map-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 96px;
  }
  .cookie-banner {
    bottom: 102px;
    padding: 0.95rem 1.1rem;
  }
  .vs-inner {
    justify-content: center;
  }
  .map-iframe-wrap {
    height: 260px;
  }
}
