/* PR1 shared styles for the page content classes. */

/* Shared typography */
.pr1-blog-eyebrow,
.pr1-services-eyebrow,
.pr1-about-eyebrow,
.pr1-contact-eyebrow {
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .82rem;
	font-weight: 700;
}

.pr1-blog-section-title,
.pr1-services-section-title,
.pr1-about-section-title,
.pr1-contact-section-title {
	font-size: clamp(2.1rem, 4vw, 3.7rem) !important;
	line-height: 1.08 !important;
	letter-spacing: -.025em;
}

.pr1-blog-lead,
.pr1-services-lead,
.pr1-about-lead,
.pr1-contact-lead {
	font-size: 20px;
	line-height: 1.65;
}

.pr1-blog-topic,
.pr1-services-card,
.pr1-services-product,
.pr1-about-card,
.pr1-contact-card,
.pr1-contact-topic {
	height: 100%;
	transition: transform .2s ease, box-shadow .2s ease;
}

.pr1-blog-topic:hover,
.pr1-services-card:hover,
.pr1-about-card:hover,
.pr1-contact-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 38px rgba(0, 0, 0, .08);
}

/* Hero headings */
.pr1-blog-hero-title,
.pr1-about-hero-title,
.pr1-contact-hero-title {
	font-size: clamp(3.1rem, 8vw, 6rem) !important;
	line-height: .98 !important;
	letter-spacing: -.035em;
}

.pr1-blog-hero-title {
	font-size: clamp(3rem, 7vw, 5.7rem) !important;
	max-width: 980px;
}

.pr1-services-hero-title {
	font-size: clamp(3rem, 7vw, 5.8rem) !important;
	line-height: 1 !important;
	letter-spacing: -.035em;
}

/* Services */
.pr1-services-anchor { scroll-margin-top: 110px; }
.pr1-services-link a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pr1-services-number { font-size: 4.8rem; line-height: 1; font-weight: 800; letter-spacing: -.06em; opacity: .18; margin-bottom: 8px; }
.pr1-services-mini { font-size: .9rem; line-height: 1.55; }
.pr1-services-product { border-top: 5px solid; }

.pr1-services-faq,
.pr1-about-faq {
	border-top: 1px solid #ddd;
	padding-top: 28px;
	margin-top: 28px;
}

.pr1-services-faq:first-of-type,
.pr1-about-faq:first-of-type {
	border-top: 0;
	padding-top: 0;
	margin-top: 0;
}

.pr1-services-visual,
.pr1-contact-location {
	position: relative;
	overflow: hidden;
}

.pr1-services-visual {
	min-height: 430px;
	display: flex;
	align-items: flex-end;
}

.pr1-services-visual::before,
.pr1-contact-location::before,
.pr1-services-visual::after,
.pr1-contact-location::after {
	content: "";
	position: absolute;
	border-radius: 50%;
}

.pr1-services-visual::before,
.pr1-contact-location::before {
	width: 330px;
	height: 330px;
	right: -80px;
	top: -100px;
	border: 2px solid rgba(255, 255, 255, .35);
}

.pr1-services-visual::after,
.pr1-contact-location::after {
	width: 220px;
	height: 220px;
	right: 70px;
	top: 60px;
	border: 1px solid rgba(255, 255, 255, .18);
}

.pr1-services-visual-content,
.pr1-contact-location-content {
	position: relative;
	z-index: 2;
}

/* About */
.pr1-about-person-image { overflow: hidden; border-radius: 14px; }
.pr1-about-person-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.pr1-about-role { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.pr1-about-tag { display: inline-block; padding: 7px 12px; margin: 0 7px 8px 0; border-radius: 999px; font-size: .86rem; font-weight: 600; }
.pr1-about-number,
.pr1-contact-number { font-size: 4rem; line-height: 1; font-weight: 800; letter-spacing: -.05em; opacity: .16; }

/* Blog */
.pr1-blog-grid .wp-block-post-template { gap: 30px; }
.pr1-blog-grid .wp-block-post { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; overflow: hidden; height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.pr1-blog-grid .wp-block-post:hover { transform: translateY(-3px); box-shadow: 0 14px 38px rgba(0, 0, 0, .09); }
.pr1-blog-grid .wp-block-post-featured-image { margin: 0; }
.pr1-blog-grid .wp-block-post-featured-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pr1-blog-grid .wp-block-post-title,
.pr1-blog-grid .wp-block-post-date,
.pr1-blog-grid .wp-block-post-excerpt,
.pr1-blog-grid .wp-block-read-more { margin-left: 26px; margin-right: 26px; }
.pr1-blog-grid .wp-block-post-title { margin-top: 25px; margin-bottom: 10px; line-height: 1.18; }
.pr1-blog-grid .wp-block-post-title a { color: #000; text-decoration: none; }
.pr1-blog-grid .wp-block-post-date { color: #777; font-size: .82rem; margin-bottom: 14px; }
.pr1-blog-grid .wp-block-post-excerpt { line-height: 1.55; }
.pr1-blog-grid .wp-block-read-more { display: inline-block; margin-top: 5px; margin-bottom: 28px; color: #7c0fa6; font-weight: 700; text-decoration: none; }
.pr1-blog-grid .wp-block-query-pagination { margin-top: 55px; gap: 12px; align-items: center; }
.pr1-blog-grid .wp-block-query-pagination a { text-decoration: none; }
.pr1-blog-grid .wp-block-query-pagination-numbers { display: flex; gap: 7px; }
.pr1-blog-grid .wp-block-query-pagination-numbers .page-numbers { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d7d7d7; border-radius: 50%; }
.pr1-blog-grid .wp-block-query-pagination-numbers .current { background: #7c0fa6; border-color: #7c0fa6; color: #fff; }
.pr1-blog-grid .wp-block-query-pagination-previous,
.pr1-blog-grid .wp-block-query-pagination-next { padding: 9px 14px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.pr1-blog-note { border-left: 5px solid #ff5757; }

/* Contact */
.pr1-contact-link { color: inherit; text-decoration: none; }
.pr1-contact-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.pr1-contact-form-wrap { background: #fff; border-radius: 14px; padding: 42px; box-shadow: 0 14px 40px rgba(0, 0, 0, .07); }
.pr1-contact-form-wrap .wpforms-container { margin: 0; }
.pr1-contact-form-wrap input,
.pr1-contact-form-wrap textarea,
.pr1-contact-form-wrap select { border-radius: 7px !important; }
.pr1-contact-form-wrap .wpforms-submit { background: #ff5757 !important; border: 0 !important; border-radius: 8px !important; color: #fff !important; font-weight: 700 !important; padding: 13px 24px !important; }
.pr1-contact-form-wrap .wpforms-submit:hover { background: #993333 !important; }
.pr1-contact-location::before { right: -100px; top: -120px; border-color: rgba(255, 255, 255, .25); }
.pr1-contact-location::after { right: 80px; top: 50px; border-color: rgba(255, 255, 255, .15); }

@media (max-width: 781px) {
	/* Scope shared mobile rules to PR1 landing pages, never header/footer or posts.
	 * !important is needed for Gutenberg's inline spacing/type declarations.
	 * :has() reuses existing PR1 markers without changing saved block content. */
	.entry-content:has(h1[class*="pr1-"]) > :where(.wp-block-group.alignfull, .wp-block-cover.alignfull) {
		padding-block: 64px !important;
		margin-block: 0 !important;
	}

	/* The source contains comment-only paragraphs between full-width sections. */
	.entry-content:has(h1[class*="pr1-"]) > p:empty { display: none; }

	.entry-content:has(h1[class*="pr1-"]) > .wp-block-cover {
		min-height: 0 !important;
	}
	/* The live transparent row is 110px; its height token currently reports 70px.
	 * Reserve the observed row plus 32px without changing header configuration. */
	.entry-content:has(h1[class*="pr1-"]) > .wp-block-cover:has(h1) {
		padding-top: max(142px, calc(var(--header-height, 110px) + 32px)) !important;
	}

	/* Fact strips and short editorial asides. */
	.entry-content:has(h1[class*="pr1-"]) > .wp-block-group:not(:has(h1, h2, h3)),
	.entry-content:has(h1[class*="pr1-"]) > .wp-block-group:has(.pr1-blog-note) {
		padding-block: 48px !important;
	}

	/* Intro and its separate card section share a 48px content-to-content gap. */
	.entry-content:has(h1[class*="pr1-"]) > .wp-block-group:has(+ p:empty + .wp-block-group :is(.pr1-card, .pr1-services-card, .pr1-about-card, .pr1-blog-topic)) {
		padding-bottom: 24px !important;
	}
	.entry-content:has(h1[class*="pr1-"]) > .wp-block-group:has(:is(.pr1-card, .pr1-services-card, .pr1-about-card, .pr1-blog-topic)) {
		padding-top: 24px !important;
	}

	/* Native Gutenberg columns: details and three-step processes stack. */
	.entry-content:has(h1[class*="pr1-"]) .wp-block-columns {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
		margin-bottom: 0;
	}
	.entry-content:has(h1[class*="pr1-"]) .wp-block-column { min-width: 0; }
	.pr1-services-anchor .wp-block-column:has(> .pr1-services-visual) { order: 1; }
	.pr1-anchor .wp-block-column:has(> .wp-block-group > h3):not(:has(.pr1-section-title)) { order: 1; }
	.pr1-anchor .wp-block-column > .wp-block-group:has(> h3) { padding: 28px 24px !important; }

	/* Four compact navigation/product cards retain two columns even at 320px. */
	.entry-content:has(h1[class*="pr1-"]) .wp-block-columns:has(> .wp-block-column > :is(.pr1-services-card, .pr1-services-product)) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
	.pr1-services-card,
	.pr1-services-product { padding: 22px 14px !important; }

	.entry-content:has(h1[class*="pr1-"]) :is(h1, h2, h3, p, li, .wp-block-button__link) {
		overflow-wrap: anywhere;
		hyphens: auto;
	}
	.entry-content:has(h1[class*="pr1-"]) h1 {
		font-size: clamp(2rem, 6vw, 3rem) !important;
		line-height: 1.1 !important;
	}
	.entry-content:has(h1[class*="pr1-"]) h2 {
		font-size: clamp(1.75rem, 4.5vw, 2.25rem) !important;
		line-height: 1.18 !important;
	}
	.entry-content:has(h1[class*="pr1-"]) h3 {
		font-size: clamp(1.25rem, 3vw, 1.5rem) !important;
		line-height: 1.3 !important;
	}
	.entry-content:has(h1[class*="pr1-"]) :is(.pr1-services-card, .pr1-services-product) h3 {
		font-size: clamp(1.0625rem, 2.8vw, 1.25rem) !important;
	}
	.entry-content:has(h1[class*="pr1-"]) :is(p:not([class*="pr1-"]), li) {
		font-size: 1rem !important;
		line-height: 1.65 !important;
	}
	.pr1-blog-lead,
	.pr1-services-lead,
	.pr1-about-lead,
	.pr1-contact-lead,
	.entry-content .pr1-training-lead { font-size: 1.125rem; line-height: 1.6; }

	/* Tighten large inline gaps before cards, FAQs and calls to action. */
	.entry-content:has(h1[class*="pr1-"]) :is(h2, p)[style*="margin-bottom:55px"] {
		margin-bottom: 32px !important;
	}
	.entry-content:has(h1[class*="pr1-"]) p[class*="eyebrow"] + :is(h1, h2, h3) {
		margin-top: 16px !important;
	}
	.entry-content :is(.pr1-services-number, .pr1-about-number, .pr1-contact-number, .pr1-training-number) {
		margin-block: 0 12px;
		line-height: 1;
	}
	.entry-content :is(.pr1-services-number, .pr1-about-number, .pr1-contact-number, .pr1-training-number) + h3 {
		margin-top: 16px;
	}
	.entry-content:has(h1[class*="pr1-"]) .wp-block-buttons {
		gap: 12px;
	}
	.entry-content:has(h1[class*="pr1-"]) .wp-block-buttons[style] {
		margin-top: 28px !important;
	}
	.entry-content:has(h1[class*="pr1-"]) .wp-block-button__link {
		min-height: 48px;
		padding: 14px 20px !important;
		font-size: .9375rem;
		line-height: 1.4;
		white-space: normal;
	}
	.entry-content:has(h1[class*="pr1-"]) > .wp-block-cover:not(:has(h1)) {
		padding-block: 48px !important;
	}

	.pr1-card,
	.pr1-blog-topic,
	.pr1-services-card,
	.pr1-services-product,
	.pr1-about-card,
	.pr1-contact-card,
	.pr1-contact-topic,
	.entry-content .pr1-training-card { margin-bottom: 0; }
	.pr1-blog-grid .wp-block-post-template { grid-template-columns: 1fr !important; }
	.pr1-blog-grid .wp-block-query-pagination { flex-wrap: wrap; }
	.pr1-services-visual { min-height: 0; padding: 28px 24px !important; }
	.pr1-services-number { font-size: 3.5rem; }
	.pr1-about-person-image { margin-bottom: 0; }
	.pr1-contact-form-wrap,
	.entry-content .pr1-training-form { padding: 24px; }
}

@media (max-width: 480px) {
	.entry-content:has(h1[class*="pr1-"]) .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}
	.entry-content:has(h1[class*="pr1-"]) .wp-block-button,
	.entry-content:has(h1[class*="pr1-"]) .wp-block-button__link { width: 100%; }
}
