/*
Theme Name: Cornerstone Blog
Author: Kristina Siewert
Description: The blog theme for Cornerstone Administrative Solutions. Warm ivory, charcoal, Cormorant Garamond headings, Poppins body text and an Allison script accent, matched to cornerstoneadmin.ca.
Version: 1.0.21
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cornerstone-blog
*/

body { -webkit-font-smoothing: antialiased; }
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
.wp-site-blocks > * + * { margin-block-start: 0; }
strong, b { font-weight: 500; }

/* ---------- Shared pieces ---------- */
.script {
	font-family: var(--wp--preset--font-family--script); font-weight: 400;
	font-size: clamp(2.6rem, 4.5vw, 3.35rem); line-height: 0.9;
	color: var(--wp--preset--color--deep-blue); margin-top: 0 !important; margin-bottom: 0.15rem !important; letter-spacing: 0;
}
.eyebrow, .wp-block-post-terms {
	font-family: var(--wp--preset--font-family--body); font-size: 0.72rem; font-weight: 500;
	letter-spacing: 0.22em; text-transform: uppercase; color: var(--wp--preset--color--deep-olive);
}
.wp-block-post-terms a { color: inherit; text-decoration: none; }
.wp-block-post-terms a:hover { color: var(--wp--preset--color--charcoal); }
.text-link a, a.text-link, .wp-block-read-more {
	color: var(--wp--preset--color--charcoal); font-weight: 500; font-size: 0.9rem;
	text-decoration: none; border-bottom: 1px solid var(--wp--preset--color--taupe); padding-bottom: 2px;
}
.text-link a:hover, .wp-block-read-more:hover { border-bottom-color: var(--wp--preset--color--charcoal); }
.wp-element-button, .wp-block-button__link { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--charcoal);
	border: 1px solid var(--wp--preset--color--charcoal); padding: calc(0.85rem - 1px) calc(1.9rem - 1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--ivory); }
:focus-visible { outline: 2px solid var(--wp--preset--color--deep-blue); outline-offset: 3px; }

/* Cards: white, 20px corners, thin taupe border (same as the main site) */
.cs-card, .is-style-cs-card {
	background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--taupe);
	border-radius: 20px; overflow: hidden;
}
.is-style-cs-card { padding: clamp(1.5rem, 3vw, 2.25rem); }

/* ---------- Header ---------- */
.site-header-wrap { background: var(--wp--preset--color--ivory); border-bottom: 1px solid rgba(200, 195, 187, 0.55); }
.site-header { padding-top: 1rem; padding-bottom: 1rem; gap: 1.5rem; }
.site-header .wp-block-site-logo img { width: auto; max-height: 58px; }
.site-header .wp-block-site-title { font-family: var(--wp--preset--font-family--heading); font-size: 1.6rem; font-weight: 600; margin: 0; }
.site-header .wp-block-site-title a { color: var(--wp--preset--color--charcoal); text-decoration: none; }
.site-nav-group { gap: 1.75rem; }
.site-header .wp-block-navigation { font-size: 0.92rem; font-weight: 400; gap: 1.5rem; }
.site-header .wp-block-navigation a { white-space: nowrap; text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-header .wp-block-navigation a:hover,
.site-header .wp-block-navigation .current-menu-item > a,
.site-header .wp-block-navigation .is-current > a { border-bottom-color: var(--wp--preset--color--charcoal); }
.site-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--ivory); padding: 2rem 1.5rem; }
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.25rem; font-size: 1.15rem; }
.header-cta .wp-block-button__link { padding: 0.7rem 1.5rem; font-size: 0.88rem; white-space: nowrap; }
@media (min-width: 782px) and (max-width: 1100px) { .site-header .wp-block-navigation { gap: 1rem; font-size: 0.85rem; } .header-cta { display: none; } }

/* ---------- Page banner (blog home, archives, pages) ---------- */
.cs-banner {
	position: relative; overflow: hidden; text-align: center;
	padding-top: clamp(3rem, 7vw, 5.5rem) !important; padding-bottom: clamp(3rem, 7vw, 5rem) !important;
}
.cs-banner::before {
	content: ""; position: absolute; z-index: 0; pointer-events: none;
	width: min(820px, 120vw); aspect-ratio: 1; border-radius: 50%;
	background: var(--wp--preset--color--pale); left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.cs-banner > * { position: relative; z-index: 1; }
.cs-banner h1, .cs-banner .wp-block-query-title, .cs-banner .wp-block-post-title { margin: 0 auto !important; max-width: 16ch; }
.cs-banner .wp-block-query-title { max-width: 22ch; }
.cs-banner .banner-intro { max-width: 34rem; margin: 1rem auto 0 !important; font-size: 1.05rem; }
.cs-banner .script { margin-bottom: 0.1rem !important; }
.cs-banner::before { top: 58%; }

/* Category pills under the banner */
.cs-categories .wp-block-categories-list, ul.wp-block-categories-list.cs-categories {
	list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
}
.cs-categories .wp-block-categories-list li, ul.wp-block-categories-list.cs-categories li { margin: 0; }
.cs-categories .wp-block-categories-list a, ul.wp-block-categories-list.cs-categories a {
	display: inline-block; text-decoration: none; color: var(--wp--preset--color--charcoal);
	font-size: 0.8rem; font-weight: 400; padding: 0.45rem 1.1rem; border: 1px solid var(--wp--preset--color--taupe);
	border-radius: 999px; background: var(--wp--preset--color--white); transition: background-color .2s ease, color .2s ease;
}
.cs-categories .wp-block-categories-list a:hover, ul.wp-block-categories-list.cs-categories a:hover,
.cs-categories .current-cat > a { background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--ivory); border-color: var(--wp--preset--color--charcoal); }

/* ---------- Post grid ---------- */
.cs-listing { padding-top: clamp(2.5rem, 5vw, 3.5rem) !important; padding-bottom: clamp(3.5rem, 7vw, 5.5rem) !important; }
.cs-grid .wp-block-post-template { gap: clamp(1.25rem, 2.5vw, 2rem) !important; }
.cs-grid .wp-block-post { display: flex; }
.cs-grid .cs-card { display: flex; flex-direction: column; width: 100%; transition: transform .3s ease, box-shadow .3s ease; }
.cs-grid .cs-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(47, 47, 47, 0.08); }
.cs-card .wp-block-post-featured-image { margin: 0; }
.cs-card .wp-block-post-featured-image img { display: block; width: 100%; }
.cs-card .card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.cs-card .card-body > * { margin-top: 0; margin-bottom: 0; }
.cs-card .wp-block-post-title { font-size: 1.55rem; line-height: 1.15; margin: 0.55rem 0 0.6rem !important; }
.cs-card .wp-block-post-title a { color: var(--wp--preset--color--charcoal); text-decoration: none; }
.cs-card .wp-block-post-title a:hover { color: var(--wp--preset--color--deep-blue); }
.cs-card .wp-block-post-excerpt { font-size: 0.93rem; line-height: 1.7; margin-bottom: 1.1rem !important; }
.cs-card .wp-block-post-excerpt__more-text { display: none; }
.cs-card .card-foot { margin-top: auto !important; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cs-card .wp-block-post-date { font-size: 0.8rem; color: var(--wp--preset--color--deep-olive); }
/* No featured image yet: show a soft placeholder so cards still line up */
.cs-card:not(:has(.wp-block-post-featured-image img))::before {
	content: ""; display: block; aspect-ratio: 3 / 2;
	background: radial-gradient(circle at 70% 30%, var(--wp--preset--color--soft-blue) 0 18%, transparent 19%), var(--wp--preset--color--greige);
}

/* Newest post is featured full width on the first page of the blog */
body:not(.paged) .cs-home-grid .wp-block-post:first-child { grid-column: 1 / -1; }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .cs-card { display: grid; grid-template-columns: 1.15fr 1fr; }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .wp-block-post-featured-image,
body:not(.paged) .cs-home-grid .wp-block-post:first-child .wp-block-post-featured-image a { height: 100%; }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .wp-block-post-featured-image img { height: 100% !important; aspect-ratio: auto !important; object-fit: cover; min-height: 340px; }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .card-body { padding: clamp(1.75rem, 4vw, 3rem); justify-content: center; }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .wp-block-post-title { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .wp-block-post-excerpt { font-size: 1rem; }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .card-foot { margin-top: 0.5rem !important; }
body:not(.paged) .cs-home-grid .wp-block-post:first-child .cs-card:not(:has(.wp-block-post-featured-image img))::before { aspect-ratio: auto; min-height: 300px; }

/* Pagination */
.wp-block-query-pagination { margin-top: 3rem !important; gap: 0.5rem; font-size: 0.9rem; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; color: var(--wp--preset--color--charcoal); }
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
}
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--ivory); }

/* ---------- Single post ---------- */
.cs-post-head { text-align: center; padding-top: clamp(2.5rem, 6vw, 4.5rem) !important; padding-bottom: clamp(1.5rem, 4vw, 2.5rem) !important; }
.cs-post-head .wp-block-post-title { margin: 0.6rem auto 0.9rem !important; max-width: 20ch; }
.cs-post-meta { justify-content: center; gap: 0.6rem; font-size: 0.85rem; color: var(--wp--preset--color--deep-olive); }
.cs-post-meta > * { margin: 0 !important; }
.cs-post-meta .sep { opacity: 0.6; }
.cs-post-hero img { border-radius: 20px; max-height: 560px; object-fit: cover; width: 100%; }
.cs-post-body { padding-top: clamp(2rem, 5vw, 3rem) !important; }
.cs-post-body .wp-block-post-content > p:first-child { font-size: 1.15rem; }
.cs-post-body .wp-block-post-content h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); margin-top: 2.75rem; }
.cs-post-body .wp-block-post-content h3 { margin-top: 2.25rem; }
.cs-post-body .wp-block-post-content img { border-radius: 14px; }
.cs-post-body .wp-block-post-content li { margin-bottom: 0.4rem; }
.cs-post-body .wp-block-post-content li::marker { color: var(--wp--preset--color--deep-olive); }
.cs-post-body .wp-block-post-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Author box */
.cs-author { margin-top: clamp(3rem, 6vw, 4rem) !important; }
.cs-author .is-style-cs-card { display: flex; gap: 1.5rem; align-items: center; }
.cs-author .wp-block-post-author__avatar img, .cs-author .wp-block-avatar img { border-radius: 50%; }
.cs-author h3 { margin: 0 0 0.35rem; font-size: 1.5rem; }
.cs-author p { margin: 0; font-size: 0.95rem; }
.cs-author .signature { font-family: var(--wp--preset--font-family--script); font-size: 2.8rem; line-height: 1; color: var(--wp--preset--color--deep-blue); margin-top: 0.4rem !important; }

/* Post navigation */
.cs-post-nav { margin-top: 2.5rem !important; padding-top: 1.5rem; border-top: 1px solid var(--wp--preset--color--taupe); font-size: 0.9rem; }
.cs-post-nav a { color: var(--wp--preset--color--charcoal); text-decoration: none; font-weight: 500; }
.cs-post-nav a:hover { color: var(--wp--preset--color--deep-blue); }

/* Comments */
.cs-comments { margin-top: 3rem !important; }
.cs-comments .comment-item { background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--taupe); border-radius: 16px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.cs-comments .wp-block-comment-author-name { font-family: var(--wp--preset--font-family--heading); font-size: 1.25rem; font-weight: 600; }
.cs-comments .wp-block-comment-date { font-size: 0.8rem; color: var(--wp--preset--color--deep-olive); }
.cs-comments input[type="text"], .cs-comments input[type="email"], .cs-comments input[type="url"], .cs-comments textarea {
	width: 100%; box-sizing: border-box; padding: 0.75rem 0.9rem; font: inherit; background: #fff;
	border: 1px solid var(--wp--preset--color--taupe); border-radius: 12px;
}
.cs-comments .comment-reply-title { font-family: var(--wp--preset--font-family--heading); font-size: 1.6rem; font-weight: 600; }
.cs-comments input[type="submit"] {
	background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--ivory); border: 0; border-radius: 999px;
	padding: 0.85rem 1.9rem; font: inherit; font-weight: 500; cursor: pointer;
}
.cs-comments input[type="submit"]:hover { background: var(--wp--preset--color--deep-blue); }

/* More posts under a post */
.cs-more { padding-top: clamp(3rem, 6vw, 4.5rem) !important; padding-bottom: clamp(3rem, 6vw, 4.5rem) !important; background: var(--wp--preset--color--pale); }
.cs-more .section-head { text-align: center; margin-bottom: 2rem !important; }
.cs-more .section-head h2 { margin: 0; }

/* ---------- Plain pages ---------- */
.cs-page-body { padding-top: clamp(2.5rem, 5vw, 4rem) !important; padding-bottom: clamp(3rem, 6vw, 5rem) !important; }

/* ---------- Next step band (above the footer) ---------- */
.cs-next-step { background: var(--wp--preset--color--greige); text-align: center; padding-top: clamp(3.5rem, 7vw, 5.5rem) !important; padding-bottom: clamp(3.5rem, 7vw, 5.5rem) !important; }
.cs-next-step h2 { max-width: 18ch; margin: 0 auto !important; }
.cs-next-step p.next-text { max-width: 34rem; margin: 1rem auto 1.75rem !important; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wp--preset--color--charcoal); color: rgba(247, 244, 238, 0.82); font-size: 0.92rem; }
.site-footer .footer-main { padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: 2.5rem; gap: clamp(2rem, 5vw, 4rem); }
.site-footer a { color: var(--wp--preset--color--ivory); text-decoration: none; }
.site-footer a:hover { color: var(--wp--preset--color--soft-blue); }
.site-footer h4 { color: var(--wp--preset--color--ivory); font-size: 1.35rem; margin: 0 0 1rem; }
.footer-logo-pill {
	display: inline-flex; background: var(--wp--preset--color--ivory); border-radius: 999px;
	padding: 0.7rem 1.6rem; align-items: center; justify-content: center;
}
.footer-logo-pill .wp-block-site-logo img { width: auto; max-height: 52px; }
.footer-logo-pill .wp-block-site-title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: 1.3rem; font-weight: 600; }
.footer-logo-pill .wp-block-site-title a { color: var(--wp--preset--color--charcoal); }
.footer-tagline { font-family: var(--wp--preset--font-family--heading); font-style: italic; font-size: 1.2rem; color: var(--wp--preset--color--ivory); margin-top: 1rem !important; }
.footer-links { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.footer-links li { margin: 0 0 0.6rem; break-inside: avoid; }
.site-footer .wp-block-social-links { gap: 0.6rem; margin: 0 0 1rem; }
.site-footer .wp-block-social-links .wp-social-link {
	background: transparent !important; color: var(--wp--preset--color--ivory) !important;
	border: 1px solid rgba(247, 244, 238, 0.5); border-radius: 50%; transition: background-color .2s ease;
}
.site-footer .wp-block-social-links .wp-social-link a { padding: 0.6rem; }
.site-footer .wp-block-social-links .wp-social-link:hover { background: rgba(247, 244, 238, 0.12) !important; }
.footer-bottom { border-top: 1px solid rgba(247, 244, 238, 0.15); padding-top: 1.25rem; padding-bottom: 1.5rem; font-size: 0.8rem; gap: 0.75rem 2rem; }
.footer-bottom p { margin: 0; }

/* ---------- Scroll reveal ---------- */
.cs-reveal-on .reveal, .cs-reveal-on .cs-grid .wp-block-post { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.cs-reveal-on .reveal.is-visible, .cs-reveal-on .cs-grid .wp-block-post.is-visible { opacity: 1; transform: none; }

/* ---------- Small helpers ---------- */
.site-header .wp-block-navigation .mobile-only { display: none; }
.wp-block-navigation__responsive-container.is-menu-open .mobile-only { display: block !important; }
.site-brand:has(.wp-block-site-logo img) .brand-fallback,
.footer-logo-pill:has(.wp-block-site-logo img) .brand-fallback { display: none; }
.cs-search { max-width: 30rem; margin: 1.5rem auto 0 !important; }
.cs-search .wp-block-search__input { border: 1px solid var(--wp--preset--color--taupe); border-radius: 999px; padding: 0.7rem 1.2rem; background: #fff; font: inherit; }
.cs-search .wp-block-search__button { margin-left: 0.5rem; }
.cs-page-body .wp-block-post-content h2 { margin-top: 2.5rem; }
.cs-page-body .wp-block-post-content li::marker { color: var(--wp--preset--color--deep-olive); }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.header-cta { display: none; }
	.site-header .wp-block-site-logo img { max-height: 46px; }
	body:not(.paged) .cs-home-grid .wp-block-post:first-child .cs-card { grid-template-columns: 1fr; }
	body:not(.paged) .cs-home-grid .wp-block-post:first-child .wp-block-post-featured-image img { min-height: 0; aspect-ratio: 3 / 2 !important; }
	.site-header .wp-block-navigation .mobile-only { display: list-item; }
	.cs-author .is-style-cs-card { flex-direction: column; text-align: center; }
	.footer-links { columns: 2; }
	.site-footer .footer-main > .wp-block-column { flex-basis: 100% !important; }
	.footer-bottom { flex-direction: column; align-items: flex-start !important; }
	.cs-next-step .wp-block-buttons, .cs-next-step .wp-block-button { width: 100%; }
	.cs-next-step .wp-block-button__link { width: 100%; }
}

/* Tip list pattern: numbered circles rotating Deep Blue, Deep Olive and Charcoal */
.cs-tips { gap: 1.25rem !important; }
.cs-tips .is-style-cs-card { padding: 1.6rem 1.5rem; }
.cs-tips .tip-num {
	width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 0 1rem !important;
	background: var(--wp--preset--color--deep-blue); color: #fff; font-family: var(--wp--preset--font-family--heading); font-size: 1.6rem; font-weight: 600;
}
.cs-tips > .wp-block-column:nth-child(3n+2) .tip-num { background: var(--wp--preset--color--deep-olive); }
.cs-tips > .wp-block-column:nth-child(3n) .tip-num { background: var(--wp--preset--color--charcoal); }
.cs-tips h4 { margin: 0 0 0.4rem; }
.cs-tips p:last-child { margin-bottom: 0; font-size: 0.95rem; }

/* Responsive grid and header, set here so it never depends on WordPress defaults */
@media (max-width: 1000px) {
	.cs-grid .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.cs-more-grid .wp-block-post:nth-child(3) { display: none; }
}
@media (max-width: 900px) {
	.site-header { flex-wrap: wrap !important; justify-content: center !important; row-gap: 0.75rem; }
}
@media (max-width: 640px) {
	.cs-grid .wp-block-post-template { grid-template-columns: 1fr !important; }
	.cs-more-grid .wp-block-post:nth-child(3) { display: flex; }
	.site-header { flex-wrap: nowrap !important; justify-content: space-between !important; }
	.cs-banner h1 { font-size: clamp(2.4rem, 11vw, 3rem) !important; }
	.cs-banner::before { width: 150vw; }
	.cs-next-step .wp-block-buttons { flex-direction: column; }
	.footer-bottom { font-size: 0.75rem; }
}
.cs-card .card-foot { flex-wrap: wrap !important; row-gap: 0.4rem; }
.cs-card .wp-block-read-more { white-space: nowrap; }

/* v1.0.1: "Let's Work Together" lives in the menu, like cornerstoneadmin.ca */
.site-header .wp-block-navigation .mobile-only { display: list-item !important; }
.header-cta { display: none !important; }
@media (min-width: 600px) {
	.site-header .wp-block-navigation .nav-cta > a {
		background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--ivory) !important;
		border-radius: 999px; padding: 0.65rem 1.4rem !important; border-bottom: 0 !important; font-weight: 500;
		transition: background-color .25s ease;
	}
	.site-header .wp-block-navigation .nav-cta > a:hover { background: var(--wp--preset--color--deep-blue); }
}
.wp-block-navigation__responsive-container.is-menu-open .nav-cta > a { background: none !important; color: var(--wp--preset--color--charcoal) !important; padding: 0 !important; }
.site-header .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
.site-header .wp-block-navigation__responsive-container-open, .site-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--charcoal); }
.site-header .site-nav-group { flex-shrink: 0; }

/* v1.0.2: footer matched to cornerstoneadmin.ca */
.site-footer .footer-heading {
	font-family: var(--wp--preset--font-family--body); font-size: 0.78rem; font-weight: 500;
	letter-spacing: 0.28em; text-transform: uppercase; color: var(--wp--preset--color--muted-olive);
	margin: 0 0 1.4rem !important;
}
.site-footer, .site-footer p:not(.footer-tagline), .footer-links a { font-family: var(--wp--preset--font-family--body); }
.site-footer .footer-tagline { font-family: var(--wp--preset--font-family--heading) !important; font-style: italic; font-size: 1.35rem; }
.footer-links { columns: auto !important; display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.85rem 2rem; font-size: 1rem; }
.footer-links li { margin: 0 !important; }
.footer-social { display: flex; gap: 0.85rem; margin: 0 0 1.5rem; }
.footer-social a {
	width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid rgba(247, 244, 238, 0.45); color: var(--wp--preset--color--ivory) !important; transition: background-color .2s ease;
}
.footer-social a:hover { background: rgba(247, 244, 238, 0.12); }
.site-footer .footer-main p:not(.footer-heading):not(.footer-tagline) { font-size: 1rem; }
.footer-logo-pill { border-radius: 22px; padding: 1rem 1.75rem; }
.footer-bottom, .footer-bottom p, .footer-bottom a { color: rgba(247, 244, 238, 0.6) !important; font-size: 0.85rem; }
.footer-bottom a:hover { color: var(--wp--preset--color--ivory) !important; }

/* v1.0.3: Cornerstone logos built into the theme */
.cs-logo { display: block; line-height: 0; }
.cs-logo img { display: block; height: auto; }
.cs-logo-header img { width: 230px; max-width: 58vw; }
.footer-logo-pill { padding: 1.1rem 1.6rem !important; border-radius: 22px !important; }
.cs-logo-footer img { width: 190px; }
@media (max-width: 781px) {
	.cs-logo-header img { width: 190px; }
	.cs-logo-footer img { width: 170px; }
}

/* v1.0.4: menu built like cornerstoneadmin.ca (row of links on laptops, drop-down panel on phones) */
.cs-nav { display: flex; align-items: center; }
.cs-nav-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.6rem; font-size: 0.92rem; }
.cs-nav-links a { color: var(--wp--preset--color--charcoal); text-decoration: none; white-space: nowrap; padding-bottom: 4px; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.cs-nav-links a:hover, .cs-nav-links .is-current > a { border-bottom-color: var(--wp--preset--color--charcoal); }
.cs-nav-links .cs-nav-cta > a {
	background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--ivory); border-radius: 999px;
	padding: 0.7rem 1.5rem; border-bottom: 0; font-weight: 500; transition: background-color .25s ease;
}
.cs-nav-links .cs-nav-cta > a:hover { background: var(--wp--preset--color--deep-blue); }
.cs-nav-toggle { display: none; background: none; border: 0; padding: 0.4rem; margin-right: -0.4rem; color: var(--wp--preset--color--charcoal); cursor: pointer; line-height: 0; }
.cs-nav-toggle .icon-close { display: none; }
.cs-nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.cs-nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.cs-mobile-menu { display: none; }

@media (max-width: 1023px) {
	.cs-nav-links { display: none; }
	.cs-nav-toggle { display: block; }
	.site-header { flex-wrap: nowrap !important; justify-content: space-between !important; }
	.cs-mobile-menu:not([hidden]) {
		display: block; background: var(--wp--preset--color--ivory); border-top: 1px solid rgba(200, 195, 187, 0.7);
		padding: 0.75rem 0 1.75rem; margin-left: 0 !important; margin-right: 0 !important;
	}
	.cs-mobile-menu ul { list-style: none; margin: 0; padding: 0; }
	.cs-mobile-menu li { border-bottom: 1px solid rgba(200, 195, 187, 0.7); }
	.cs-mobile-menu li a { display: inline-block; padding: 1.05rem 0; color: var(--wp--preset--color--charcoal); text-decoration: none; font-size: 1.05rem; }
	.cs-mobile-menu li.is-current a { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
	.cs-mobile-cta {
		display: block; margin-top: 1.5rem; text-align: center; padding: 1rem 1.5rem; border-radius: 999px;
		background: var(--wp--preset--color--charcoal); color: var(--wp--preset--color--ivory) !important; text-decoration: none; font-weight: 500;
	}
}
.site-header-wrap { border-bottom: 1px solid rgba(200, 195, 187, 0.7); }
.site-header-wrap > .cs-mobile-menu { max-width: 1180px !important; }

/* v1.0.5: menu text and footer logo sized like cornerstoneadmin.ca */
.cs-nav-links a { color: rgba(47, 47, 47, 0.8); font-weight: 300; }
.cs-nav-links a:hover, .cs-nav-links .is-current > a { color: var(--wp--preset--color--charcoal); }
.cs-nav-links .cs-nav-cta > a { color: var(--wp--preset--color--ivory); font-weight: 400; }
@media (max-width: 1023px) {
	.cs-mobile-menu li a { font-size: 16px; font-weight: 300; color: rgba(47, 47, 47, 0.8); padding: 14px 0; letter-spacing: 0.01em; }
	.cs-mobile-menu li.is-current a { color: var(--wp--preset--color--charcoal); }
	.cs-mobile-cta { font-size: 15px; font-weight: 400; padding: 0.9rem 1.5rem; }
}
.site-footer .footer-logo-pill {
	display: inline-flex !important; width: fit-content !important; max-width: 320px;
	padding: 1.1rem 1.5rem !important; justify-content: center;
}
.cs-logo-footer img { width: 200px !important; max-width: 100%; }
@media (max-width: 781px) {
	.site-footer .footer-logo-pill { padding: 1rem 1.4rem !important; }
	.cs-logo-footer img { width: 190px !important; }
}

/* v1.0.6: footer type and logo scaled down to match cornerstoneadmin.ca */
.site-footer .footer-heading { font-size: 0.66rem !important; margin-bottom: 1.1rem !important; }
.site-footer .footer-tagline { font-size: 1.125rem !important; }
.footer-links { font-size: 0.875rem !important; gap: 0.75rem 2rem !important; }
.footer-links a, .site-footer .footer-main p:not(.footer-heading):not(.footer-tagline), .site-footer .footer-main p a { font-size: 0.875rem !important; }
.footer-bottom, .footer-bottom p, .footer-bottom a { font-size: 0.75rem !important; }
.footer-social { gap: 0.7rem; }
.footer-social a { width: 38px; height: 38px; }
.footer-social svg { width: 17px; height: 17px; }
.site-footer .footer-logo-pill { padding: 0.9rem 1.1rem !important; border-radius: 18px !important; }
.cs-logo-footer img { width: 150px !important; }
@media (max-width: 781px) {
	.site-footer .footer-logo-pill { padding: 0.75rem 0.95rem !important; border-radius: 16px !important; }
	.cs-logo-footer img { width: 108px !important; }
}
@media (max-width: 1023px) {
	.cs-mobile-menu li a { font-size: 14px !important; padding: 11px 0 !important; }
	.cs-mobile-cta { font-size: 14px !important; padding: 0.75rem 1.5rem !important; margin-top: 1.1rem !important; }
}

/* v1.0.7: footer fine-tuned against cornerstoneadmin.ca */
.footer-links { gap: 0.75rem 1.5rem !important; }
.footer-links li, .footer-links a { line-height: 1.4 !important; }
.footer-bottom { row-gap: 0.4rem !important; }
.footer-bottom p { margin: 0 !important; line-height: 1.6; }
@media (max-width: 781px) {
	.site-footer .footer-logo-pill { padding: 16px !important; border-radius: 18px !important; }
	.cs-logo-footer img { width: 116px !important; }
	.fb-sep { display: none; }
	.fb-privacy { display: block; margin-top: 0.3rem; }
}

/* v1.0.8: footer vertical spacing matched to cornerstoneadmin.ca on phones */
.footer-links { row-gap: 0.85rem !important; }
@media (max-width: 781px) {
	.site-footer .footer-main { gap: 2.9rem !important; }
	.footer-social { margin-bottom: 1.1rem !important; }
	.site-footer .footer-bottom { padding-bottom: 3.9rem !important; }
}

/* v1.0.9: header stays at the top while scrolling, like cornerstoneadmin.ca */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 0px); }
header.wp-block-template-part .site-header-wrap {
	background: rgba(247, 244, 238, 0.94) !important;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	box-shadow: 0 6px 18px rgba(47, 47, 47, 0.06);
}
@media (max-width: 1023px) {
	.cs-mobile-menu:not([hidden]) { max-height: calc(100vh - 90px); overflow-y: auto; }
}
@media (max-width: 600px) { .admin-bar header.wp-block-template-part { top: 0; } }

/* v1.0.10: phone header height, logo and menu icon matched to cornerstoneadmin.ca */
@media (max-width: 781px) {
	.site-header { padding-top: 2.1rem !important; padding-bottom: 2.1rem !important; }
	.cs-logo-header { margin-left: 3px; }
	.cs-logo-header img { width: 184px !important; }
	.cs-nav-toggle { margin-right: 0 !important; }
	.cs-nav-toggle svg { width: 26px; height: 26px; stroke-width: 1.4; }
}

/* v1.0.11: laptop header height matched to cornerstoneadmin.ca (same spacing as phones) */
@media (min-width: 782px) {
	.site-header { padding-top: 2rem !important; padding-bottom: 2rem !important; }
}

/* v1.0.12: footer logo the same size on every screen, matching cornerstoneadmin.ca */
.site-footer .footer-logo-pill { padding: 16px !important; border-radius: 18px !important; }
.cs-logo-footer img { width: 116px !important; }

/* v1.0.13: laptop header about 10px taller to line up with cornerstoneadmin.ca */
@media (min-width: 782px) {
	.site-header { padding-top: calc(2.3rem + 5px) !important; padding-bottom: calc(2.3rem + 5px) !important; }
}

/* v1.0.15: laptop logo larger and header content inset to match cornerstoneadmin.ca.
   Header height is unchanged: the bigger logo takes up the extra 10px. */
@media (min-width: 782px) {
	.site-header { max-width: 1104px !important; margin-left: auto !important; margin-right: auto !important;
		padding-top: 2.3rem !important; padding-bottom: 2.3rem !important; }
	.cs-logo-header img { width: 270px !important; max-width: none; }
}

/* v1.0.16: laptop logo 250px; padding nudged so header height stays the same */
@media (min-width: 782px) {
	.cs-logo-header img { width: 250px !important; }
	.site-header { padding-top: calc(2.3rem + 2.5px) !important; padding-bottom: calc(2.3rem + 2.5px) !important; }
}

/* v1.0.17: laptop logo moved 10px in from the left */
@media (min-width: 782px) {
	.cs-logo-header { margin-left: 10px !important; }
}

/* v1.0.18: laptop menu matched exactly to cornerstoneadmin.ca (12.8px, Poppins Light, tracking-wide, 28px gaps) */
@media (min-width: 1024px) {
	.cs-nav-links { font-size: 0.8rem !important; gap: 28px !important; }
	.cs-nav-links a { font-size: 0.8rem !important; font-weight: 300; letter-spacing: 0.025em; color: rgba(47, 47, 47, 0.8); }
	.cs-nav-links .is-current > a { color: var(--wp--preset--color--charcoal); }
	.cs-nav-links .cs-nav-cta > a { font-size: 0.8rem !important; font-weight: 500 !important; letter-spacing: normal; padding: 10px 20px !important; color: var(--wp--preset--color--ivory); }
}

/* Subscribe band */
.cs-subscribe { background: var(--wp--preset--color--ivory); text-align: center; padding-top: clamp(3rem, 6vw, 4.5rem) !important; padding-bottom: clamp(3rem, 6vw, 4.5rem) !important; border-top: 1px solid rgba(200, 195, 187, 0.6); }
.cs-subscribe .script { margin-bottom: 0.25rem !important; }
.cs-subscribe h2 { margin: 0 auto !important; }
.cs-subscribe .sub-text { margin: 0.9rem auto 1.6rem !important; color: rgba(47, 47, 47, 0.8); }
.cs-subscribe form { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.cs-subscribe input[type="email"] {
	flex: 1 1 260px; max-width: 360px; padding: 0.85rem 1.25rem !important; border: 1px solid var(--wp--preset--color--taupe) !important;
	border-radius: 999px !important; background: #fff !important; font-family: var(--wp--preset--font-family--body); font-size: 0.95rem !important; color: var(--wp--preset--color--charcoal);
}
.cs-subscribe button, .cs-subscribe .wp-block-button__link {
	padding: 0.85rem 1.75rem !important; border-radius: 999px !important; border: 0 !important; background: var(--wp--preset--color--charcoal) !important;
	color: var(--wp--preset--color--ivory) !important; font-family: var(--wp--preset--font-family--body); font-weight: 500; font-size: 0.9rem !important; cursor: pointer;
}
.cs-subscribe button:hover { background: var(--wp--preset--color--deep-blue) !important; }
.cs-subscribe .wp-block-jetpack-subscriptions__container { margin: 0 auto; }

/* v1.0.19: post pages on laptop are the same width as the header content
   (logo left edge to "Let's work together" right edge). Featured image shows in full. */
@media (min-width: 782px) {
	.single .cs-post-hero,
	.single .cs-post-body > *,
	.single .cs-post-body .wp-block-post-content > *,
	.single .cs-more > *,
	.single .cs-more .cs-more-grid {
		max-width: 1094px !important; width: 100%;
		margin-left: auto !important; margin-right: auto !important;
		position: relative; left: 5px;
	}
	.single .cs-post-body .wp-block-post-content > * { left: 0; }
	.single .cs-post-hero img { max-height: none; height: auto; }
}

/* v1.0.20: stop the menu "jump" between cornerstoneadmin.ca and the blog.
   Website header content is exactly 1088px wide (max-w-6xl minus px-8).
   The blog was 1104px, so the menu sat 8px further right. Logo stays where it was approved. */
@media (min-width: 782px) {
	.site-header { max-width: 1088px !important; }
	.cs-logo-header { margin-left: 2px !important; }
	.single .cs-post-hero,
	.single .cs-post-body > *,
	.single .cs-more > *,
	.single .cs-more .cs-more-grid { max-width: 1088px !important; left: 0; }
}

/* v1.0.21: laptop header rebuilt from the cornerstoneadmin.ca Header code (Lovable).
   Website: max-w-6xl px-8 py-4 -> content 1088px, logo 108px tall -> header 140px + 1px border.
   Links: text-[0.8rem] tracking-wide text-charcoal/80 pb-0.5 border-b transparent, gap-7.
   Current link: border-charcoal text-charcoal. Hover: colour only.
   Button: rounded-full px-5 py-2.5 text-[0.8rem] font-medium. Tailwind line-height 1.5. */
header.wp-block-template-part .site-header-wrap {
	background: rgba(247, 244, 238, 0.95) !important;
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: none !important;
	border-bottom: 1px solid rgba(200, 195, 187, 0.4) !important;
}
@media (min-width: 1024px) {
	.site-header {
		max-width: 1088px !important; height: 140px; box-sizing: border-box;
		padding-top: 0 !important; padding-bottom: 0 !important;
		align-items: center !important; gap: 16px !important;
	}
	.cs-nav-links { gap: 28px !important; line-height: 1.5; }
	.cs-nav-links li { line-height: 1.5; }
	.cs-nav-links a {
		font-size: 0.8rem !important; line-height: 1.5; font-weight: 300; letter-spacing: 0.025em;
		color: rgba(47, 47, 47, 0.8); padding-bottom: 2px !important;
		border-bottom: 1px solid transparent !important; transition: color .15s ease;
	}
	.cs-nav-links a:hover { color: var(--wp--preset--color--charcoal); border-bottom-color: transparent !important; }
	.cs-nav-links .is-current > a, .cs-nav-links .is-current > a:hover {
		color: var(--wp--preset--color--charcoal); border-bottom-color: var(--wp--preset--color--charcoal) !important;
	}
	.cs-nav-links .cs-nav-cta > a {
		font-size: 0.8rem !important; line-height: 1.5; font-weight: 500 !important; letter-spacing: normal;
		padding: 10px 20px !important; border: 0 !important; border-radius: 9999px;
		color: var(--wp--preset--color--ivory); display: inline-block;
	}
}
