/* Content page template (inc/content-pages.php): About Us, FAQs, Terms, Privacy, Areas Serviced, directions, county pages.
   Loaded only on those pages. */

/* ---------- Page background: white, like the category pages ---------- */
body.bb-cp,
body.bb-cp #wrapper,
body.bb-cp #inner-wrap,
body.bb-cp .site,
body.bb-cp .content-area,
body.bb-cp .site-main { background: var(--bb-white) !important; }

/* ---------- Header band: the same look as the category pages ---------- */
.bb-cp .entry-hero .hero-section-overlay { background: var(--bb-cream) !important; }
.bb-cp .entry-hero .entry-hero-container-inner { min-height: 0; }
.bb-cp .entry-hero .hero-container.site-container { max-width: 1368px; padding-top: 20px; padding-bottom: 18px; }
.bb-cp .entry-hero .entry-header { text-align: left; align-items: flex-start; }
.bb-cp .entry-hero .entry-title {
	margin: 0 0 .1em;
	color: var(--bb-night);
	font-size: clamp(2.4rem, 4.4vw, 3.4rem);
	font-weight: 600;
	line-height: 1.05;
	text-align: left;
	text-transform: uppercase;
}
.bb-cp__crumbs { margin: 0 0 14px; font-size: .9rem; color: var(--bb-text); }
.bb-cp__crumbs ol { display: flex; flex-wrap: wrap; gap: 0 .4em; margin: 0; padding: 0; list-style: none; }
.bb-cp__crumbs li { margin: 0; }
.bb-cp__crumbs li + li::before { content: "/"; margin-right: .4em; }
.bb-cp__crumbs a { display: inline-block; padding: 14px 6px; margin: -14px -6px; color: inherit; text-decoration: underline; text-underline-offset: .18em; } /* a 44px tap area without moving the text */
.bb-cp__intro { max-width: 62ch; margin: 0; color: var(--bb-text); font-size: 1.15rem; line-height: 1.6; }

/* ---------- Layout: reading column + sticky side column ---------- */
.bb-cp .content-container.site-container { max-width: 1368px; }
.bb-cp .content-area { margin-top: 0; margin-bottom: 0; }
.bb-cp #primary .content-container { padding-top: clamp(24px, 3.5vw, 44px); padding-bottom: clamp(40px, 6vw, 80px); }
.bb-cp .entry.content-bg, .bb-cp .entry-content-wrap { padding: 0; background: transparent; box-shadow: none; border: 0; }
.bb-cp .entry-content { margin: 0; }

.bb-cp__layout { display: block; }
.bb-cp__layout--two {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}
.bb-cp__layout--two > .content-wrap { max-width: 780px; }
/* Kadence adds an empty notices div before the content; it must not take the first grid cell (that pushed the text into the narrow column) */
.bb-cp__layout > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.bb-cp__layout > .woocommerce-notices-wrapper:not(:has(*)) { display: none; }
.bb-cp__layout--two > .content-wrap { grid-column: 1; }
.bb-cp__layout--two > .bb-cp__side { grid-column: 2; }
.bb-cp__side {
	position: sticky;
	top: 130px; /* below the sticky header */
	display: grid;
	gap: 20px;
	max-height: calc(100vh - 150px); /* on a short screen the column scrolls instead of being cut off */
	max-height: calc(100svh - 150px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* "On this page" */
.bb-cp__toc { padding: 6px 20px 12px; border: 1px solid var(--bb-border); border-radius: var(--bb-radius); background: var(--bb-white); }
.bb-cp__toc summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	cursor: pointer;
	list-style: none;
	font-family: var(--bb-heading-font);
	font-size: 1.2rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--bb-night);
}
.bb-cp__toc summary::-webkit-details-marker { display: none; }
.bb-cp__toc summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.bb-cp__toc details[open] > summary::after { transform: rotate(-135deg); }
.bb-cp__toc ol { max-height: min(36vh, 360px); margin: 0; padding: 0; overflow: auto; list-style: none; }
.bb-cp__toc li { margin: 0; }
.bb-cp__toc a {
	display: block;
	padding: 12px 0 12px 12px;
	border-left: 3px solid transparent;
	color: var(--bb-text);
	font-size: .95rem;
	line-height: 1.35;
	text-decoration: none;
}
.bb-cp__toc a:hover, .bb-cp__toc a:focus-visible { color: var(--bb-purple-dark); background: var(--bb-cream); }
.bb-cp__toc a[aria-current="true"] { border-left-color: var(--bb-purple); color: var(--bb-purple-dark); font-weight: 700; }
.bb-cp__toc-l3 a { padding-left: 28px; font-size: .9rem; }

/* Contact card */
.bb-cp__card {
	padding: 24px;
	border-radius: var(--bb-radius-lg);
	background: linear-gradient(135deg, var(--bb-purple) 0%, var(--bb-purple-dark) 60%, var(--bb-night) 100%);
	color: #fff;
	box-shadow: var(--bb-shadow);
}
.bb-cp__card-title { margin: 0 0 .4rem; color: #fff; font-size: 1.5rem; text-transform: uppercase; }
.bb-cp__phone {
	display: block;
	padding: 4px 0;
	color: #fff;
	font-family: var(--bb-heading-font);
	font-size: 2.1rem;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.2;
	text-decoration: none;
}
/* The theme's general link hover colour is a dark purple: invisible (1.4:1) on this purple card. Yellow is about 5:1. */
.bb-cp__phone:hover, .bb-cp__phone:focus-visible { color: var(--bb-yellow); text-decoration: underline; }
.bb-cp__hours { margin: .4rem 0 .8rem; padding: 0; list-style: none; font-size: .95rem; line-height: 1.6; }
.bb-cp__hours li { margin: 0; }
.bb-cp__email { margin: 0 0 1.1rem; font-size: .95rem; }
.bb-cp__email a { display: inline-block; padding: 14px 0; color: #fff; text-decoration: underline; text-underline-offset: .18em; }
.bb-cp__email a:hover, .bb-cp__email a:focus-visible { color: var(--bb-yellow); }

/* Buttons (card and call-to-action band) */
.bb-cp__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 26px;
	border: 2px solid var(--bb-yellow);
	border-radius: 999px;
	background: var(--bb-yellow);
	color: var(--bb-night);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color .2s, color .2s, border-color .2s;
}
.bb-cp__btn:hover, .bb-cp__btn:focus-visible { border-color: #fff; background: #fff; color: var(--bb-purple-dark); }
.bb-cp__btn--ghost { background: transparent; border-color: #fff; color: #fff; }
.bb-cp__btn--ghost:hover, .bb-cp__btn--ghost:focus-visible { background: #fff; color: var(--bb-purple-dark); }
.bb-cp__card .bb-cp__btn { width: 100%; }

/* ---------- Call-to-action band ---------- */
.bb-cp-cta {
	padding: clamp(40px, 6vw, 72px) 0;
	background: linear-gradient(135deg, var(--bb-purple) 0%, var(--bb-purple-dark) 55%, var(--bb-night) 100%);
	color: #fff;
}
.bb-cp-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; max-width: 1368px; }
.bb-cp-cta h2 { margin: 0 0 .35em; color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.6rem); text-transform: uppercase; }
.bb-cp-cta p { max-width: 54ch; margin: 0; font-size: 1.1rem; line-height: 1.6; }
.bb-cp-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Easier-to-read text ---------- */
.bb-cp .entry-content { color: var(--bb-text); font-size: 1.075rem; line-height: 1.75; }
.bb-cp .entry-content p, .bb-cp .entry-content ul, .bb-cp .entry-content ol { margin: 0 0 1.2em; }
.bb-cp .entry-content h2, .bb-cp .entry-content h3, .bb-cp .entry-content h4 { scroll-margin-top: 140px; } /* the colour is left to the theme and to the page's own blocks */
.bb-cp .entry-content h2 { margin: 2.2em 0 .6em; font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.12; text-transform: uppercase; }
.bb-cp .entry-content h3 { margin: 1.8em 0 .5em; font-size: clamp(1.4rem, 2vw, 1.7rem); line-height: 1.15; }
.bb-cp .entry-content h4 { margin: 1.5em 0 .4em; font-size: 1.15rem; font-weight: 700; }
.bb-cp .entry-content > :first-child { margin-top: 0; }
.bb-cp .entry-content a:not(.wp-element-button):not(.kb-button) { color: var(--bb-purple-dark); text-decoration: underline; text-underline-offset: .18em; }
.bb-cp .entry-content a:not(.wp-element-button):not(.kb-button):hover { color: var(--bb-purple); }
/* A block with its own background (a coloured tile, say) keeps its own link colours. */
.bb-cp .entry-content :is(.has-background, [style*="background"], [class*="-background-color"]) a:not(.wp-element-button):not(.kb-button) { color: inherit; }
.bb-cp .entry-content ul, .bb-cp .entry-content ol { padding-left: 1.4em; }
.bb-cp .entry-content li { margin: 0 0 .45em; }
.bb-cp .entry-content ul li::marker { color: var(--bb-purple); }
.bb-cp .entry-content ol li::marker { color: var(--bb-purple); font-weight: 700; }
.bb-cp .entry-content blockquote {
	margin: 1.6em 0;
	padding: 1em 1.4em;
	border-left: 4px solid var(--bb-yellow);
	border-radius: 0 var(--bb-radius) var(--bb-radius) 0;
	background: var(--bb-cream);
	font-size: 1.15rem;
}
.bb-cp .entry-content blockquote p:last-child { margin-bottom: 0; }
.bb-cp .entry-content img { max-width: 100%; height: auto; border-radius: var(--bb-radius); }
.bb-cp .entry-content figcaption { margin-top: .5em; color: var(--bb-muted); font-size: .9rem; }
.bb-cp .entry-content hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--bb-border); }
.bb-cp .entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .95rem; }
.bb-cp .entry-content th, .bb-cp .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--bb-tint); text-align: left; }
.bb-cp .entry-content th { background: var(--bb-cream); color: var(--bb-night); }

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; } /* this file only loads on these pages */
}

/* ---------- Tablets and phones: one column. "On this page" first (collapsed), the card after the text. ---------- */
@media (max-width: 960px) {
	.bb-cp__layout--two { display: flex; flex-direction: column; gap: 28px; }
	.bb-cp__side { display: contents; position: static; max-height: none; overflow: visible; }
	.bb-cp__toc { order: -1; }
	.bb-cp__card { order: 2; }
	.bb-cp__layout--two > .content-wrap { max-width: none; width: 100%; }
	.bb-cp__toc ol { max-height: 50vh; }
	.bb-cp .entry-hero .hero-container.site-container { padding-bottom: 18px; }
}
@media (max-width: 560px) {
	.bb-cp-cta__actions { width: 100%; }
	.bb-cp-cta__actions .bb-cp__btn { flex: 1 1 100%; }
}

/* ---------- Pages built from the page-faqs / page-areas-serviced / page-contact patterns ---------- */
.bb-areas__towns { columns: 3 13rem; column-gap: 28px; margin: 0; padding-left: 1.2em; }
.bb-areas__towns li { margin: 0 0 .3em; break-inside: avoid; }
.bb-contact { gap: clamp(28px, 5vw, 64px); }
.bb-contact .bb-location { margin: 0 0 1.2em; }
@media (max-width: 781px) { .bb-contact .wp-block-column { flex-basis: 100% !important; } }

/* ---------- Contact Form 7 (the Contact page form): a clean card ---------- */
.bb-cp .wpcf7 { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--bb-border); border-radius: var(--bb-radius-lg); background: var(--bb-cream); box-shadow: var(--bb-shadow); }
.bb-cp .wpcf7 .row.normal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 0 0 14px; }
.bb-cp .wpcf7 .row.normal > p, .bb-cp .wpcf7 .row.normal > .field { grid-column: 1 / -1; }
.bb-cp .wpcf7 .row.normal > .col-md-6 { grid-column: auto; min-width: 0; }
.bb-cp .wpcf7 p { margin: 0 !important; }
.bb-cp .wpcf7 p:empty, .bb-cp .wpcf7 br { display: none; }
.bb-cp .wpcf7 .wpcf7-form-control-wrap { display: block; }
.bb-cp .wpcf7 :is(input[type="text"], input[type="tel"], input[type="email"], input[type="date"], textarea) {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #b9a9c0;
	border-radius: var(--bb-radius);
	background: var(--bb-white);
	color: var(--bb-night);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
}
.bb-cp .wpcf7 textarea { height: 150px; min-height: 120px; resize: vertical; }
.bb-cp .wpcf7 ::placeholder { color: #6b5a72; opacity: 1; } /* readable, 5:1 on white */
.bb-cp .wpcf7 :is(input, textarea):focus-visible { border-color: var(--bb-purple); outline: 3px solid var(--bb-yellow); outline-offset: 1px; }
.bb-cp .wpcf7 [aria-invalid="true"], .bb-cp .wpcf7 .wpcf7-not-valid { border-color: #b3261e; }
.bb-cp .wpcf7 .wpcf7-not-valid-tip { margin-top: 4px; color: #b3261e; font-size: .9rem; }
.bb-cp .wpcf7 .row.normal > p:has(input[type="date"]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bb-cp .wpcf7 .row.normal > p:has(input[type="date"]) > span:first-child { padding: 0 !important; color: var(--bb-night); font-weight: 700; }
.bb-cp .wpcf7 input[type="date"] { width: auto; min-width: 12rem; }
.bb-cp .wpcf7 .cf7-cf-turnstile { margin: 4px 0 16px !important; }
.bb-cp .wpcf7 .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 32px;
	border: 2px solid var(--bb-yellow);
	border-radius: 999px;
	background: var(--bb-yellow);
	color: var(--bb-night);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.bb-cp .wpcf7 .wpcf7-submit:hover, .bb-cp .wpcf7 .wpcf7-submit:focus-visible { border-color: var(--bb-purple-dark); background: var(--bb-purple-dark); color: #fff; }
.bb-cp .wpcf7 .wpcf7-response-output { margin: 16px 0 0; padding: 12px 16px; border: 2px solid var(--bb-purple); border-radius: var(--bb-radius); background: var(--bb-white); }
@media (max-width: 560px) {
	.bb-cp .wpcf7 .row.normal { grid-template-columns: 1fr; }
	.bb-cp .wpcf7 .wpcf7-submit { width: 100%; }
}
