/* The Physios - blog styles (archive + single post).
   Layout modelled on the Writrox post page. Change the tokens below to match the brand. */

.pb-page {
	--pb-ink: #131b3a;
	--pb-text: #3a4560;
	--pb-muted: #7a859a;
	--pb-blue: #1a5fd6;
	--pb-blue-dark: #144bb0;
	--pb-band: #d7e3f6;
	--pb-mist: #f4f7fc;
	--pb-line: #e3e8f0;
	--pb-sticky-top: 0px;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 16px;
	line-height: 1.7;
	color: var(--pb-text);
	background: #fff;
}

.pb-page *,
.pb-page *::before,
.pb-page *::after { box-sizing: border-box; }

.pb-page [hidden] { display: none !important; }

.pb-page h1,
.pb-page h2,
.pb-page h3,
.pb-page h4 {
	font-family: 'Inter', system-ui, sans-serif;
	color: var(--pb-ink);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 0;
}

.pb-page p { margin: 0; }
.pb-page ul,
.pb-page ol { margin: 0; }
.pb-page a { color: inherit; text-decoration: none; }
.pb-page img { max-width: 100%; height: auto; display: block; }

.pb-wrap { width: min(1280px, 100% - 48px); margin-inline: auto; }

/* Astra overrides: full width, no theme padding */
body.physios-blog .ast-container { max-width: 100%; padding: 0; display: block; }
body.physios-blog #primary,
body.physios-blog .content-area { width: 100%; margin: 0; padding: 0; }
body.physios-blog .site-content { background: #fff; }

.pb-page :focus-visible { outline: 3px solid var(--pb-blue); outline-offset: 3px; }

/* Buttons */
.pb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 24px;
	border-radius: 8px;
	border: 2px solid transparent;
	font: 600 .95rem/1 'Inter', sans-serif;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.pb-btn--blue { background: var(--pb-blue); color: #fff; }
.pb-btn--blue:hover { background: var(--pb-blue-dark); }
.pb-btn--line { border-color: var(--pb-line); background: #fff; color: var(--pb-ink); }
.pb-btn--line:hover { border-color: var(--pb-blue); color: var(--pb-blue); }
.pb-btn.is-loading { opacity: .6; pointer-events: none; }

/* ------------------------------------------------------------ Cards */
.pb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

.pb-card {
	--pb-tint: #e4ecf7;
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-radius: 16px;
	overflow: hidden;
	background: var(--pb-tint);
	transition: transform .25s ease;
}
.pb-card:nth-child(4n + 1) { --pb-tint: #e6e0f5; }
.pb-card:nth-child(4n + 2) { --pb-tint: #e4ecf7; }
.pb-card:nth-child(4n + 3) { --pb-tint: #cbd8f5; }
.pb-card:nth-child(4n + 4) { --pb-tint: #d6f0e3; }
.pb-card:hover { transform: translateY(-4px); }

.pb-card__body { flex: 1; padding: 22px 22px 20px; min-height: 8.5rem; }
.pb-card__title { font-size: 1.05rem; line-height: 1.35; }
.pb-card__title a { display: block; }
.pb-card__title a:hover,
.pb-card__title a:focus-visible { color: var(--pb-blue); }
.pb-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: .8rem; color: var(--pb-text); opacity: .8; }

.pb-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.pb-card__media img { width: 100%; height: auto; object-fit: cover; transition: transform .5s ease; }
.pb-card:hover .pb-card__media img { transform: scale(1.04); }
.pb-card__ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #b9cdf0, #8fb0e8); }

/* ------------------------------------------------------- Blog main page */
.pb-hero { background: var(--pb-band); padding: clamp(40px, 6vw, 80px) 0; }
.pb-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 56px; align-items: center; }
.pb-hero__inner--solo { grid-template-columns: minmax(0, 760px); }
.pb-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); max-width: 18ch; }
.pb-hero__intro { margin-top: 16px; max-width: 54ch; font-size: 1.05rem; }

.pb-search { display: flex; margin-top: 28px; max-width: 500px; background: #fff; border-radius: 10px; padding: 5px; border: 1px solid #c4d3ec; }
.pb-search input[type='search'] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 16px; font: 500 .95rem 'Inter', sans-serif; color: var(--pb-ink); box-shadow: none; }
.pb-search input[type='search']:focus { outline: none; box-shadow: none; }
.pb-search:focus-within { outline: 3px solid var(--pb-blue); outline-offset: 2px; }
.pb-search button { border: 0; border-radius: 7px; background: var(--pb-blue); color: #fff; padding: 0 22px; font: 600 .95rem 'Inter', sans-serif; cursor: pointer; }
.pb-search button:hover { background: var(--pb-blue-dark); }

.pb-hero__feature { position: relative; display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 14px 34px rgba(19, 27, 58, .16); }
.pb-hero__feature img { width: 100%;  object-fit: cover; transition: transform .5s ease; }
.pb-hero__feature:hover img { transform: scale(1.03); }
.pb-hero__feature-text { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 4px; padding: 44px 22px 20px; color: #fff; background: linear-gradient(to top, rgba(19, 27, 58, .88), rgba(19, 27, 58, 0)); }
.pb-hero__feature-text span { font-size: .8rem; opacity: .85; }
.pb-hero__feature-text strong { font-size: 1.15rem; line-height: 1.3; }

.pb-filters { position: sticky; top: var(--pb-sticky-top); z-index: 20; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--pb-line); }
body.admin-bar .pb-filters { top: calc(var(--pb-sticky-top) + 32px); }
.pb-filters__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.pb-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.pb-chips::-webkit-scrollbar { display: none; }
.pb-chip { flex: none; border: 1.5px solid var(--pb-line); background: #fff; color: var(--pb-ink); border-radius: 999px; padding: 8px 17px; font: 600 .88rem/1 'Inter', sans-serif; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.pb-chip:hover { border-color: var(--pb-blue); color: var(--pb-blue); }
.pb-chip.is-active { background: var(--pb-blue); border-color: var(--pb-blue); color: #fff; }
.pb-status { flex: none; font-size: .88rem; color: var(--pb-muted); }

.pb-listing { padding: clamp(36px, 5vw, 64px) 0 clamp(40px, 6vw, 72px); }
.pb-loadmore { display: flex; justify-content: center; margin-top: 52px; }
.pb-empty { text-align: center; padding: 56px 0; }
.pb-empty h2 { font-size: 1.6rem; }
.pb-empty p { margin: 10px 0 22px; color: var(--pb-muted); }

/* ------------------------------------------------- Boxes under content */
.pb-after { width: min(720px, 100% - 48px); margin: 0 auto; padding-bottom: clamp(40px, 6vw, 72px); }
.pb-box { background: var(--pb-mist); border-top: 3px solid var(--pb-blue); border-radius: 6px 6px 18px 18px; padding: clamp(28px, 5vw, 48px); }
.pb-box h2 { font-size: 1.4rem; }
.pb-box p { margin-top: 12px; max-width: 50ch; }
.pb-box__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.pb-share { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-block: 20px; border-block: 1px solid var(--pb-line); }
.pb-share > span:first-child { font-size: .9rem; color: var(--pb-muted); }
.pb-share__links { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-share a,
.pb-share button { padding: 10px 18px; border-radius: 8px; border: 1px solid var(--pb-line); background: #fff; color: var(--pb-ink); font: 600 .85rem/1 'Inter', sans-serif; cursor: pointer; transition: border-color .2s, color .2s; }
.pb-share a:hover,
.pb-share button:hover { border-color: var(--pb-blue); color: var(--pb-blue); }

.pb-author { display: flex; gap: 28px; align-items: flex-start; margin-top: 36px; }
.pb-author__avatar {  flex: none; width: 100px; height: 100px; object-fit: cover; }
.pb-author__label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pb-muted); }
.pb-author__name { margin-top: 2px; font-weight: 700; font-size: 1.05rem; color: var(--pb-ink); }
.pb-author__bio { margin-top: 10px; font-size: .88rem; line-height: 1.8; }

.pb-comments { margin-top: 48px; }

/* ------------------------------------------------------------ Single post */
.pb-shead { background: var(--pb-band); padding: clamp(36px, 5vw, 64px) 0; }
.pb-shead__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: center; }
.pb-shead__inner--solo { grid-template-columns: minmax(0, 760px); }
.pb-byline { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.pb-byline strong { color: var(--pb-ink); font-weight: 600; }
.pb-byline__avatar { border-radius: 50%; width: 28px; height: 28px; }
.pb-shead h1 { margin: 22px 0 34px; max-width: 26ch; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.22; }
.pb-shead__date { font-size: .88rem; color: var(--pb-muted); }
.pb-shead__time { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .88rem; color: var(--pb-ink); font-weight: 500; }
.pb-shead__img { margin: 0; }
.pb-shead__img img { width: 100%;  object-fit: cover; border-radius: 12px; box-shadow: 0 14px 34px rgba(19, 27, 58, .16); }

.pb-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 260px; gap: 56px; padding-block: clamp(36px, 5vw, 64px); }

/* Table of contents */
.pb-toc { position: sticky; top: calc(var(--pb-sticky-top) + 100px); align-self: start; max-height: calc(100vh - 130px); overflow-y: auto; font-size: .8rem; scrollbar-width: thin; }
.pb-toc__title { margin-bottom: 14px; font-size: .9rem; font-weight: 700; color: var(--pb-ink); }
.pb-toc ol { list-style: none; padding: 0; border-left: 1px solid var(--pb-line); }
.pb-toc li { margin: 0; }
.pb-toc a { display: block; padding: 8px 8px 8px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--pb-muted); line-height: 1.45; }
.pb-toc .is-sub a { padding-left: 28px; }
.pb-toc a:hover { color: var(--pb-blue); }
.pb-toc a.is-active { color: var(--pb-blue); font-weight: 600; border-left-color: var(--pb-blue); }

/* Article typography */
.pb-article { min-width: 0; max-width: 700px; width: 100%; margin-inline: auto; }
.pb-content { font-size: .97rem; line-height: 1.85; }
.pb-content > * + * { margin-top: 1.1em; }
.pb-content h2 { margin-top: 2em; font-size: clamp(1.45rem, 2.4vw, 1.75rem); scroll-margin-top: 110px; }
.pb-content h3 { margin-top: 1.7em; font-size: 1.25rem; scroll-margin-top: 110px; }
.pb-content h4 { margin-top: 1.5em; font-size: .97rem; color: var(--pb-blue); }
.pb-content h2 + *,
.pb-content h3 + *,
.pb-content h4 + * { margin-top: .8em; }
.pb-content strong { color: var(--pb-ink); }
.pb-content a { color: var(--pb-blue); text-decoration: underline; text-decoration-color: rgba(26, 95, 214, .35); text-underline-offset: 3px; }
.pb-content a:hover { text-decoration-color: var(--pb-blue); }
.pb-content ul,
.pb-content ol { padding-left: 1.3em; }
.pb-content li + li { margin-top: .5em; }
.pb-content li::marker { color: var(--pb-blue); }
.pb-content blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--pb-blue); font-style: italic; color: var(--pb-ink); }
.pb-content blockquote p { margin: 0; }
.pb-content img { border-radius: 14px; }
.pb-content figure { margin-inline: 0; }
.pb-content figcaption { margin-top: 10px; font-size: .88rem; color: var(--pb-muted); }
.pb-content table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: .92rem; }
.pb-content th,
.pb-content td { padding: 11px 14px; border-bottom: 1px solid var(--pb-line); text-align: left; }
.pb-content th { background: var(--pb-mist); color: var(--pb-ink); }

/* Recent posts */
.pb-recent { position: sticky; top: calc(var(--pb-sticky-top) + 100px); align-self: start; }
.pb-recent ul { list-style: none; padding: 0; }
.pb-recent__title { margin-bottom: 8px; font-size: .9rem; font-weight: 700; color: var(--pb-ink); }
.pb-recent li { margin: 0; }
.pb-recent__item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--pb-line); }
.pb-recent__thumb { flex: none; width: 56px; height: 42px; border-radius: 6px; object-fit: cover; }
.pb-recent__thumb--ph { background: var(--pb-band); }
.pb-recent__name { display: block; font-size: .83rem; font-weight: 600; line-height: 1.4; color: var(--pb-ink); }
.pb-recent__item:hover .pb-recent__name { color: var(--pb-blue); }
.pb-recent__date { display: block; margin-top: 2px; font-size: .74rem; color: var(--pb-muted); }

/* Keep reading */
.pb-related { padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 7vw, 88px); }
.pb-related h2 { margin-bottom: 26px; font-size: 1.45rem; }
.pb-browse { display: inline-block; margin-top: 28px; padding-bottom: 2px; font-weight: 600; font-size: .9rem; color: var(--pb-blue); border-bottom: 2px solid var(--pb-line); }
.pb-browse:hover { border-bottom-color: var(--pb-blue); }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1200px) {
	.pb-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.pb-toc { position: static; max-height: none; order: -1; max-width: 700px; width: 100%; margin-inline: auto; padding: 20px 24px; background: var(--pb-mist); border-radius: 14px; }
	.pb-recent { position: static; max-width: 700px; width: 100%; margin-inline: auto; }
	.pb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.pb-hero__inner,
	.pb-shead__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.pb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pb-status { display: none; }
}

@media (max-width: 600px) {
	.pb-grid { grid-template-columns: minmax(0, 1fr); }
	.pb-search button { padding: 0 16px; }
	.pb-author { flex-direction: column; gap: 16px; }
	.pb-share { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	.pb-page *,
	.pb-page *::before,
	.pb-page *::after { transition: none !important; animation: none !important; }
}
