/* ==========================================================================
   Blog — index, archive and single post.

   These are child-theme PHP templates, not Elementor, because there is no
   Theme Builder without Pro. They reuse the Elementor pages' own classes
   (.hbr-svc__main, .hbr-svc__side, .hbr-sidecard, .hbr-svcnav, .hbr-ph,
   .hbr-inlinecta) so the blog is not visibly a different site.
   ========================================================================== */

/* --- Shared template shell ------------------------------------------------ */

.hbr-tpl-banner {
  background: var(--hbr-charcoal);
  padding-block: 64px;
  border-bottom: 4px solid var(--hbr-accent);
}
.hbr-tpl-eyebrow {
  font-family: var(--hbr-font-head);
  font-size: 13px; font-weight: var(--hbr-w-bold);
  color: var(--hbr-accent);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: var(--hbr-space-2);
}
.hbr-tpl-title {
  font-family: var(--hbr-font-head);
  font-size: var(--hbr-size-h1); line-height: 1.1;
  font-weight: var(--hbr-w-extrabold);
  color: var(--hbr-white);
  margin: 0 0 var(--hbr-space-3);
}

.hbr-tpl-body { padding-block: 72px; background: var(--hbr-white); }
.hbr-tpl-body__inner { display: flex; align-items: flex-start; gap: 48px; }
.hbr-tpl-main { flex: 1 1 auto; min-width: 0; }
.hbr-tpl-side { flex: 0 0 320px; position: sticky; top: 24px; }

.hbr-tpl-sidehead {
  font-family: var(--hbr-font-head);
  font-size: 15px; font-weight: var(--hbr-w-bold);
  color: var(--hbr-charcoal);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: var(--hbr-space-5) 0 var(--hbr-space-3);
}
.hbr-tpl-side > .hbr-tpl-sidehead:first-child { margin-top: 0; }

/* --- Closing CTA ---------------------------------------------------------- */

.hbr-tpl-cta { background: var(--hbr-charcoal); padding-block: 72px; }
.hbr-tpl-cta__inner { display: flex; align-items: center; gap: 40px; }
.hbr-tpl-cta__copy { flex: 1 1 auto; }
.hbr-tpl-cta__copy h2 {
  font-family: var(--hbr-font-head);
  font-size: var(--hbr-size-h2); line-height: 1.15;
  font-weight: var(--hbr-w-extrabold);
  color: var(--hbr-white);
  margin: 0 0 var(--hbr-space-3);
}
.hbr-tpl-cta__copy p { color: rgba(255,255,255,0.78); font-size: 17px; margin: 0; }
.hbr-tpl-cta__action { flex: 0 0 auto; }
.hbr-tpl-btn {
  display: inline-block;
  background: var(--hbr-accent); color: var(--hbr-white);
  font-family: var(--hbr-font-body); font-weight: var(--hbr-w-semibold);
  font-size: var(--hbr-size-btn); letter-spacing: var(--hbr-ls-btn);
  padding: 18px 32px; border-radius: var(--hbr-radius);
  white-space: nowrap;
}
.hbr-tpl-btn:hover { background: var(--hbr-red-hover); color: var(--hbr-white); }

/* --- Post grid ------------------------------------------------------------ */

.hbr-postgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

.hbr-postcard {
  background: var(--hbr-white);
  border: 1px solid var(--hbr-hairline);
  border-radius: var(--hbr-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--hbr-shadow-s);
  transition: box-shadow var(--hbr-duration) var(--hbr-ease), transform var(--hbr-duration) var(--hbr-ease);
}
.hbr-postcard:hover { box-shadow: var(--hbr-shadow-l); transform: translateY(-3px); }

.hbr-postcard__media { position: relative; display: block; }
.hbr-postcard__media img { width: 100%; height: 220px; object-fit: cover; display: block; }
.hbr-postcard__media .hbr-ph { border: 0; border-radius: 0; }

/* Red date badge, as in the template's blog cards. */
.hbr-postcard__date {
  position: absolute; left: 16px; bottom: 16px;
  background: var(--hbr-accent); color: var(--hbr-white);
  border-radius: var(--hbr-radius-sm);
  padding: 8px 12px; text-align: center; line-height: 1;
}
.hbr-postcard__date strong { display: block; font-family: var(--hbr-font-head); font-size: 19px; font-weight: var(--hbr-w-extrabold); }
.hbr-postcard__date em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

.hbr-postcard__body { padding: var(--hbr-space-4); display: flex; flex-direction: column; flex: 1 1 auto; }
.hbr-postcard__cat {
  font-family: var(--hbr-font-head); font-size: 11px; font-weight: var(--hbr-w-bold);
  color: var(--hbr-accent); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.hbr-postcard__title { font-family: var(--hbr-font-head); font-size: 19px; line-height: 1.3; font-weight: var(--hbr-w-bold); margin: 0 0 8px; }
.hbr-postcard__title a { color: var(--hbr-charcoal); }
.hbr-postcard__title a:hover { color: var(--hbr-accent); }
.hbr-postcard__excerpt { color: var(--hbr-text-muted); font-size: 15px; line-height: 25px; margin: 0 0 var(--hbr-space-3); }
.hbr-postcard__more {
  margin-top: auto; align-self: flex-start;
  color: var(--hbr-accent); font-weight: var(--hbr-w-semibold); font-size: 15px;
}
.hbr-postcard__more::after { content: " \2192"; }
.hbr-postcard__more:hover { color: var(--hbr-red-hover); }

/* --- Pagination ----------------------------------------------------------- */

.hbr-tpl-main .navigation.pagination { margin-top: var(--hbr-space-6); }
.hbr-tpl-main .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hbr-tpl-main .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--hbr-hairline); border-radius: var(--hbr-radius-sm);
  font-family: var(--hbr-font-body); font-weight: var(--hbr-w-semibold); font-size: 15px;
  color: var(--hbr-charcoal);
}
.hbr-tpl-main .page-numbers:hover { background: var(--hbr-roofline); color: var(--hbr-accent); }
.hbr-tpl-main .page-numbers.current { background: var(--hbr-accent); border-color: var(--hbr-accent); color: var(--hbr-white); }
.hbr-tpl-main .screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Single post ---------------------------------------------------------- */

.hbr-single__meta {
  color: var(--hbr-text-muted); font-size: 15px;
  margin: 0 0 var(--hbr-space-4); display: flex; gap: 10px; align-items: center;
}
.hbr-single__media { margin-bottom: var(--hbr-space-5); }
.hbr-single__media img { width: 100%; height: auto; border-radius: var(--hbr-radius); display: block; }

.hbr-single__content { color: var(--hbr-text-muted); font-size: 17px; line-height: 30px; }
.hbr-single__content h2 {
  font-family: var(--hbr-font-head); font-size: 28px; line-height: 1.2;
  font-weight: var(--hbr-w-extrabold); color: var(--hbr-charcoal);
  margin: var(--hbr-space-6) 0 var(--hbr-space-3);
}
.hbr-single__content h3 {
  font-family: var(--hbr-font-head); font-size: 21px; font-weight: var(--hbr-w-bold);
  color: var(--hbr-charcoal); margin: var(--hbr-space-5) 0 var(--hbr-space-2);
}
.hbr-single__content p { margin: 0 0 var(--hbr-space-4); }
.hbr-single__content ul, .hbr-single__content ol { margin: 0 0 var(--hbr-space-4) 22px; }
.hbr-single__content li { margin-bottom: 8px; }
.hbr-single__content a { color: var(--hbr-accent); text-decoration: underline; text-underline-offset: 3px; }
.hbr-single__content blockquote {
  border-left: 4px solid var(--hbr-accent);
  background: var(--hbr-roofline);
  margin: var(--hbr-space-5) 0; padding: var(--hbr-space-4);
  border-radius: 0 var(--hbr-radius) var(--hbr-radius) 0;
}
.hbr-single__content blockquote p:last-child { margin-bottom: 0; }

/* --- Prev / next ---------------------------------------------------------- */

.hbr-postnav { display: flex; gap: 16px; margin-top: var(--hbr-space-6); }
.hbr-postnav__item {
  flex: 1 1 0; border: 1px solid var(--hbr-hairline); border-radius: var(--hbr-radius);
  padding: var(--hbr-space-4); background: var(--hbr-white);
}
.hbr-postnav__item:hover { border-color: var(--hbr-accent); }
.hbr-postnav__item span { display: block; font-size: 13px; color: var(--hbr-text-muted); margin-bottom: 4px; }
.hbr-postnav__item strong {
  font-family: var(--hbr-font-head); font-size: 16px; font-weight: var(--hbr-w-bold);
  color: var(--hbr-charcoal); line-height: 1.3;
}
.hbr-postnav__item--next { text-align: right; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1024px) {
  .hbr-tpl-body__inner { flex-direction: column; }
  .hbr-tpl-side { flex: 1 1 auto; width: 100%; position: static; margin-top: var(--hbr-space-6); }
  .hbr-tpl-cta__inner { flex-direction: column; align-items: flex-start; }
  .hbr-tpl-body { padding-block: 56px; }
}
@media (max-width: 767px) {
  /* The CTA button is 307px of nowrap text; at 320px that broke the page by
     3px once the container gutters were counted. */
  .hbr-tpl-cta__action { width: 100%; }
  .hbr-tpl-btn { white-space: normal; padding: 16px 20px; }
  .hbr-postgrid { grid-template-columns: 1fr; gap: 20px; }
  .hbr-postnav { flex-direction: column; }
  .hbr-postnav__item--next { text-align: left; }
  .hbr-tpl-btn { width: 100%; text-align: center; }
  .hbr-tpl-banner { padding-block: 48px; }
  .hbr-single__content { font-size: 16px; line-height: 28px; }
}
