/* Nature Boy Digital: blog listing + single post (loaded on blog views only). */
.nbd-blog { --nbd-blue: #507ca3; padding: 0 0 0; }
.nbd-blog .nbd-wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.nbd-blog .nbd-wrap--text { max-width: 760px; }
.nbd-blog a { color: var(--nbd-blue); }
.nbd-blog .nbd-crumbs { margin: 0 0 18px; font-size: 18px; line-height: 1.6; }
.nbd-blog .nbd-crumbs p { margin: 0; }
.nbd-blog .nbd-crumbs a { color: #1d1f22; text-decoration: none; }
.nbd-blog .nbd-crumbs a:hover { text-decoration: underline; }

/* Buttons (same look as the rest of the site) */
.nbd-blog .nbd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 6px; background: var(--nbd-night); color: #fff; font: 600 1.05rem/1 var(--nbd-font-body); text-decoration: none; border: 2px solid var(--nbd-night); }
.nbd-blog .nbd-btn:hover { background: #2b2e33; border-color: #2b2e33; color: #fff; }
.nbd-blog .nbd-btn--ghost { background: transparent; color: var(--nbd-night); }
.nbd-blog .nbd-btn--ghost:hover { background: var(--nbd-night); color: #fff; }

/* Listing header */
.nbd-blog-head { padding: 40px 0 28px; }
.nbd-eyebrow { margin: 0 0 6px; color: var(--nbd-blue); font: 600 1rem/1.2 var(--nbd-font-head); letter-spacing: .12em; text-transform: uppercase; }
.nbd-blog-title { margin: 0 0 12px; font-size: clamp(2.4rem, 5vw, 3.6rem); text-transform: uppercase; letter-spacing: .02em; color: var(--nbd-ink); }
.nbd-blog-intro { max-width: 720px; color: var(--nbd-ink-2); font-size: 1.2rem; }
.nbd-blog-intro p { margin: 0 0 .6em; }

/* Post meta line */
.nbd-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; color: var(--nbd-ink-3); font-size: .95rem; }
.nbd-post-meta .nbd-post-cat { color: var(--nbd-blue); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; text-decoration: none; }
.nbd-post-meta .nbd-dot { color: var(--nbd-line); }

/* Card grid */
.nbd-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; padding: 8px 0 48px; }
.nbd-post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--nbd-line); border-radius: 8px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.nbd-post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.nbd-post-card__media { display: block; aspect-ratio: 3 / 2; background: #e7e3da; overflow: hidden; }
.nbd-post-card__media img, .nbd-post-card__ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.nbd-post-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.nbd-post-card__title { margin: 0 0 10px; font-size: 1.7rem; line-height: 1.1; }
.nbd-post-card__title a { color: var(--nbd-ink); text-decoration: none; }
.nbd-post-card__title a:hover { color: var(--nbd-blue); }
.nbd-post-card__excerpt { margin: 0 0 16px; color: var(--nbd-ink-2); font-size: 1.05rem; }
.nbd-read-more { margin-top: auto; font-weight: 600; text-decoration: none; }
.nbd-read-more:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Newest post: wide card */
.nbd-post-card.is-featured { grid-column: 1 / -1; flex-direction: row; }
.nbd-post-card.is-featured .nbd-post-card__media { flex: 0 0 60%; aspect-ratio: auto; min-height: 380px; }
.nbd-post-card.is-featured .nbd-post-card__body { justify-content: center; padding: 32px 36px; }
.nbd-post-card.is-featured .nbd-post-card__title { font-size: clamp(2rem, 3vw, 2.6rem); }
.nbd-post-card.is-featured .nbd-read-more { margin-top: 4px; }

.nbd-pagination { padding: 0 0 56px; }
.nbd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nbd-pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--nbd-line); border-radius: 6px; background: #fff; color: var(--nbd-ink); text-decoration: none; font-weight: 600; }
.nbd-pagination .page-numbers.current { background: var(--nbd-night); border-color: var(--nbd-night); color: #fff; }
.nbd-blog-empty { padding: 48px 32px 64px; margin: 8px 0 56px; background: #fff; border: 1px solid var(--nbd-line); border-radius: 8px; text-align: center; }
.nbd-blog-empty h2 { margin: 0 0 8px; font-size: 2rem; }
.nbd-blog-empty p { color: var(--nbd-ink-2); }

/* Single post */
.nbd-article-head { padding-top: 40px; padding-bottom: 24px; }
.nbd-article-title { margin: 4px 0 14px; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; color: var(--nbd-ink); }
.nbd-article-lead { margin: 0 0 14px; font-size: 1.3rem; line-height: 1.5; color: var(--nbd-ink-2); }
.nbd-byline { margin: 0; color: var(--nbd-ink-3); }
.nbd-byline a { font-weight: 600; text-decoration: none; }
.nbd-article-hero { margin: 0 auto 36px; max-width: 1140px; }
.nbd-article-hero img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: cover; border-radius: 8px; }
.nbd-article-hero figcaption, .nbd-article-body figcaption, .nbd-article-body .wp-element-caption { margin-top: 8px; color: var(--nbd-ink-3); font-size: .95rem; text-align: center; }

.nbd-article-body { font-size: 1.2rem; line-height: 1.75; color: var(--nbd-ink); }
.nbd-article-body > * { margin-top: 0; margin-bottom: 1.2em; }
.nbd-article-body h2 { margin: 1.8em 0 .5em; font-size: 2.1rem; }
.nbd-article-body h3 { margin: 1.5em 0 .4em; font-size: 1.6rem; }
.nbd-article-body a { text-decoration: underline; text-underline-offset: 3px; }
.nbd-article-body img { max-width: 100%; height: auto; border-radius: 6px; }
.nbd-article-body figure { margin: 2em 0; }
.nbd-article-body .alignwide, .nbd-article-body .alignfull { margin-left: calc(50% - min(48vw, 540px)); margin-right: calc(50% - min(48vw, 540px)); max-width: none; }
.nbd-article-body blockquote, .nbd-article-body .wp-block-pullquote { margin: 2em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--nbd-blue); font: 500 1.6rem/1.35 var(--nbd-font-head); color: var(--nbd-ink); }
.nbd-article-body blockquote p { margin: 0 0 .4em; }
.nbd-article-body blockquote cite { display: block; font: 400 1rem/1.4 var(--nbd-font-body); color: var(--nbd-ink-3); font-style: normal; }
.nbd-article-body ul, .nbd-article-body ol { padding-left: 1.3em; }
.nbd-article-body li { margin-bottom: .4em; }
.nbd-article-body hr { border: 0; border-top: 1px solid var(--nbd-line); margin: 2.4em 0; }
.nbd-article-body .wp-block-gallery { gap: 12px; }
/* Print galleries dropped into a post ([nbd_gallery ids="…" tabs="no" bar="no"]) can use the full width */
.nbd-article-body .nbd-gallery { margin: 2em calc(50% - min(48vw, 540px)); }

.nbd-article-foot { padding-top: 8px; padding-bottom: 32px; }
.nbd-tags { color: var(--nbd-ink-3); }
.nbd-tags a { display: inline-block; margin: 0 4px 6px 0; padding: 4px 10px; border: 1px solid var(--nbd-line); border-radius: 99px; background: #fff; font-size: .9rem; text-decoration: none; }
.nbd-author { display: flex; gap: 20px; align-items: flex-start; margin-top: 24px; padding: 24px; background: #fff; border: 1px solid var(--nbd-line); border-radius: 8px; }
.nbd-author__logo { flex: none; width: 88px; height: auto; }
.nbd-author p { margin: 0 0 8px; color: var(--nbd-ink-2); }
.nbd-author__name { font: 600 1.4rem/1.1 var(--nbd-font-head) !important; color: var(--nbd-ink) !important; text-transform: uppercase; letter-spacing: .04em; }

.nbd-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 8px; }
.nbd-post-nav a { display: block; padding: 18px 20px; background: #fff; border: 1px solid var(--nbd-line); border-radius: 8px; color: var(--nbd-ink); font: 600 1.3rem/1.2 var(--nbd-font-head); text-decoration: none; }
.nbd-post-nav a span { display: block; margin-bottom: 4px; color: var(--nbd-blue); font: 600 .9rem/1 var(--nbd-font-body); letter-spacing: .04em; }
.nbd-post-nav a:hover { border-color: var(--nbd-blue); }
.nbd-post-nav .next { grid-column: 2; text-align: right; }
.nbd-back { margin-top: 16px; margin-bottom: 48px; }
.nbd-back a { font-weight: 600; text-decoration: none; }

/* "Bring the outdoors home" band */
.nbd-blog-cta { background: var(--nbd-night); color: #fff; padding: 48px 0; }
.nbd-blog-cta .nbd-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.nbd-blog-cta h2 { margin: 0 0 8px; color: #fff; font-size: 2.2rem; text-transform: uppercase; letter-spacing: .03em; }
.nbd-blog-cta p { margin: 0; color: #d9dbde; max-width: 620px; }
.nbd-blog-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.nbd-blog-cta .nbd-btn { background: var(--nbd-sun); border-color: var(--nbd-sun); color: var(--nbd-night); }
.nbd-blog-cta .nbd-btn:hover { background: #fff; border-color: #fff; color: var(--nbd-night); }
.nbd-blog-cta .nbd-btn--ghost { background: transparent; border-color: #fff; color: #fff; }
.nbd-blog-cta .nbd-btn--ghost:hover { background: #fff; color: var(--nbd-night); }

@media (max-width: 1024px) {
	.nbd-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nbd-post-card.is-featured .nbd-post-card__media { flex-basis: 52%; min-height: 300px; }
}
@media (max-width: 700px) {
	.nbd-blog .nbd-wrap { padding: 0 16px; }
	.nbd-blog-head, .nbd-article-head { padding-top: 24px; }
	.nbd-post-grid { grid-template-columns: 1fr; gap: 24px; }
	.nbd-post-card.is-featured { flex-direction: column; }
	.nbd-post-card.is-featured .nbd-post-card__media { aspect-ratio: 3 / 2; min-height: 0; }
	.nbd-post-card.is-featured .nbd-post-card__body { padding: 20px 22px 22px; }
	.nbd-article-body { font-size: 1.1rem; }
	.nbd-article-body .alignwide, .nbd-article-body .alignfull, .nbd-article-body .nbd-gallery { margin-left: 0; margin-right: 0; }
	.nbd-author { flex-direction: column; }
	.nbd-post-nav { grid-template-columns: 1fr; }
	.nbd-post-nav .next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .nbd-post-card { transition: none; } .nbd-post-card:hover { transform: none; } }

/* Full-width blog pages (the theme boxes .site-main by default) */
body .site-main.nbd-blog { max-width: none; width: 100%; margin: 0; padding: 0; }
.nbd-blog .nbd-blog-cta .nbd-btn { background: var(--nbd-sun); border-color: var(--nbd-sun); color: var(--nbd-night); }
.nbd-blog .nbd-blog-cta .nbd-btn--ghost { background: transparent; border-color: #fff; color: #fff; }
.nbd-blog .nbd-blog-cta .nbd-btn:hover, .nbd-blog .nbd-blog-cta .nbd-btn--ghost:hover { background: #fff; border-color: #fff; color: var(--nbd-night); }
.nbd-back { margin-bottom: 56px; }

/* Single post: left-aligned layout, lined up with the featured image (1.9.4) */
.nbd-single .nbd-wrap--text { max-width: 1140px; }
.nbd-blog-head, .nbd-single .nbd-article-head { padding-top: 64px; }
.nbd-single .nbd-article-head { padding-bottom: 32px; }
.nbd-single .nbd-article-head > *, .nbd-single .nbd-article-body > *, .nbd-single .nbd-article-foot > * { max-width: 800px; margin-left: 0; margin-right: auto; text-align: left; }
.nbd-single .nbd-article-hero { margin-bottom: 56px; }
.nbd-single figcaption, .nbd-single .wp-element-caption { text-align: left !important; }
.nbd-single .nbd-article-body > .nbd-gallery, .nbd-single .nbd-article-body > .alignwide, .nbd-single .nbd-article-body > .alignfull { max-width: none; margin: 2.4em 0; }
.nbd-single .nbd-article-body .nbd-gallery .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nbd-single .nbd-post-nav { grid-template-columns: repeat(2, minmax(0, 390px)); justify-content: start; margin-top: 8px; }
.nbd-single .nbd-back { margin-top: 40px; margin-bottom: 64px; text-align: left; }
@media (max-width: 1024px) { .nbd-single .nbd-article-body .nbd-gallery .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
	.nbd-blog-head, .nbd-single .nbd-article-head { padding-top: 36px; }
	.nbd-single .nbd-article-hero { margin-bottom: 36px; }
	.nbd-single .nbd-article-body .nbd-gallery .photo-grid { grid-template-columns: 1fr; }
	.nbd-single .nbd-post-nav { grid-template-columns: 1fr; }
}
.nbd-article-body .nbd-gallery .photo-grid { padding-left: 0; list-style: none; }
.nbd-article-body .nbd-gallery .photo-card { margin-bottom: 0; }

/* Featured photo: show the whole image (tall photos aren't cropped) (1.9.6) */
.nbd-single .nbd-article-hero img { width: auto; max-width: 100%; height: auto; max-height: 85vh; object-fit: contain; }
.nbd-single .nbd-article-body .wp-block-gallery img { border-radius: 6px; }

/* Inline story photos (1.9.9) */
.nbd-article-body .nbd-inline-photo { margin: 40px 0; }
.nbd-article-body .nbd-inline-photo img { display: block; width: auto; max-width: 100%; height: auto; max-height: 85vh; border-radius: 4px; }
.nbd-article-body .nbd-inline-photo figcaption { margin-top: 10px; font-size: .9rem; color: #4a4d52; text-align: left; }
.nbd-article-body .nbd-inline-photo.alignright { float: right; width: 42%; max-width: 340px; margin: 6px 0 24px 32px; }
.nbd-article-body .nbd-inline-photo.alignright img { width: 100%; max-height: none; }
.nbd-article-body::after { content: ""; display: table; clear: both; }
.nbd-article-body h2, .nbd-article-body blockquote { clear: both; }
@media (max-width: 600px) { .nbd-article-body .nbd-inline-photo.alignright { float: none; width: 100%; max-width: none; margin: 32px 0; } }

/* Line the blog up with the other pages: same left edge and top spacing (1.10.1) */
.nbd-blog .nbd-wrap, .nbd-single .nbd-wrap--text { max-width: 1304px; padding: 0 32px; }
.nbd-blog-head, .nbd-single .nbd-article-head { padding-top: 24px; }
@media (max-width: 767px) {
	.nbd-blog .nbd-wrap, .nbd-single .nbd-wrap--text { padding: 0 16px; }
	.nbd-blog-head, .nbd-single .nbd-article-head { padding-top: 16px; }
}
