/*======================================================
                Single Posts Page
========================================================*/

/* Theme-ish tokens (safe to keep local to this section) */
:root{
  --sp-bg: #f6f5f2;                 /* warm editorial background */
  --sp-card: rgba(255,255,255,.92); /* soft card */
  --sp-ink: #0f172a;                /* deep ink */
  --sp-muted: #64748b;              /* slate */
  --sp-font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --sp-border: rgba(15,23,42,.10);
  --sp-shadow: 0 18px 45px rgba(15, 23, 42, .06);
  --sp-shadow-sm: 0 10px 25px rgba(15, 23, 42, .05);
  --sp-radius: 10px;
  --sp-accent: #2b6cb0;             /* matches your theme accent vibe */
}

/* Add gentle page background (optional but recommended) */
body{
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(43,108,176,.10), transparent 60%),
    radial-gradient(700px 400px at 85% 20%, rgba(34,211,238,.10), transparent 60%),
    var(--sp-bg);
  color: var(--sp-ink);
}

/* Meta */
.post-meta{
  color: var(--sp-muted);
  font-size: .93rem;
}
.post-meta i{ opacity: .85; }

/* Featured image */
.featured-img{
  border-radius: var(--sp-radius);
  overflow: hidden;
  border: 1px solid var(--sp-border);
  box-shadow: var(--sp-shadow);
  background: #fff;
}
.featured-img img{
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.01); /* tiny “polish” to avoid edge lines */
}

/* Post body card */
.post-content{
  background: var(--sp-card) !important;
  border-radius: calc(var(--sp-radius) + .25rem);
  border: 1px solid var(--sp-border) !important;
  box-shadow: var(--sp-shadow);
  backdrop-filter: blur(6px);
}

/* Typography: more editorial */
.post-content p{
  line-height: 1.95;
  font-size: 1.04rem;
  color: rgba(15,23,42,.92);
}
.post-content ul,
.post-content ol{
  line-height: 1.9;
}
.post-content li{ margin: .35rem 0; }

.post-content h2,
.post-content h3{
  margin-top: 2.2rem;
  letter-spacing: -.02em;
}
.post-content h2{
  font-size: 1.55rem;
  font-weight: 800;
}
.post-content h3{
  font-size: 1.2rem;
  font-weight: 800;
}

/* Add a subtle “section marker” feel to headings */
.post-content h2{
  position: relative;
  padding-top: .4rem;
}

/* =========================================================
   Single Post — Gutenberg image styling
   - Makes in-content images consistent (radius, shadow, spacing)
   - Handles aligncenter/left/right/wide/full + captions
========================================================= */

.single .entry-content .wp-block-image,
.single .entry-content figure.wp-block-image{
  margin: 1.25rem 0 1.5rem;
}

/* The actual image */
.single .entry-content .wp-block-image img{
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;

  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 18px 45px rgba(15,23,42,.08);
  background: #fff;
}

/* If WP inserts inline width (common), keep it responsive */
.single .entry-content .wp-block-image img[width]{
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

/* Captions */
.single .entry-content .wp-block-image figcaption{
  margin-top: .6rem;
  font-size: .92rem;
  color: rgba(15,23,42,.65);
  text-align: center;
}

/* Alignment support (classic + blocks) */
.single .entry-content .aligncenter{
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.single .entry-content .alignleft{
  float: left;
  margin: .35rem 1.25rem 1rem 0;
  max-width: 52%;
}

.single .entry-content .alignright{
  float: right;
  margin: .35rem 0 1rem 1.25rem;
  max-width: 52%;
}

/* Wide/full (depends on theme/container width) */
.single .entry-content .alignwide{
  width: min(1100px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.single .entry-content .alignfull{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Make left/right alignments stack on mobile */
@media (max-width: 768px){
  .single .entry-content .alignleft,
  .single .entry-content .alignright{
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }
}


/* Share buttons: more modern pills */
.share-btn{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border-radius: 999px;
  padding: .6rem 1rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--sp-border);
  background: rgba(255,255,255,.75);
  color: var(--sp-ink);
  box-shadow: 0 10px 20px rgba(15,23,42,.04);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.share-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15,23,42,.08);
  border-color: rgba(43,108,176,.25);
  background: rgba(255,255,255,.95);
}
.share-btn i{ color: var(--sp-accent); }

/* Widgets */
.widget{
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 1.15rem;
  background: rgba(255,255,255,.90);
  box-shadow: var(--sp-shadow-sm);
  backdrop-filter: blur(6px);
}
.widget-title{
  font-weight: 800;
  font-size: 1.02rem;
  margin-bottom: .85rem;
  letter-spacing: -.01em;
}

/* Sidebar inputs feel more premium */
.widget .form-control{
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  padding: .65rem .9rem;
}
.widget .btn{
  border-radius: 999px;
}

/* Latest posts */
.latest-post{
  display: flex;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  padding: .65rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  transition: background .14s ease, transform .14s ease, border-color .14s ease;
}
.latest-post:hover{
  background: rgba(15,23,42,.03);
  border-color: rgba(43,108,176,.16);
  transform: translateY(-1px);
}
.latest-post img{
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 1rem;
  flex: 0 0 auto;
  border: 1px solid rgba(15,23,42,.08);
}
.latest-post .lp-title{
  font-family: var(--sp-font-body);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.25;
}
.latest-post .lp-meta{
  font-size: .82rem;
  color: var(--sp-muted);
}

/* Categories */
.category-link{
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: .6rem .75rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.category-link:hover{
  background: rgba(15,23,42,.03);
  border-color: rgba(43,108,176,.16);
  transform: translateY(-1px);
}

/* Tag pills in sidebar: slightly softer */
.widget .badge.text-bg-dark{
  background: rgba(15,23,42,.92) !important;
  border: 1px solid rgba(255,255,255,.12);
}

/* Related posts */
.related-card{
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  overflow: hidden;
  background: rgba(255,255,255,.92);
  box-shadow: var(--sp-shadow-sm);
  height: 100%;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.related-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--sp-shadow);
  border-color: rgba(43,108,176,.22);
}
.related-card img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: var(--sp-radius);
  border-top-right-radius: var(--sp-radius);
}
.related-card .rc-body{ padding: 1rem 1rem 1.1rem; }
.related-card .rc-title{
  font-family: var(--sp-font-body);
  font-weight: 800;
  margin-bottom: .25rem;
  letter-spacing: -.01em;
}
.related-card .rc-meta{
  color: var(--sp-muted);
  font-size: .85rem;
}

/* Sticky sidebar: give space under header 
.sticky-sidebar{
  position: sticky;
  top: 96px; /* better than 24px when you have a header 
}
@media (max-width: 991.98px){
  .sticky-sidebar{ position: static; top:auto; }
}*/

/*------ Smart Sticky Sidebar (sticky for a while, then releases) ---------- */

/* Sticky/fixed breaks if any ancestor has overflow != visible */
.single-post-content,
.single-post-content .container,
.single-post-content .row,
.single-post-content .col-lg-4 {
  overflow: visible;
}

.single-post-content{
  margin-top: 6rem;
  margin-bottom: 4rem;
}

/* Wrap defines the "playground" for the sidebar */
.ht-sticky-wrap{
  position: relative;
}

/* Default flow */
.sticky-sidebar{
  position: relative; /* not sticky anymore */
  width: 100%;
}

/* Fixed (sticky phase) */
.sticky-sidebar.is-fixed{
  position: fixed;
  top: 96px;          /* keep your current offset */
  z-index: 10;
}

/* Released (scrolls away after the sticky window ends) */
.sticky-sidebar.is-absolute{
  position: absolute;
  left: 0;
  right: 0;
  top: var(--ht-sticky-stop, 1200px); /* JS sets this */
}

/* Disable smart-sticky on mobile/tablet */
@media (max-width: 991.98px){
  .sticky-sidebar,
  .sticky-sidebar.is-fixed,
  .sticky-sidebar.is-absolute{
    position: static !important;
    top: auto !important;
    width: auto !important;
  }
}


/* Small polish: separators */
.post-content hr{
  border-color: rgba(15,23,42,.10);
  opacity: 1;
}

/* ==============================
   Single Inspiration (CPT)
   ============================== */

.ht-insp-single .container { max-width: 1120px; }

.ht-insp-head { padding: 28px 0 18px; }
.ht-insp-back { display:inline-block; text-decoration:none; opacity:.75; }
.ht-insp-back:hover { opacity:1; text-decoration:underline; }

.ht-insp-title { margin: 10px 0 10px; font-size: clamp(1.6rem, 2.2vw, 2.4rem); line-height: 1.15; }

.ht-insp-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.ht-insp-tag { display:inline-flex; padding:6px 10px; border-radius:999px; border:1px solid rgba(0,0,0,.08); background:#fff; font-size:.85rem; }

.ht-insp-hero { display:grid; grid-template-columns: 1.6fr .9fr; gap: 22px; align-items:start; padding: 10px 0 18px; }
@media (max-width: 900px){ .ht-insp-hero { grid-template-columns: 1fr; } }

.ht-insp-figure { margin:0; border-radius: 16px; overflow:hidden; background:#fff; border:1px solid rgba(0,0,0,.06); box-shadow: 0 18px 48px rgba(15,23,42,.08); }
.ht-insp-figure img { display:block; width:100%; height:auto; }

.ht-insp-panel { border-radius:16px; border:1px solid rgba(0,0,0,.06); background:#fff; box-shadow: 0 18px 48px rgba(15,23,42,.06); padding: 16px; }
.ht-insp-btn { width:100%; display:inline-flex; justify-content:center; align-items:center; gap:8px; padding: 11px 12px; border-radius: 12px; border:1px solid rgba(0,0,0,.12); background:#fff; cursor:pointer; text-decoration:none; margin-bottom: 10px; }
.ht-insp-btn--primary { background:#0f172a; color:#fff; border-color:#0f172a; }
.ht-insp-btn--primary:hover { filter: brightness(1.05); color:#fff; }

.ht-insp-meta { font-size:.92rem; opacity:.85; display:grid; gap:8px; margin-top: 6px; }
.ht-insp-meta-url a { text-decoration:none; }
.ht-insp-meta-url a:hover { text-decoration:underline; }

.ht-insp-desc { margin-top: 12px; }
.ht-insp-desc strong { display:block; margin-bottom: 6px; }
.ht-insp-desc p { margin:0; line-height: 1.6; }

.ht-insp-nav { padding: 18px 0 30px; border-top: 1px solid rgba(0,0,0,.06); }
.ht-insp-nav-inner { display:flex; justify-content:space-between; gap:14px; }
.ht-insp-nav a { text-decoration:none; }
.ht-insp-nav a:hover { text-decoration:underline; }

/* Pinterest brand color on hover */
.ht-insp-btn:hover .fa-pinterest-p {
  color: #e60023;
}

/* ======================================================
   Archive (tag/date/author) — HomeTriks
====================================================== */

.ht-archive-wrap { background: transparent; }

/* Re-use your category hero structure */
.ht-cat-hero{
  position: relative;
  height: 450px;
  margin-top: 90px;
  padding: clamp(2.25rem, 4vw, 4rem) 0;
  overflow: hidden;
}

/* background image via CSS var */
.ht-cat-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--ht-hero);
  background-size: cover;
  background-position: center;
  /*transform: scale(1.02);
  filter: blur(10px);*/
  opacity: .65;
}

/* overlay */
.ht-cat-hero::after{
  content:"";
  position:absolute;
  inset:0;
  /*background:
    radial-gradient(80% 80% at 15% 15%, rgba(255,255,255,.85), rgba(255,255,255,.55) 55%, rgba(255,255,255,.15) 100%),
    linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,255,255,.92));*/
}

/* keep content above overlays */
.ht-cat-hero > .container{
  position: relative;
  z-index: 2;
}

/* hero card look */
.ht-cat-hero .hero-card{
  border-radius: 1.25rem;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 14px 40px rgba(0,0,0,.08);
  backdrop-filter: blur(2px);
}

/* breadcrumbs */
.ht-cat-hero .breadcrumb{
  font-size: .9rem;
  opacity: .9;
}
.ht-cat-hero .breadcrumb a{
  text-decoration: none;
}
.ht-cat-hero .breadcrumb a:hover{
  text-decoration: underline;
}

/* title */
.ht-cat-hero h1{
  margin: 0 0 .35rem 0;
  line-height: 1.1;
  letter-spacing: -0.6px;
}

/* subtitle */
.ht-cat-hero .text-muted-ht{
  opacity: .9;
}
/* ======================================================
   HARD FIX: Archive card alignment
   (prevents image spill + forces equal card structure)
====================================================== */

/* Ensure grid children stretch equally */
.ht-archive-wrap .row > [class*="col-"]{
  display: flex;
}

/* Make each card fill its column and clip overflow */
.ht-archive-wrap .post-card{
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* critical */
}

/* Thumbnail wrapper MUST be the positioning context */
.ht-archive-wrap .post-card .thumb-wrap{
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 10;
  overflow: hidden !important;
  flex: 0 0 auto;
}

/* Force the image to fully cover wrapper (no auto height leaks) */
.ht-archive-wrap .post-card .thumb-wrap img,
.ht-archive-wrap .post-card .thumb-wrap .thumb{
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  max-width: none !important;
  display: block !important;
}

/* Card body should take remaining space */
.ht-archive-wrap .post-card > div{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Prevent long titles/meta from breaking layout */
.ht-archive-wrap .post-card h3{
  margin: 0;
}
.ht-archive-wrap .post-card .meta{
  white-space: nowrap;
}
.ht-archive-wrap .post-card .text-muted-ht{
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.6em * 3);
}

/* ===========================================================
                        All Categories Page
============================================================= */

.all-categories-page {
  background: #fff;
}

/* Hero */
.categories-hero {
  padding: 5rem 0 3rem;
}

.categories-hero .eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ht-muted);
  margin-bottom: 0.75rem;
}

.categories-hero h1 {
  font-family: var(--ht-font-serif);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

.categories-hero .hero-intro {
  max-width: 640px;
  color: var(--ht-muted);
  font-size: 1.05rem;
}

/* Grid */
.categories-grid-section {
  padding: 3rem 0 5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* Card */
.category-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--ht-border);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ht-shadow);
}

.category-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* Image Placeholder */
.category-card-image {
  aspect-ratio: 16 / 10;
  background: #e5e5e5;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card-image span {
  font-size: 1.1rem;
  font-weight: 600;
  color: #999;
}

/* Content */
.category-card-content {
  padding: 1.4rem;
}

.category-card-content h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.category-card-content p{
  font-size: 0.95rem;
  color: var(--ht-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;       /* change to 2/3/4 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ht-accent);
}

