/**
 * InsuranceFixits Core – Homepage styles
 * Scoped under .ifx-home. Coastal authority mockup.
 *
 * Managed/Developed by ThatWorx
 *
 * @package InsuranceFixits_Core
 */

/* ========== Design Tokens ========== */
.ifx-home {
	--ifx-primary-blue: #1e5f8a;
	--ifx-deep-navy: #0f172a;
	--ifx-accent-green: #16a34a;
	--ifx-text-light: #fff;
	--ifx-border-radius: 16px;
	--ifx-shadow-soft: 0 4px 20px rgba(15, 23, 42, 0.08);
	--ifx-card-radius: 18px;
	--ifx-map-radius: 20px;
	--ifx-transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Coastline background – body only, homepage ========== */
body.home {
	background:
		linear-gradient(
			to bottom,
			rgba(255, 255, 255, 0.96) 0%,
			rgba(255, 255, 255, 0.88) 40%,
			rgba(255, 255, 255, 0.75) 100%
		),
		url('../img/sc-coastline.png');
	background-size: cover;
	background-position: center bottom;
	background-attachment: fixed;
}

/* ========== Hide theme header on front page – plugin provides single nav ========== */
body.home .twxb-header {
	display: none;
}

/* Remove main top padding so nav sits flush – eliminates white bar above header */
body.home .twxb-main {
	padding-top: 0;
}

/* ========== Top Navigation – white header ========== */
.ifx-home .ifx-nav {
	background-color: #fff;
	background-image: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	position: relative;
	z-index: 10;
}

.ifx-home .ifx-nav__link,
.ifx-home .ifx-nav__links a {
	color: var(--ifx-deep-navy);
}

.ifx-home .ifx-nav__link:hover,
.ifx-home .ifx-nav__link--active,
.ifx-home .ifx-nav__links a:hover,
.ifx-home .ifx-nav__links .current-menu-item > a {
	color: var(--ifx-primary-blue);
}

.ifx-home .ifx-nav__logo-text {
	color: var(--ifx-deep-navy);
}

.ifx-home .ifx-nav__inner {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem clamp(1.5rem, 4vw, 2rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
}

.ifx-home .ifx-nav__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: transform var(--ifx-transition-smooth);
}

.ifx-home .ifx-nav__logo:hover {
	transform: scale(1.03);
}

.ifx-home .ifx-nav__logo-img {
	display: block;
	max-height: 84px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15)) drop-shadow(0 0 12px rgba(13, 148, 136, 0.12));
	transition: filter var(--ifx-transition-smooth);
}

.ifx-home .ifx-nav__logo:hover .ifx-nav__logo-img {
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 20px rgba(13, 148, 136, 0.18));
}

.ifx-home .ifx-nav__logo-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: linear-gradient(135deg, var(--ifx-primary-blue), #0d9488);
	color: var(--ifx-text-light);
	font-weight: 700;
	font-size: 0.875rem;
	border-radius: var(--ifx-border-radius);
}

.ifx-home .ifx-nav__logo-text {
	font-size: 1.25rem;
	font-weight: 700;
}

.ifx-home .ifx-nav__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ifx-home .ifx-nav__link,
.ifx-home .ifx-nav__links a {
	font-weight: 500;
}

.ifx-home .ifx-nav__link:hover,
.ifx-home .ifx-nav__links a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.ifx-home .ifx-nav__link--active,
.ifx-home .ifx-nav__links .current-menu-item > a {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ========== Hero – full-width bg, dark overlay, premium scale ========== */
.ifx-home .ifx-hero {
	position: relative;
	background-color: var(--ifx-deep-navy);
	width: 100%;
	min-height: clamp(340px, 48vw, 460px);
	padding: clamp(3.5rem, 9vw, 5.5rem) clamp(1.5rem, 4vw, 3rem);
	display: flex;
	align-items: center;
}

.ifx-home .ifx-hero__bg-layer {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 1.2s ease-in-out;
	z-index: 0;
}

.ifx-home .ifx-hero__bg-layer.is-active {
	opacity: 1;
}

.ifx-home .ifx-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		105deg,
		rgba(8, 14, 26, 0.94) 0%,
		rgba(15, 23, 42, 0.88) 35%,
		rgba(25, 45, 75, 0.55) 100%
	);
	pointer-events: none;
}

.ifx-home .ifx-hero__overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.2) 0%,
		rgba(0, 0, 0, 0.06) 35%,
		transparent 55%
	);
	pointer-events: none;
}

.ifx-home .ifx-hero__overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		ellipse 80% 100% at 100% 50%,
		rgba(15, 23, 42, 0.35) 0%,
		transparent 70%
	);
	pointer-events: none;
}

.ifx-home .ifx-hero__texture {
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	opacity: 0.03;
	pointer-events: none;
	z-index: 1;
}

.ifx-home .ifx-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

.ifx-home .ifx-hero__title {
	font-size: clamp(2.2rem, 6vw, 3.85rem);
	font-weight: 700;
	color: var(--ifx-text-light);
	margin: 0 0 1rem;
	line-height: 1.1;
	letter-spacing: -0.035em;
	text-align: left;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);
	transition: opacity 0.3s ease;
	min-height: 2.2em;
}

.ifx-home .ifx-hero__title--fade-out {
	opacity: 0;
}

.ifx-home .ifx-hero__subtitle {
	font-size: clamp(1rem, 1.35vw, 1.25rem);
	color: rgba(255, 255, 255, 0.97);
	margin: 0 0 2rem;
	max-width: 440px;
	line-height: 1.55;
	text-align: left;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: opacity 0.3s ease;
	min-height: 6.2em;
}

.ifx-home .ifx-hero__subtitle--fade-out {
	opacity: 0;
}

.ifx-home .ifx-hero__buttons {
	display: flex;
	gap: 1rem 1.25rem;
	flex-wrap: wrap;
}

.ifx-home .ifx-hero__buttons .ifx-btn {
	margin-right: 0;
}

/* Primary CTA: solid green, glow/depth */
.ifx-home .ifx-btn--primary {
	background: var(--ifx-accent-green);
	color: var(--ifx-text-light);
	border-color: transparent;
	box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35), 0 0 20px rgba(22, 163, 74, 0.15);
}

.ifx-home .ifx-btn--primary:hover {
	background: #15803d;
	box-shadow: 0 4px 16px rgba(22, 163, 74, 0.45), 0 0 28px rgba(22, 163, 74, 0.25);
	transform: translateY(-1px);
}

/* Secondary CTA: transparent, white border */
.ifx-home .ifx-btn--secondary {
	background: transparent;
	color: var(--ifx-text-light);
	border: 2px solid rgba(255, 255, 255, 0.8);
}

.ifx-home .ifx-btn--secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: var(--ifx-text-light);
}

/* ========== Audience Cards – soft shadow, section spacing ========== */
.ifx-home .ifx-audience-cards {
	padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
	background: transparent;
}

.ifx-home .ifx-audience-cards__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 3vw, 2rem);
	align-items: stretch;
}

.ifx-home .ifx-audience-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: var(--ifx-card-radius);
	padding: 0;
	text-align: center;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04);
	transition: transform var(--ifx-transition-smooth), box-shadow var(--ifx-transition-smooth), border-color var(--ifx-transition-smooth);
}

.ifx-home .ifx-audience-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Image area: top of card, 16:9 aspect ratio, rounded top corners, object-fit cover */
.ifx-home .ifx-audience-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	flex-shrink: 0;
	background: #e0f2fe;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 8px rgba(15, 23, 42, 0.04);
}

.ifx-home .ifx-audience-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Content area below image */
.ifx-home .ifx-audience-card__title,
.ifx-home .ifx-audience-card__desc,
.ifx-home .ifx-audience-card .ifx-btn {
	padding-left: clamp(1.25rem, 2.5vw, 1.75rem);
	padding-right: clamp(1.25rem, 2.5vw, 1.75rem);
}

.ifx-home .ifx-audience-card__title {
	padding-top: clamp(1.25rem, 2.5vw, 1.5rem);
}

.ifx-home .ifx-audience-card__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a365d;
	margin: 0 0 0.5rem;
}

.ifx-home .ifx-audience-card__desc {
	color: #64748b;
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	flex-grow: 1;
	padding-bottom: 0;
}

.ifx-home .ifx-audience-card .ifx-btn {
	margin-top: auto;
	margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.ifx-home .ifx-audience-card .ifx-btn--outline {
	background: #0c1222;
	color: var(--ifx-text-light);
	transition: background var(--ifx-transition-smooth), box-shadow var(--ifx-transition-smooth);
}

.ifx-home .ifx-audience-card .ifx-btn--outline:hover {
	background: var(--ifx-deep-navy);
}

/* ========== How Membership Works – section heading, light gray bg ========== */
.ifx-home .ifx-how-it-works {
	padding: clamp(2rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
	padding-bottom: var(--space-lg, 2.5rem);
	background: transparent;
}

.ifx-home .ifx-how-it-works__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.ifx-home .ifx-how-it-works .ifx-section-title {
	margin-bottom: var(--space-sm, 1.25rem);
}

.ifx-home .ifx-steps {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	position: relative;
}

.ifx-home .ifx-steps::before {
	content: "";
	position: absolute;
	top: 35px;
	left: 12%;
	right: 12%;
	height: 3px;
	background: linear-gradient(90deg, rgba(30, 95, 138, 0.3), rgba(30, 95, 138, 0.5) 15%, rgba(30, 95, 138, 0.5) 85%, rgba(30, 95, 138, 0.3));
	pointer-events: none;
	z-index: 0;
	border-radius: 2px;
}

@media (max-width: 768px) {
	.ifx-home .ifx-steps::before {
		display: none;
	}
}

.ifx-home .ifx-step {
	flex: 1 1 0;
	min-width: 200px;
	max-width: 300px;
	text-align: center;
	padding: 0 0.75rem;
	position: relative;
	z-index: 1;
}

.ifx-home .ifx-step__number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 0.75rem;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--ifx-primary-blue) 0%, #0d9488 50%, #0b8a7a 100%);
	box-shadow:
		0 2px 0 rgba(255, 255, 255, 0.25) inset,
		0 4px 12px rgba(15, 23, 42, 0.15),
		0 8px 24px rgba(13, 148, 136, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.4);
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	line-height: 1;
	transition: transform var(--ifx-transition-smooth), box-shadow var(--ifx-transition-smooth);
}

.ifx-home .ifx-step:hover .ifx-step__number {
	transform: scale(1.05);
	box-shadow:
		0 2px 0 rgba(255, 255, 255, 0.3) inset,
		0 6px 20px rgba(15, 23, 42, 0.2),
		0 12px 32px rgba(13, 148, 136, 0.25);
}

.ifx-home .ifx-step__number span {
	display: block;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.ifx-home .ifx-step__title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--ifx-deep-navy);
	margin: 0 0 0.375rem;
}

.ifx-home .ifx-step__desc {
	font-size: 0.875rem;
	color: #64748b;
	margin: 0;
	line-height: 1.45;
}

/* ========== Why Trust Us – light tint, separation ========== */
.ifx-home .ifx-trust {
	padding: clamp(2rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
	padding-top: var(--space-lg, 2.5rem);
	background: transparent;
	border-top: 1px solid rgba(30, 95, 138, 0.12);
	position: relative;
}

.ifx-home .ifx-trust::before {
	content: "";
	display: block;
	width: 64px;
	height: 2px;
	margin: 0 auto 0 var(--space-lg, 2.5rem);
	background: linear-gradient(90deg, transparent, rgba(30, 95, 138, 0.4) 50%, transparent);
	border-radius: 1px;
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
}

.ifx-home .ifx-trust__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.ifx-home .trust-panel {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 16px;
	padding: 30px;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.8) inset,
		0 4px 12px rgba(0, 0, 0, 0.05),
		0 24px 48px -12px rgba(15, 23, 42, 0.15),
		0 0 0 1px rgba(15, 23, 42, 0.04);
}

.ifx-home .ifx-trust .ifx-section-title {
	margin-bottom: clamp(1rem, 2vw, 1.25rem);
}

.ifx-home .ifx-trust .ifx-section-title::after {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	margin-top: 0.75rem;
	background: linear-gradient(90deg, var(--ifx-primary-blue), #0d9488);
	border-radius: 2px;
}

.ifx-home .ifx-trust__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(1.5rem, 3vw, 2rem);
}

.ifx-home .ifx-trust__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	flex: 1 1 140px;
	min-width: 120px;
	max-width: 200px;
	padding: 1rem;
	border-radius: var(--ifx-border-radius);
	transition: background var(--ifx-transition-smooth), transform var(--ifx-transition-smooth), box-shadow var(--ifx-transition-smooth);
}

.ifx-home .ifx-trust__item:hover {
	background: rgba(255, 255, 255, 0.7);
	transform: translateY(-6px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.ifx-home .ifx-trust__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 1.5rem;
	border-radius: var(--ifx-border-radius);
	background: linear-gradient(135deg, var(--ifx-primary-blue), #0d9488);
	box-shadow: var(--ifx-shadow-soft);
	color: #fff;
}

.ifx-home .ifx-trust__icon svg {
	width: 30px;
	height: 30px;
}

.ifx-home .ifx-trust__title {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--ifx-deep-navy);
	margin: 0;
}

/* ========== Service Area – split layout ========== */
.ifx-home .ifx-service-area {
	position: relative;
	padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
	background: transparent !important;
	background-image: none !important;
	min-height: clamp(320px, 45vw, 420px);
	display: flex;
	align-items: center;
}

.ifx-home .ifx-service-area__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(8, 14, 26, 0.9) 0%,
		rgba(15, 23, 42, 0.78) 50%,
		rgba(15, 23, 42, 0.5) 100%
	);
	pointer-events: none;
	z-index: 0;
}

.ifx-home .ifx-service-area__inner {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 2fr 3fr;
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: start;
	width: 100%;
}

.ifx-home .ifx-service-area__content {
	max-width: 480px;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ifx-home .ifx-service-area__title {
	font-size: clamp(1.625rem, 3.25vw, 2.25rem);
	font-weight: 700;
	color: var(--ifx-text-light);
	margin: 0;
	letter-spacing: -0.025em;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ifx-home .ifx-service-area__list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ifx-home .ifx-service-area__list li {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	color: rgba(255, 255, 255, 0.95);
	font-weight: 500;
	font-size: 1rem;
}

.ifx-home .ifx-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--ifx-accent-green);
	border-radius: 50%;
	flex-shrink: 0;
}

.ifx-home .ifx-service-area__map {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border-radius: var(--ifx-map-radius);
	border: 1px solid rgba(255, 255, 255, 0.7);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.9) inset,
		0 4px 16px rgba(0, 0, 0, 0.3),
		0 16px 48px rgba(0, 0, 0, 0.25);
	padding: 1.25rem;
}

.ifx-home .ifx-service-area__map img {
	width: 100%;
	height: auto;
	border-radius: calc(var(--ifx-map-radius) - 4px);
	display: block;
}

/* ========== Final CTA ========== */
.ifx-home .ifx-final-cta {
	position: relative;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 58, 95, 0.75) 50%, rgba(12, 74, 110, 0.7) 100%);
	padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
	text-align: center;
}

.ifx-home .ifx-final-cta__inner {
	max-width: 560px;
	margin: 0 auto;
}

.ifx-home .ifx-final-cta__title {
	font-size: clamp(1.375rem, 2.75vw, 1.75rem);
	font-weight: 700;
	color: var(--ifx-text-light);
	margin: 0 0 1.5rem;
	letter-spacing: -0.02em;
}

.ifx-home .ifx-final-cta .ifx-btn--primary {
	box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
}

.ifx-home .ifx-final-cta .ifx-btn--primary:hover {
	box-shadow: 0 6px 24px rgba(22, 163, 74, 0.5);
}

/* ========== Mobile Responsiveness ========== */
@media (max-width: 900px) {
	.ifx-home .ifx-audience-cards__inner {
		grid-template-columns: 1fr;
		max-width: 400px;
		margin-left: auto;
		margin-right: auto;
	}
}

@media (max-width: 768px) {
	.ifx-home .ifx-hero__buttons {
		flex-direction: column;
		align-items: flex-start;
	}

	.ifx-home .ifx-hero__buttons .ifx-btn {
		width: 100%;
		max-width: 280px;
		justify-content: center;
	}

	.ifx-home .ifx-steps {
		flex-direction: column;
		align-items: center;
		gap: 1.5rem;
	}

	.ifx-home .ifx-step {
		max-width: 320px;
	}

	.ifx-home .ifx-service-area__inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.ifx-home .ifx-service-area__map {
		order: -1;
		max-width: 400px;
		margin: 0 auto;
	}

	.ifx-home .ifx-nav__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.ifx-home .ifx-nav__links {
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.ifx-home .ifx-nav__links {
		flex-direction: column;
		align-items: center;
	}
}
