/* ============================================================
   HBM BLOGGEN — PRO STYLE (FINAL + JNEWS FIX + FIRST CARD FIX)
   File: assets/css/hbm-bloggen.css
   ============================================================ */

/* ------------------------------------------------------------
   0) Tokens (scoped to wrapper)
   ------------------------------------------------------------ */
.hbm-blog-wrap{
  --hbm-bg: #0b0f17;
  --hbm-surface: rgba(255,255,255,.06);
  --hbm-surface2: rgba(255,255,255,.10);
  --hbm-stroke: rgba(255,255,255,.12);
  --hbm-text: rgba(255,255,255,.92);
  --hbm-muted: rgba(255,255,255,.70);

  --hbm-gold: #d6ad61;
  --hbm-gold2: #cbb682;

  --hbm-radius: 18px;
  --hbm-radius2: 22px;

  --hbm-shadow: 0 18px 60px rgba(0,0,0,.35);
  --hbm-shadow2: 0 10px 26px rgba(0,0,0,.28);

  --hbm-max: 980px;
  --hbm-col: 820px;

  /* Consistent image sizes */
  --hbm-img-ratio: 16/10;      /* cards */
  --hbm-img-ratio-vote: 16/10; /* vote cards */
  --hbm-img-maxh: 220px;
  --hbm-img-minh: 160px;

  color: var(--hbm-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  letter-spacing: .1px;
  line-height: 1.7;

  padding: clamp(14px, 2vw, 22px);
  margin: 0 auto;
  max-width: var(--hbm-max);
}

.hbm-blog-wrap *{ box-sizing:border-box; }
.hbm-blog-wrap a{ color: inherit; text-decoration: none; }
.hbm-blog-wrap a:hover{ opacity:.95; }

.hbm-blog-wrap h1,
.hbm-blog-wrap h2,
.hbm-blog-wrap h3{
  margin: 0 0 10px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hbm-blog-wrap h1{ font-size: clamp(30px, 3.2vw, 54px); font-weight: 900; }
.hbm-blog-wrap h2{ font-size: clamp(20px, 2.2vw, 30px); font-weight: 850; }
.hbm-blog-wrap h3{ font-size: clamp(16px, 1.6vw, 20px); font-weight: 800; }

.hbm-blog-wrap p{
  margin: 0 0 14px;
  color: var(--hbm-muted);
  font-size: 17px;
}

.hbm-blog-wrap strong{ color: var(--hbm-text); }

/* ------------------------------------------------------------
   1) Sections
   ------------------------------------------------------------ */
.hbm-blog-wrap .hbm-section{
  max-width: var(--hbm-col);
  margin: 0 auto;
  padding: clamp(14px, 2.2vw, 26px) 0;
}

.hbm-blog-wrap .hbm-section + .hbm-section{
  border-top: 1px solid var(--hbm-stroke);
}

/* ------------------------------------------------------------
   2) Hero
   ------------------------------------------------------------ */
.hbm-hero{
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hbm-stroke);
  background:
    radial-gradient(1200px 420px at 20% 0%, rgba(214,173,97,.22), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: var(--hbm-radius2);
  box-shadow: var(--hbm-shadow);
  padding: clamp(18px, 3vw, 34px);
  margin: 10px auto 18px;
  max-width: var(--hbm-col);
}

.hbm-heroInner{ max-width: 820px; }
.hbm-hero p{ margin-top: 10px; font-size: 18px; color: var(--hbm-muted); }

/* ------------------------------------------------------------
   3) Lists
   ------------------------------------------------------------ */
.hbm-list{
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.hbm-list li{
  padding: 10px 12px;
  margin: 10px 0;
  border: 1px solid var(--hbm-stroke);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  color: var(--hbm-muted);
}

/* ------------------------------------------------------------
   4) CTA footer + buttons
   ------------------------------------------------------------ */
.hbm-cta{
  max-width: var(--hbm-col);
  margin: 16px auto 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 4px;
}

.hbm-btn{
  appearance:none;
  border: 1px solid rgba(214,173,97,.45);
  background: linear-gradient(135deg, rgba(214,173,97,.95), rgba(203,182,130,.88));
  color: #111;
  font-weight: 900;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
  transition: transform .12s ease, opacity .12s ease;
}

.hbm-btn:hover{ transform: translateY(-1px); }

.hbm-btn.ghost{
  background: rgba(255,255,255,.06);
  color: var(--hbm-text);
  border-color: var(--hbm-stroke);
  box-shadow: none;
}

/* ------------------------------------------------------------
   5) Grid cards — consistent image frame + placeholder
   ------------------------------------------------------------ */
.hbm-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.hbm-card{
  grid-column: span 6;
  border-radius: var(--hbm-radius);
  overflow: hidden;
  border: 1px solid var(--hbm-stroke);
  background: rgba(255,255,255,.05);
  box-shadow: var(--hbm-shadow2);
  display: flex;
  flex-direction: column;
  min-height: 240px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.hbm-card:hover{
  transform: translateY(-2px);
  border-color: rgba(214,173,97,.34);
  background: rgba(255,255,255,.06);
}

/* IMPORTANT:
   JNews sometimes overrides image heights. We force a stable frame. */
.hbm-cardMedia{
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--hbm-img-ratio);
  min-height: var(--hbm-img-minh);
  max-height: var(--hbm-img-maxh);
  background:
    radial-gradient(700px 240px at 20% 20%, rgba(214,173,97,.20), transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
}

.hbm-cardImg{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: center;
  display:block;
  position: relative;
  z-index: 2;
}

.hbm-cardPh{
  position:absolute;
  inset:0;
  z-index: 1;
  background:
    radial-gradient(700px 240px at 20% 20%, rgba(214,173,97,.20), transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
}

.hbm-cardShade{
  position:absolute;
  inset:0;
  z-index: 3;
  background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,.55) 100%);
  pointer-events:none;
}

.hbm-badge{
  position:absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17,17,17,.72);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 12px;
}

.hbm-rate{
  position:absolute;
  z-index: 4;
  bottom: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17,17,17,.72);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 12px;
}

.hbm-rate em{ font-style: normal; color: rgba(255,255,255,.75); font-weight: 800; }

.hbm-cardBody{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.hbm-cardTitle{
  margin: 0;
  color: var(--hbm-text);
  font-size: 18px;
  font-weight: 900;
}

.hbm-cardMeta{
  color: rgba(255,255,255,.72);
  font-size: 13px;
  display: grid;
  gap: 6px;
}

.hbm-line{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hbm-cardActions{
  margin-top: auto;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.hbm-pill{
  border: 1px solid var(--hbm-stroke);
  background: rgba(255,255,255,.06);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,.82);
}

.hbm-pill.gold{
  border-color: rgba(214,173,97,.45);
  background: rgba(214,173,97,.14);
  color: rgba(255,255,255,.92);
}

.hbm-empty{
  max-width: var(--hbm-col);
  margin: 10px auto 0;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,.20);
  border-radius: 16px;
  color: rgba(255,255,255,.75);
}

/* ------------------------------------------------------------
   6) Vote page
   ------------------------------------------------------------ */
.hbm-votePage .hbm-section{ max-width: var(--hbm-max); }

.hbm-voteGrid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.hbm-vCard{
  grid-column: span 6;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  border: 1px solid var(--hbm-stroke);
  border-radius: var(--hbm-radius);
  overflow: hidden;
  background: rgba(255,255,255,.05);
  box-shadow: var(--hbm-shadow2);
}

.hbm-vMedia{
  position: relative;
  overflow:hidden;
  aspect-ratio: var(--hbm-img-ratio-vote);
  min-height: 160px;
  background:
    radial-gradient(520px 260px at 35% 20%, rgba(214,173,97,.18), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  display:block;
}

.hbm-vImg{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  position: relative;
  z-index: 2;
}

.hbm-vPh{
  position:absolute;
  inset:0;
  z-index: 1;
}

.hbm-vOverlay{
  position:absolute;
  inset:0;
  z-index: 3;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.55) 100%);
  pointer-events:none;
}

.hbm-vRate{
  position:absolute;
  z-index: 4;
  bottom: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17,17,17,.72);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 12px;
}

.hbm-vBody{
  padding: 12px 12px 14px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.hbm-vName{ font-weight: 950; font-size: 16px; color: var(--hbm-text); }
.hbm-vVotes{ font-size: 13px; color: rgba(255,255,255,.78); }
.hbm-voteCount{ font-weight: 950; color: rgba(255,255,255,.92); }

.hbm-vActions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hbm-vBtn{
  appearance:none;
  border: 1px solid rgba(214,173,97,.45);
  background: rgba(214,173,97,.16);
  color: rgba(255,255,255,.92);
  font-weight: 950;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}

.hbm-vBtn:hover{ transform: translateY(-1px); }

.hbm-vBtn.ghost{
  background: rgba(255,255,255,.06);
  border-color: var(--hbm-stroke);
}

.hbm-vBtn.link{
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
  color: rgba(255,255,255,.82);
  text-decoration: underline;
}

.hbm-vMsg{
  min-height: 18px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

.hbm-vMsg.is-ok{ color:#4fd18b; }
.hbm-vMsg.is-warn{ color:#f2d48e; }
.hbm-vMsg.is-err{ color:#ff6b6b; }

.hbm-vBtn.is-loading{
  opacity: .75;
  pointer-events: none;
  filter: saturate(.9);
}

/* ------------------------------------------------------------
   7) Social Pack
   ------------------------------------------------------------ */
.hbm-socialPack{
  max-width: var(--hbm-col);
  margin: 18px auto 10px;
  border: 1px solid var(--hbm-stroke);
  background: rgba(255,255,255,.05);
  border-radius: var(--hbm-radius2);
  padding: 14px;
  box-shadow: var(--hbm-shadow2);
}

.hbm-spHead{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hbm-spHead h2{ margin:0; }

.hbm-spHead p{
  margin:6px 0 0;
  color: var(--hbm-muted);
}

.hbm-spJson{
  width:100%;
  min-height: 260px;
  border-radius: 14px;
  border: 1px solid var(--hbm-stroke);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.86);
  padding: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.hbm-spHint{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.70);
}

/* ------------------------------------------------------------
   8) Responsive
   ------------------------------------------------------------ */
@media (max-width: 980px){
  .hbm-card{ grid-column: span 12; }
  .hbm-vCard{ grid-column: span 12; }
}

@media (max-width: 620px){
  .hbm-hero{ padding: 16px; }
  .hbm-blog-wrap{ padding: 12px; }

  .hbm-vCard{ grid-template-columns: 1fr; }
  .hbm-vMedia{ min-height: 190px; }

  .hbm-cta{ flex-direction: column; }
  .hbm-btn{ width: 100%; }

  .hbm-cardMedia{
    min-height: 190px;
    max-height: 260px;
    aspect-ratio: 16/11;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .hbm-card, .hbm-btn, .hbm-vBtn{ transition: none !important; }
}

/* ============================================================
   9) CRITICAL: JNEWS MOBILE LAYOUT FIX (ONLY WHEN BLOGGEN EXISTS)
   - Fix narrow content column + huge empty side space
   - Push sidebar below content
   ============================================================ */
@media (max-width: 900px){

  /* full width wrapper */
  .hbm-blog-wrap{
    width: 100% !important;
    max-width: 100% !important;
  }

  /* common JNews wrappers */
  .jeg_main,
  .jeg_main_content,
  .jeg_content,
  .jeg_section,
  .container,
  .content-inner,
  .content-wrapper{
    width: 100% !important;
    max-width: 100% !important;
  }

  /* force one column layout */
  .jeg_main,
  .jeg_main_content,
  .jeg_content,
  .jeg_section{
    display: block !important;
  }

  /* sidebar goes under */
  .jeg_sidebar,
  .sidebar,
  aside{
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    margin-top: 18px !important;
  }

  .hbm-grid{
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   10) FIX: ONLY TOP (FIRST) RESTAURANT CARD
   - Sometimes first image is broken/blocked => empty block
   - This keeps a stable height frame always
   ============================================================ */
.hbm-grid > .hbm-card:first-child .hbm-cardMedia{
  min-height: var(--hbm-img-minh) !important;
  max-height: var(--hbm-img-maxh) !important;
  aspect-ratio: var(--hbm-img-ratio) !important;
}

.hbm-grid > .hbm-card:first-child{
  margin-top: 0 !important;
}