.g-referencehero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: var(--reference-hero-height, 360px);
  margin-left: 0;
  overflow: hidden;
  color: #fff;
  background: #0b1f3a;
}

.g-referencehero__image,
.g-referencehero__overlay {
  position: absolute;
  inset: 0;
}

.g-referencehero__image {
  z-index: -2;
  background-size: cover;
  background-position: var(--reference-hero-position, center 54%);
  background-repeat: no-repeat;
  filter: brightness(.72) saturate(.84);
  transition: filter .25s ease;
}

.g-referencehero__overlay {
  z-index: -1;
  background: linear-gradient(90deg, rgba(4, 20, 43, .9) 0%, rgba(6, 29, 59, .7) 46%, rgba(6, 26, 52, .18) 100%);
}

.g-referencehero__content {
  width: min(100%, var(--reference-hero-content-width, 1440px));
  min-height: var(--reference-hero-height, 360px);
  margin: 0 auto;
  padding: 56px clamp(26px, 6vw, 82px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.g-referencehero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: #a9c9ff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.g-referencehero__eyebrow::before {
  content: '';
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: #397cf6;
}

.g-referencehero h1 {
  max-width: 760px;
  min-height: 1.96em;
  margin: 0;
  color: #fff !important;
  font-size: clamp(2.35rem, 5vw, 4.25rem);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}

/* Automatický nadpis se zobrazí až po dosazení správné hodnoty.
   visibility zachová jeho rozměry, takže hero neposkočí. */
.g-referencehero[data-headline-source="page"] h1 {
  visibility: hidden;
}

.g-referencehero[data-headline-source="page"].is-headline-ready h1 {
  visibility: visible;
}

.g-referencehero__lead {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.55;
}

html[data-theme="light"] .g-referencehero__image,
html[data-theme-preference="light"] .g-referencehero__image {
  filter: brightness(1.03) saturate(.96);
}

html[data-theme="light"] .g-referencehero__overlay,
html[data-theme-preference="light"] .g-referencehero__overlay {
  background: linear-gradient(90deg, rgba(10, 39, 76, .8) 0%, rgba(13, 53, 97, .55) 48%, rgba(15, 50, 86, .12) 100%);
}

html[data-theme="light"] body .g-referencehero h1,
html[data-theme-preference="light"] body .g-referencehero h1,
html[data-theme="light"] body .g-referencehero__lead,
html[data-theme-preference="light"] body .g-referencehero__lead {
  color: #fff !important;
}

html[data-theme="dark"] .g-referencehero__image,
html[data-theme-preference="dark"] .g-referencehero__image,
body.dark-mode .g-referencehero__image {
  filter: brightness(.58) saturate(.78);
}

html[data-theme="dark"] .g-referencehero__overlay,
html[data-theme-preference="dark"] .g-referencehero__overlay,
body.dark-mode .g-referencehero__overlay {
  background: linear-gradient(90deg, rgba(3, 12, 28, .94) 0%, rgba(5, 22, 46, .78) 50%, rgba(4, 18, 38, .3) 100%);
}

html[data-theme="dark"] body .g-referencehero h1,
html[data-theme-preference="dark"] body .g-referencehero h1,
body.dark-mode .g-referencehero h1,
html[data-theme="dark"] body .g-referencehero__lead,
html[data-theme-preference="dark"] body .g-referencehero__lead,
body.dark-mode .g-referencehero__lead {
  color: #fff !important;
}

body.itemid-542 #g-header .g-content {
  margin: 0 !important;
  padding: 0 !important;
}

body.itemid-542 #g-header {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.itemid-542 #g-header > .g-container,
body.itemid-211 #g-header > .g-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.itemid-542 #g-header .g-grid,
body.itemid-542 #g-header .g-block,
body.itemid-211 #g-header .g-grid,
body.itemid-211 #g-header .g-block {
  width: 100% !important;
  max-width: none !important;
}

body.itemid-211 #g-header,
body.itemid-211 #g-header .g-content {
  margin: 0 !important;
  padding: 0 !important;
}

body.itemid-211 #g-mainbar .page-header {
  display: none !important;
}

body.itemid-149 #g-header,
body.itemid-149 #g-header .g-content,
body.itemid-499 #g-header,
body.itemid-499 #g-header .g-content {
  margin: 0 !important;
  padding: 0 !important;
}

body.outline-30 #g-header,
body.outline-30 #g-header .g-content {
  margin: 0 !important;
  padding: 0 !important;
}

body.outline-30 #g-header > .g-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.outline-30 #g-header .g-grid,
body.outline-30 #g-header .g-block {
  width: 100% !important;
  max-width: none !important;
}

/* Samostatné obsahové outlines: xComfort, segmenty, CB02 a Home Assistant. */
body:is(.outline-34, .outline-35, .outline-36, .outline-37, .outline-38, .outline-39) #g-header,
body:is(.outline-34, .outline-35, .outline-36, .outline-37, .outline-38, .outline-39) #g-header .g-content {
  margin: 0 !important;
  padding: 0 !important;
}

body:is(.outline-34, .outline-35, .outline-36, .outline-37, .outline-38, .outline-39) #g-header > .g-container,
body:is(.outline-34, .outline-35, .outline-36, .outline-37, .outline-38, .outline-39) #g-header .g-grid,
body:is(.outline-34, .outline-35, .outline-36, .outline-37, .outline-38, .outline-39) #g-header .g-block {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body:is(.outline-34, .outline-35, .outline-36, .outline-37, .outline-38, .outline-39) #g-mainbar .page-header {
  display: none !important;
}

body:is(.outline-40, .outline-41, .outline-42, .outline-43, .outline-44, .outline-45, .outline-46, .outline-47) #g-header,
body:is(.outline-40, .outline-41, .outline-42, .outline-43, .outline-44, .outline-45, .outline-46, .outline-47) #g-header .g-content {
  margin: 0 !important;
  padding: 0 !important;
}

body:is(.outline-40, .outline-41, .outline-42, .outline-43, .outline-44, .outline-45, .outline-46, .outline-47) #g-header > .g-container,
body:is(.outline-40, .outline-41, .outline-42, .outline-43, .outline-44, .outline-45, .outline-46, .outline-47) #g-header .g-grid,
body:is(.outline-40, .outline-41, .outline-42, .outline-43, .outline-44, .outline-45, .outline-46, .outline-47) #g-header .g-block {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body:is(.outline-40, .outline-41, .outline-42, .outline-43, .outline-44, .outline-45, .outline-46, .outline-47) #g-mainbar .page-header {
  display: none !important;
}

/* Phoca Download původně skrývá celý header; v samostatném outline 41
   je header určený pro hero a musí zůstat zobrazený. */
body.outline-41.com_phocadownload #g-header {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

body.itemid-149 #g-header > .g-container,
body.itemid-499 #g-header > .g-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.itemid-149 #g-header .g-grid,
body.itemid-149 #g-header .g-block,
body.itemid-499 #g-header .g-grid,
body.itemid-499 #g-header .g-block {
  width: 100% !important;
  max-width: none !important;
}

body.itemid-149 #g-mainbar .page-header,
body.itemid-499 #g-mainbar .page-header {
  display: none !important;
}

body.itemid-542 #g-mainbar {
  padding-top: 0 !important;
}

body.itemid-542 #g-mainbar .g-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.itemid-542 #g-mainbar .page-header {
  display: none !important;
}

@media (max-width: 767px) {
  .g-referencehero {
    min-height: var(--reference-hero-height-mobile, 250px);
  }

  .g-referencehero__content {
    width: 100%;
    min-height: var(--reference-hero-height-mobile, 250px);
    padding: 36px 24px;
  }

  .g-referencehero__overlay {
    background: linear-gradient(90deg, rgba(4, 20, 43, .9), rgba(6, 29, 59, .54));
  }

  .g-referencehero__eyebrow {
    margin-bottom: 10px;
    font-size: .7rem;
  }

  .g-referencehero h1 {
    min-height: 1.96em;
    font-size: clamp(2rem, 9vw, 2.5rem);
  }

  .g-referencehero__lead {
    margin-top: 14px;
    font-size: .95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-referencehero__image { transition: none; }
}
