/*
Theme Name: CPR Hello Child
Template: hello-elementor
Description: cpraedfirstaid.org on Elementor. Base typography and the few shared classes the Elementor layouts use (cpr-*). Layout, colors and copy live in Elementor.
Version: 1.0.0
Text Domain: cpr-hello-child
*/

:root {
	--cpr-red: #af1e1e;
	--cpr-red-dark: #961e1e;
	--cpr-red-darker: #7d1f1f;
	--cpr-red-50: #fef2f2;
	--cpr-red-200: #fdcbcb;
	--cpr-ink: #0f172a;
	--cpr-text: #334155;
	--cpr-muted: #475569;
	--cpr-subtle: #64748b;
	--cpr-line: #e2e8f0;
	--cpr-soft: #f8fafc;
	--cpr-display: 'Montserrat', 'Inter', system-ui, sans-serif;
	--cpr-sans: 'Inter', system-ui, sans-serif;
	--cpr-shadow-card: 0 1px 2px rgb(15 23 42 / 0.04), 0 4px 16px -4px rgb(15 23 42 / 0.08);
}

html { scroll-behavior: smooth; scroll-padding-top: 8rem; }
body { font-family: var(--cpr-sans); color: var(--cpr-text); background: #fff; -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4 { font-family: var(--cpr-display); color: var(--cpr-ink); }
h1 { font-weight: 700; letter-spacing: -0.025em; }
h2 { font-weight: 700; letter-spacing: -0.025em; }
h3 { font-weight: 600; }

/* Rich text written in the editor (pages, posts, ACF copy) */
.cpr-prose p, .elementor-widget-text-editor p { margin: 0 0 1em; }
.cpr-prose p:last-child, .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.cpr-prose ul, .cpr-prose ol, .elementor-widget-text-editor ul, .elementor-widget-text-editor ol { margin: 0 0 1em; padding-left: 1.5em; }
.cpr-prose li, .elementor-widget-text-editor li { margin: 0.25em 0; }
.cpr-prose li::marker, .elementor-widget-text-editor li::marker { color: var(--cpr-red); }
.cpr-prose h2, .elementor-widget-text-editor h2 { font-size: 1.875rem; line-height: 2.25rem; margin: 1.5em 0 0.5em; }
.cpr-prose h3, .elementor-widget-text-editor h3 { font-size: 1.25rem; line-height: 1.75rem; margin: 1.25em 0 0.5em; }
.cpr-prose h2:first-child, .cpr-prose h3:first-child,
.elementor-widget-text-editor h2:first-child, .elementor-widget-text-editor h3:first-child { margin-top: 0; }
.cpr-prose a, .elementor-widget-text-editor a {
	color: var(--cpr-red); font-weight: 500; text-decoration: underline;
	text-decoration-color: var(--cpr-red-200); text-underline-offset: 4px;
}
.cpr-prose a:hover, .elementor-widget-text-editor a:hover { text-decoration-color: var(--cpr-red); }
.cpr-prose img { border-radius: 1rem; height: auto; }
.cpr-prose blockquote { border-left: 4px solid var(--cpr-red); padding-left: 1.25rem; font-style: italic; color: #1e293b; margin: 1.5em 0; }

/* Small uppercase label above a heading */
.cpr-eyebrow, .cpr-eyebrow .elementor-heading-title {
	font-family: var(--cpr-sans) !important; font-size: 0.875rem !important; line-height: 1.25rem !important;
	font-weight: 600 !important; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cpr-red) !important;
}
.cpr-eyebrow--muted, .cpr-eyebrow--muted .elementor-heading-title { color: var(--cpr-subtle) !important; }

/* Arrow text link ("Get directions ->") */
.cpr-arrow-link a, a.cpr-arrow-link { color: var(--cpr-red); font-weight: 600; text-decoration: none; }
.cpr-arrow-link a:hover, a.cpr-arrow-link:hover { text-decoration: underline; }

/* Lists drawn as ruled rows (towns, counties, course rows) */
.cpr-ruled { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--cpr-ink); display: grid; }
.cpr-ruled > li { border-bottom: 1px solid var(--cpr-line); padding: 0.75rem 1rem 0.75rem 0; margin: 0; }
.cpr-ruled--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
	.cpr-ruled--sm2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cpr-ruled--sm3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.cpr-ruled--lg3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cpr-ruled--lg4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Numbered steps ("01 Choose your course") */
.cpr-step { border-top: 2px solid var(--cpr-ink); padding-top: 1.5rem; }
.cpr-step-num .elementor-heading-title { font-family: var(--cpr-display); color: var(--cpr-red); font-weight: 700; }

/* Accordions styled as ruled question lists */
.cpr-faq .e-n-accordion-item { border-bottom: 1px solid var(--cpr-line); }
.cpr-faq .e-n-accordion-item:first-child { border-top: 1px solid var(--cpr-line); }
.cpr-faq .elementor-accordion .elementor-accordion-item { border: 0; border-bottom: 1px solid var(--cpr-line); }
.cpr-faq .elementor-accordion .elementor-accordion-item:first-child { border-top: 1px solid var(--cpr-line); }
.cpr-faq .elementor-tab-title { padding: 1.25rem 0 !important; }
.cpr-faq .elementor-tab-content { padding: 0 3rem 1.25rem 0 !important; border: 0 !important; }

/* Pill buttons that aren't the primary red */
.cpr-btn-outline .elementor-button { background: transparent !important; color: var(--cpr-red) !important; box-shadow: inset 0 0 0 2px var(--cpr-red); }
.cpr-btn-outline .elementor-button:hover { background: var(--cpr-red) !important; color: #fff !important; }
.cpr-btn-dark .elementor-button { background: var(--cpr-ink) !important; }
.cpr-btn-dark .elementor-button:hover { background: #334155 !important; }
.cpr-btn-ghost .elementor-button { background: transparent !important; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4); }
.cpr-btn-ghost .elementor-button:hover { background: rgb(255 255 255 / 0.1) !important; }

/* Hero wash used by the AHA style */
.cpr-wash { background-image: linear-gradient(to bottom, rgb(254 242 242 / 0.7), #fff 60%, #fff); }

/* Cards */
.cpr-card { background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px var(--cpr-line); transition: box-shadow 0.2s; }
.cpr-card:hover { box-shadow: 0 0 0 1px #cbd5e1; }
.cpr-card-img img { transition: transform 0.5s; }
.cpr-card:hover .cpr-card-img img { transform: scale(1.03); }

/* Header: shadow once the page scrolls (Elementor sticky adds .elementor-sticky--effects) */
.cpr-header.elementor-sticky--effects { box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.05); background: rgb(255 255 255 / 0.95) !important; backdrop-filter: blur(4px); }

/* Breadcrumbs */
.cpr-crumbs { font-size: 0.875rem; color: var(--cpr-muted); }
.cpr-crumbs a { color: inherit; text-decoration: none; }
.cpr-crumbs a:hover { color: var(--cpr-red); }
.cpr-crumbs .sep { margin: 0 0.5rem; color: #94a3b8; }

/* Maps from the Google Maps widget get the rounded look */
.cpr-map iframe { border-radius: 1rem; }

/* Leave room for the sticky booking bar */
body.cpr-has-sticky-bar { padding-bottom: 3.5rem; }
@media (min-width: 940px) { body.cpr-has-sticky-bar { padding-bottom: 3.75rem; } }

/* Blog article body */
.cpr-article { font-size: 1.0625rem; line-height: 1.8; }
.cpr-article h2 { font-size: 1.75rem; line-height: 1.25; margin: 2em 0 0.6em; scroll-margin-top: 9rem; }
.cpr-article h3 { font-size: 1.25rem; margin: 1.6em 0 0.5em; scroll-margin-top: 9rem; }
.cpr-article p, .cpr-article ul, .cpr-article ol { margin: 0 0 1.2em; }
.cpr-article ul, .cpr-article ol { padding-left: 1.5em; }
.cpr-article li::marker { color: var(--cpr-red); }
.cpr-article a { color: var(--cpr-red); text-decoration: underline; text-decoration-color: var(--cpr-red-200); text-underline-offset: 4px; }
.cpr-article img { border-radius: 1rem; height: auto; max-width: 100%; }

/* Text helpers used by the page layouts */
.cpr-lead, .cpr-lead p { font-size: 1.125rem; line-height: 1.75rem; color: var(--cpr-muted); }
.cpr-muted, .cpr-muted p { color: var(--cpr-muted); }
.cpr-small, .cpr-small p, .cpr-small li { font-size: 0.875rem; line-height: 1.5rem; }
.cpr-address { font-size: 1.125rem; font-weight: 600; color: var(--cpr-ink); margin: 0.5rem 0 0; }
.cpr-on-dark .elementor-heading-title { color: #fff !important; }
.cpr-on-dark-muted, .cpr-on-dark-muted p { color: #cbd5e1 !important; }
.cpr-center-narrow { max-width: 48rem; margin-left: auto; margin-right: auto; text-align: center; }

/* Checkmark lists (Gutenberg "checkmark" style and course card bullets) */
ul.cpr-checklist { list-style: none !important; padding-left: 0 !important; }
ul.cpr-checklist li { position: relative; padding-left: 1.6rem; margin: 0.4rem 0; }
ul.cpr-checklist li::before { content: ''; position: absolute; left: 0; top: 0.3em; width: 1rem; height: 1rem; border-radius: 9999px; background: var(--cpr-red);
	-webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.4 5.3-.7-.7a.5.5 0 0 0-.7 0L7 7.6 5.6 6.3a.5.5 0 0 0-.7 0l-.7.7a.5.5 0 0 0 0 .7l2.5 2.5a.5.5 0 0 0 .7 0l4-4a.5.5 0 0 0 0-.9Z'/%3e%3c/svg%3e") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.4 5.3-.7-.7a.5.5 0 0 0-.7 0L7 7.6 5.6 6.3a.5.5 0 0 0-.7 0l-.7.7a.5.5 0 0 0 0 .7l2.5 2.5a.5.5 0 0 0 .7 0l4-4a.5.5 0 0 0 0-.9Z'/%3e%3c/svg%3e") center / contain no-repeat; }
.cpr-card .cpr-checklist { border-top: 1px solid #f1f5f9; padding-top: 1rem !important; margin-top: 0.25rem; }

/* Ruled lists on city pages */
.cpr-ruled--strong > li { font-weight: 600; color: var(--cpr-ink); }

/* "Which card" job list */
.cpr-which { margin: 0; border-top: 1px solid var(--cpr-line); border-bottom: 1px solid var(--cpr-line); }
.cpr-which > div { display: grid; gap: 0.25rem; padding: 1.25rem 0; }
.cpr-which > div + div { border-top: 1px solid var(--cpr-line); }
@media (min-width: 640px) { .cpr-which > div { grid-template-columns: 3fr 2fr; gap: 1.5rem; } }
.cpr-which dt { font-size: 0.875rem; color: var(--cpr-muted); }
.cpr-which dd { margin: 0; }
.cpr-which a { font-family: var(--cpr-display); font-weight: 600; color: var(--cpr-ink) !important; text-decoration: none !important; }
.cpr-which a span { color: var(--cpr-red); }
.cpr-which a:hover { color: var(--cpr-red) !important; }

/* Hero */
.cpr-hero-img img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 1rem; }
.cpr-hero-logo img { height: 4rem; width: auto; }
.cpr-card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.cpr-card > .e-con-inner, .cpr-card { overflow: hidden; }

/* Header */
.cpr-header { position: relative; }
.cpr-header-nav { position: relative; }
.cpr-brandbar-text p { margin: 0; font-size: 0.75rem; line-height: 1.25rem; font-weight: 500; color: #f1f5f9; white-space: nowrap; }
.cpr-brandbar-link a { color: #cbd5e1 !important; text-decoration: none !important; }
.cpr-brandbar-link a:hover { color: #fff !important; }
@media (max-width: 1023px) { .cpr-brandbar-link { display: none; } .cpr-brandbar > .e-con-inner { justify-content: center !important; } }
.cpr-logo img { width: 16rem; max-width: 100%; height: auto; }
@media (max-width: 1023px) { .cpr-logo img { width: 14rem; } }
.elementor-widget-cpr-main-nav { flex-grow: 1; }

/* Footer */
.cpr-footer .cpr-footer-name .elementor-heading-title { font-family: var(--cpr-display); font-size: 1.25rem; font-weight: 700; color: #fff; }
.cpr-footer .cpr-footer-head .elementor-heading-title { font-family: var(--cpr-sans); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; }
.cpr-footer-text p { max-width: 24rem; font-size: 0.875rem; line-height: 1.6; color: #94a3b8; }
.cpr-bbb-chip { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 0.5rem; background: #fff; text-decoration: none !important; }
.cpr-bbb-chip img { height: 2.25rem; width: auto; }
.cpr-bbb-chip span { font-size: 0.875rem; font-weight: 600; color: var(--cpr-ink); }
.cpr-footer-links { list-style: none !important; padding: 0 !important; margin: 0; }
.cpr-footer-links li { margin: 0 0 0.75rem; font-size: 0.875rem; }
.cpr-footer-links a { color: #cbd5e1 !important; text-decoration: none !important; font-weight: 400 !important; }
.cpr-footer-links a:hover { color: #fff !important; }
.cpr-footer-copy { border-top: 1px solid #1e293b; padding-top: 1.5rem; }
.cpr-footer-copy p { font-size: 0.75rem; color: #64748b; }

/* BBB band */
.cpr-bbb-seal img { height: 5rem; width: auto; }
.cpr-bbb .cpr-bbb-title .elementor-heading-title { font-family: var(--cpr-display); font-size: 1.5rem; font-weight: 700; color: var(--cpr-ink); }
@media (min-width: 768px) { .cpr-bbb-text { border-left: 1px solid #cbd5e1; padding-left: 2.5rem !important; } }
.cpr-bbb a { color: var(--cpr-red); text-decoration: none; }
.cpr-bbb a:hover { text-decoration: underline; }

/* Steps in a row of four (booking pages) */
@media (min-width: 768px) { .cpr-steps-4 > .e-con { width: calc(25% - 24px) !important; } }

/* Blog post */
.cpr-sticky-side { position: sticky; top: 9rem; }
.cpr-toc .elementor-toc__header { padding: 0 0 0.75rem; border: 0; }
.cpr-toc .elementor-toc__header-title { font-size: 0.75rem !important; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cpr-subtle) !important; }
.cpr-toc .elementor-toc__body { padding: 0 0 0 1rem; border-left: 2px solid var(--cpr-line); max-height: none; }
.cpr-toc .elementor-toc__list-item-text { font-size: 0.875rem; color: var(--cpr-muted) !important; }
.cpr-toc .elementor-toc__list-item-text:hover { color: var(--cpr-red) !important; }
.cpr-toc .elementor-toc__top-level, .cpr-toc ul { padding-left: 0; }
.cpr-toc.elementor-widget-table-of-contents .elementor-toc__list-wrapper { margin: 0; }
.cpr-toc--mobile { border: 1px solid var(--cpr-line); border-radius: 0.75rem; padding: 0.75rem 1.25rem; }

/* AHA / Red Cross chooser */
.cpr-brand-choice { flex: 1 1 0; border: 1px solid var(--cpr-line); border-radius: 1rem; text-align: center; }
.cpr-brand-choice:hover { border-color: var(--cpr-red); }
.cpr-choice-logo img { height: 5rem; width: auto; object-fit: contain; }
.cpr-choice-title .elementor-heading-title { font-family: var(--cpr-display); font-size: 1.125rem; font-weight: 700; }
.cpr-choice-title a { color: var(--cpr-ink); }
.cpr-choice-none a { font-weight: 600; color: var(--cpr-red); text-decoration: none; }
.elementor-widget-text-editor ul.cpr-ruled, .cpr-prose ul.cpr-ruled { padding-left: 0; margin: 0; list-style: none; }
.elementor-widget-text-editor ul.cpr-ruled li { margin: 0; }

/* Sticky header (CSS, not Elementor's sticky, which clones the header) */
.elementor-location-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
.elementor-location-header.is-scrolled .cpr-header { box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.05); }

/* Inline icons inside editor text (contact pages) */
.elementor-widget-text-editor svg { width: 1.25rem; height: 1.25rem; vertical-align: -0.2em; margin-right: 0.375rem; }
