/*
Theme Name: Steadfast
Theme URI: https://steadfasthomecare.example
Author: Steadfast Home Care
Description: Custom Gutenberg block theme for Steadfast Home Care, a warm, professional in-home care agency website. Built with core blocks only, no page builder.
Version: 1.0.4
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: steadfast
*/

/* ---------- Global polish ---------- */

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: clip;
}

/* Header, main, and footer stack flush, with no root block gap */
.wp-site-blocks > * {
	margin-block-start: 0 !important;
}

/* Full-width page sections provide their own vertical padding. Gutenberg's
 * flow-layout block gap otherwise inserts a visible strip between each one. */
.wp-block-post-content > section {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
}

/* Clear, high-visibility keyboard focus for older visitors */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid #96690F;
	outline-offset: 2px;
	border-radius: 3px;
}

/* Buttons: smooth transitions + outline style */
.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(13, 30, 58, 0.18);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* Outline buttons on dark bands need white, not navy */
.has-teal-depth-gradient-background .wp-block-button.is-style-outline .wp-block-button__link,
.has-primary-dark-background-color .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
}

.has-teal-depth-gradient-background .wp-block-button.is-style-outline .wp-block-button__link:hover,
.has-primary-dark-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary-dark);
}

/* Accent button variant used on dark backgrounds */
.sf-btn-accent .wp-block-button__link {
	background: #96690F;
	color: var(--wp--preset--color--white);
	font-weight: 700;
}

.sf-btn-accent .wp-block-button__link:hover {
	background: #7D570C;
	color: var(--wp--preset--color--white);
}

/* Header logo sizing */
.sf-header .wp-block-site-logo img {
	height: auto;
}

/* ---------- Header ---------- */

.mobile-panel a.mobile-request-care {
	background: var(--gold);
	color: #fff;
	margin: 12px 20px 16px;
	border: 0;
	border-radius: 999px;
	text-align: center;
}

.mobile-panel a.mobile-request-care:hover,
.mobile-panel a.mobile-request-care:focus-visible {
	background: var(--gold-dark);
	color: #fff;
}

.sf-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(252, 252, 250, 0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(13, 30, 58, 0.08);
}

.sf-header .wp-block-site-title a {
	text-decoration: none;
}

.sf-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--accent);
}

/* ---------- Cards ---------- */

.sf-card {
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(13, 30, 58, 0.08);
	border-radius: 18px;
	box-shadow: 0 4px 18px rgba(13, 30, 58, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Equal-height cards only when a card is alone in its column;
   stacked cards must keep natural height or they stretch past the page */
.wp-block-column > .sf-card:only-child,
.wp-block-column > .sf-testimonial:only-child {
	height: 100%;
}

.sf-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(13, 30, 58, 0.12);
}

.sf-icon-circle {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--mist);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	line-height: 1;
}

/* Testimonial cards */
.sf-testimonial {
	background: var(--wp--preset--color--white);
	border-radius: 18px;
	border: 1px solid rgba(13, 30, 58, 0.08);
	box-shadow: 0 4px 18px rgba(13, 30, 58, 0.06);
}

.sf-stars {
	color: #C9962F;
	letter-spacing: 2px;
	font-size: 1.05rem;
}

/* Eyebrow label above headings */
.sf-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
	font-size: 0.82rem;
	color: var(--wp--preset--color--accent);
}

.has-primary-dark-background-color .sf-eyebrow,
.has-teal-depth-gradient-background .sf-eyebrow {
	color: #D9A947;
}

/* Rounded images */
.sf-rounded img {
	border-radius: 22px;
}

/* ---------- Contact Form 7 styling ---------- */

.wpcf7 {
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(13, 30, 58, 0.1);
	border-radius: 18px;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	box-shadow: 0 4px 18px rgba(13, 30, 58, 0.06);
}

.wpcf7 label {
	display: block;
	font-weight: 700;
	font-size: 0.95rem;
	margin-bottom: 0.35rem;
	color: var(--wp--preset--color--primary-dark);
}

.wpcf7 .wpcf7-form-control-wrap {
	display: block;
	margin-bottom: 1.1rem;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1.5px solid rgba(13, 30, 58, 0.18);
	border-radius: 10px;
	background: var(--wp--preset--color--base);
	font-family: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--contrast);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(29, 62, 115, 0.15);
}

.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-weight: 700;
	font-size: 1rem;
	border: none;
	border-radius: 999px;
	padding: 0.85rem 2.25rem;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(13, 30, 58, 0.18);
}

.wpcf7-not-valid-tip {
	font-size: 0.85rem;
	color: #b3402a;
	margin-top: 0.25rem;
}

.wpcf7 form .wpcf7-response-output {
	border-radius: 10px;
	padding: 0.75rem 1rem;
	margin: 1rem 0 0;
}

.wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--mist);
}

/* ---------- Misc ---------- */

/* Keep list-style pages tidy */
.sf-post-card {
	background: var(--wp--preset--color--white);
	border: 1px solid rgba(13, 30, 58, 0.08);
	border-radius: 18px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sf-post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(13, 30, 58, 0.12);
}

.sf-post-card .wp-block-post-title a {
	text-decoration: none;
}

/* Checklist style */
.sf-check li {
	list-style: none;
	padding-left: 1.9em;
	position: relative;
	margin-bottom: 0.6em;
}

.sf-check {
	padding-left: 0 !important;
}

.sf-check li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	width: 1.35em;
	height: 1.35em;
	border-radius: 50%;
	background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	font-size: 0.85em;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Trust bar logos/badges */
.sf-trust-item {
	opacity: 0.85;
}

/* Homepage community bulletin board */
.sf-bulletin-board {
	background: #d9c5a2;
	background-image:
		radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.24) 0 1px, transparent 2px),
		radial-gradient(circle at 76% 68%, rgba(91, 67, 38, 0.12) 0 1px, transparent 2px);
	background-size: 26px 26px, 31px 31px;
	border: 10px solid #8a6545;
	border-radius: 16px;
	padding: clamp(1.25rem, 4vw, 2.5rem);
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), 0 14px 32px rgba(13, 30, 58, 0.12);
}

.sf-bulletin-note {
	position: relative;
	background: #fffdf7;
	border-radius: 4px;
	padding: 1.6rem 1.35rem 1.35rem;
	box-shadow: 0 8px 18px rgba(54, 38, 23, 0.16);
}

.sf-bulletin-note:nth-child(1) { transform: rotate(-1deg); }
.sf-bulletin-note:nth-child(2) { transform: rotate(1.2deg); }
.sf-bulletin-note:nth-child(3) { transform: rotate(-0.6deg); }

.sf-bulletin-note::before {
	content: "";
	position: absolute;
	top: 0.55rem;
	left: 50%;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	box-shadow: 0 2px 4px rgba(13, 30, 58, 0.32);
	transform: translateX(-50%);
}

.sf-gallery-placeholder {
	min-height: 230px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	border: 2px dashed rgba(29, 62, 115, 0.28);
	background: rgba(255, 255, 255, 0.72);
}

.sf-promise-quote {
	border-left: 5px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--white);
	border-radius: 16px;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	box-shadow: 0 18px 42px rgba(13, 30, 58, 0.18);
}

.sf-promise-quote p,
.sf-promise-quote cite {
	color: inherit;
}

/* Give the three homepage event cards and their photography room to breathe. */
.social-feed-grid {
	gap: clamp(2.125rem, 3.5vw, 3.25rem) !important;
	margin-bottom: clamp(3.25rem, 6vw, 4.75rem) !important;
}

/* Long-form About story copy: normal paragraphs flow naturally, while the
 * client's emphasis lines remain intentionally stacked. */
.story-purpose-copy {
	max-width: 920px;
	margin-inline: auto;
}

.story-purpose-copy > .section-head {
	margin-bottom: 2rem;
}

.story-purpose-copy > p {
	color: var(--wp--preset--color--contrast);
	margin-bottom: 1.15rem;
}

.story-stacked-lines {
	display: grid;
	gap: 0.45rem;
	margin: 1.75rem 0;
}

.story-stacked-lines p {
	margin: 0;
	color: var(--wp--preset--color--primary-dark);
	font-weight: 700;
}

.story-promise {
	margin-top: 2.25rem;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border-left: 5px solid var(--wp--preset--color--accent);
	border-radius: 16px;
	background: var(--wp--preset--color--cream);
}

.story-promise h3 {
	margin-top: 0;
}

.story-promise > p:last-child {
	margin-bottom: 0;
}

.mission-copy p {
	margin-bottom: 0.85rem;
}

.mission-copy-list {
	display: grid;
	gap: 0.65rem;
	margin: 1rem 0 0;
	padding-left: 1.25rem;
	list-style: disc;
}

.mission-copy-list li {
	display: list-item;
	color: var(--wp--preset--color--contrast);
	list-style: disc;
}

.mission-copy-list li::marker {
	color: var(--wp--preset--color--accent);
}

/* Detail modals use the theme's check SVGs instead of browser bullets. */
.modal .mission-copy-list {
	padding-left: 0;
	list-style: none;
}

.modal .mission-copy-list li {
	display: flex;
	list-style: none;
}

.modal .mission-copy-list li::marker {
	content: "";
}

.home-about-card .mission-copy {
	font-size: 0.92rem;
	line-height: 1.55;
}

/* Careers layout refinements. */
.role-grid .role-card:last-child {
	grid-column: 1 / -1;
	justify-self: center;
	width: calc((100% - 1.125rem) / 2);
}

/* Services photography remains fully visible without dominating each section. */
#page-services .photo-wide,
body.page-id-19 .photo-wide {
	width: min(calc(100% - 40px), 980px);
	margin: clamp(28px, 4vw, 56px) auto;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 14px 34px rgba(13, 30, 58, 0.08);
}

@media (max-width: 600px) {
	#page-services .photo-wide,
	body.page-id-19 .photo-wide {
		width: calc(100% - 32px);
		margin: 24px auto;
		border-radius: 14px;
	}
}

.checklist-2col .checklist-item:last-child {
	border-bottom: 1px solid var(--line);
}

.career-application-heading {
	text-align: center;
}

/* Consultation form: clearly bounded sections and tightly paired controls. */
.consult-form {
	counter-reset: consult-section;
}

.consult-form-section {
	counter-increment: consult-section;
	margin: 1.25rem 0;
	padding: clamp(1.375rem, 4vw, 1.875rem);
	border: 1px solid var(--line);
	border-radius: 18px;
	background: var(--sage-tint);
}

.consult-form-section h3 {
	display: flex;
	align-items: center;
	gap: 0.6875rem;
}

.consult-form-section h3::before {
	content: counter(consult-section);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.875rem;
	height: 1.875rem;
	flex: 0 0 1.875rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary-dark);
	color: #fff;
	font-size: 0.82rem;
	font-weight: 700;
}

.consult-question {
	margin: 1rem 0 0 !important;
	padding: 1.125rem;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fff;
}

.consult-form label.cbox,
.consult-form label.opt {
	display: flex;
	align-items: center;
}

.consult-form .cbox {
	justify-content: flex-start;
	gap: 0.625rem;
}

.consult-form [role="radiogroup"] {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.consult-form [role="radiogroup"] .cbox {
	flex: 0 0 auto;
	min-width: 6.75rem;
	padding: 0.75rem 0.9375rem;
}

/* Shared branded feedback for every card-like interactive control. */
[data-modal]:not(.btn),
.social-card,
.jump-nav a,
.opt,
.cbox {
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

@media (hover: hover) and (pointer: fine) {
	[data-modal]:not(.btn):hover,
	.social-card:hover,
	.jump-nav a:hover,
	.opt:hover,
	.cbox:hover {
		transform: translateY(-5px);
		border-color: rgba(186, 120, 1, 0.62);
		box-shadow: 0 16px 34px rgba(13, 30, 58, 0.13), 0 0 0 3px rgba(186, 120, 1, 0.08);
	}
}

[data-modal]:not(.btn):active,
[data-modal]:not(.btn).is-card-pressed,
.social-card:active,
.social-card.is-card-pressed,
.jump-nav a:active,
.jump-nav a.is-card-pressed,
.opt:active,
.opt.is-card-pressed,
.cbox:active,
.cbox.is-card-pressed {
	transform: translateY(-1px) scale(0.99);
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 8px 22px rgba(13, 30, 58, 0.14), 0 0 0 3px rgba(186, 120, 1, 0.14);
}

[data-modal]:not(.btn):focus-visible,
.jump-nav a:focus-visible,
.social-card:focus-within,
.opt:focus-within,
.cbox:focus-within {
	outline: 3px solid rgba(186, 120, 1, 0.48);
	outline-offset: 3px;
}

@media (max-width: 900px) {
	.role-grid .role-card:last-child {
		grid-column: auto;
		justify-self: stretch;
		width: 100%;
	}
}

.wpcf7 .wpcf7-checkbox {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem 1rem;
}

.wpcf7 .wpcf7-list-item {
	margin: 0;
}

.wpcf7 .wpcf7-list-item label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.wpcf7 .wpcf7-list-item input[type="checkbox"] {
	margin-top: 0.3rem;
}

@media (max-width: 781px) {
	.consult-form {
		padding: 1.25rem;
	}

	.consult-form-section {
		padding: 1.25rem;
	}

	.social-feed-grid {
		gap: 2.125rem !important;
		margin-bottom: 3.5rem !important;
	}

	.sf-hide-mobile {
		display: none !important;
	}

	.wpcf7 .wpcf7-checkbox {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	[data-modal]:not(.btn),
	.social-card,
	.jump-nav a,
	.opt,
	.cbox {
		transition: none !important;
		transform: none !important;
	}
}
