/* =====================================================================
   blog.css — Classy Dental blog skin (L3).
   Styles the parent's unstyled .ac-* blog markup (archive + single post)
   to match the site's design DNA (see implants.custom.css / chrome.css).
   Colors ONLY via theme vars; neutral rgba()/color-mix for scrims/shadows.
   No brand hex. (--accent-rgb is NOT defined — use color-mix for gold alpha.)
   ===================================================================== */

/* ---------------------------------------------------------------------
   PAGE HERO — teal band + bg photo + teal scrim (service-hero feel).
   Used by both the archive (.ac-pagehead--blog) and single post (.ac-pagehead).
   Top padding clears the fixed transparent header (desktop ~155px).
   --------------------------------------------------------------------- */
.ac-pagehead{
	position: relative;
	background: var(--primary-color);
	overflow: hidden;
	isolation: isolate;
}
.ac-pagehead__photo{
	position: absolute; inset: 0; z-index: 0;
	background-size: cover; background-position: center;
}
/* Teal scrim: keeps light-on-dark text readable over any (or no) photo. */
.ac-pagehead__scrim{
	position: absolute; inset: 0; z-index: 1;
	background:
		linear-gradient(115deg,
			var(--primary-color),
			color-mix(in srgb, var(--primary-color) 82%, transparent) 48%,
			color-mix(in srgb, var(--primary-color) 60%, transparent)),
		linear-gradient(to top, rgba(0, 0, 0, .35), rgba(0, 0, 0, .05));
}

/* Faint decorative vertical rules (parent .ac-grid-lines markup). */
.ac-pagehead .ac-grid-lines{
	position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.ac-pagehead .ac-grid-lines__inner{
	max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 36px;
	display: flex; justify-content: space-between;
}
.ac-pagehead .ac-grid-lines__inner span{
	width: 1px;
	background: linear-gradient(
		color-mix(in srgb, var(--white-color) 0%, transparent),
		color-mix(in srgb, var(--white-color) 9%, transparent) 45%,
		color-mix(in srgb, var(--white-color) 0%, transparent));
}

.ac-pagehead__body{
	position: relative; z-index: 2;
	padding-top: 200px; padding-bottom: 92px;
}

/* Breadcrumb */
.ac-pagehead .ac-breadcrumb{
	font-family: var(--default-font); font-size: 12px; letter-spacing: .16em;
	text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 24px;
}
.ac-pagehead .ac-breadcrumb a{ color: var(--on-dark-muted); text-decoration: none; transition: color .2s ease; }
.ac-pagehead .ac-breadcrumb a:hover{ color: var(--accent-color); }
.ac-pagehead .ac-breadcrumb span[aria-hidden]{ margin: 0 10px; color: color-mix(in srgb, var(--on-dark-muted) 60%, transparent); }
.ac-pagehead .ac-breadcrumb span[aria-current]{ color: var(--white-color); }

/* Eyebrow (gold, letterspaced serif — site convention) */
.ac-pagehead .ac-eyebrow{ margin-bottom: 16px; }
.ac-pagehead .ac-eyebrow__label{
	font-family: var(--mono-font); font-size: 13px; letter-spacing: .2em;
	text-transform: uppercase; color: var(--accent-color);
}

/* Title (Playfair, light-on-dark) */
.ac-pagehead__title{
	font-family: var(--heading-font); font-weight: 600;
	color: var(--white-color); margin: 0; line-height: 1.05;
	font-size: clamp(40px, 5.4vw, 66px); max-width: 20ch;
}
.ac-pagehead__title--post{ font-size: clamp(34px, 4.4vw, 54px); max-width: 24ch; }

/* ---------------------------------------------------------------------
   FILTER / SEARCH BAR — square, on-brand (overrides parent pill styling
   and its broken rgba(var(--accent-rgb)) focus ring).
   --------------------------------------------------------------------- */
.blog-filter-bar{ margin-bottom: 48px; }
.blog-search-form input[type="search"]{
	border-radius: 0; border: 1px solid var(--divider-color);
	background: var(--white-color); color: var(--primary-color);
	font-family: var(--default-font);
}
.blog-search-form input[type="search"]:focus{
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 24%, transparent);
}
.blog-search-form button{
	border-radius: 0; right: 8px; width: 42px; height: 42px;
	background: var(--primary-color); color: var(--white-color);
}
.blog-search-form button:hover{ background: var(--accent-color); }

/* ---------------------------------------------------------------------
   BLOG GRID — responsive 3 / 2 / 1 columns.
   --------------------------------------------------------------------- */
.ac-blog-grid{
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 30px;
}
@media (max-width: 991px){
	.ac-blog-grid{ grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}
@media (max-width: 600px){
	.ac-blog-grid{ grid-template-columns: 1fr; gap: 30px; }
}

/* ---------------------------------------------------------------------
   BLOG CARD — ivory/white surface, subtle border + shadow, lift on hover.
   --------------------------------------------------------------------- */
.ac-blog-card{
	display: flex; flex-direction: column; height: 100%;
	background: var(--white-color);
	border: 1px solid var(--divider-color);
	box-shadow: 0 10px 30px rgba(var(--primary-rgb), .06);
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.ac-blog-card:hover{
	transform: translateY(-4px);
	box-shadow: 0 20px 44px rgba(var(--primary-rgb), .14);
	border-color: color-mix(in srgb, var(--accent-color) 45%, var(--divider-color));
}

/* Framed 3/2 media. Tinted teal fallback (with a gold "+" mark) shows for
   posts without a featured image; the <img>, when present, covers it. */
.ac-blog-card__media{
	position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden;
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--primary-color) 15%, var(--secondary-color)),
		color-mix(in srgb, var(--primary-color) 6%, var(--secondary-color)));
	border-bottom: 1px solid var(--divider-color);
}
.ac-blog-card__media::after{
	content: "+"; position: absolute; inset: 0; z-index: 0;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--heading-font); font-size: 58px; line-height: 1;
	color: color-mix(in srgb, var(--accent-color) 55%, transparent);
}
.ac-blog-card__media img{ position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }

.ac-blog-card__body{
	display: flex; flex-direction: column; flex: 1;
	padding: 26px 28px 30px;
}
.ac-blog-card__date{
	font-family: var(--mono-font); font-size: 12px; letter-spacing: .16em;
	text-transform: uppercase; color: var(--accent-color); margin-bottom: 12px;
}
.ac-blog-card__title{
	font-family: var(--heading-font); font-weight: 600; font-size: 22px;
	line-height: 1.28; margin: 0 0 12px;
}
.ac-blog-card__title a{ color: var(--primary-color); text-decoration: none; transition: color .2s ease; }
.ac-blog-card__title a:hover{ color: var(--accent-color); }
.ac-blog-card__excerpt{
	font-family: var(--default-font); font-size: 15px; line-height: 1.62;
	color: var(--text-color); margin: 0 0 22px;
}
.ac-blog-card__more{
	margin-top: auto; align-self: flex-start;
	font-family: var(--default-font); font-size: 12px; font-weight: 600;
	letter-spacing: .16em; text-transform: uppercase;
	color: var(--accent-color); text-decoration: none; transition: color .2s ease;
}
.ac-blog-card__more:hover{ color: var(--primary-color); }

/* ---------------------------------------------------------------------
   PAGINATION — square tiles, gold active state.
   --------------------------------------------------------------------- */
.ac-pagination{
	display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 64px;
}
.ac-pagination__item{ display: inline-flex; }
.ac-pagination .page-numbers{
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 46px; height: 46px; padding: 0 12px;
	font-family: var(--default-font); font-size: 15px;
	border: 1px solid var(--divider-color); color: var(--primary-color);
	text-decoration: none; transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.ac-pagination a.page-numbers:hover{ border-color: var(--accent-color); color: var(--accent-color); }
.ac-pagination .page-numbers.current{
	background: var(--accent-color); border-color: var(--accent-color); color: var(--white-color);
}
.ac-pagination .page-numbers.dots{ border-color: transparent; }

/* ---------------------------------------------------------------------
   SINGLE POST — readable prose column + prev/next nav.
   --------------------------------------------------------------------- */
.ac-article-wrap{ max-width: 820px; margin: 0 auto; }

.ac-article.ac-prose{
	max-width: 760px; margin: 0 auto;
	font-family: var(--mono-font); font-size: 19px; line-height: 1.8; color: var(--text-color);
}
.ac-article.ac-prose > :first-child{ margin-top: 0; }
.ac-article.ac-prose p{ margin: 0 0 1.4em; }
.ac-article.ac-prose h2{
	font-family: var(--heading-font); font-weight: 600; color: var(--primary-color);
	font-size: clamp(28px, 3.4vw, 36px); line-height: 1.2; margin: 1.7em 0 .5em;
}
.ac-article.ac-prose h3{
	font-family: var(--heading-font); font-weight: 600; color: var(--primary-color);
	font-size: clamp(22px, 2.6vw, 27px); line-height: 1.25; margin: 1.5em 0 .45em;
}
.ac-article.ac-prose a{
	color: var(--accent-color); text-decoration: underline;
	text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s ease;
}
.ac-article.ac-prose a:hover{ color: var(--primary-color); }
.ac-article.ac-prose ul, .ac-article.ac-prose ol{ margin: 1.2em 0 1.4em; padding-left: 1.4em; }
.ac-article.ac-prose li{ margin: .5em 0; }
.ac-article.ac-prose li::marker{ color: var(--accent-color); }
.ac-article.ac-prose blockquote{
	margin: 1.8em 0; padding: 6px 0 6px 28px;
	border-left: 3px solid var(--accent-color);
	font-family: var(--heading-font); font-style: italic; font-size: 1.12em;
	line-height: 1.5; color: var(--primary-color);
}
.ac-article.ac-prose img{ max-width: 100%; height: auto; margin: 1.6em 0; }
.ac-article.ac-prose strong{ color: var(--primary-color); }

/* Neutralize right-aligned inline styling baked into imported post content
   (nearly every legacy paragraph carries style="text-align:right") so the body
   reads as normal left-aligned prose. Scoped to the offending inline rule only. */
.ac-article.ac-prose [style*="text-align: right"],
.ac-article.ac-prose [style*="text-align:right"]{ text-align: left !important; }

/* Prev / next */
.ac-article-nav{
	display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
	margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--divider-color);
}
.ac-article-nav > div{ display: flex; }
.ac-article-nav .is-next{ justify-content: flex-end; text-align: right; }
.ac-article-nav a{
	display: flex; flex-direction: column; gap: 7px; width: 100%;
	padding: 22px 24px; text-decoration: none;
	background: var(--white-color); border: 1px solid var(--divider-color);
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ac-article-nav .is-next a{ align-items: flex-end; }
.ac-article-nav a:hover{
	border-color: var(--accent-color);
	box-shadow: 0 14px 30px rgba(var(--primary-rgb), .1);
	transform: translateY(-2px);
}
.ac-article-nav span{
	font-family: var(--default-font); font-size: 11px; letter-spacing: .18em;
	text-transform: uppercase; color: var(--accent-color);
}
.ac-article-nav strong{
	font-family: var(--heading-font); font-weight: 600; font-size: 18px;
	line-height: 1.3; color: var(--primary-color);
}

.ac-article-back{ text-align: center; margin-top: 40px; }
.ac-article-back a{
	font-family: var(--default-font); font-size: 12px; letter-spacing: .16em;
	text-transform: uppercase; color: var(--accent-color); text-decoration: none;
	transition: color .2s ease;
}
.ac-article-back a:hover{ color: var(--primary-color); }

/* ---------------------------------------------------------------------
   RESPONSIVE — clear the shorter fixed mobile header (~121px).
   --------------------------------------------------------------------- */
@media (max-width: 991px){
	.ac-pagehead__body{ padding-top: 150px; padding-bottom: 56px; }
	.ac-pagehead .ac-grid-lines{ display: none; }
}
@media (max-width: 600px){
	.ac-pagehead__body{ padding-top: 138px; padding-bottom: 48px; }
	.ac-article.ac-prose{ font-size: 18px; }
	.ac-article-nav{ grid-template-columns: 1fr; gap: 16px; }
	.ac-article-nav .is-next, .ac-article-nav .is-next a{ text-align: left; align-items: flex-start; }
	.ac-article-nav .is-next{ justify-content: stretch; }
}

/* =====================================================================
   Shared final CTA block (.ac-cta-section) — used by single blog posts
   (ac_block('cta')). The parent ships the markup but no CSS, and the old
   roofing skin's version is gone, so style it on-brand here: teal photo
   band + ivory request-a-consultation card. Colors via theme vars only.
   ===================================================================== */
.ac-cta-section{ position: relative; overflow: hidden; background: var(--primary-color); }
.ac-cta-section__photo{ position: absolute; inset: 0; background-size: cover; background-position: center; }
.ac-cta-section__scrim{
	position: absolute; inset: 0;
	background: linear-gradient(90deg,
		rgba(var(--primary-rgb), .94) 0%,
		rgba(var(--primary-rgb), .80) 52%,
		rgba(var(--primary-rgb), .52) 100%);
}
.ac-cta{
	position: relative; z-index: 2;
	display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center;
	padding-top: 96px; padding-bottom: 96px;
}
.ac-cta .ac-eyebrow__label{ color: var(--accent-color); }
.ac-cta__title{
	font-family: var(--heading-font); font-weight: 600; color: var(--white-color);
	font-size: clamp(32px, 4vw, 46px); line-height: 1.08; margin: 14px 0 0; max-width: 16ch; text-wrap: balance;
}
.ac-cta__lead{
	font-family: var(--mono-font); font-size: 18px; line-height: 1.6;
	color: var(--on-dark); margin-top: 20px; max-width: 46ch;
}
/* Request-a-consultation card — ivory panel, dark-on-light text */
.ac-cta .ac-form-card{
	background: var(--secondary-color); padding: 44px 42px;
	box-shadow: 0 24px 55px rgba(0,0,0,.22);
}
.ac-cta .ac-form-card__title{
	font-family: var(--heading-font); font-weight: 600; font-size: 24px; line-height: 1.2;
	color: var(--primary-color); margin: 0;
}
.ac-cta .ac-form-card__intro{
	font-family: var(--mono-font); font-size: 17px; line-height: 1.6;
	color: var(--text-color); margin: 12px 0 24px;
}
.ac-cta .ac-form-card .btn-default{ margin: 0; }
.ac-cta .ac-form-card__foot{
	margin-top: 20px; font-family: var(--default-font); font-size: 13px; letter-spacing: .06em;
	color: var(--text-color);
}
.ac-cta .ac-form-card__foot strong{ color: var(--primary-color); }
@media (max-width: 991px){
	.ac-cta{ grid-template-columns: 1fr; gap: 32px; padding-top: 60px; padding-bottom: 60px; }
	.ac-cta .ac-form-card{ padding: 32px 26px; }
}
