/* =============================================================
   Canada Yoga — Single blog post + Author archive (premium)
   Uses the design tokens defined in widgets.css (:root).
   ============================================================= */

/* ---------- SINGLE POST ---------- */
.cy-single {
	font-family: var(--cy-font-body);
	color: var(--cy-forest);
	padding: clamp(2.4rem, 5vw, 4.5rem) clamp(1.1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 6rem);
}
.cy-single__container { max-width: 1180px; margin: 0 auto; }

/* --- Header: category pill -> title -> byline --- */
.cy-single__head {
	max-width: 780px;
	margin: 0 auto clamp(1.8rem, 4vw, 2.8rem);
	text-align: center;
}
.cy-single__pill {
	display: inline-block;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cy-clay-deep);
	background: rgba(197, 123, 92, .1);
	border: 1px solid rgba(197, 123, 92, .22);
	padding: 7px 16px;
	border-radius: 999px;
	text-decoration: none;
	transition: all .25s var(--cy-ease);
}
.cy-single__pill:hover { background: var(--cy-clay); color: #fff; border-color: var(--cy-clay); }
.cy-single__title {
	font-family: var(--cy-font-display);
	font-weight: 500;
	color: var(--cy-forest);
	font-size: clamp(2.1rem, 5vw, 3.5rem);
	line-height: 1.07;
	letter-spacing: -0.015em;
	margin: 20px 0 0;
}

/* Byline */
.cy-single__byline {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin: 24px 0 0;
}
.cy-single__author { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.cy-single__avatar {
	width: 46px; height: 46px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--cy-mist), 0 6px 14px -8px rgba(20, 35, 24, .6);
}
.cy-single__bywrap { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.cy-single__bylabel { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--cy-clay); }
.cy-single__byname { font-weight: 600; color: var(--cy-forest); transition: color .2s var(--cy-ease); }
.cy-single__author:hover .cy-single__byname { color: var(--cy-clay-deep); }
.cy-single__meta { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: #8a857a; }
.cy-single__sep { color: var(--cy-mist); }

/* --- Cinematic featured image --- */
.cy-single__feat {
	max-width: 1060px;
	margin: 0 auto clamp(2.2rem, 5vw, 3.6rem);
	border-radius: 22px;
	overflow: hidden;
	border: 1px solid rgba(20, 35, 24, .06);
	box-shadow: 0 40px 80px -40px rgba(20, 35, 24, .55), 0 10px 24px -18px rgba(20, 35, 24, .4);
}
.cy-single__feat img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
	object-fit: cover;
}

/* --- Two-column body + sidebar --- */
.cy-single__wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: clamp(2.2rem, 4vw, 4rem);
	align-items: start;
}

/* --- Article typography --- */
.cy-single__content {
	font-size: 1.09rem;
	line-height: 1.78;
	color: #35372f;
	min-width: 0;
}
.cy-single__content > *:first-child { margin-top: 0; }
/* Lead paragraph */
.cy-single__content > p:first-of-type {
	font-size: 1.22rem;
	line-height: 1.62;
	color: #2a3b30;
}
.cy-single__content h2 {
	font-family: var(--cy-font-display);
	font-weight: 500;
	color: var(--cy-forest);
	font-size: clamp(1.55rem, 2.8vw, 2.1rem);
	line-height: 1.18;
	letter-spacing: -0.01em;
	margin: 2.3em 0 .55em;
	padding-top: .2em;
}
.cy-single__content h3 {
	font-family: var(--cy-font-display);
	font-weight: 500;
	color: var(--cy-forest);
	font-size: clamp(1.28rem, 2.1vw, 1.6rem);
	line-height: 1.25;
	margin: 1.9em 0 .45em;
}
.cy-single__content h4 { font-weight: 700; color: var(--cy-forest); margin: 1.6em 0 .35em; font-size: 1.12rem; }
.cy-single__content p { margin: 0 0 1.25em; }
.cy-single__content a { color: var(--cy-clay-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s var(--cy-ease); }
.cy-single__content a:hover { color: var(--cy-forest); }
.cy-single__content ul,
.cy-single__content ol { margin: 0 0 1.35em; padding-left: 1.35em; }
.cy-single__content li { margin: 0 0 .55em; padding-left: .2em; }
.cy-single__content ul li::marker { color: var(--cy-clay); }
.cy-single__content ol li::marker { color: var(--cy-clay-deep); font-weight: 600; }
.cy-single__content img { max-width: 100%; height: auto; border-radius: 14px; margin: 1.6em 0; box-shadow: 0 24px 50px -34px rgba(20, 35, 24, .5); }
.cy-single__content blockquote {
	position: relative;
	margin: 1.9em 0;
	padding: .3em 0 .3em 1.6em;
	border-left: 3px solid var(--cy-clay);
	font-family: var(--cy-font-display);
	font-size: 1.4rem;
	line-height: 1.45;
	color: var(--cy-forest);
	font-style: italic;
}
.cy-single__content figure { margin: 1.6em 0; }
.cy-single__content figure img { margin: 0; }
.cy-single__content figcaption { font-size: .85rem; color: #8a857a; text-align: center; margin-top: .7em; }
.cy-single__content hr { border: 0; height: 1px; background: var(--cy-mist); margin: 2.4em 0; }
.cy-single__content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.7em 0;
	font-size: .95rem;
	display: block;
	overflow-x: auto;
	border-radius: 12px;
}
.cy-single__content th,
.cy-single__content td { border: 1px solid var(--cy-mist); padding: 12px 15px; text-align: left; }
.cy-single__content th { background: var(--cy-bone-soft); color: var(--cy-forest); font-weight: 600; }
.cy-single__content tr:nth-child(even) td { background: rgba(244, 239, 230, .4); }

/* Post tags */
.cy-single__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; margin: 2.4em 0 0; padding: 1.6em 0 0; border-top: 1px solid var(--cy-mist); }
.cy-single__tags a { font-size: .82rem; color: var(--cy-forest); background: var(--cy-bone-soft); border: 1px solid var(--cy-mist); border-radius: 999px; padding: 6px 14px; text-decoration: none; transition: all .2s var(--cy-ease); }
.cy-single__tags a:hover { background: var(--cy-forest); color: #fff; border-color: var(--cy-forest); }

/* ---------- SIDEBAR CARDS ---------- */
.cy-single__side { position: sticky; top: 100px; display: grid; gap: 20px; }
.cy-side-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--cy-mist);
	border-radius: 20px;
	padding: 28px 26px;
	box-shadow: 0 26px 60px -42px rgba(20, 35, 24, .55);
}
/* gold accent bar on the form card */
.cy-side-form::before {
	content: "";
	position: absolute; left: 26px; right: 26px; top: 0; height: 3px;
	background: linear-gradient(90deg, var(--cy-clay), var(--cy-gold));
	border-radius: 999px;
}
.cy-side-card__title {
	font-family: var(--cy-font-display);
	font-weight: 500;
	color: var(--cy-forest);
	font-size: 1.55rem;
	line-height: 1.15;
	margin: 8px 0 0;
}
.cy-side-card__sub { font-size: .93rem; color: #6f6a60; margin: 9px 0 0; line-height: 1.55; }

/* Sidebar form — stacked full-width fields */
.cy-side-form__form { display: grid; gap: 12px; margin-top: 20px; }
.cy-side-form__form input,
.cy-side-form__form select,
.cy-side-form__form textarea {
	width: 100%;
	font-family: var(--cy-font-body);
	font-size: .98rem;
	color: var(--cy-forest);
	background: var(--cy-bone-soft);
	border: 1px solid var(--cy-mist);
	border-radius: 12px;
	padding: 13px 15px;
	transition: border-color .2s var(--cy-ease), box-shadow .2s var(--cy-ease), background .2s var(--cy-ease);
}
.cy-side-form__form textarea { resize: vertical; min-height: 84px; }
/* Selects render their box shorter than inputs and clip the text — force the same
   height, vertical centering and a custom caret so every field lines up. */
.cy-side-form__form select {
	height: 50px;
	line-height: 1.3;
	padding-right: 42px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f3a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 13px;
}
.cy-side-form__form input { height: 50px; }
.cy-side-form__form input:focus,
.cy-side-form__form select:focus,
.cy-side-form__form textarea:focus {
	outline: none;
	border-color: var(--cy-forest);
	box-shadow: 0 0 0 3px rgba(31, 58, 46, .12);
	background-color: #fff;
}
.cy-side-form__form input::placeholder,
.cy-side-form__form textarea::placeholder { color: #9a9488; }
.cy-side-form__btn { width: 100%; justify-content: center; margin-top: 2px; }
.cy-side-form .cy-contact__status { margin: 4px 0 0; font-size: .88rem; min-height: 1em; }
.cy-side-form .cy-contact__status.is-ok { color: var(--cy-sage); }
.cy-side-form .cy-contact__status.is-err { color: var(--cy-clay-deep); }

/* Sidebar author card */
.cy-side-author { text-align: center; }
.cy-side-author__img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--cy-mist); }
.cy-side-author__label { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--cy-clay); margin: 13px 0 2px; }
.cy-side-author__name {
	display: inline-block;
	font-family: var(--cy-font-display);
	font-size: 1.4rem;
	color: var(--cy-forest);
	text-decoration: none;
	transition: color .2s var(--cy-ease);
}
.cy-side-author__name:hover { color: var(--cy-clay-deep); }
.cy-side-author__bio { font-size: .9rem; color: #6f6a60; line-height: 1.55; margin: 10px 0 0; }
.cy-side-author__link { display: inline-block; margin-top: 14px; color: var(--cy-clay-deep); font-weight: 600; font-size: .92rem; text-decoration: none; }
.cy-side-author__link:hover { color: var(--cy-forest); }

/* ---------- END-OF-ARTICLE FOOTER ---------- */
.cy-single__foot { max-width: calc(100% - 360px - clamp(2.2rem, 4vw, 4rem)); }
.cy-authorbox {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	background: var(--cy-bone-soft);
	border: 1px solid var(--cy-mist);
	border-radius: 20px;
	padding: 28px 30px;
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.cy-authorbox__img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid #fff; box-shadow: 0 10px 24px -14px rgba(20, 35, 24, .5); }
.cy-authorbox__label { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--cy-clay); margin: 0 0 2px; }
.cy-authorbox__name { font-family: var(--cy-font-display); font-size: 1.5rem; color: var(--cy-forest); text-decoration: none; }
.cy-authorbox__name:hover { color: var(--cy-clay-deep); }
.cy-authorbox__bio { font-size: .96rem; color: #55524b; line-height: 1.6; margin: 8px 0 0; }
.cy-authorbox__link { display: inline-block; margin-top: 12px; color: var(--cy-clay-deep); font-weight: 600; font-size: .92rem; text-decoration: none; }
.cy-authorbox__link:hover { color: var(--cy-forest); }
.cy-single__back { display: inline-block; margin-top: 2rem; color: var(--cy-forest); font-weight: 600; font-size: .95rem; text-decoration: none; transition: color .2s var(--cy-ease); }
.cy-single__back:hover { color: var(--cy-clay-deep); }

/* ---------- AUTHOR ARCHIVE (premium) ---------- */
.cy-author { padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 7vw, 6rem); }
.cy-author__inner { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }

/* Premium profile card with overlapping avatar */
.cy-author__hero { display: flex; justify-content: center; margin: 0 0 clamp(2.6rem, 5vw, 4rem); }
.cy-author__profile {
	position: relative;
	width: 100%;
	max-width: 700px;
	text-align: center;
	background: linear-gradient(180deg, #ffffff, var(--cy-bone-soft));
	border: 1px solid var(--cy-mist);
	border-radius: 26px;
	padding: 80px 40px 42px;
	box-shadow: 0 44px 100px -55px rgba(20, 35, 24, .5);
}
.cy-author__avatar-ring {
	position: absolute;
	top: -58px; left: 50%; transform: translateX(-50%);
	display: inline-grid; place-items: center;
	padding: 6px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 1px var(--cy-mist), 0 20px 44px -22px rgba(20, 35, 24, .6);
}
.cy-author__avatar-ring::before {
	content: "";
	position: absolute; inset: -3px;
	border-radius: 50%;
	background: conic-gradient(from 130deg, var(--cy-gold), var(--cy-clay), var(--cy-gold));
	opacity: .55;
	z-index: -1;
}
.cy-author__avatar { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; display: block; }
.cy-author__eyebrow { justify-content: center; }
.cy-author__name { font-family: var(--cy-font-display); font-weight: 500; color: var(--cy-forest); font-size: clamp(2.1rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -0.01em; margin: 10px 0 0; }
.cy-author__bio { font-size: 1.04rem; color: #55524b; line-height: 1.65; margin: 14px auto 0; max-width: 540px; }
.cy-author__stats { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.cy-author__stat { font-size: .82rem; letter-spacing: .05em; color: var(--cy-forest); background: rgba(31, 58, 46, .06); border: 1px solid var(--cy-mist); border-radius: 999px; padding: 8px 18px; }
.cy-author__stat strong { font-weight: 700; }

/* Labeled divider above the grid */
.cy-author__gridhead { display: flex; align-items: center; gap: 18px; margin: 0 0 26px; }
.cy-author__gridlabel { font-family: var(--cy-font-body); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--cy-clay); white-space: nowrap; }
.cy-author__gridline { flex: 1; height: 1px; background: var(--cy-mist); }

.cy-author__pagination { margin-top: 2.6rem; text-align: center; font-family: var(--cy-font-body); }
.cy-author__pagination .page-numbers { display: inline-block; padding: 9px 15px; margin: 0 3px; border-radius: 10px; color: var(--cy-forest); text-decoration: none; border: 1px solid var(--cy-mist); transition: all .2s var(--cy-ease); }
.cy-author__pagination .page-numbers:hover { border-color: var(--cy-forest); }
.cy-author__pagination .page-numbers.current { background: var(--cy-forest); color: #fff; border-color: var(--cy-forest); }

/* ---------- ASTRA COMPAT + RELIABILITY FIXES ---------- */
/* Never let Astra's boxed / narrow container constrain these full-width templates. */
.single-post .site-content > .ast-container,
.author .site-content > .ast-container { max-width: 100%; padding-left: 0; padding-right: 0; }
.ast-narrow-container .site-content > .ast-container { max-width: 100%; padding: 0; }
article.cy-single.ast-article-single { max-width: 100%; width: 100%; margin-left: auto; margin-right: auto; }

/* Article + author content must ALWAYS be visible, even if the reveal-animation
   JS doesn't run on this view (Elementor/preview/cache). Scoped to blog only so
   the fade-in still works everywhere else on the site. */
.cy-single .cy-reveal,
.cy-author .cy-reveal { opacity: 1; transform: none; }

/* position: sticky only works when no ancestor clips overflow. Keep the wrapper
   chain non-clipping on these pages so the sidebar form actually sticks. */
.single-post #page, .single-post #content, .single-post .site-content, .single-post .ast-container,
.author #page, .author #content, .author .site-content, .author .ast-container,
article.cy-single, .cy-single__wrap, .cy-single__container { overflow: visible; }

/* THE sticky killer: Astra sets `body { overflow-x: hidden }`, which turns <body>
   into a scroll container and breaks position: sticky everywhere inside it.
   `overflow-x: clip` still prevents horizontal scroll but does NOT create a scroll
   container, so sticky works again. This file only loads on blog/author pages, so
   the override is naturally scoped to them. */
body { overflow-x: clip !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
	.cy-single__wrap { grid-template-columns: 1fr; }
	.cy-single__side { position: static; order: 2; max-width: 560px; margin: .5rem auto 0; width: 100%; }
	.cy-single__content { order: 1; }
	.cy-single__foot { max-width: 100%; }
}
@media (max-width: 600px) {
	.cy-authorbox { flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 26px 22px; }
	.cy-single__content > p:first-of-type { font-size: 1.12rem; }
}
