/* ==========================================================================
   Abode & Bloom — Single post layout
   Loads on single posts only. The page is wrapped in .ab-home.ab-single so it
   inherits all homepage tokens, components (.ph .tag .btn .meta .trend-*),
   dark-mode overrides and animations. This file only adds single-specific
   layout: the article/sidebar grid, reading typography, share bar, the
   full-bleed trending slider and prev/next navigation.
   ========================================================================== */

/* ---- Featured image — perfect 1:1 square, centered ---------------------- */
.ab-single .single-banner { width: 100%; max-width: 620px; margin: 26px auto 8px; padding-inline: var(--gut); }
.ab-single .single-banner-img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-md); }
@media (max-width: 640px) { .ab-single .single-banner { max-width: 100%; margin-top: 16px; } .ab-single .single-banner-img { border-radius: var(--radius-sm); } }

/* ---- Layout: article + sticky sidebar ---------------------------------- */
.ab-single .single-wrap { padding-block: 30px 8px; }
.ab-single .single-grid { display: grid; gap: 32px; }
.ab-single .single-main { min-width: 0; }

@media (min-width: 1000px) {
	.ab-single .single-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
	.ab-single .single-side { position: sticky; top: 92px; }
}

/* ---- Breadcrumb -------------------------------------------------------- */
.ab-single .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.ab-single .crumbs a { color: var(--muted); border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.ab-single .crumbs a:hover { color: var(--moss); border-color: var(--moss); }
.ab-single .crumbs svg { width: 13px; height: 13px; opacity: .5; }

/* ---- Article header (full width, above the two columns) ---------------- */
.ab-single .single-head { max-width: 820px; margin: 0 0 30px; }
.ab-single .single-head .tag { margin-bottom: 14px; }
.ab-single .single-title { font-size: clamp(28px, 5.2vw, 48px); line-height: 1.08; letter-spacing: -.01em; margin: 6px 0 18px; }
.ab-single .single-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.ab-single .single-meta .who { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink); }
.ab-single .single-meta .who a { color: inherit; }
.ab-single .single-meta .who a:hover { color: var(--moss); }
.ab-single .single-meta .avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; background: var(--sage-soft); }
.ab-single .single-meta .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Reading typography ------------------------------------------------ */
.ab-single .entry-content { font-size: 17.5px; line-height: 1.75; color: var(--ink); max-width: 72ch; }
.ab-single .entry-content > * + * { margin-top: 1.15em; }
.ab-single .entry-content h2,
.ab-single .entry-content h3,
.ab-single .entry-content h4 { font-family: var(--f-display); line-height: 1.2; margin-top: 1.7em; }
.ab-single .entry-content h2 { font-size: clamp(23px, 3.4vw, 30px); }
.ab-single .entry-content h3 { font-size: clamp(20px, 2.6vw, 24px); }
.ab-single .entry-content h4 { font-size: 19px; }
.ab-single .entry-content a { color: var(--moss); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .15s; }
.ab-single .entry-content a:hover { color: var(--marigold-deep); }
.ab-single .entry-content strong { color: var(--ink); font-weight: 700; }
.ab-single .entry-content ul,
.ab-single .entry-content ol { padding-left: 1.3em; }
.ab-single .entry-content li + li { margin-top: .5em; }
.ab-single .entry-content li::marker { color: var(--fern); }
.ab-single .entry-content img { border-radius: var(--radius-sm); height: auto; max-width: 100%; }
.ab-single .entry-content figure img,
.ab-single .entry-content > img { display: block; margin-inline: auto; }
/* Optimised for 1:1 images: keep large squares from dominating the column */
.ab-single .entry-content img.size-full,
.ab-single .entry-content figure.aligncenter img,
.ab-single .entry-content p > img { max-width: min(100%, 520px); }
.ab-single .entry-content figure { margin-inline: 0; }
.ab-single .entry-content figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.ab-single .entry-content blockquote {
	border-left: 3px solid var(--marigold);
	padding: 4px 0 4px 20px; margin-left: 0;
	font-family: var(--f-display); font-style: italic; font-size: 20px; color: var(--moss);
}
.ab-single .entry-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .9em; background: var(--sage-soft); padding: .15em .4em; border-radius: 6px;
}
.ab-single .entry-content pre {
	background: #10201a; color: #e7efe6; padding: 16px 18px; border-radius: var(--radius-sm);
	overflow: auto; font-size: 14.5px; line-height: 1.6;
}
.ab-single .entry-content pre code { background: none; padding: 0; color: inherit; }
.ab-single .entry-content hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.ab-single .entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ab-single .entry-content th,
.ab-single .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.ab-single .entry-content th { background: var(--sage-soft); font-weight: 600; }

/* Post tags under the article */
.ab-single .post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ab-single .post-tags a.tag { text-transform: none; letter-spacing: .02em; }

/* ---- Share bar --------------------------------------------------------- */
.ab-single .share { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ab-single .share .share-label { font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ab-single .share-links { display: flex; gap: 10px; flex-wrap: wrap; }
.ab-single .share-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%; flex: none;
	border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
	cursor: pointer; transition: transform .18s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.ab-single .share-btn svg { width: 18px; height: 18px; }
.ab-single .share-btn:hover { transform: translateY(-2px); background: var(--moss); color: #fff; border-color: var(--moss); }

.ab-single .share-btn.share-follow:hover { background: var(--fern); border-color: var(--fern); }

/* ---- Sidebar cards ----------------------------------------------------- */
.ab-single .side-card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ab-single .side-card + .side-card { margin-top: 22px; }
.ab-single .side-title { font-family: var(--f-body); font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fern); margin-bottom: 16px; }

/* Author card (magazine style, matches reference) */
.ab-single .author-hero { text-align: center; padding: 24px 22px 26px; }
.ab-single .author-photo {
	width: 120px; height: 120px; aspect-ratio: 1 / 1; margin: 0 auto 16px;
	border-radius: 50%; overflow: hidden; background: var(--sage-soft);
	box-shadow: 0 0 0 4px var(--cream), 0 6px 18px rgba(27,42,33,.12);
	/* For a square/rounded portrait instead: width:100%; aspect-ratio:4/5; border-radius:16px. */
}
.ab-single .author-photo img,
.ab-single .author-img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; border-radius: inherit; }
.ab-single .author-greet { font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 2vw, 26px); line-height: 1.16; color: var(--moss); margin-bottom: 12px; }
.ab-single .author-rule { display: block; width: 46px; height: 3px; border-radius: 2px; background: #E63946; margin: 0 auto 16px; }
.ab-single .author-bio { font-size: 15px; font-weight: 500; line-height: 1.72; color: var(--ink); margin-bottom: 20px; }

.ab-single .author-pin-btn {
	display: flex; align-items: center; justify-content: center; gap: 9px;
	width: 100%; min-height: 48px; padding: 13px 18px;
	border-radius: 12px; background: #BD081C; color: #fff;
	font-weight: 600; font-size: 15px; line-height: 1;
	transition: background-color .2s ease, transform .18s ease, box-shadow .2s ease;
}
.ab-single .author-pin-btn:hover { background: #9C0616; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(189, 8, 28, .3); }
.ab-single .author-pin-btn svg { width: 18px; height: 18px; flex: none; }

/* Secondary Instagram link under the Pinterest button */
.ab-single .author-ig {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	margin-top: 12px; font-weight: 600; font-size: 14px; color: var(--moss);
	transition: color .2s ease;
}
.ab-single .author-ig svg { width: 18px; height: 18px; }
.ab-single .author-ig:hover { color: var(--marigold-deep); }

/* Recent-posts list in the sidebar (text only, no thumbnails) */
.ab-single .side-item { display: block; padding: 12px 0; border-top: 1px solid var(--line); }
.ab-single .side-item:first-of-type { border-top: none; padding-top: 0; }
.ab-single .side-cat { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fern); margin-bottom: 5px; }
.ab-single .side-item h4 { font-family: var(--f-display); font-weight: 600; font-size: 16px; line-height: 1.3; transition: color .15s; }
.ab-single .side-item:hover h4 { color: var(--moss); }
.ab-single .side-item .meta { margin-top: 4px; font-size: 12px; }

/* ---- Full-bleed trending slider --------------------------------------- */
.ab-single .single-trending {
	margin-top: 44px;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	border-radius: 0;
	padding: 40px 0 44px;
}
.ab-single .single-trending .inner { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
/* Large slider: ~1.1x the homepage card width */
.ab-single .single-trending .trend-card { flex-basis: 255px; }
.ab-single .single-trending .trend-card h3 { font-size: 17.5px; }
@media (min-width: 700px) { .ab-single .single-trending .trend-card { flex-basis: 300px; } }

/* ---- Prev / next ------------------------------------------------------- */
.ab-single .post-nav { display: grid; gap: 14px; padding-block: 40px; }
@media (min-width: 700px) { .ab-single .post-nav { grid-template-columns: 1fr 1fr; } }
.ab-single .post-nav a {
	display: flex; align-items: center; gap: 14px; padding: 16px;
	background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ab-single .post-nav a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.ab-single .post-nav .nav-next { text-align: right; }
.ab-single .post-nav .nav-next { justify-content: flex-end; }
.ab-single .post-nav .pn-thumb { width: 56px; height: 56px; flex: none; }
.ab-single .post-nav .pn-thumb .ph { aspect-ratio: 1/1; border-radius: 10px; }
.ab-single .post-nav .pn-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fern); display: flex; align-items: center; gap: 6px; }
.ab-single .post-nav .nav-next .pn-label { justify-content: flex-end; }
.ab-single .post-nav .pn-title { font-family: var(--f-display); font-weight: 600; font-size: 16px; line-height: 1.2; margin-top: 4px; color: var(--ink); }
.ab-single .post-nav svg { width: 15px; height: 15px; }

/* Reveal for single sections (JS adds .reveal/.in like the homepage). */
@media (prefers-reduced-motion: no-preference) {
	.ab-single .single-trending.reveal,
	.ab-single .post-nav.reveal { opacity: 0; transform: translateY(16px); }
	.ab-single .single-trending.reveal.in,
	.ab-single .post-nav.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.6,.2,1); }
}
