/* =========================================================
   Home Decor Boom — Blog Layouts (self-contained widget CSS)
   Namespaced .hdb-bl-* so it works on ANY theme without collisions.
   ========================================================= */
.hdb-bl-grid,
.hdb-bl-hero,
.hdb-bl-card {
	--hdb-bl-terracotta: #C56A3E;
	--hdb-bl-terracotta-dark: #A9552E;
	--hdb-bl-sage: #8B9B7E;
	--hdb-bl-card: #FFFFFF;
	--hdb-bl-ink: #2B2724;
	--hdb-bl-body: #4A453F;
	--hdb-bl-muted: #8A837B;
	--hdb-bl-border: #ECE7DF;
	--hdb-bl-radius: 14px;
	--hdb-bl-font-head: "Playfair Display", Georgia, "Times New Roman", serif;
	--hdb-bl-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Category pill ---------- */
.hdb-bl-pill {
	display: inline-block;
	background: var(--hdb-bl-terracotta);
	color: #fff !important;
	font-family: var(--hdb-bl-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
	padding: 6px 14px;
	border-radius: 999px;
	text-decoration: none !important;
}
.hdb-bl-pill.is-sage { background: var(--hdb-bl-sage); }
.hdb-bl-pill:hover { opacity: 0.92; color: #fff !important; }

/* ---------- Grid ---------- */
.hdb-bl-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
}
.hdb-bl-grid--1 { grid-template-columns: 1fr; }
.hdb-bl-grid--2 { grid-template-columns: repeat(2, 1fr); }
.hdb-bl-grid--3 { grid-template-columns: repeat(3, 1fr); }
.hdb-bl-grid--4 { grid-template-columns: repeat(4, 1fr); }
.hdb-bl-grid--5 { grid-template-columns: repeat(5, 1fr); }

/* ---------- Card ---------- */
.hdb-bl-card {
	background: var(--hdb-bl-card);
	border: 1px solid var(--hdb-bl-border);
	border-radius: var(--hdb-bl-radius);
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(43, 39, 36, 0.06);
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hdb-bl-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(43, 39, 36, 0.1);
}
.hdb-bl-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	text-decoration: none;
}
.hdb-bl-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}
.hdb-bl-card:hover .hdb-bl-card__media img { transform: scale(1.05); }

/* placeholder image block (no featured image) */
.hdb-bl-noimg {
	display: block;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(135deg, #efe9e1 0%, #e4dcd0 100%);
}

/* reading-time badge */
.hdb-bl-readtime {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(30, 26, 22, 0.6);
	color: #fff;
	font-family: var(--hdb-bl-font-body);
	font-size: 12px;
	font-weight: 600;
	padding: 5px 11px 5px 9px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	backdrop-filter: blur(4px);
	line-height: 1;
}
.hdb-bl-readtime svg { display: block; }

.hdb-bl-card__body {
	padding: 18px 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}
.hdb-bl-card__pill { line-height: 0; }
.hdb-bl-card__title {
	font-family: var(--hdb-bl-font-head);
	font-size: 21px;
	line-height: 1.25;
	font-weight: 700;
	margin: 0;
	letter-spacing: -0.01em;
}
.hdb-bl-card__title a {
	color: var(--hdb-bl-ink);
	text-decoration: none;
	transition: color 0.18s ease;
}
.hdb-bl-card__title a:hover { color: var(--hdb-bl-terracotta); }
.hdb-bl-card__excerpt {
	font-family: var(--hdb-bl-font-body);
	color: var(--hdb-bl-body);
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
}

/* compact row variant (Image 3) */
.hdb-bl-grid--compact .hdb-bl-card__title { font-size: 19px; }
.hdb-bl-grid--compact .hdb-bl-card__body { padding: 16px 18px 20px; gap: 10px; }

/* ---------- Meta row ---------- */
.hdb-bl-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding-top: 4px;
	font-family: var(--hdb-bl-font-body);
	color: var(--hdb-bl-muted);
	font-size: 13px;
}
.hdb-bl-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	object-fit: cover;
	background: #ece6dc;
	flex: 0 0 auto;
}
.hdb-bl-avatar--dummy {
	display: inline-block;
	background:
		radial-gradient(circle at 50% 38%, #cbc2b5 0 34%, transparent 35%),
		radial-gradient(circle at 50% 100%, #cbc2b5 0 60%, transparent 61%),
		#e5ded4;
}
.hdb-bl-dot { opacity: 0.55; }
.hdb-bl-author { font-weight: 600; color: var(--hdb-bl-body); }

/* ---------- Hero ---------- */
.hdb-bl-hero {
	position: relative;
	border-radius: var(--hdb-bl-radius);
	overflow: hidden;
	min-height: 480px;
	display: flex;
	align-items: flex-end;
	background-size: cover;
	background-position: center center;
	box-shadow: 0 12px 30px rgba(43, 39, 36, 0.1);
}
.hdb-bl-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(30, 26, 22, 0) 25%, rgba(30, 26, 22, 0.45) 100%);
}
.hdb-bl-hero--placeholder {
	background:
		linear-gradient(135deg, #6f665b 0%, #5b5349 100%);
}
.hdb-bl-hero__content {
	position: relative;
	z-index: 2;
	color: #fff;
	padding: 40px;
	max-width: 620px;
}
.hdb-bl-hero__title {
	font-family: var(--hdb-bl-font-head);
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.12;
	font-weight: 700;
	margin: 14px 0 12px;
	letter-spacing: -0.01em;
}
.hdb-bl-hero__title a {
	color: #fff;
	text-decoration: none;
}
.hdb-bl-hero__title a:hover { color: #fff; opacity: 0.92; }
.hdb-bl-hero__excerpt {
	font-family: var(--hdb-bl-font-body);
	color: rgba(255, 255, 255, 0.9);
	font-size: 17px;
	line-height: 1.6;
	margin: 0;
	max-width: 520px;
}
.hdb-bl-hero__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
	font-family: var(--hdb-bl-font-body);
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
}
.hdb-bl-hero__meta img,
.hdb-bl-hero__meta .hdb-bl-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

/* ---------- Button ---------- */
.hdb-bl-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--hdb-bl-terracotta);
	color: #fff !important;
	font-family: var(--hdb-bl-font-body);
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	padding: 12px 22px;
	border-radius: 999px;
	text-decoration: none !important;
	margin-top: 18px;
	transition: background 0.18s ease, transform 0.18s ease;
}
.hdb-bl-btn:hover {
	background: var(--hdb-bl-terracotta-dark);
	color: #fff !important;
	transform: translateX(2px);
}
.hdb-bl-btn__arrow { display: inline-flex; transition: transform 0.2s ease; }
.hdb-bl-btn:hover .hdb-bl-btn__arrow { transform: translateX(3px); }

/* ---------- Section heading (row widget) ---------- */
.hdb-bl-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 0 0 24px;
}
.hdb-bl-section-head h2 {
	font-family: var(--hdb-bl-font-head);
	font-size: clamp(24px, 3vw, 34px);
	color: var(--hdb-bl-ink);
	margin: 0;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.hdb-bl-sub {
	font-family: var(--hdb-bl-font-body);
	color: var(--hdb-bl-muted);
	font-size: 15px;
}

/* ---------- Empty / notes ---------- */
.hdb-bl-empty {
	grid-column: 1 / -1;
	padding: 40px;
	text-align: center;
	color: var(--hdb-bl-muted);
	font-family: var(--hdb-bl-font-body);
	border: 1px dashed var(--hdb-bl-border);
	border-radius: var(--hdb-bl-radius);
}
.hdb-bl-ph-note {
	display: inline-block;
	margin-top: 14px;
	font-family: var(--hdb-bl-font-body);
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	font-style: italic;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.hdb-bl-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.hdb-bl-grid--5 { grid-template-columns: repeat(3, 1fr); }
	.hdb-bl-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
	.hdb-bl-grid { grid-template-columns: 1fr !important; }
	.hdb-bl-hero__content { padding: 26px; }
	.hdb-bl-hero { min-height: 400px; }
}

/* =========================================================
   SIDEBAR WIDGETS (Category List, Popular Posts, Follow Grid)
   ========================================================= */
.hdb-bl-widget {
	--hdb-bl-terracotta: #C56A3E;
	--hdb-bl-terracotta-dark: #A9552E;
	--hdb-bl-sage: #8B9B7E;
	--hdb-bl-ink: #2B2724;
	--hdb-bl-body: #4A453F;
	--hdb-bl-muted: #8A837B;
	--hdb-bl-border: #ECE7DF;
	--hdb-bl-font-head: "Playfair Display", Georgia, serif;
	--hdb-bl-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: #fff;
	border: 1px solid var(--hdb-bl-border);
	border-radius: 16px;
	padding: 24px;
	font-family: var(--hdb-bl-font-body);
}

/* Shared widget title */
.hdb-bl-wtitle {
	font-family: var(--hdb-bl-font-body);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--hdb-bl-muted);
	margin: 0 0 20px;
}

/* ---------- Category List ---------- */
.hdb-bl-cat__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hdb-bl-cat__item {
	padding: 10px 0;
	border-bottom: 1px solid transparent;
	transition: background-color 0.18s ease;
}
.hdb-bl-cat__list.has-divider .hdb-bl-cat__item:not(:last-child) {
	border-bottom-color: #F0EBE3;
}
.hdb-bl-cat__link {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
}
.hdb-bl-cat__icon {
	color: var(--hdb-bl-terracotta);
	flex: 0 0 auto;
	transition: color 0.18s ease;
}
.hdb-bl-cat__name {
	font-size: 16px;
	font-weight: 500;
	color: var(--hdb-bl-ink);
	flex: 1;
	transition: color 0.18s ease;
}
.hdb-bl-cat__count {
	font-size: 14px;
	font-weight: 500;
	color: var(--hdb-bl-muted);
	flex: 0 0 auto;
}

/* ---------- Popular Posts ---------- */
.hdb-bl-pop__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}
.hdb-bl-pop__item {
	display: flex;
	align-items: center;
	gap: 14px;
	border-bottom: 1px solid transparent;
}
.hdb-bl-pop__item + .hdb-bl-pop__item {
	margin-top: 18px;
}
.hdb-bl-pop__list.has-divider .hdb-bl-pop__item:not(:last-child) {
	border-bottom-color: #F0EBE3;
	padding-bottom: 18px;
}
.hdb-bl-pop__num {
	font-family: var(--hdb-bl-font-head);
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	color: #E3D5C8;
	min-width: 28px;
	text-align: left;
	flex: 0 0 auto;
}
.hdb-bl-pop__thumb {
	display: block;
	width: 56px;
	height: 56px;
	flex: 0 0 auto;
	border-radius: 8px;
	overflow: hidden;
	background: #efe9e1;
}
.hdb-bl-pop__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 8px;
	transition: transform 0.4s ease, opacity 0.2s ease;
}
.hdb-bl-pop__text { flex: 1; min-width: 0; }
.hdb-bl-pop__title {
	margin: 0;
	font-family: var(--hdb-bl-font-head);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
}
.hdb-bl-pop__title a {
	color: var(--hdb-bl-ink);
	text-decoration: none;
	transition: color 0.18s ease;
}
.hdb-bl-pop__title a:hover { color: var(--hdb-bl-terracotta); }
.hdb-bl-pop__item.is-highlight .hdb-bl-pop__title a { color: var(--hdb-bl-terracotta); }
.hdb-bl-pop__meta {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--hdb-bl-muted);
}

/* ---------- Follow / Image Grid ---------- */
.hdb-bl-follow__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}
.hdb-bl-follow__cell {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 10px;
	background: #efe9e1;
}
.hdb-bl-follow__cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 10px;
	transition: transform 0.4s ease;
}
.hdb-bl-follow__cell::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(197, 106, 62, 0.35);
	opacity: 0;
	transition: opacity 0.2s ease;
	border-radius: inherit;
	pointer-events: none;
}
.hdb-bl-follow__cell:hover::after { opacity: 1; }
.hdb-bl-follow__cell:hover img { transform: scale(1.08); }
.hdb-bl-follow__link {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 18px;
	font-size: 16px;
	font-weight: 600;
	color: var(--hdb-bl-terracotta);
	text-decoration: none;
	transition: color 0.18s ease;
}
.hdb-bl-follow__link:hover { color: var(--hdb-bl-terracotta-dark); }

/* placeholder blocks inside sidebar widgets */
.hdb-bl-pop__thumb .hdb-bl-noimg,
.hdb-bl-follow__cell .hdb-bl-noimg {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(135deg, #efe9e1 0%, #e4dcd0 100%);
}

/* =========================================================
   PAGINATION (numbers, arrows, load more, infinite)
   ========================================================= */
.hdb-bl-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px;
}
.hdb-bl-pagination a,
.hdb-bl-pagination span {
	min-width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--hdb-bl-border, #ECE7DF);
	background: #fff;
	color: var(--hdb-bl-body, #4A453F);
	font-family: var(--hdb-bl-font-body, "Inter", sans-serif);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: all 0.18s ease;
}
.hdb-bl-pagination a:hover {
	background: var(--hdb-bl-terracotta, #C56A3E);
	border-color: var(--hdb-bl-terracotta, #C56A3E);
	color: #fff;
}
.hdb-bl-pagination .current {
	background: var(--hdb-bl-terracotta, #C56A3E);
	border-color: var(--hdb-bl-terracotta, #C56A3E);
	color: #fff;
}
.hdb-bl-pagination .dots {
	border: none;
	background: transparent;
}

/* Load more button */
.hdb-bl-loadmore-wrap {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}
.hdb-bl-loadmore {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--hdb-bl-font-body, "Inter", sans-serif);
	font-weight: 600;
	font-size: 15px;
	color: var(--hdb-bl-body, #4A453F);
	background: #fff;
	border: 1px solid var(--hdb-bl-border, #ECE7DF);
	padding: 13px 30px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.18s ease;
}
.hdb-bl-loadmore:hover {
	background: var(--hdb-bl-terracotta, #C56A3E);
	border-color: var(--hdb-bl-terracotta, #C56A3E);
	color: #fff;
}
.hdb-bl-paginated.is-loading .hdb-bl-loadmore {
	opacity: 0.7;
	pointer-events: none;
}
.hdb-bl-paginated.hdb-bl-nomore .hdb-bl-loadmore-wrap,
.hdb-bl-paginated.hdb-bl-nomore .hdb-bl-sentinel {
	display: none;
}

/* Infinite scroll sentinel + spinner */
.hdb-bl-sentinel {
	height: 1px;
	width: 100%;
}
.hdb-bl-infinite-status,
.hdb-bl-paginated.is-loading .hdb-bl-infinite-status {
	text-align: center;
	margin-top: 24px;
	min-height: 24px;
}
.hdb-bl-paginated.is-loading .hdb-bl-infinite-status::after {
	content: "";
	display: inline-block;
	width: 22px;
	height: 22px;
	border: 3px solid var(--hdb-bl-border, #ECE7DF);
	border-top-color: var(--hdb-bl-terracotta, #C56A3E);
	border-radius: 50%;
	animation: hdb-bl-spin 0.7s linear infinite;
}
@keyframes hdb-bl-spin { to { transform: rotate(360deg); } }

/* =========================================================
   IMAGE HOVER EFFECTS (prefix_class hdb-bl-imgfx-*)
   ========================================================= */
.hdb-bl-card__media img { transition: transform 0.5s ease, filter 0.4s ease, opacity 0.3s ease; }

/* None: cancel the default zoom */
.hdb-bl-imgfx-none .hdb-bl-card:hover .hdb-bl-card__media img { transform: none; }

/* Zoom in (default handled by base .hdb-bl-card:hover img scale) */
.hdb-bl-imgfx-zoom .hdb-bl-card:hover .hdb-bl-card__media img { transform: scale(1.05); }

/* Zoom out */
.hdb-bl-imgfx-zoom-out .hdb-bl-card__media img { transform: scale(1.08); }
.hdb-bl-imgfx-zoom-out .hdb-bl-card:hover .hdb-bl-card__media img { transform: scale(1); }

/* Pan right */
.hdb-bl-imgfx-pan-right .hdb-bl-card__media img { transform: scale(1.12); }
.hdb-bl-imgfx-pan-right .hdb-bl-card:hover .hdb-bl-card__media img { transform: scale(1.12) translateX(-5%); }

/* Grayscale -> color */
.hdb-bl-imgfx-grayscale .hdb-bl-card__media img { filter: grayscale(100%); transform: none; }
.hdb-bl-imgfx-grayscale .hdb-bl-card:hover .hdb-bl-card__media img { filter: grayscale(0%); }

/* Blur -> sharp */
.hdb-bl-imgfx-blur .hdb-bl-card__media img { filter: blur(3px); transform: scale(1.05); }
.hdb-bl-imgfx-blur .hdb-bl-card:hover .hdb-bl-card__media img { filter: blur(0); }

/* ensure media clips overlay pseudo-element */
.hdb-bl-card__media { position: relative; }
