/* Shared heading scale for property pages and the public catalogues. */
:root {
  --resort-title-size: clamp(1.625rem, 1.32rem + 1.55vw, 2.375rem);
  --resort-section-size: clamp(1.3125rem, 1.17rem + .65vw, 1.625rem);
}
html body :is(#overview.st-hero, #catalog-view, #sn-home-v2, #main, #content, main, .hero, .page-head, .sn-region-hero, .sn-network-hero, .sl-detail, .text-panel, .pane-page-title, .pane-node-body) h1,
html body :is(#overview.st-hero #hotel-name, #resort-title, #sn-home-v2 #home-heading, .sn-hero-title) {
  font-size: var(--resort-title-size) !important;
  line-height: 1.16 !important;
  letter-spacing: -.02em !important;
  word-break: normal !important;
  -webkit-hyphens: manual !important;
  hyphens: manual !important;
  overflow-wrap: break-word !important;
  text-wrap: pretty;
}
html body :is(#resort-title, .hero h1) :is(.resort-name, em) { font-size: inherit !important; }
html body :is(#overview, #main, #catalog-view, #content, .hotel-sections, .sl-surface, .rs-root, .st-section-head, .pane-node-body, .sn-section-heading) h2,
html body.hotel-page main :is(h2, h2#rp-heading, h2#si-title) {
  font-size: var(--resort-section-size) !important;
  line-height: 1.25 !important;
  letter-spacing: -.012em !important;
}
html body.hotel-page #overview.st-hero .st-copy.intro {
  display: flex !important;
  padding: clamp(1.25rem, 2.5vw, 2.25rem) !important;
  gap: .75rem !important;
}
html body.hotel-page #overview.st-hero .st-copy > p:empty { display: none !important; }
html body.hotel-page #overview.st-hero .st-place {
  font-size: .875rem !important;
  line-height: 1.4 !important;
  letter-spacing: .06em !important;
}
html body.hotel-page #overview.st-hero .st-description {
  font-size: 1.0625rem !important;
  line-height: 1.5 !important;
  max-width: 46ch;
}
html body.hotel-page #overview.st-hero .st-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
}
html body.hotel-page #overview.st-hero .st-photo { min-height: 0 !important; }
html body.hotel-page #overview.st-hero .st-photo #hero-gallery:not([hidden]):not(:empty) {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
}
html body.hotel-page #overview.st-hero #hero-gallery > button.st-cover,
html body.hotel-page #overview.st-hero #hero-gallery > button:first-child,
html body.hotel-page #overview.st-hero #hero-gallery > button > img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
}
@media (min-width: 761px) {
  html body.hotel-page #overview.st-hero .st-photo { min-height: 16rem !important; }
}
@media (max-width: 760px) {
  html body.hotel-page #overview.st-hero .st-photo { aspect-ratio: 2 / 1; }
}
/* These older accessibility switches enlarge the body without changing the root rem. */
html.sn-network-readable:not([data-sana]), html.rs-contrast:not([data-sana]) {
  --resort-title-size: clamp(2rem, 1.55rem + 2.2vw, 3rem);
  --resort-section-size: clamp(1.625rem, 1.4rem + .8vw, 2rem);
}

/* CMS property templates, including the encapsulated Karacharovo header. */
html body #kar-layout, html body #kar-section-first, html body #kar-static-home#kar-static-home { --sl-h1:var(--resort-title-size,2.375rem)!important; --sl-h2:var(--resort-section-size,1.625rem)!important; }

/* Responsive alignment of catalogue, resort and price pages */
#catalog-shell-header .shell-header-main, body.rs-interior #main > .wrap, body.hotel-page #st-head .st-mast {
  width: 100%; max-width: 1200px; min-width: 0; margin-inline: auto; padding-inline: 15px; box-sizing: border-box;
}
:is(#catalog-view, #overview.st-hero, body.rs-interior #main) :is(.table-wrap, .sana-scroll, .rp-scroll) {
  min-width: 0; max-width: 100%; overflow-x: auto; box-sizing: border-box;
}
html body #catalog-view .st-catalog-copy a.st-btn { background-color: var(--st-green, #245c3b) !important; color: #fff !important; }
@media (max-width: 768px) {
  html body #catalog-shell-header:has(.st-catalog-book) { padding-inline: 0 !important; }
  html body #catalog-shell-header:has(.st-catalog-book) .shell-header-main {
    display: flex !important; flex-wrap: wrap; align-items: center !important; gap: 8px 12px !important;
    width: 100% !important; max-width: 1200px; margin-inline: auto; padding-inline: 15px !important; box-sizing: border-box;
  }
  #catalog-shell-header .shell-brand { flex: 1 1 12rem; min-width: 0; }
  #catalog-shell-header :is(.m-menu-btn, .shell-mobile-menu) { order: 1; }
  html body #catalog-shell-header .shell-header-contact { order: 2; flex: 1 1 15rem; min-width: 0; max-width: 100%; flex-wrap: wrap; }
  html body #catalog-shell-header .st-catalog-book { order: 3; }
  html body :is(#catalog-shell-header .shell-header-contact a[href^="tel:"], #st-head .st-contact, header.rs-root .rs-phone) {
    position: relative; z-index: 10; max-width: 100%; white-space: normal; text-decoration: none;
  }
  html body:has(#st-head, header.rs-root) :is(#st-head.topbar, header.rs-root.mh-ready) {
    display: flex !important; flex-direction: column; align-items: stretch; height: auto !important; padding-inline: 0 !important;
  }
  html body #st-head .st-wrap.st-mast, html body header.rs-root .rs-wrap.rs-mast {
    display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px 12px !important;
    width: 100% !important; min-width: 0; height: auto !important; margin-inline: auto; padding-inline: 15px !important; box-sizing: border-box;
  }
  html body #st-head .st-tools, html body header.rs-root .rs-mast .rs-actions { display: contents !important; }
  html body #st-head .st-brand, html body header.rs-root .rs-mast .rs-brand {
    display: flex !important; flex: 1 1 11rem; min-width: 0; max-width: 100%; overflow-wrap: anywhere;
  }
  html body :is(#st-head .st-contact, header.rs-root .rs-mast .rs-phone) { order: 1; flex: 0 1 auto; }
  html body :is(#st-head .st-mast > .st-btn, header.rs-root .rs-mast .rs-btn, #catalog-shell-header .st-catalog-book) {
    position: static !important; transform: none !important; max-width: 100%; min-width: 0; white-space: normal;
  }
  html body :is(#st-head .st-mast > .st-btn, header.rs-root .rs-mast .rs-btn) { order: 2; }
  html body header.rs-root .rs-mast .rs-contrast-control { order: 3; }
  html body :is(#st-head, header.rs-root.mh-ready) > :is(nav, .sn-section-menu, .mh-toggle, .mh-font) { box-sizing: border-box; max-width: 100%; padding-inline: 15px !important; }
  html body.hotel-page #overview.st-hero:not([data-rm-hero]), #catalog-view .st-catalog-hero {
    position: relative; overflow: hidden; grid-template-columns: minmax(0, 1fr) !important;
  }
  html body.hotel-page #overview.st-hero:not([data-rm-hero]) > .st-copy { grid-area: 1 / 1 !important; }
  html body.hotel-page #overview.st-hero:not([data-rm-hero]) > .st-photo { position: relative; grid-area: 2 / 1 !important; width: 100%; max-width: 100%; overflow: hidden; }
  html body.hotel-page #overview.st-hero .st-actions { position: static; flex-wrap: wrap; align-items: center; justify-content: center; width: 100%; min-width: 0; }
  html body.hotel-page #overview.st-hero .st-actions .st-btn { position: static; box-sizing: border-box; display: block; width: fit-content; max-width: 100%; margin-inline: auto; white-space: normal; text-align: center; }
  body:has(#catalog-shell-header, #st-head, header.rs-root .rs-mast) :is(.home-bar, .mobile-actions) { box-sizing: border-box; max-width: 100%; z-index: 999 !important; }
  html body :is(.home-bar, .mobile-actions) > :is(a, button) { min-width: 0; max-width: 100%; flex-shrink: 1; white-space: normal !important; }
  body:has(#catalog-shell-header, #st-head, header.rs-root .rs-mast):has(.home-bar, .mobile-actions):not(:has(.rm-chat-bar)) { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  html body .rm-head:has(+ #st-head, + header.rs-root.mh-ready) { display: none !important; }
  html body.hotel-page #overview.st-hero [data-rm-copy] .st-actions { display: flex !important; }
  html body.hotel-page #overview.st-hero [data-rm-copy]:has(.st-actions) > .rm-book { display: none !important; }
}
