/* ===== Blog template scope — does not touch site's global classes ===== */
/* WHITE VARIANT — header/footer unchanged, only blog content area is light (approved: Option 1W) */
/* overflow-x:clip (not hidden) on .blog-page alone isn't reliably honored on
   some mobile browsers unless paired with the same rule on html/body
   directly — this is the standard robust fix for horizontal overflow,
   scoped to this template only since blog.css is never enqueued on the main
   site's other pages.
   `clip`, not `hidden` — this matters: overflow-x:hidden with no
   overflow-y set makes the browser auto-promote overflow-y to `auto` (a
   real CSS spec quirk), silently turning html/body/.blog-page into
   scrolling containers of their own. That breaks position:sticky on any
   descendant (confirmed live: .post-sidebar's "Search Articles"/"Browse
   Categories" boxes weren't floating while scrolling — 2026-08-29).
   overflow-x:clip prevents the same horizontal overflow without ever
   triggering that promotion. */
html,body{overflow-x:clip;max-width:100%;}
.blog-page{background:#ffffff;color:#221b12;font-family:'Poppins',sans-serif;padding-top:110px;padding-bottom:90px;min-height:100vh;max-width:100vw;overflow-x:clip;}
.blog-page *{box-sizing:border-box;}
.blog-container{max-width:1300px;margin:0 auto;padding:0 40px;}

.blog-hero{text-align:center;padding:50px 20px 60px;}
.blog-eyebrow{display:inline-block;letter-spacing:3px;font-size:12px;color:#6b5c45;text-transform:uppercase;border:1px solid rgba(0,0,0,.15);padding:6px 16px;border-radius:20px;margin-bottom:22px;}
.blog-hero h1{font-family:'Cinzel',serif;font-weight:600;font-size:42px;letter-spacing:2px;margin:0 0 18px;color:#1a1410;}
.blog-hero p{max-width:620px;margin:0 auto;line-height:1.8;color:rgba(0,0,0,.6);font-size:15px;}

.blog-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:0 0 50px;}
.blog-filter{font-size:12px;letter-spacing:1px;text-transform:uppercase;color:rgba(0,0,0,.55);border:1px solid rgba(0,0,0,.15);padding:8px 18px;border-radius:20px;text-decoration:none;display:inline-block;transition:all .3s ease;}
.blog-filter:hover{border-color:#6b5c45;color:#6b5c45;}
.blog-filter.active{background:#6b5c45;color:#fff;border-color:#6b5c45;}

.blog-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:36px;padding-bottom:50px;}
.blog-card{background:#ffffff;border:1px solid rgba(0,0,0,.1);border-radius:16px;overflow:hidden;transition:transform .35s ease,border-color .35s ease,box-shadow .35s ease;box-shadow:0 2px 14px rgba(0,0,0,.05);}
.blog-card:hover{transform:translateY(-6px);border-color:rgba(0,0,0,.2);box-shadow:0 10px 24px rgba(0,0,0,.1);}
.blog-card-img{position:relative;height:230px;overflow:hidden;background:#f2f0eb;}
.blog-card-img img{width:100%;height:100%;object-fit:contain;transition:transform .5s ease;}
.blog-card:hover .blog-card-img img{transform:scale(1.06);}
.blog-tag{position:absolute;top:16px;left:16px;background:rgba(0,0,0,.65);border:1px solid #FFF8DC;color:#FFF8DC;font-size:10px;letter-spacing:1.5px;text-transform:uppercase;padding:6px 12px;border-radius:2px;text-decoration:none;}
.blog-card-body{padding:26px 24px 28px;}
.blog-card-body h3{font-family:'Cinzel',serif;font-size:18px;line-height:1.5;font-weight:600;margin:0 0 12px;}
.blog-card-body h3 a{color:#1a1410;text-decoration:none;}
.blog-card-body h3 a:hover{color:#6b5c45;}
.blog-card-body p{font-size:13.5px;line-height:1.8;color:rgba(0,0,0,.6);margin:0 0 18px;}
.blog-meta{display:flex;justify-content:space-between;align-items:center;font-size:11px;letter-spacing:.5px;color:rgba(0,0,0,.45);border-top:1px solid rgba(0,0,0,.1);padding-top:16px;}
.blog-meta a{color:#6b5c45;text-decoration:none;font-weight:600;letter-spacing:1px;}
.blog-meta a:hover{color:#3d3222;}

.blog-pagination{display:flex;justify-content:center;gap:12px;}
.blog-pagination a,.blog-pagination span.current{font-size:12px;letter-spacing:1px;text-transform:uppercase;padding:10px 20px;border:1px solid rgba(0,0,0,.15);border-radius:20px;text-decoration:none;color:#1a1410;}
.blog-pagination span.current{background:#6b5c45;color:#fff;border-color:#6b5c45;}
.blog-pagination a:hover{border-color:#6b5c45;color:#6b5c45;}

.blog-empty{text-align:center;padding:60px 20px 100px;color:rgba(0,0,0,.5);}

@media (max-width:1024px){.blog-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:680px){
  .blog-grid{grid-template-columns:1fr;}
  .blog-container{padding:0 22px;}
  .blog-hero h1{font-size:30px;}
  .blog-page{padding-top:90px;padding-bottom:60px;}
}

/* ===== Single post — approved design ===== */
.blog-container-wide{max-width:1300px;margin:0 auto;padding:0 40px;}

.post-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12.5px;color:rgba(0,0,0,.5);margin:36px 0 30px;}
.post-breadcrumb a{color:#6b5c45;text-decoration:none;}
.post-breadcrumb a:hover{color:#3d3222;text-decoration:underline;}
.post-breadcrumb span.sep{color:rgba(0,0,0,.3);}
.post-breadcrumb span.current{color:#1a1410;font-weight:600;}

.post-layout{display:grid;grid-template-columns:1fr 320px;gap:56px;align-items:start;}
.post-main{min-width:0;}
/* Grid items default to min-width:auto, which lets a child's own content
   (e.g. .sidebar-box min-width:260px x3 in a wrapped row) force this whole
   item — and therefore the shared grid row/page — wider than the viewport,
   regardless of what grid-template-columns says. Header/footer use the main
   site's own separate stylesheet and were never affected; this is scoped to
   the blog template's own grid. */
.post-sidebar{min-width:0;}
.blog-page img{max-width:100%;height:auto;}
/* Listing page shares .post-layout with the sidebar too — 2 cards fit the narrower main column better than the archive-only 3-column grid. */
.post-main .blog-grid{grid-template-columns:repeat(2,1fr);}
@media (max-width:640px){.post-main .blog-grid{grid-template-columns:1fr;}}

.post-eyebrow{display:inline-block;letter-spacing:2px;font-size:11px;color:#6b5c45;text-transform:uppercase;border:1px solid rgba(0,0,0,.15);padding:6px 14px;border-radius:20px;margin-bottom:20px;text-decoration:none;}
.post-title{font-family:'Cinzel',serif;font-weight:600;font-size:34px;line-height:1.4;letter-spacing:1px;margin:0 0 24px;color:#1a1410;}

.post-meta-row{display:flex;align-items:center;gap:14px;padding-bottom:28px;margin-bottom:32px;border-bottom:1px solid rgba(0,0,0,.1);}
.post-meta-row img{width:44px;height:44px;border-radius:50%;object-fit:cover;}
.post-meta-text{font-size:12.5px;color:rgba(0,0,0,.5);line-height:1.6;}
.post-meta-text b{color:#1a1410;display:block;font-size:13.5px;margin-bottom:2px;}

.post-featured-img{width:100%;height:360px;border-radius:14px;overflow:hidden;margin-bottom:40px;background:#f2f0eb;}
.post-featured-img img{width:100%;height:100%;object-fit:contain;}

.post-body{font-size:15.5px;line-height:1.95;color:rgba(0,0,0,.75);}
.post-body p{margin:0 0 24px;}
.post-body h2{font-family:'Cinzel',serif;font-weight:600;font-size:22px;letter-spacing:.5px;color:#1a1410;margin:40px 0 18px;}
.post-body h3{font-family:'Cinzel',serif;font-weight:600;font-size:18px;letter-spacing:.5px;color:#1a1410;margin:32px 0 14px;}
.post-body ul{margin:0 0 24px;padding-left:22px;}
.post-body li{margin-bottom:10px;}
/* Client pastes from Google Docs often wrap each bullet's text in its own
   <p>, which inherits .post-body p's 24px bottom margin and stacks on top
   of li's own margin — bullets end up gapped far wider than the rest of the
   page. Zero it out so a <p>-in-<li> reads the same as plain <li> text. */
.post-body li>p{margin:0;}
.post-body a{color:#6b5c45;font-weight:700;text-decoration:underline;}
.post-body a:hover{color:#3d3222;}
.post-body img{max-width:100%;height:auto;border-radius:12px;margin:10px 0 24px;}

/* Real data tables from pasted content (not styled at all before — browser
   default). .table-scroll lets a wide table scroll horizontally on mobile
   instead of forcing the whole page wider. */
.post-body .table-scroll{overflow-x:auto;margin:0 0 28px;}
.post-body table.post-table{width:100%;border-collapse:collapse;font-size:14.5px;line-height:1.6;}
.post-body table.post-table th,
.post-body table.post-table td{padding:12px 16px;border:1px solid rgba(0,0,0,.1);text-align:left;vertical-align:top;}
.post-body table.post-table thead th{background:#faf9f6;font-family:'Cinzel',serif;font-weight:600;font-size:13px;letter-spacing:.3px;color:#1a1410;}
.post-body table.post-table td ul{margin:0;padding-left:18px;}
.post-body table.post-table td li{margin-bottom:6px;}
.post-body table.post-table td li:last-child{margin-bottom:0;}

.post-highlight{border-left:3px solid #6b5c45;background:#faf9f6;border-radius:0 12px 12px 0;padding:20px 24px;margin:36px 0;}
.post-highlight h2,.post-highlight h3{margin:0 0 10px;}
.post-highlight p{margin:0;}

.post-tags{display:flex;flex-wrap:wrap;gap:8px;margin:40px 0 0;}
.post-tags a{font-size:11px;letter-spacing:.5px;text-transform:uppercase;color:rgba(0,0,0,.6);border:1px solid rgba(0,0,0,.15);padding:6px 14px;border-radius:20px;text-decoration:none;}
.post-tags a:hover{border-color:#6b5c45;color:#6b5c45;}

.author-box{display:flex;gap:20px;align-items:center;background:#faf9f6;border:1px solid rgba(0,0,0,.08);border-radius:14px;padding:26px;margin:50px 0;}
.author-box img{width:66px;height:66px;border-radius:50%;object-fit:cover;flex:0 0 66px;}
.author-box h4{font-family:'Cinzel',serif;font-size:15px;margin:0 0 6px;color:#1a1410;}
.author-box p{font-size:13px;line-height:1.7;color:rgba(0,0,0,.6);margin:0;}

.post-faq{margin:44px 0;}
.post-faq h2{font-family:'Cinzel',serif;font-size:22px;color:#1a1410;margin:0 0 22px;}
.post-faq-item{border:1px solid rgba(0,0,0,.1);border-radius:12px;padding:20px 24px;margin-bottom:14px;}
.post-faq-item h4{font-family:'Poppins',sans-serif;font-weight:600;font-size:14.5px;color:#1a1410;margin:0 0 10px;}
.post-faq-item p{font-size:13.5px;line-height:1.8;color:rgba(0,0,0,.65);margin:0;}

.post-sidebar{position:sticky;top:130px;display:flex;flex-direction:column;gap:24px;}
.sidebar-box{background:#faf9f6;border:1px solid rgba(0,0,0,.08);border-radius:14px;padding:24px;}
.sidebar-box h4{font-family:'Cinzel',serif;font-size:14px;letter-spacing:1px;text-transform:uppercase;color:#1a1410;margin:0 0 18px;}

.sidebar-search{display:flex;gap:0;}
/* min-width:0 is required here — <input> elements get a non-trivial default
   min-width in flex layouts regardless of flex:1, a well-known form-control
   flexbox quirk, and were forcing this box wider than the phone screen. */
.sidebar-search input{flex:1;min-width:0;padding:11px 14px;border:1px solid rgba(0,0,0,.15);border-right:none;border-radius:10px 0 0 10px;font-family:'Poppins',sans-serif;font-size:13px;outline:none;background:#fff;}
.sidebar-search input::placeholder{color:rgba(0,0,0,.4);}
.sidebar-search button{padding:0 18px;background:#6b5c45;color:#fff;border:none;border-radius:0 10px 10px 0;cursor:pointer;font-size:14px;}
.sidebar-search button:hover{background:#4a3f2f;}

.sidebar-cats{list-style:none;margin:0;padding:0;}
.sidebar-cats li{border-bottom:1px dashed rgba(0,0,0,.1);}
.sidebar-cats li:last-child{border-bottom:none;}
.sidebar-cats a{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:11px 2px;font-size:13.5px;color:rgba(0,0,0,.7);text-decoration:none;}
.sidebar-cats a:hover{color:#6b5c45;}
/* Plain text as a flex item defaults to min-width:auto and refuses to
   shrink/wrap, pushing the count badge off the edge for longer category
   names ("Project Spotlight", "Market Insights") — wrapping it in its own
   span lets it truncate with an ellipsis instead. */
.sidebar-cats a span.cat-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sidebar-cats a span.count{flex-shrink:0;font-size:11px;color:rgba(0,0,0,.4);border:1px solid rgba(0,0,0,.15);border-radius:20px;padding:2px 9px;}
.sidebar-cats a:hover span.count{border-color:#6b5c45;color:#6b5c45;}

.sidebar-cta{background:#1a1410;border-radius:14px;padding:26px 24px;color:#FFFDD0;}
.sidebar-cta h4{color:#FFF8DC;border:none;margin-bottom:10px;}
.sidebar-cta p{font-size:13px;line-height:1.7;color:rgba(255,253,208,.7);margin:0 0 18px;}
.sidebar-cta a{display:inline-block;background:#6b5c45;color:#fff;text-decoration:none;font-size:12px;letter-spacing:1px;text-transform:uppercase;padding:11px 20px;border-radius:20px;transition:background .3s ease;}
.sidebar-cta a:hover{background:#4a3f2f;}

.post-cta-banner{background:#6b5c45;border-radius:16px;padding:44px 40px;display:flex;justify-content:space-between;align-items:center;gap:24px;margin:60px 0 0;color:#fff;}
.post-cta-banner h3{font-family:'Cinzel',serif;font-size:22px;margin:0 0 8px;}
.post-cta-banner p{font-size:13.5px;color:rgba(255,255,255,.8);margin:0;}
.post-cta-banner a{flex-shrink:0;display:inline-block;background:#fff;color:#1a1410;text-decoration:none;font-size:12px;letter-spacing:1px;text-transform:uppercase;padding:13px 26px;border-radius:24px;font-weight:600;}

.related-section{border-top:1px solid rgba(0,0,0,.1);margin-top:70px;padding-top:60px;}
.related-heading{font-family:'Cinzel',serif;font-size:22px;letter-spacing:1px;color:#1a1410;text-align:center;margin:0 0 34px;}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;padding:0 0 90px;}
.related-card{background:#ffffff;border:1px solid rgba(0,0,0,.1);border-radius:14px;overflow:hidden;box-shadow:0 2px 14px rgba(0,0,0,.05);transition:transform .3s ease;text-decoration:none;display:block;}
.related-card:hover{transform:translateY(-4px);}
.related-card img{width:100%;height:150px;object-fit:cover;display:block;background:#f2f0eb;}
.related-card-body{padding:18px;}
.related-card-body span{font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#6b5c45;display:block;margin-bottom:8px;}
.related-card-body h5{font-family:'Cinzel',serif;font-size:14px;line-height:1.5;color:#1a1410;margin:0;font-weight:600;}

@media (max-width:1100px){
  .post-layout{grid-template-columns:1fr;}
  .post-sidebar{position:static;flex-direction:row;flex-wrap:wrap;}
  /* min-width:0 (not a fixed 260px floor) — flex:1 already distributes
     available space evenly in the row layout; a hard 260px minimum was
     still being enforced even after flex-direction switched to column on
     narrow phones, forcing each box wider than the actual screen. */
  .sidebar-box{flex:1;min-width:0;}
}
@media (max-width:900px){
  .related-grid{grid-template-columns:1fr;}
  .post-title{font-size:26px;}
  .post-featured-img{height:240px;}
  .post-cta-banner{flex-direction:column;text-align:center;}
}
@media (max-width:600px){
  .blog-container-wide{padding:0 22px;}
  .author-box{flex-direction:column;text-align:center;}
  /* flex-wrap:wrap from the 1100px breakpoint above was never reset here —
     combined with flex-direction:column it can split the sidebar into
     multiple side-by-side columns instead of one vertical stack, which is
     the actual root cause of every box being sliced on the right on phones.
     This is the real fix; the earlier min-width:0 additions were correct
     defensive CSS but weren't the cause of this specific symptom. */
  .post-sidebar{flex-direction:column;flex-wrap:nowrap;}
  /* The site-wide floating WhatsApp/Call/Scroll-top buttons are a fixed,
     right:15px/bottom:55px/width:40px, z-index:9999 overlay (defined in the
     main site's own shared stylesheet, not this one) — anything that scrolls
     under that zone gets visually covered. Not a content-overflow bug; inset
     the sidebar so its search button and category count badges never land
     under that overlay. */
  .post-sidebar{padding-right:56px;}
}
