/**
 * CRO-Optimized Above-the-Fold Hero Section
 * For Kadence Child Theme - Damage Restoration Niche
 * Mobile-First Responsive Design
 *
 * @package kadence-child-cro
 */

/* ═══════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
   Color variables are injected dynamically from
   Global Settings via cro_dynamic_css() in PHP.
   Only non-color defaults are kept here.
   ═══════════════════════════════════════════════ */
:root {
	/* Spacing */
	--cro-section-padding-y: 2rem;
	--cro-container-max: 1200px;

	/* Border Radius */
	--cro-radius-sm: 6px;
	--cro-radius-md: 10px;
	--cro-radius-lg: 16px;

	/* Shadows */
	--cro-shadow-btn: 0 4px 14px rgba(249, 115, 22, 0.4);
	--cro-shadow-image: 0 20px 60px rgba(0, 0, 0, 0.3);
	--cro-shadow-badge: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* ═══════════════════════════════════════════════
   HERO SECTION - BASE (Mobile-First)
   ═══════════════════════════════════════════════ */
.cro-hero-section {
	position: relative;
	background: var(--cro-primary-dark, #0f2440);
	overflow: hidden;
	margin: 0 -1.5em 2em -1.5em; /* Only horizontal breakout, NO top overlap */
	padding: 0;
	/* Ensure it stretches full width */
	width: calc(100% + 3em);
}

/* Ensure it overrides Kadence boxed content */
.content-style-boxed .single-entry .cro-hero-section,
.entry-content-wrap .cro-hero-section {
	margin: 0 -1.5em 2em -1.5em;
	width: calc(100% + 3em);
}

.cro-hero-bg-overlay {
	position: absolute;
	inset: 0;
	background: var(--cro-overlay-gradient, linear-gradient(135deg, rgba(15, 36, 64, 0.92) 0%, rgba(30, 58, 95, 0.85) 100%));
	z-index: 1;
}

.cro-hero-container {
	position: relative;
	z-index: 2;
	max-width: var(--cro-container-max);
	margin: 0 auto;
	padding: var(--cro-section-padding-y) 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}


/* ═══════════════════════════════════════════════
   HERO CONTENT (Left Column)
   ═══════════════════════════════════════════════ */
.cro-hero-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Subtitle */
.cro-hero-subtitle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--cro-accent, #f97316);
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0;
	padding: 0.35rem 0.75rem;
	background: rgba(249, 115, 22, 0.12);
	border-radius: 50px;
	width: fit-content;
}

/* H1 Title */
.cro-hero-title {
	color: var(--cro-text-light, #ffffff) !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 1.75rem !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.02em;
	margin: 0 !important;
	padding: 0 !important;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}


/* ═══════════════════════════════════════════════
   USP LIST
   ═══════════════════════════════════════════════ */
.cro-hero-usp-list {
	list-style: none !important;
	margin: 0.25rem 0 0 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.cro-hero-usp-item {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	color: var(--cro-text-muted, rgba(255, 255, 255, 0.85));
	font-family: 'Inter', sans-serif;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.45;
	margin: 0 !important;
	padding: 0 !important;
}

.cro-hero-usp-item::before {
	content: none !important; /* Override any Kadence list styles */
}

.cro-usp-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	margin-top: 1px;
}

.cro-usp-icon svg {
	display: block;
}

.cro-usp-text {
	flex: 1;
}


/* ═══════════════════════════════════════════════
   CTA BUTTONS
   ═══════════════════════════════════════════════ */
.cro-hero-cta-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.cro-hero-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 1.5rem;
	border-radius: var(--cro-radius-sm);
	font-family: 'Inter', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.25s ease;
	cursor: pointer;
	border: none;
	text-align: center;
}

.cro-btn-primary {
	background: var(--cro-accent, #f97316);
	color: #ffffff !important;
	box-shadow: var(--cro-shadow-btn);
}

.cro-btn-primary:hover,
.cro-btn-primary:focus {
	background: var(--cro-accent-hover, #ea580c);
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.cro-btn-phone {
	background: transparent;
	color: var(--cro-text-light, #ffffff) !important;
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.cro-btn-phone:hover,
.cro-btn-phone:focus {
	background: rgba(255, 255, 255, 0.1);
	color: var(--cro-text-light, #ffffff) !important;
	border-color: rgba(255, 255, 255, 0.5);
}

.cro-btn-phone svg {
	animation: cro-phone-ring 2s ease-in-out infinite;
}

@keyframes cro-phone-ring {
	0%, 100% { transform: rotate(0deg); }
	10% { transform: rotate(-10deg); }
	20% { transform: rotate(10deg); }
	30% { transform: rotate(-10deg); }
	40% { transform: rotate(0deg); }
}


/* ═══════════════════════════════════════════════
   TRUST BADGES
   ═══════════════════════════════════════════════ */
.cro-hero-trust-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cro-trust-badge {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.65rem;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: background 0.2s ease;
}

.cro-trust-badge:hover {
	background: rgba(255, 255, 255, 0.14);
}

.cro-trust-badge svg {
	flex-shrink: 0;
	display: block;
}

.cro-trust-badge span {
	color: var(--cro-text-muted, rgba(255, 255, 255, 0.85));
	font-family: 'Inter', sans-serif;
	font-size: 0.7rem;
	font-weight: 600;
	white-space: nowrap;
}

.cro-trust-stars .cro-stars-wrap {
	display: flex;
	gap: 1px;
}

.cro-trust-stars .cro-stars-wrap svg {
	width: 14px;
	height: 14px;
}


/* ═══════════════════════════════════════════════
   HERO IMAGE (Right Column)
   ═══════════════════════════════════════════════ */
.cro-hero-image-col {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cro-hero-image-wrap {
	position: relative;
	width: 100%;
	max-width: 500px;
	border-radius: var(--cro-radius-lg);
	overflow: hidden;
	box-shadow: var(--cro-shadow-image);
}

.cro-hero-featured-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--cro-radius-lg);
}

/* "Licensed & Insured" badge on image */
.cro-hero-image-badge {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	border-radius: 50px;
	padding: 0.35rem 0.85rem;
	box-shadow: var(--cro-shadow-badge);
}

.cro-badge-text {
	color: var(--cro-primary, #1e3a5f);
	font-family: 'Inter', sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Placeholder when no image is set */
.cro-hero-image-placeholder {
	background: rgba(255, 255, 255, 0.05);
	border: 2px dashed rgba(255, 255, 255, 0.2);
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cro-placeholder-content {
	text-align: center;
	color: rgba(255, 255, 255, 0.4);
	font-family: 'Inter', sans-serif;
	font-size: 0.85rem;
}

.cro-placeholder-content p {
	margin: 0.5rem 0 0 0;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE: TABLET (768px+)
   ═══════════════════════════════════════════════ */
@media (min-width: 768px) {
	:root {
		--cro-section-padding-y: 2.5rem;
	}

	.cro-hero-title {
		font-size: 2.25rem !important;
	}

	.cro-hero-cta-wrap {
		flex-direction: row;
		align-items: center;
	}

	.cro-hero-cta-btn {
		width: auto;
	}

	.cro-hero-usp-item {
		font-size: 0.95rem;
	}

	.cro-trust-badge span {
		font-size: 0.75rem;
	}
}


/* ═══════════════════════════════════════════════
   RESPONSIVE: DESKTOP (1024px+)
   ═══════════════════════════════════════════════ */
@media (min-width: 1024px) {
	:root {
		--cro-section-padding-y: 3rem;
	}

	.cro-hero-section {
		/* Full-width breakout on desktop */
		margin: -1.5em -2em 2em -2em;
		width: calc(100% + 4em);
	}

	.content-style-boxed .single-entry .cro-hero-section,
	.entry-content-wrap .cro-hero-section {
		margin: -1.5em -2em 2em -2em;
		width: calc(100% + 4em);
	}

	.cro-hero-container {
		flex-direction: row;
		align-items: center;
		gap: 3rem;
		padding: var(--cro-section-padding-y) 2rem;
		min-height: 420px;
	}

	.cro-hero-content {
		flex: 1.2;
		gap: 1.1rem;
	}

	.cro-hero-title {
		font-size: 2.65rem !important;
	}

	.cro-hero-subtitle {
		font-size: 0.85rem;
	}

	.cro-hero-usp-item {
		font-size: 1rem;
	}

	.cro-hero-image-col {
		flex: 0.8;
	}

	.cro-hero-featured-img {
		aspect-ratio: 3 / 4;
		max-height: 450px;
	}

	.cro-trust-badge span {
		font-size: 0.78rem;
	}
}


/* ═══════════════════════════════════════════════
   RESPONSIVE: LARGE DESKTOP (1280px+)
   ═══════════════════════════════════════════════ */
@media (min-width: 1280px) {
	.cro-hero-container {
		padding: 3.5rem 2.5rem;
	}

	.cro-hero-title {
		font-size: 3rem !important;
	}

	.cro-hero-content {
		gap: 1.25rem;
	}

	.cro-hero-featured-img {
		max-height: 500px;
	}
}


/* ═══════════════════════════════════════════════
   FULLWIDTH LAYOUT SUPPORT
   (When Kadence is set to fullwidth post layout)
   ═══════════════════════════════════════════════ */
body.single .site-main > .content-wrap > .single-entry > .entry-content-wrap > .cro-hero-section {
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	width: 100vw;
	max-width: 100vw;
}


/* ═══════════════════════════════════════════════
   ANIMATION: Subtle fade-in on load
   ═══════════════════════════════════════════════ */
.cro-hero-content {
	animation: cro-fadeInUp 0.6s ease-out;
}

.cro-hero-image-col {
	animation: cro-fadeInUp 0.6s ease-out 0.15s both;
}

@keyframes cro-fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* ═══════════════════════════════════════════════
   ACCESSIBILITY: Focus states & reduced motion
   ═══════════════════════════════════════════════ */
.cro-hero-cta-btn:focus-visible {
	outline: 3px solid var(--cro-accent, #f97316);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.cro-hero-content,
	.cro-hero-image-col {
		animation: none;
	}

	.cro-btn-phone svg {
		animation: none;
	}

	.cro-hero-cta-btn:hover {
		transform: none;
	}
}


/* ═══════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════ */
@media print {
	.cro-hero-section {
		background: #fff !important;
		color: #000 !important;
	}

	.cro-hero-bg-overlay {
		display: none;
	}

	.cro-hero-title {
		color: #000 !important;
	}

	.cro-hero-usp-item {
		color: #333 !important;
	}
}
