/* Lone Star Plumbing & Water — theme styles */

/* ---------- Hero ---------- */
.lspw-hero .wp-block-cover__background,
.lspw-hero span.has-background-dim {
	background: linear-gradient(
		90deg,
		rgba(8, 42, 69, 0.94),
		rgba(8, 42, 69, 0.66),
		rgba(8, 42, 69, 0.18)
	) !important;
	opacity: 1 !important;
}

.lspw-trust-points {
	list-style: none;
	padding-left: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.4rem 1.25rem;
	margin-top: 1.25rem;
}

.lspw-trust-points li::before {
	content: "\2713";
	color: #d8a640;
	font-weight: 700;
	margin-right: 0.5rem;
}

/* ---------- Header ---------- */
.lspw-utility-bar a {
	color: #f7f3ea;
	text-decoration: none;
	font-weight: 600;
}

.lspw-utility-bar a:hover,
.lspw-utility-bar a:focus {
	color: #20a5d8;
	text-decoration: underline;
}

.lspw-main-header {
	border-bottom: 1px solid rgba(8, 42, 69, 0.1);
}

/* Hide the fallback logo image once a real site logo is set */
.wp-block-site-logo:not(:empty) + .lspw-fallback-logo {
	display: none;
}

.wp-block-site-logo:empty {
	display: none;
}

.lspw-main-header .wp-block-navigation a {
	font-weight: 600;
	color: #172532;
}

.lspw-main-header .wp-block-navigation a:hover,
.lspw-main-header .wp-block-navigation a:focus {
	color: #1268a5;
}

/* ---------- Cards ---------- */
.lspw-card {
	border: 1px solid rgba(8, 42, 69, 0.08);
	box-shadow: 0 2px 10px rgba(8, 42, 69, 0.07);
	overflow: hidden;
	transition: box-shadow 0.15s ease;
}

.lspw-card:hover {
	box-shadow: 0 6px 20px rgba(8, 42, 69, 0.14);
}

.lspw-card-image img {
	width: 100%;
	height: 240px;
	object-fit: cover;
	display: block;
	border-radius: 12px 12px 0 0;
}

.lspw-service-image img {
	border-radius: 12px;
	width: 100%;
	height: auto;
}

/* ---------- Pricing ---------- */
.lspw-pricing-table table {
	border-collapse: collapse;
	width: 100%;
}

.lspw-pricing-table th {
	background: #082a45;
	color: #fff;
	text-align: left;
	padding: 0.75rem 1rem;
}

.lspw-pricing-table td {
	padding: 0.7rem 1rem;
	border-bottom: 1px solid rgba(8, 42, 69, 0.12);
}

.lspw-pricing-table tbody tr:nth-child(even) {
	background: #f7f3ea;
}

/* ---------- FAQ ---------- */
.lspw-faq-item {
	border: 1px solid rgba(8, 42, 69, 0.12);
	border-radius: 8px;
	padding: 0.9rem 1.1rem;
	margin-bottom: 0.75rem;
	background: #fff;
}

.lspw-faq-item summary {
	font-weight: 700;
	color: #082a45;
	cursor: pointer;
}

.lspw-faq-item summary:focus-visible {
	outline: 3px solid #20a5d8;
	outline-offset: 2px;
}

/* ---------- Footer ---------- */
.lspw-footer a {
	color: #f7f3ea;
	text-decoration: none;
}

.lspw-footer a:hover,
.lspw-footer a:focus {
	color: #20a5d8;
	text-decoration: underline;
}

.lspw-footer-menu {
	list-style: none;
	padding-left: 0;
}

.lspw-footer-menu li {
	margin-bottom: 0.35rem;
}

.lspw-hours-list {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.lspw-hours-list li {
	padding: 0.2rem 0;
}

/* ---------- Mobile call bar ---------- */
.lspw-mobile-call-bar {
	display: none;
}

@media (max-width: 781px) {
	.lspw-mobile-call-bar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		margin: 0 !important;
		padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom));
		box-shadow: 0 -3px 12px rgba(8, 42, 69, 0.3);
	}

	.lspw-mobile-call-link {
		margin: 0;
	}

	.lspw-mobile-call-link a {
		color: #fff;
		font-weight: 700;
		font-size: 1.05rem;
		text-decoration: none;
		display: block;
		width: 100%;
		text-align: center;
		padding: 0.35rem 0;
	}

	body {
		padding-bottom: 64px;
	}

	/* Full-width call buttons on mobile */
	.lspw-call-button,
	.lspw-call-button .wp-block-button__link {
		width: 100%;
		text-align: center;
	}

	/* Stack the pricing table into cards */
	.lspw-pricing-table thead {
		display: none;
	}

	.lspw-pricing-table tr {
		display: block;
		border: 1px solid rgba(8, 42, 69, 0.12);
		border-radius: 8px;
		margin-bottom: 0.6rem;
		padding: 0.5rem 0.75rem;
		background: #fff;
	}

	.lspw-pricing-table td {
		display: block;
		border: 0;
		padding: 0.2rem 0;
	}

	.lspw-pricing-table td:first-child {
		font-weight: 700;
		color: #082a45;
	}

	.lspw-trust-points {
		grid-template-columns: 1fr;
	}

	.lspw-card-image img {
		height: 220px;
	}

	/* Stronger hero overlay on mobile */
	.lspw-hero .wp-block-cover__background,
	.lspw-hero span.has-background-dim {
		background: linear-gradient(
			90deg,
			rgba(8, 42, 69, 0.96),
			rgba(8, 42, 69, 0.85),
			rgba(8, 42, 69, 0.6)
		) !important;
	}
}

/* ---------- Buttons & focus ---------- */
.wp-element-button,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid #20a5d8;
	outline-offset: 2px;
}

/* Prevent horizontal scroll */
html,
body {
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
