/*
 * San Mateo County Repipe Widgets — frontend styles
 * Scoped under .smrw-* classes so they coexist with theme styles.
 */

:root {
	--smrw-color-primary: #34373e;
	--smrw-color-secondary: #88898d;
	--smrw-color-light: #FFFFFF;
	--smrw-color-accent: #4a4e58;
	--smrw-color-text-dark: #222;
	--smrw-font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--smrw-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

	/* Aliases the legacy snippets in this stylesheet still reference */
	--color-primary: #34373e;
	--color-secondary: #88898d;
	--color-light: #FFFFFF;
	--color-accent: #4a4e58;
	--color-text-dark: #222;
}

/* Heading + paragraph normalization (scoped) */
.smrw-hero,
.smrw-section,
.faq-footer.smrw-section,
.smrw-image-divider {
	font-family: var(--smrw-font-main);
	color: var(--smrw-color-text-dark);
	line-height: 1.6;
	box-sizing: border-box;
}

.smrw-hero *,
.smrw-section *,
.smrw-image-divider * {
	box-sizing: border-box;
}

.smrw-hero h1,
.smrw-hero h2,
.smrw-section h1,
.smrw-section h2,
.smrw-section h3,
.smrw-section h4 {
	line-height: 1.2;
	margin-bottom: 1rem;
	color: var(--smrw-color-primary);
}

.smrw-hero p,
.smrw-section p {
	margin-bottom: 1rem;
	font-size: 1.125rem;
	color: #444;
}

/* ── HERO ─────────────────────────────────────────────────────────── */
.smrw-hero.hero {
	background-color: var(--smrw-color-primary);
	color: var(--smrw-color-light);
	min-height: 95vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4rem 2rem;
	position: relative;
	overflow: hidden;
	background: radial-gradient(circle at 70% 30%, #4a4e58 0%, #34373e 100%);
}

.smrw-hero.hero[style*="background-image"] {
	background: var(--smrw-color-primary);
}

.smrw-hero.hero.has-overlay::before,
.smrw-hero.hero.has-overlay::after {
	content: none;
}

.smrw-hero.hero.has-overlay {
	background-color: var(--smrw-color-primary);
}

.smrw-hero.hero.has-overlay > .hero-content {
	position: relative;
	z-index: 2;
}

.smrw-hero.hero.has-overlay::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.7));
	z-index: 1;
}

.smrw-hero.hero:not(.has-overlay)::before,
.smrw-hero.hero:not(.has-overlay)::after {
	content: '';
	position: absolute;
	background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
	border-radius: 40px;
	transform: rotate(-15deg) skewX(10deg);
	z-index: 0;
	box-shadow: 0 40px 100px rgba(0,0,0,0.4);
	-webkit-backdrop-filter: blur(15px);
	backdrop-filter: blur(15px);
	border: 1px solid rgba(255,255,255,0.1);
}

.smrw-hero.hero:not(.has-overlay)::before {
	width: 45vw;
	height: 45vw;
	top: -15%;
	right: -10%;
	animation: smrw-float 18s ease-in-out infinite;
}

.smrw-hero.hero:not(.has-overlay)::after {
	width: 35vw;
	height: 35vw;
	bottom: -15%;
	left: -5%;
	animation: smrw-float 22s ease-in-out infinite reverse;
}

.smrw-hero .badge {
	display: inline-block;
	padding: 0.8rem 1.5rem;
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 100px;
	color: var(--smrw-color-light);
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 2.5rem;
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.smrw-hero .hero-content {
	position: relative;
	z-index: 1;
	max-width: 1000px;
	margin: 0 auto;
	text-align: center;
}

.smrw-hero h1 {
	color: var(--smrw-color-light);
	font-size: clamp(2.4rem, 4.8vw, 3.8rem);
	margin-bottom: 2.5rem;
	letter-spacing: -0.02em;
	text-shadow: 2px 4px 15px rgba(0,0,0,0.4);
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.1;
	text-align: center;
}

.smrw-hero .no-wrap {
	white-space: nowrap;
}

.smrw-hero p,
.smrw-hero .smrw-hero-body p {
	color: rgba(255,255,255,0.95);
	font-size: clamp(1.2rem, 2vw, 1.4rem);
	font-weight: 300;
	max-width: 850px;
	margin: 0 auto 1.8rem;
	line-height: 1.5;
}

.smrw-hero .smrw-hero-body img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
	margin: 1.5rem auto;
	display: block;
}

.smrw-hero a {
	color: #fff;
	text-decoration: underline;
}

/* ── GENERIC SECTION ──────────────────────────────────────────────── */
.smrw-section {
	padding: 8rem 2rem;
	position: relative;
}

.smrw-section .container,
.faq-footer.smrw-section .container {
	max-width: 1200px;
	margin: 0 auto;
}

.smrw-section .section-title {
	text-align: center;
	font-size: clamp(2.2rem, 4vw, 3.2rem);
	margin-bottom: 5rem;
	position: relative;
	display: block;
	font-weight: 700;
	max-width: 900px;
	line-height: 1.1;
	margin-left: auto;
	margin-right: auto;
}

.smrw-section .section-title::after {
	content: '';
	display: block;
	margin: 15px auto 0;
	width: 60%;
	height: 4px;
	background: linear-gradient(90deg, transparent, var(--smrw-color-secondary), transparent);
	border-radius: 2px;
}

/* ── BACKGROUND VARIANTS ──────────────────────────────────────────── */
.smrw-section.bg-light,
.smrw-image-divider.bg-light {
	background-color: #f7f8fa;
}

.smrw-section.bg-gradient,
.smrw-image-divider.bg-gradient {
	background: linear-gradient(135deg, #f7f8fa 0%, #e2e3e6 100%);
}

.smrw-section.bg-dark,
.smrw-image-divider.bg-dark {
	background-color: var(--smrw-color-primary);
	color: var(--smrw-color-light);
}

.smrw-image-divider.bg-none {
	background: transparent;
	padding: 0;
}

.smrw-section.bg-dark p,
.smrw-section.bg-dark h1,
.smrw-section.bg-dark h2,
.smrw-section.bg-dark h3,
.smrw-section.bg-dark h4 {
	color: var(--smrw-color-light);
}

.smrw-section.bg-dark p {
	color: rgba(255,255,255,0.9);
}

.smrw-section.bg-dark .section-title {
	color: var(--smrw-color-light);
}

/* ── TEXT BLOCK ───────────────────────────────────────────────────── */
.smrw-section .text-block {
	background: var(--smrw-color-light);
	border-radius: 20px;
	padding: 3rem;
	box-shadow: 0 15px 40px rgba(52,55,62,0.08);
	margin: 0 auto;
	max-width: 900px;
	border-left: 8px solid var(--smrw-color-secondary);
	position: relative;
	overflow: hidden;
}

.smrw-section .text-block img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 1rem 0;
	display: block;
}

.smrw-section .text-block a {
	color: var(--smrw-color-accent);
	text-decoration: underline;
}

.smrw-section.bg-dark .text-block a {
	color: #fff;
}

/* ── 3D GRID + CARDS ──────────────────────────────────────────────── */
.smrw-section .grid-3d {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2.5rem;
	perspective: 1200px;
}

.smrw-section .card-3d {
	background: var(--smrw-color-light);
	border-radius: 24px;
	padding: 3rem;
	box-shadow:
		15px 15px 40px rgba(52, 55, 62, 0.05),
		-10px -10px 40px rgba(255, 255, 255, 0.8),
		inset 0 0 0 transparent;
	transition: var(--smrw-transition);
	transform-style: preserve-3d;
	border: 1px solid rgba(136, 137, 141, 0.08);
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.smrw-section .card-3d:hover {
	transform: translateY(-15px) rotateX(4deg) rotateY(-4deg);
	box-shadow:
		30px 30px 80px rgba(52, 55, 62, 0.1),
		-15px -15px 80px rgba(255, 255, 255, 1);
}

.smrw-section .card-3d h3 {
	color: var(--smrw-color-primary);
	font-size: 1.6rem;
	font-weight: 600;
}

.smrw-section .card-3d p {
	color: #444;
	font-size: 1.1rem;
	line-height: 1.6;
}

.smrw-section .card-3d img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.smrw-section .card-3d a {
	color: var(--smrw-color-accent);
	text-decoration: underline;
}

/* Dark cards */
.smrw-section.bg-dark .card-3d h3,
.smrw-section .card-3d[style*="rgba(255,255,255,0.05)"] h3 {
	color: var(--smrw-color-light);
}

.smrw-section.bg-dark .card-3d p {
	color: rgba(255,255,255,0.85);
}

/* ── SPLIT LAYOUT ─────────────────────────────────────────────────── */
.smrw-section .split-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: center;
}

/* ── FAQ FOOTER ───────────────────────────────────────────────────── */
.faq-footer.smrw-section {
	background-color: var(--smrw-color-primary);
	color: var(--smrw-color-light);
	padding: 6rem 2rem 4rem;
}

.faq-footer .faq-container {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.faq-footer details.faq-item {
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 10px;
	padding: 1.5rem;
}

.faq-footer details.faq-item summary {
	font-size: 1.2rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	outline: none;
	color: var(--smrw-color-light);
}

.faq-footer details.faq-item summary::-webkit-details-marker {
	display: none;
}

.faq-footer .faq-content {
	margin-top: 1rem;
	color: rgba(255,255,255,0.85);
}

.faq-footer .faq-content a {
	color: #fff;
	text-decoration: underline;
}

.faq-footer .faq-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	margin-top: 0.75rem;
	display: block;
}

/* ── IMAGE DIVIDER ────────────────────────────────────────────────── */
.smrw-image-divider {
	padding: 4rem 2rem;
}

.smrw-image-divider.bg-none {
	padding: 0;
}

.smrw-image-divider .smrw-image-divider-inner {
	max-width: 1200px;
	margin: 0 auto;
}

.smrw-image-divider.layout-full-width .smrw-image-divider-inner {
	max-width: 100%;
}

.smrw-image-figure {
	margin: 0;
	text-align: center;
}

.smrw-image-figure img {
	max-width: 100%;
	height: auto;
	border-radius: 18px;
	display: block;
	margin: 0 auto;
	box-shadow: 0 15px 40px rgba(52,55,62,0.12);
}

.smrw-image-divider.layout-full-width .smrw-image-figure img {
	border-radius: 0;
	width: 100%;
}

.smrw-image-caption {
	margin-top: 1rem;
	font-size: 1rem;
	color: #555;
	font-style: italic;
}

.smrw-image-divider.bg-dark .smrw-image-caption {
	color: rgba(255,255,255,0.8);
}

/* ── REVEAL ANIMATIONS ────────────────────────────────────────────── */
.smrw-section.reveal,
.smrw-image-divider.reveal,
.smrw-hero.reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.smrw-section.reveal.active,
.smrw-image-divider.reveal.active,
.smrw-hero.reveal.active {
	opacity: 1;
	transform: translateY(0);
}

@keyframes smrw-float {
	0%   { transform: translateY(0) rotate(-15deg) skewX(10deg); }
	50%  { transform: translateY(-20px) rotate(-10deg) skewX(12deg); }
	100% { transform: translateY(0) rotate(-15deg) skewX(10deg); }
}

/* ── EDITOR PREVIEW: disable reveal so widgets stay visible ───────── */
.elementor-editor-active .smrw-section.reveal,
.elementor-editor-active .smrw-image-divider.reveal,
.elementor-editor-active .smrw-hero.reveal {
	opacity: 1;
	transform: none;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.smrw-section .container { max-width: 95%; }
	.smrw-section .section-title {
		font-size: clamp(2rem, 5vw, 2.8rem);
		margin-bottom: 3rem;
	}
}

@media (max-width: 768px) {
	.smrw-section { padding: 4rem 1.2rem; }

	.smrw-hero.hero {
		min-height: auto;
		padding: 6rem 1.2rem;
		display: block;
	}

	.smrw-hero .hero-content { padding-top: 2rem; }

	.smrw-hero h1 {
		font-size: clamp(1.8rem, 7.5vw, 2.4rem);
		line-height: 1.25;
		margin-bottom: 1.2rem;
	}

	.smrw-hero .no-wrap { white-space: normal; }
	.smrw-hero p { font-size: 1.1rem; }

	.smrw-hero .badge {
		padding: 0.6rem 1.2rem;
		font-size: 0.8rem;
		margin-bottom: 1.5rem;
	}

	.smrw-section .grid-3d {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.smrw-section .split-layout {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.smrw-section .card-3d { padding: 2rem; }
	.smrw-section .text-block {
		padding: 2rem 1.5rem;
		border-left-width: 5px;
	}

	.faq-footer details.faq-item { padding: 1.2rem; }
	.faq-footer details.faq-item summary { font-size: 1.1rem; }
}

@media (max-width: 480px) {
	.smrw-hero h1 {
		font-size: 1.55rem;
		line-height: 1.3;
	}

	.smrw-section .section-title { font-size: 1.6rem; }
	.smrw-section .card-3d h3 { font-size: 1.3rem; }
}
