/* ============================================================
   BHR - CLEAN LAYOUT + TYPOGRAPHY (FINAL)
   Put this at the VERY END of style.css
   ============================================================ */

/* -------------------------
   0) Variables
   ------------------------- */
:root{
  --container-width: 1200px;
  --sidebar-width: 260px;
  --rightbar-width: 320px;

  --color-text: #1d1d1f;
  --color-border: rgba(235, 238, 243, .95);

  /* Fonts (IMPORTANT: straight quotes " ") */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", ui-serif, Georgia, "Times New Roman", Times, serif;

  /* Body */
  --body-size: 15.5px;
  --body-line: 1.75;

  /* Headings (smaller + elegant) */
  --h1: clamp(22px, 3.0vw, 32px);
  --h2: clamp(18px, 2.1vw, 24px);
  --h3: clamp(16px, 1.7vw, 20px);
  --h4: clamp(15px, 1.4vw, 18px);
}

/* Mobile tighten */
@media (max-width: 1024px){
  :root{
    --body-size: 15px;
    --body-line: 1.72;

    --h1: clamp(20px, 6.0vw, 28px);
    --h2: clamp(17px, 5.0vw, 22px);
    --h3: clamp(15px, 4.4vw, 19px);
    --h4: clamp(14px, 4.0vw, 17px);
  }
}

/* -------------------------
   1) Base
   ------------------------- */
html, body{
  font-family: var(--font-sans);
  font-size: var(--body-size);
  line-height: var(--body-line);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a{
  color: inherit;
  text-underline-offset: 3px;
}

/* -------------------------
   2) Layout
   ------------------------- */
.bhr-container{
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.bhr-grid{
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--rightbar-width);
  gap: 28px;
  padding: 28px 0 60px;
}

.bhr-sidebar{
  border-right: 1px solid var(--color-border);
  padding-right: 18px;
}

.bhr-right{
  border-left: 1px solid var(--color-border);
  padding-left: 18px;
  position: sticky;
  top: 92px;
}

@media (max-width: 1024px){
  .bhr-grid{ grid-template-columns: 1fr; }
  .bhr-sidebar, .bhr-right{ border: 0; padding: 0; }
  .bhr-right{ display:none; }
}

/* -------------------------
   3) Apple Header
   ------------------------- */
.bhr-topbar-apple{
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(246, 247, 251, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);

  border-bottom: 1px solid var(--color-border);
  box-shadow: none !important;
}

.bhr-topbar-apple-inner{
  height: 52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.bhr-apple-brand{
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--color-text);
  text-decoration: none;
  padding: 6px 0;
}

.bhr-apple-actions{
  display:flex;
  align-items:center;
  gap: 12px;
}

.bhr-apple-icon{
  width: 36px;
  height: 36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  border: 0;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;

  color: var(--color-text);
  box-shadow:none !important;

  transition: opacity .16s ease, transform .16s ease;
}

.bhr-apple-icon:hover{ opacity: .75; }
.bhr-apple-icon:active{ transform: translateY(1px); }

.bhr-apple-icon svg{
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bhr-apple-cta{
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;

  background: #0a66ff;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  transition: opacity .16s ease, transform .16s ease;
}

.bhr-apple-cta:hover{ opacity: .9; }
.bhr-apple-cta:active{ transform: translateY(1px); }

.bhr-topbar-apple .bhr-search{ display:none !important; }
.bhr-topbar-apple .bhr-nav{ display:none !important; }

@media (max-width: 1024px){
  .bhr-topbar-apple-inner{ height: 54px; }
  .bhr-apple-cta{ display:none; }
  .bhr-apple-actions{ gap: 10px; }
}

/* Burger injected */
#bhr-mobile-menu-btn{
  display:none; /* ui.js toggles */
  width: 36px !important;
  height: 36px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 999px !important;
  padding: 0 !important;
  box-shadow:none !important;
  cursor:pointer !important;
  color: var(--color-text) !important;
  transition: opacity .16s ease, transform .16s ease;
}
#bhr-mobile-menu-btn:hover{ opacity:.75 !important; }
#bhr-mobile-menu-btn:active{ transform: translateY(1px) !important; }
@media (max-width:1024px){
  #bhr-mobile-menu-btn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
  }
}

/* -------------------------
   4) TYPOGRAPHY — THIS IS THE IMPORTANT PART
   (Smaller headings for single + content)
   ------------------------- */

/* Post Title (single) — catch both Gutenberg + classic */
body.single .wp-block-post-title,
body.single h1.wp-block-post-title,
body.single .entry-title,
body.single h1.entry-title,
body.single .entry-header h1{
  font-family: var(--font-serif) !important;
  font-size: var(--h1) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.02em !important;
  font-weight: 650 !important;
  margin: 0 0 12px !important;
}

/* Content area base */
body.single .entry-content,
body.single .wp-block-post-content,
body.single .wp-site-blocks .wp-block-post-content{
  font-size: 16px;
  line-height: 1.8;
  max-width: 760px;
}

/* Headings inside CONTENT only (H1-H4) */
body.single .entry-content h1,
body.single .entry-content h2,
body.single .entry-content h3,
body.single .entry-content h4,
body.single .wp-block-post-content h1,
body.single .wp-block-post-content h2,
body.single .wp-block-post-content h3,
body.single .wp-block-post-content h4,
body.single .wp-site-blocks .wp-block-post-content h1,
body.single .wp-site-blocks .wp-block-post-content h2,
body.single .wp-site-blocks .wp-block-post-content h3,
body.single .wp-site-blocks .wp-block-post-content h4{
  font-family: var(--font-serif) !important;
  letter-spacing: -0.02em !important;
  font-weight: 650 !important;
  color: var(--color-text) !important;
}

/* Sizes */
body.single .entry-content h1,
body.single .wp-block-post-content h1{ font-size: var(--h1) !important; line-height: 1.14 !important; margin: 22px 0 12px !important; }

body.single .entry-content h2,
body.single .wp-block-post-content h2{ font-size: var(--h2) !important; line-height: 1.22 !important; margin: 26px 0 12px !important; }

body.single .entry-content h3,
body.single .wp-block-post-content h3{ font-size: var(--h3) !important; line-height: 1.28 !important; margin: 20px 0 10px !important; }

body.single .entry-content h4,
body.single .wp-block-post-content h4{ font-size: var(--h4) !important; line-height: 1.32 !important; margin: 16px 0 8px !important; }

/* Cards (archive/list) */
.bhr-post-card h2,
.bhr-post-card-title,
.archive .entry-title,
.category .entry-title{
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.28;
  letter-spacing: -0.015em;
  font-weight: 650;
}

/* -------------------------
   5) Mobile Reading Mode
   (sidebar only in off-canvas)
   ------------------------- */
@media (max-width: 1024px){
  .bhr-sidebar{ display:none !important; }
  .bhr-right{ display:none !important; }
  .bhr-grid{
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding-top: 16px !important;
  }
  body.single .entry-content,
  body.single .wp-block-post-content{
    max-width: 100%;
    font-size: 15px;
  }
}
/* allow sidebar inside mobile panel */
@media (max-width: 1024px){
  #bhr-mobile-panel .bhr-sidebar{ display:block !important; }
}

/* -------------------------
   6) Mobile TOC Drawer (right sheet)
   ------------------------- */
#bhr-toc-backdrop{
  position:fixed;
  inset:0;
  background:rgba(12,12,16,.40);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  z-index:10060;
}

#bhr-toc-panel{
  position:fixed;
  top:0;
  right:0;
  height:100vh;
  width:min(86vw, 360px);
  background:#fff;
  transform:translateX(102%);
  transition:transform .20s ease;
  z-index:10061;
  border-left:1px solid var(--color-border);
  padding:16px;
  overflow:auto;
}

#bhr-toc-panel .bhr-toc-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:4px 0 10px;
}

#bhr-toc-panel .bhr-toc-links a{
  display:block;
  padding:8px 10px;
  border-radius:12px;
  text-decoration:none;
  color:rgba(29,29,31,.82);
  font-size:14px;
  line-height:1.45;
}
#bhr-toc-panel .bhr-toc-links a:hover{
  background:rgba(246,247,251,.92);
}
#bhr-toc-panel .bhr-toc-links a[data-level="3"]{
  padding-left:22px;
  opacity:.92;
}

@media (min-width: 1025px){
  #bhr-open-toc{ display:none !important; }
}
/* H1 smaller (override) */
:root{
  /* Desktop max 32 -> 30, min 22 -> 21 */
  --h1: clamp(21px, 2.7vw, 30px);
}

@media (max-width: 1024px){
  :root{
    /* Mobile max 28 -> 26 */
    --h1: clamp(19px, 5.4vw, 26px);
  }
}
/* =========================
   Comments (BHR)
   ========================= */
.bhr-comments{
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(235,238,243,.95);
}

.bhr-comments-title,
.bhr-comment-form-title{
  font-family: var(--font-serif, Georgia, serif);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.bhr-comments-empty{
  color: rgba(29,29,31,.68);
  margin: 0 0 14px;
}

.bhr-comment-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.bhr-comment-list .comment{
  padding: 14px 0;
  border-bottom: 1px solid rgba(235,238,243,.85);
}

.bhr-comment-list .comment:last-child{
  border-bottom: 0;
}

.bhr-comment-list .comment-body{
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
}

.bhr-comment-list .avatar{
  border-radius: 999px;
}

.bhr-comment-list .comment-author{
  font-weight: 650;
  letter-spacing: -0.01em;
}

.bhr-comment-list .comment-metadata{
  font-size: 13px;
  color: rgba(29,29,31,.55);
  margin-top: 2px;
}

.bhr-comment-list .comment-content{
  margin-top: 8px;
  color: rgba(29,29,31,.86);
  line-height: 1.7;
}

.bhr-comment-form-wrap{
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(235,238,243,.95);
  border-radius: 16px;
  background: rgba(246,247,251,.60);
}

.bhr-comment-note{
  font-size: 13px;
  color: rgba(29,29,31,.60);
  margin: 0 0 10px;
}

.bhr-comment-form label{
  display:block;
  font-size: 13px;
  color: rgba(29,29,31,.65);
  margin: 0 0 6px;
}

.bhr-comment-form input,
.bhr-comment-form textarea{
  width: 100%;
  border: 1px solid rgba(235,238,243,.95);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-family: var(--font-sans, -apple-system, Arial, sans-serif);
  font-size: 14px;
  outline: none;
}

.bhr-comment-form textarea{ resize: vertical; }

.bhr-comment-submit{
  margin-top: 10px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: #0a66ff;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}

.bhr-comment-submit:hover{ opacity: .92; }
/* ============================================================
   Footer (BHR) — clean, Apple-like
   ============================================================ */
.bhr-footer{
  margin-top: 44px;
  border-top: 1px solid rgba(235,238,243,.95);
  background: rgba(246,247,251,.65);
}

.bhr-footer-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding: 28px 0;
}

.bhr-footer-brand{
  display:inline-block;
  font-weight: 650;
  letter-spacing: -.02em;
  text-decoration:none;
  color: var(--color-text, #1d1d1f);
  font-size: 15px;
}

.bhr-footer-desc{
  margin: 10px 0 12px;
  color: rgba(29,29,31,.72);
  line-height: 1.65;
  font-size: 14px;
  max-width: 420px;
}

.bhr-footer-mini{
  display:flex;
  gap:8px;
  font-size: 12.5px;
  color: rgba(29,29,31,.55);
}

.bhr-footer-title{
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .02em;
  color: rgba(29,29,31,.62);
  margin-bottom: 10px;
}

.bhr-footer-links,
.bhr-footer-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap: 8px;
}

.bhr-footer-links a,
.bhr-footer-nav a{
  text-decoration:none;
  color: rgba(29,29,31,.78);
  font-size: 14px;
}

.bhr-footer-links a:hover,
.bhr-footer-nav a:hover{
  color: rgba(29,29,31,.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bhr-footer-widgets{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(235,238,243,.9);
}

.bhr-footer-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(235,238,243,.9);
}

.bhr-footer-legal{
  font-size: 12.5px;
  color: rgba(29,29,31,.55);
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.bhr-footer-dot{ opacity:.5; }

.bhr-footer-top{
  width: 34px;
  height: 34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  border: 1px solid rgba(235,238,243,.95);
  background: rgba(255,255,255,.75);
  color: rgba(29,29,31,.78);
  text-decoration:none;
  transition: opacity .16s ease, transform .16s ease;
}
.bhr-footer-top:hover{ opacity:.85; }
.bhr-footer-top:active{ transform: translateY(1px); }

@media (max-width: 1024px){
  .bhr-footer-grid{
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 0;
  }
  .bhr-footer-bottom{
    flex-direction: column;
    align-items:flex-start;
  }
}