/**
 * Typeset — layout primitives + CSS tied to parent theme infrastructure
 * (shortcodes, PHP-injected markup, page templates).
 *
 * Visual design patterns (heroes, cards, grids, etc.) live in the
 * Typeset Starter child theme, not here. Parent is infrastructure; starter
 * is design.
 */

/* ------------------------------------------------------------------------- *
 * Section primitives — universal spacing rhythm
 * ------------------------------------------------------------------------- */

.section {
	padding: clamp(48px, 6vw, 80px) 0;
}

.section--tight   { padding: clamp(32px, 5vw, 60px) 0; }
.section--loose   { padding: clamp(64px, 8vw, 112px) 0; }
.section--pt-0    { padding-top: 0; }
.section--pb-0    { padding-bottom: 0; }
.section--bg-card { background: var(--card); }

/* ------------------------------------------------------------------------- *
 * Service-page layout
 *
 * Triggered by authored markup:
 *   <div class="container service-layout">
 *     <article class="service-body">…</article>
 *   </div>
 *
 * The <aside class="service-sidebar"> is injected by the_content filter
 * (see typeset_inject_service_sidebar in functions.php). The CSS below
 * has to ship with the parent because the PHP injection hard-codes
 * these class names.
 * ------------------------------------------------------------------------- */

.service-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	gap: 48px;
	padding-top: clamp(32px, 4vw, 60px);
}

.service-body > :first-child { margin-top: 0; }
.service-body > :last-child  { margin-bottom: 0; }

/* #page in general.css has overflow-x: hidden, which kills position:sticky.
   Override on service template only. */
.page-template-page-service #page {
	overflow: visible;
}

.service-sidebar {
	position: sticky;
	top: 120px;
	align-self: start;
}

.service-sidebar .sidebar-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

.service-sidebar .sidebar-menu li { padding: 0; }

.service-sidebar .sidebar-menu a,
.service-sidebar .sidebar-menu a:visited {
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid var(--gray-100);
	color: var(--link-color);
	text-decoration: none;
	font-weight: 500;
}

.service-sidebar .sidebar-menu li:last-child a { border-bottom: none; }

.service-sidebar .sidebar-menu a:hover {
	color: var(--button-color);
}

.service-sidebar .sidebar-menu .current-menu-item > a,
.service-sidebar .sidebar-menu .current_page_item > a,
.service-sidebar .sidebar-menu [aria-current="page"] {
	color: var(--button-color);
	font-weight: 700;
}

@media (max-width: 1023px) {
	.service-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.service-sidebar {
		position: static;
		order: 2;
	}
}

/* ------------------------------------------------------------------------- *
 * Footer CTA band spacing — site-wide margin primitive for the last content
 * block before the footer. Use on any element that sits immediately above
 * the footer to reserve breathing room. Generic, not visual.
 * ------------------------------------------------------------------------- */

.footer-top-cta-section {
	margin-top: clamp(48px, 6vw, 80px);
}

/* ------------------------------------------------------------------------- *
 * [typeset_reviews] Google review star widget
 * (Shipped in parent because it's required by the shortcode output.)
 * ------------------------------------------------------------------------- */

.hero-star-center {
	display: inline-block;
	margin-bottom: 2rem;
}

.hero-star-center a {
	text-decoration: none;
	color: inherit;
}

.hero-star-rating {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hero-star-rating .review-number {
	font-weight: 700;
	font-size: 1.2rem;
}

.google-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	background: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.google-icon img {
	display: block;
	width: 28px;
	height: 28px;
}

.hero-stars {
	display: flex;
	gap: 5px;
	margin-top: 2px;
	margin-bottom: 1px;
}

.hero-star {
	width: 20px;
	height: 20px;
	color: var(--star-color);
}

/* ------------------------------------------------------------------------- *
 * Utilities
 * ------------------------------------------------------------------------- */

.hidden-md,
.hidden-sm,
.hidden-xs { display: initial; }

@media (max-width: 1200px) { .hidden-md { display: none !important; } }
@media (max-width: 1024px) { .hidden-sm { display: none !important; } }
@media (max-width: 767px)  { .hidden-xs { display: none !important; } }

ul.col2,
ul.col3 {
	list-style: disc;
	padding: 0;
	column-gap: 5em;
}

ul.col2 { columns: 2; }
ul.col3 { columns: 3; }

/* Mobile nav: make dropdown scrollable so all items are reachable */
@media screen and (max-width: 1249px) {
	.header-inline .main-navigation.toggled-on {
		overflow-y: auto;
		max-height: calc(100vh - 120px);
		max-height: calc(100dvh - 120px);
	}
}
