:root{
  --hb-red:#d6111e;
  --hb-gold:#ddc76d;
  --hb-black:#000000;
  --hb-white:#ffffff;
}

/* Fixed header bar – maltillinen, ei peitä koko sivua */
.hb-jn-bar{
  position: fixed;
  left: 0;
  right: 0;
  top: 0; /* JS siirtää alas jos admin bar */
  z-index: 999999;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* “Divin kanssa yhteensopiva” container */
.hb-jn-container{
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
}

.hb-jn-inner{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

/* Left: logo + badge */
.hb-jn-left{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hb-jn-brand,
.custom-logo-link{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.hb-jn-brand-img,
.custom-logo{
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.hb-jn-brand-text{
  font-weight: 900;
  font-size: 14px;
  color: var(--hb-black);
  white-space: nowrap;
}

.hb-jn-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: var(--hb-red);
  color: var(--hb-white);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .2px;
  box-shadow: 0 10px 18px rgba(214,17,30,.20);
  white-space: nowrap;
}

.hb-jn-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background: var(--hb-gold);
  box-shadow: 0 0 0 3px rgba(221,199,109,.25);
}

/* Middle scroller */
.hb-jn-mid{
  overflow: hidden;
  min-width: 0;
}

.hb-jn-track{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.25) transparent;
  touch-action: pan-x;
}

.hb-jn-track::-webkit-scrollbar{ height: 8px; }
.hb-jn-track::-webkit-scrollbar-track{ background: transparent; }
.hb-jn-track::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.hb-jn-item{
  scroll-snap-align: start;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  white-space: nowrap;
}

.hb-jn-time{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 900;
  color: var(--hb-red);
  background: rgba(214,17,30,.08);
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: .3px;
  font-size: 12px;
}

.hb-jn-link{
  color: var(--hb-black);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  max-width: 48ch;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: bottom;
}
.hb-jn-link:hover{
  text-decoration: underline;
  text-decoration-color: rgba(214,17,30,.55);
}

.hb-jn-more{
  color: var(--hb-red);
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
}
.hb-jn-more:hover{
  text-decoration: underline;
  text-decoration-color: rgba(214,17,30,.55);
}

/* Right controls */
.hb-jn-right{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hb-jn-subscribe{
  border: 1px solid rgba(0,0,0,.10);
  background: var(--hb-white);
  color: var(--hb-black);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}
.hb-jn-subscribe:hover{ border-color: rgba(0,0,0,.18); }
.hb-jn-subscribe:focus{
  outline: 3px solid rgba(214,17,30,.25);
  outline-offset: 2px;
}

.hb-jn-close{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  color: var(--hb-black);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  font-size: 22px;
  line-height: 1;
}
.hb-jn-close:hover{ border-color: rgba(0,0,0,.18); }
.hb-jn-close:focus{
  outline: 3px solid rgba(214,17,30,.25);
  outline-offset: 2px;
}

/* Expandable subscription panel */
.hb-jn-panel{
  border-top: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.96);
}

.hb-jn-panel-inner{
  padding: 12px 0 14px 0;
}

.hb-jn-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hb-jn-panel-close{
  border: 1px solid rgba(0,0,0,.10);
  background: var(--hb-white);
  color: var(--hb-black);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.hb-jn-newsletter{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,.02);
}

/* Newsletter form safety */
.hb-jn-newsletter input,
.hb-jn-newsletter select,
.hb-jn-newsletter textarea{
  max-width: 100%;
  box-sizing: border-box;
}

/* Mobile tweaks */
@media (max-width: 680px){
  .hb-jn-brand-img,
  .custom-logo{ height: 24px; }

  .hb-jn-link{ max-width: 24ch; }
  .hb-jn-subscribe{ padding: 8px 10px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .hb-jn-track{ scroll-behavior: auto; }
}

