:root{
  --page-width: 1200px;
  --hero-height-desktop: 150px;
  --hero-height-mobile: 180px;
  --hero-gap-top: 0px;
  --content-hpad: 10px;
}

/* ===== ZÁKLAD HLAVIČKY / HERO ===== */

.backhead{
  position: relative;
  height: var(--hero-height-desktop);
  min-height: var(--hero-height-desktop);
  overflow: hidden;

  /* zrušit starý gradient/rámečky ještě před načtením zbytku CSS */
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* pozadí s fotkou za textem */
.hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  filter: blur(2px);
  opacity: .85;
}

/* průhledné "sklo" přes header */
.backhead .headerbar{
  position: relative;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;

  height: calc(100% - var(--hero-gap-top));
}
.backhead .headerbar::before{
  content:"";
  position:absolute;
  left:50%;
  top: var(--hero-gap-top);
  transform: translateX(-50%);

  width: 100%;
  max-width: calc(var(--page-width) + 2 * var(--content-hpad));
  height: calc(100% - var(--hero-gap-top));

  background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  border: none;
  outline:none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);

  z-index: 0;
  pointer-events: none;
}

/* vnitřek hlavičky (logo, název fóra, vyhledávání) */
.headerbar .inner{
  position: relative;
  z-index: 1;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 14px 18px;
}

/* hlavní obsah stránky pod hlavičkou */
.wrap{
  max-width: var(--page-width);
  margin-inline: auto;
}

/* mobilní úpravy rozměrů – taky MUSÍ být tady, aby se ani na mobilu nic neposunulo
   (ať je layout stabilní už od prvního renderu) */
@media (max-width: 768px){
  .backhead{
    height: var(--hero-height-mobile) !important;
    min-height: var(--hero-height-mobile) !important;
  }

  .hero-bg img{
    object-position: 50% 28%;
  }

  .backhead .headerbar::before{
    max-width: 100% !important;
    border-radius: 8px !important;
  }

  #site-description{
    text-align:center;
  }
  #site-description .logo{
    display:inline-block;
    margin: 6px auto 4px;
  }
  #site-description .site-title{
    display:block !important;
    visibility:visible !important;
    margin: 2px auto 0 !important;
    color:#fff !important;
    font-weight:700;
    font-size: clamp(18px, 1.4vw, 32px);
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
  }
  #site-description p{
    display:none !important;
  }

  .headerbar .inner{
    padding: 12px 14px;
    z-index:2 !important;
  }
}

/* základní typografie titulku, aby se nedeformoval po načtení zbytku CSS */
.site-title,
.site-title a {
  font-family: 'Open Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: .2px;
  text-decoration: none;
  text-transform: none;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 900px){
  .site-title,
  .site-title a {
    font-size: 18px;
  }
}

/* abychom neztratili klikatelnost v headeru */
.backhead .headerbar { position: relative; }
.backhead .headerbar::before { pointer-events: none; }
#search-box { position: relative; z-index: 3; }
#g3-search-box { position: relative; z-index: 3; }
