/* DehraHikes blog page + category archive. Loaded after dh-base.css. Colours come from the tokens in dh-base.css. */

.dh-blog { --dh-cols: 4; } /* cards per row on large screens: change 4 to 3 for wider cards */
.dh-blog .dh-wrap { width: min(1280px, calc(100% - 32px)); }

/* ===== Hero ===== */
.dh-blog-hero {
    display: flow-root;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 36px 0 30px;
    box-sizing: border-box;
    text-align: center;
    background: radial-gradient(circle at 50% 0, rgba(31, 122, 77, .12), transparent 55%), linear-gradient(180deg, #f6fbf8 0%, #fff 100%);
}
.dh-blog-hero .dh-crumbs,
.dh-blog-hero .dh-crumbs p { justify-content: center; margin-bottom: 18px; }
/* Centre the small badge above the centred heading */
.dh-blog-hero .dh-chip { display: flex; width: fit-content; margin: 0 auto; }
.dh-blog-title {
	margin: 0 auto 10px; max-width: 900px; color: var(--dh-ink);
	font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.12; font-weight: 800; letter-spacing: 0;
}
.dh-blog-title::after { content: ""; display: block; width: 56px; height: 3px; margin: 14px auto 0; border-radius: 3px; background: var(--dh-primary); }
.dh-blog-intro { max-width: 720px; margin: 14px auto 0; color: var(--dh-muted); font-size: 16px; line-height: 1.7; }
.dh-blog-intro p { margin: 0 0 10px; }

.dh-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.dh-pill {
	display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--dh-line); border-radius: 999px; background: #fff;
	color: var(--dh-ink); font-size: 13px; font-weight: 800; line-height: 1; min-height: 40px; padding: 0 16px; transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.dh-pill:hover { border-color: var(--dh-primary); color: var(--dh-primary); }
.dh-pill.is-current { background: var(--dh-primary); border-color: var(--dh-primary); color: #fff; }

/* ===== Featured ===== */
.dh-featured { padding: 6px 0 32px; }
.dh-featured-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.dh-featured--solo .dh-featured-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.dh-feat-photo { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #eef2f0; }
.dh-feat-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.dh-feat-main:hover .dh-feat-photo img,
.dh-feat-small:hover .dh-feat-photo img { transform: scale(1.03); }
.dh-feat-body { padding-top: 14px; }
.dh-feat-title { margin: 8px 0 8px; font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.22; font-weight: 900; }
.dh-feat-title a:hover,
.dh-feat-title-sm a:hover { color: var(--dh-primary); }
.dh-feat-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--dh-primary); font-size: 13px; font-weight: 900; }
.dh-feat-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.dh-feat-small .dh-feat-photo { aspect-ratio: 4 / 3; border-radius: 14px; }
.dh-feat-small .dh-card-meta { margin-top: 8px; }
.dh-feat-title-sm { margin: 6px 0 0; font-size: 14px; line-height: 1.3; font-weight: 900; }

/* ===== Filter bar ===== */
.dh-filterbar { padding: 14px 0; border-top: 1px solid var(--dh-line); border-bottom: 1px solid var(--dh-line); background: #fbfdfc; }
.dh-filter { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) auto auto; gap: 12px; align-items: center; }
.dh-field {
	position: relative; display: flex; align-items: center; min-width: 0; height: 46px;
	border: 1px solid var(--dh-line); border-radius: 12px; background: #fff; padding: 0 12px; gap: 8px; color: var(--dh-muted);
}
.dh-field:focus-within { border-color: var(--dh-primary); box-shadow: 0 0 0 3px var(--dh-primary-soft); }
.dh-field input,
.dh-field select {
	width: 100%; min-width: 0; height: 100%; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important;
	color: var(--dh-ink); font: inherit; font-size: 14px; padding: 0 !important;
}
.dh-field select { cursor: pointer; text-overflow: ellipsis; }
.dh-filter .dh-btn {
	height: 46px; border: 0; border-radius: 12px; background: var(--dh-primary); color: #fff; cursor: pointer;
	font: inherit; font-size: 14px; font-weight: 800; padding: 0 22px; transition: background .18s ease;
}
.dh-filter .dh-btn:hover { background: var(--dh-primary-dark); }
.dh-reset { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--dh-primary); font-size: 13px; font-weight: 800; white-space: nowrap; }
.dh-reset:hover { text-decoration: underline; }

/* ===== Grid ===== */
.dh-listing { padding: 32px 0 72px; }
.dh-results { margin: 0 0 18px; color: var(--dh-muted); font-size: 14px; font-weight: 700; }
.dh-grid { display: grid; grid-template-columns: repeat(var(--dh-cols, 4), minmax(0, 1fr)); gap: 20px; align-items: stretch; }

.dh-empty { padding: 40px 20px; border: 1px dashed var(--dh-line); border-radius: 18px; background: #fbfdfc; text-align: center; }
.dh-empty p { margin: 0 0 14px; color: var(--dh-muted); font-size: 16px; font-weight: 700; }
.dh-empty .dh-btn { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 12px; background: var(--dh-primary); color: #fff; font-weight: 800; }

/* ===== Pagination ===== */
.dh-pagination { margin-top: 34px; }
.dh-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dh-pagination li { margin: 0; }
.dh-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
	border: 1px solid var(--dh-line); border-radius: 12px; background: #fff; color: var(--dh-ink); font-size: 14px; font-weight: 800;
	transition: border-color .18s ease, color .18s ease;
}
.dh-pagination a.page-numbers:hover { border-color: var(--dh-primary); color: var(--dh-primary); }
.dh-pagination .page-numbers.current { background: var(--dh-primary); border-color: var(--dh-primary); color: #fff; }
.dh-pagination .page-numbers.dots { border: 0; background: transparent; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
	.dh-grid { grid-template-columns: repeat(min(var(--dh-cols, 4), 3), minmax(0, 1fr)); }
	.dh-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dh-filter .dh-field--search { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
	.dh-featured-grid { grid-template-columns: minmax(0, 1fr); }
	.dh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 560px) {
	.dh-blog .dh-wrap { width: min(100% - 24px, 1280px); }
	.dh-blog-hero { padding: 26px 0 22px; }
	.dh-feat-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dh-grid,
	.dh-filter { grid-template-columns: minmax(0, 1fr); }
	.dh-feat-side { gap: 14px 12px; }
	.dh-filter .dh-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.dh-feat-photo img { transition: none; }
}

/* ===== Archive hero extras (author / tag / date) ===== */
.dh-author-hero { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 auto 14px; }
.dh-author-hero img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; box-shadow: 0 8px 22px rgba(16, 24, 40, .14); }
.dh-blog-hero .dh-search-form { max-width: 520px; margin: 18px auto 0; }
.dh-blog-hero .dh-search-form form { display: flex; gap: 8px; }
.dh-blog-hero .dh-search-form input[type="search"] { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--dh-line); border-radius: 12px; padding: 0 14px; }
.dh-blog-hero .dh-search-form input[type="submit"],
.dh-blog-hero .dh-search-form button { height: 46px; border: 0; border-radius: 12px; background: var(--dh-primary); color: #fff; font-weight: 800; padding: 0 20px; cursor: pointer; }
