/* Blog post layout in the site design (template-parts/blog/single-post.php). Text styles: article.css. */

/* Link colours, as on the specialist pages: each part sets --apx-a / --apx-a-hover (the theme's link colour stays out). */
body.apb-body .apx a:not(.apx-none):not(.blog-cta *),
body.apb-body .apx a:not(.apx-none):not(.blog-cta *):visited { color: var(--apx-a, var(--apx-blue)); }
body.apb-body .apx a:not(.apx-none):not(.blog-cta *):hover,
body.apb-body .apx a:not(.apx-none):not(.blog-cta *):focus-visible { color: var(--apx-a-hover, var(--apx-a, var(--apx-blue))); }

.apx.apx-post { background: #fff; }

/* Header band */
.apx-post-hero { position: relative; z-index: 0; overflow: hidden; padding: 40px 0 44px; background: linear-gradient(115deg, #F9FCFF 0%, #EEF5FF 55%, #E1F8FA 100%); border-bottom: 1px solid var(--apx-line); }
.apx-post-hero::before { content: ""; position: absolute; z-index: -1; top: -160px; right: 6%; width: 520px; max-width: 70vw; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(46, 102, 255, .14), rgba(46, 102, 255, 0) 70%); pointer-events: none; animation: apxDriftA 18s ease-in-out infinite alternate; }
.apx-post-hero::after { content: ""; position: absolute; z-index: -1; left: 2%; bottom: -220px; width: 480px; max-width: 70vw; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(6, 182, 212, .13), rgba(6, 182, 212, 0) 70%); pointer-events: none; animation: apxDriftB 22s ease-in-out infinite alternate; }
.apx-post-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 1120px; }
.apx .apx-post-back { --apx-a: var(--apx-navy); --apx-a-hover: var(--apx-blue); display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: color .2s ease, gap .2s ease; }
.apx .apx-post-back:hover { gap: 11px; }
.apx-post-back svg { width: 18px; height: 18px; fill: none; stroke: var(--apx-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.apx .apx-post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.apx .apx-post-cats a { --apx-a: var(--apx-blue); --apx-a-hover: var(--apx-navy); display: inline-block; padding: 5px 14px; border: 1px solid var(--apx-blue-20); border-radius: 999px; background: var(--apx-blue-10); font-size: 13px; font-weight: 600; line-height: 1.3; letter-spacing: .35px; text-transform: uppercase; text-decoration: none; transition: background-color .2s ease; }
.apx .apx-post-cats a:hover { background: var(--apx-blue-20); }
.apx .apx-post-title { max-width: 1000px; margin: 0; font-family: inherit; font-size: clamp(34px, 4.2vw, 52px); font-weight: 700; line-height: 1.1; letter-spacing: -1.2px; color: var(--apx-navy); text-transform: none; }
.apx .apx-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 15px; line-height: 1.5; color: var(--apx-muted); }
.apx .apx-post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 0; padding: 12px 16px; border: 1px solid var(--apx-line); border-radius: 12px; background: rgba(255, 255, 255, .75); font-size: 15px; line-height: 1.5; color: var(--apx-muted); }
.apx .apx-post-byline strong { font-weight: 600; color: var(--apx-navy); }
.apx-post-reviewed { display: inline; }
.apx-post-reviewed svg { display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
.apx-post-reviewed svg circle { fill: #0E9F6E; }
.apx-post-reviewed svg path { fill: #fff; }
.apx-post-sep { color: var(--apx-line-2); }
.apx-post-nowrap { white-space: nowrap; }

/* Body: text column + "On this page" */
.apx-post-layout { display: grid; grid-template-columns: minmax(0, 780px); justify-content: center; gap: 56px; padding-top: 44px; padding-bottom: 72px; }
.apx-post-layout.has-toc { grid-template-columns: minmax(0, 780px) 280px; }
.apx-post-main { min-width: 0; }
.apx .apx-post-image { margin: 0 0 36px; overflow: hidden; border-radius: 20px; background: linear-gradient(160deg, #dfeaf7, #d4efec); box-shadow: var(--apx-shadow-xl); }
.apx .apx-post-image img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; transition: transform .6s ease; }
.apx .apx-post-image:hover img { transform: scale(1.02); }

.apx-post-aside { position: relative; }
.apx-post-aside > * { position: sticky; top: 110px; }
.admin-bar .apx-post-aside > * { top: 142px; }
.apx .apx-post-aside .apx-post-toc { max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.apx .apx-post-toc { padding: 22px 22px 18px; border: 1px solid var(--apx-line); border-radius: 16px; background: #fff; box-shadow: var(--apx-shadow-sm); }
.apx .apx-post-toc-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--apx-blue); }
.apx .apx-post-toc ol { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.apx .apx-post-toc a { --apx-a: var(--apx-ink); --apx-a-hover: var(--apx-blue); position: relative; display: block; padding: 7px 10px 7px 14px; border-radius: 8px; font-size: 15px; line-height: 1.4; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.apx .apx-post-toc a::before { content: ""; position: absolute; left: 3px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: transparent; transition: background-color .2s ease; }
.apx .apx-post-toc a:hover { background: var(--apx-blue-5); }
.apx .apx-post-toc a[aria-current="true"] { --apx-a: var(--apx-blue); background: var(--apx-blue-5); font-weight: 600; }
.apx .apx-post-toc a[aria-current="true"]::before { background: var(--apx-grad); }
.apx .apx-post-aside-btn { width: 100%; margin-top: 14px; }

/* Phone / tablet "On this page" (collapsible) */
.apx .apx-post-toc-inline { display: none; margin: 0 0 32px; padding: 0; border: 1px solid var(--apx-blue-20); border-radius: 14px; background: linear-gradient(135deg, rgba(204, 245, 255, .45), rgba(46, 102, 255, .06)); }
.apx .apx-post-toc-inline summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--apx-blue); cursor: pointer; list-style: none; }
.apx .apx-post-toc-inline summary::-webkit-details-marker { display: none; }
.apx .apx-post-toc-inline[open] .apx-faq-icon::after { transform: rotate(0deg); }
.apx .apx-post-toc-inline ol { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0 12px 14px; list-style: none; }
.apx .apx-post-toc-inline a { --apx-a: var(--apx-ink); --apx-a-hover: var(--apx-blue); display: block; padding: 8px 8px; border-radius: 8px; font-size: 16px; line-height: 1.4; text-decoration: none; }

/* Tags, booking box */
.apx .apx-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; padding: 22px 0 0; border-top: 1px solid var(--apx-line); list-style: none; }
.apx .apx-post-tags a { --apx-a: var(--apx-muted); --apx-a-hover: var(--apx-blue); display: inline-block; padding: 5px 12px; border: 1px solid var(--apx-line); border-radius: 999px; font-size: 14px; text-decoration: none; transition: border-color .2s ease, color .2s ease; }
.apx .apx-post-tags a:hover { border-color: var(--apx-blue-20); }
.apx-post-pages { margin-top: 24px; font-size: 15px; }
.apx .apx-post-cta { margin-top: 44px; padding: 36px 40px; }
.apx .apx-post-cta p.apx-banner-title { margin: 0; font-size: 28px; color: #fff; }

/* Related posts */
.apx-post-related-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.apx .apx-post-related-head .apx-h3xl { margin: 0; }
.apx .apx-post-all { --apx-a: var(--apx-blue); --apx-a-hover: var(--apx-navy); display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; text-decoration: none; }
.apx-post-all .apx-arrow, .apx-post-card-more .apx-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.apx-post-all:hover .apx-arrow { transform: translateX(4px); }
.apx .apx-post-card { --apx-a: var(--apx-navy); --apx-a-hover: var(--apx-navy); gap: 0; padding: 0; overflow: hidden; border-radius: 16px; text-decoration: none; }
.apx-post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(160deg, #dfeaf7, #d4efec); }
.apx-post-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.apx-post-card:hover .apx-post-card-img img { transform: scale(1.05); }
.apx-post-card-body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 20px 22px 22px; }
.apx .apx-post-card-meta { font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--apx-muted); }
.apx .apx-post-card-title { font-size: 19px; font-weight: 600; line-height: 1.35; color: var(--apx-navy); }
.apx .apx-post-card-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 600; color: var(--apx-blue); }
.apx-post-card:hover .apx-post-card-more .apx-arrow { transform: translateX(4px); }

/* Phone booking button */
.apx .apx-post-sticky { display: none; }

/* The theme wraps every page in <main class="overflow-hidden">, which stops the sidebar from staying in view.
   On posts it clips instead (same look: nothing spills sideways), so the sidebar can stay in view while scrolling. */
html body.apb-body main.overflow-hidden { overflow: clip; }

/* Without "On this page": the title lines up with the centred text column */
.apx-post-notoc .apx-post-head { max-width: 780px; }

/* Wide screens: the post fills the same width as the rest of the site (about half the screen) */
@media (min-width: 2400px) {
	.apx-post-head, .apx-post-notoc .apx-post-head { max-width: none; }
	.apx .apx-post-title { max-width: 1200px; font-size: 60px; }
	.apx-post-layout { grid-template-columns: minmax(0, 1fr); }
	.apx-post-layout.has-toc { grid-template-columns: minmax(0, 1fr) 320px; }
	.apx .apx-prose p:not(.blog-cta *), .apx .apx-prose :is(ul, ol):not(.blog-cta *) li { font-size: 20px; }
}

@media (max-width: 1100px) {
	.apx-post-layout.has-toc { grid-template-columns: minmax(0, 780px); }
	.apx-post-head { max-width: 780px; }
	.apx-post-aside { display: none; }
	.apx .apx-post-toc-inline { display: block; }
}
@media (max-width: 767px) {
	.apx-post-hero { padding: 28px 0 30px; }
	.apx .apx-post-title { font-size: 32px; letter-spacing: -.6px; }
	.apx .apx-post-byline { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 14px; }
	.apx .apx-post-byline .apx-post-sep { display: none; }
	.apx-post-layout { gap: 0; padding-top: 28px; padding-bottom: 52px; }
	.apx .apx-post-image { margin-bottom: 26px; border-radius: 16px; }
	.apx .apx-post-cta { padding: 28px 22px; }
	.apx .apx-post-cta p.apx-banner-title { font-size: 23px; }
	.apx .apx-post-cta .apx-btn { width: 100%; }
	.apb-has-sticky .apx .apx-post-sticky { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; display: flex; min-height: 52px; border-radius: 999px; box-shadow: 0 10px 24px -6px rgba(46, 102, 255, .55); }
	body.apb-has-sticky { padding-bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) {
	.apx-post-hero::before, .apx-post-hero::after { animation: none !important; }
}
