/* Mortgage Page Styles */

:root {
	--mortgage-navy: #002F52;
	--mortgage-sapphire: #133156;
	--mortgage-blue: #008BD1;
	--mortgage-light-blue: #0093D5;
	--mortgage-dark-blue: #005885;
	--mortgage-gold: #FDB71A;
	--mortgage-gold-alt: #ffbc00;
	--mortgage-green: #016632;
	--mortgage-card-navy: #162e51;
	--mortgage-contact-bg: #a1d3eb;
	--mortgage-homerise-bg: #eaf8ff;
	--mortgage-text-body: #425466;
	--mortgage-text-muted: #5c6c7f;
	--mortgage-border: #E4E9ED;
	--mortgage-font-display: 'Glober', sans-serif;
	--mortgage-font-body: 'Inter', sans-serif;
	--mortgage-shadow: 0 4px 16px rgba(149, 155, 189, 0.25);
	--mortgage-radius: 12px;
}

.mortgage-page {
	font-family: var(--mortgage-font-body);
	color: var(--mortgage-text-body);
	overflow-x: hidden;
}


/* ========================================
   Shared Button Styles
   ======================================== */

.mortgage-btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 6px;
	font-family: var(--mortgage-font-body);
	font-weight: 500;
	font-size: 16px;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.3s ease, color 0.3s ease;
	cursor: pointer;
}

.mortgage-btn--primary {
	background-color: var(--mortgage-sapphire);
	color: #fff;
}

.mortgage-btn--primary:hover {
	background-color: var(--mortgage-dark-blue);
	color: #fff;
}

.mortgage-btn--secondary {
	background-color: #DCF3FF;
	color: var(--mortgage-dark-blue);
}

.mortgage-btn--secondary:hover {
	background-color: #c5e9fa;
	color: var(--mortgage-dark-blue);
}

.mortgage-btn--coral {
	background-color: #fff;
	color: var(--mortgage-sapphire);
	font-size: 16px;
	font-weight: 600;
	padding: 14px 32px;
}

.mortgage-btn--coral:hover {
	background-color: rgba(255, 255, 255, 0.85);
	color: var(--mortgage-sapphire);
}

.mortgage-btn--blue {
	background-color: var(--mortgage-blue);
	color: #fff;
	font-weight: 600;
}

.mortgage-btn--blue:hover {
	background-color: var(--mortgage-dark-blue);
	color: #fff;
}


/* ========================================
   Hero Section
   ======================================== */

.mortgage-hero {
	position: relative;
	min-height: 700px;
	background-size: cover;
	background-position: right center;
	display: flex;
	align-items: center;
}

.mortgage-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--mortgage-navy) 0%, rgba(0, 47, 82, 0.6) 40%, rgba(0, 47, 82, 0) 70%);
	display: flex;
	align-items: center;
}

.mortgage-hero__curve {
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	z-index: 2;
}

.mortgage-hero__curve svg {
	display: block;
	width: 100%;
	height: 160px;
}

.mortgage-hero__content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 64px 24px;
	width: 100%;
}

.mortgage-hero__title {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.5rem, 0.705rem + 3.39vw, 3.25rem);
	font-weight: 800;
	color: #fff;
	line-height: 1.15;
	max-width: 620px;
	margin: 0 0 24px;
	padding-bottom: 24px;
	border-bottom: 4px solid var(--mortgage-gold);
}

.mortgage-hero__highlight {
	color: var(--mortgage-gold);
}

.mortgage-hero__subtitle {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1rem, 0.773rem + 0.97vw, 1.5rem);
	font-weight: 700;
	color: rgba(255, 255, 255, 0.95);
	margin: 0 0 40px;
	line-height: 1.5;
}

.mortgage-hero__cta {
	position: absolute;
	bottom: 30px;
	left: 0;
	width: 100%;
	box-sizing: border-box;
	padding: 0 24px;
	z-index: 3;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 28px;
	text-decoration: none;
	transition: transform 0.3s ease;
}

.mortgage-hero__cta:hover {
	transform: scale(1.15);
}

.mortgage-hero__cta-img {
	width: 120px;
	height: auto;
	justify-self: center;
}

.mortgage-hero__cta-text {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.125rem, 0.841rem + 1.21vw, 1.75rem);
	font-weight: 800;
	color: var(--mortgage-gold);
}

.mortgage-hero__cta-text:first-of-type {
	text-align: right;
}

.mortgage-hero__cta-text:last-of-type {
	text-align: left;
}


/* ========================================
   About Section
   ======================================== */

.mortgage-about {
	background-color: #fff;
	padding: 64px 0;
}

.mortgage-about__container {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 24px;
	text-align: center;
}

.mortgage-about__text {
	font-size: clamp(1rem, 0.943rem + 0.24vw, 1.125rem);
	font-weight: 400;
	color: var(--mortgage-text-body);
	line-height: 1.7;
	margin: 0 0 32px;
}

.mortgage-about__actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}


/* ========================================
   Lenders Section
   ======================================== */

.mortgage-lenders {
	background-color: var(--mortgage-navy);
	padding: 64px 0;
}

.mortgage-lenders__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.mortgage-lenders__title {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.75rem, 1.636rem + 0.48vw, 2rem);
	font-weight: 800;
	color: #fff;
	text-align: center;
	margin: 0 0 40px;
}

.mortgage-lenders__map {
	margin-bottom: 64px;
}


/* ========================================
   Leadership
   ======================================== */

.mortgage-leadership {
	display: grid;
	grid-template-columns: 2fr 3fr;
	gap: 48px;
	align-items: center;
}

.mortgage-leadership__image img {
	width: 100%;
	max-height: 400px;
	object-fit: cover;
	object-position: center 30%;
	border-radius: var(--mortgage-radius);
	box-shadow: var(--mortgage-shadow);
}

.mortgage-leadership__heading {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.5rem, 1.273rem + 0.97vw, 2rem);
	font-weight: 800;
	color: var(--mortgage-gold);
	margin: 0 0 20px;
}

.mortgage-leadership__text {
	font-size: clamp(1rem, 0.943rem + 0.24vw, 1.125rem);
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.7;
	margin: 0 0 16px;
}

.mortgage-leadership__attribution {
	font-size: 16px;
	font-style: italic;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
}


/* ========================================
   Calculator Section
   ======================================== */

.mortgage-calculator {
	padding: 64px 0;
	background-color: #fff;
}

.mortgage-calculator__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	text-align: center;
}

.mortgage-calculator__title {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.5rem, 1.273rem + 0.97vw, 2rem);
	font-weight: 800;
	color: var(--mortgage-sapphire);
	margin: 0 0 12px;
}

.mortgage-calculator__subtitle {
	font-size: clamp(1rem, 0.943rem + 0.24vw, 1.125rem);
	color: var(--mortgage-text-body);
	margin: 0 0 40px;
	line-height: 1.6;
}

.mortgage-calculator__frame {
	margin-bottom: 24px;
}

.mortgage-calculator .bs-calculator {
	padding: 0;
}

.mortgage-calculator__disclaimer {
	font-size: 14px;
	color: var(--mortgage-text-muted);
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.6;
}


/* ========================================
   Down Payment Assistance
   ======================================== */

.mortgage-dpa {
	background-color: #000;
	background-size: cover;
	background-position: center top;
	min-height: 560px;
	display: flex;
	align-items: flex-end;
	padding: 64px 24px 80px;
}

.mortgage-dpa__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	width: 100%;
}

.mortgage-dpa__content {
	max-width: 560px;
}

.mortgage-dpa__heading {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.5rem, 1.045rem + 1.94vw, 2.5rem);
	font-weight: 800;
	color: #fff;
	line-height: 1.15;
	margin: 0 0 24px;
	padding-bottom: 24px;
	border-bottom: 4px solid var(--mortgage-gold);
}

.mortgage-dpa__subheading {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1rem, 0.773rem + 0.97vw, 1.5rem);
	font-weight: 700;
	color: rgba(255, 255, 255, 0.95);
	margin: 0;
	line-height: 1.5;
}


/* ========================================
   Steps Section
   ======================================== */

.mortgage-steps {
	background-color: var(--mortgage-dark-blue);
	padding: 64px 0;
}

.mortgage-steps__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.mortgage-steps__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-bottom: 40px;
}

.mortgage-steps__card {
	background-color: #fff;
	border: 1px solid var(--mortgage-border);
	border-radius: var(--mortgage-radius);
	padding: 32px 24px;
	text-align: center;
	box-shadow: var(--mortgage-shadow);
}

.mortgage-steps__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: var(--mortgage-sapphire);
	color: #fff;
	font-family: var(--mortgage-font-display);
	font-size: 20px;
	font-weight: 800;
	margin-bottom: 16px;
}

.mortgage-steps__card-title {
	font-family: var(--mortgage-font-display);
	font-size: 18px;
	font-weight: 800;
	color: var(--mortgage-sapphire);
	margin: 0 0 12px;
}

.mortgage-steps__card-text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--mortgage-text-body);
	margin: 0;
}

.mortgage-steps__action {
	text-align: center;
}


/* ========================================
   HomeRise100 Section
   ======================================== */

.mortgage-homerise {
	background-color: var(--mortgage-homerise-bg);
	padding: 64px 0;
}

.mortgage-homerise__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
}

.mortgage-homerise__logo {
	height: 100px;
	width: auto;
	margin-bottom: 20px;
}

.mortgage-homerise__heading {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.5rem, 1.386rem + 0.48vw, 1.75rem);
	font-weight: 800;
	color: var(--mortgage-sapphire);
	line-height: 1.3;
	margin: 0 0 16px;
}

.mortgage-homerise__blue {
	color: var(--mortgage-light-blue);
}

.mortgage-homerise__text {
	font-size: 16px;
	line-height: 1.7;
	color: var(--mortgage-text-body);
	margin: 0;
}

.mortgage-homerise__list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mortgage-homerise__list li {
	font-size: 16px;
	font-weight: 500;
	color: var(--mortgage-sapphire);
	padding: 14px 0 14px 28px;
	border-bottom: 1px solid rgba(19, 49, 86, 0.1);
	position: relative;
}

.mortgage-homerise__list li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var(--mortgage-blue);
	font-weight: 700;
}

.mortgage-homerise__list li:last-child {
	border-bottom: none;
}


/* ========================================
   Product Cards Section
   ======================================== */

.mortgage-products {
	background-color: #f7f8fa;
	padding: 64px 0;
}

.mortgage-products__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.mortgage-products__title {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.5rem, 1.273rem + 0.97vw, 2rem);
	font-weight: 800;
	color: var(--mortgage-sapphire);
	text-align: center;
	margin: 0 0 40px;
}

.mortgage-products .products-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.mortgage-products__grid {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 24px;
}

.mortgage-product-card {
	--product-bg: #eff7ff;
	--product-bg-hover: #cbe4ff;
	border-radius: 8px;
	background: #fff;
	box-shadow: var(--mortgage-shadow);
	padding: 8px;
	width: 100%;
	max-width: 511px;
	min-width: 280px;
	flex: 1 1 400px;
	display: flex;
	flex-direction: column;
	height: 400px;
	overflow: hidden;
}

.mortgage-product-card__logo-container {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--product-bg);
	border-radius: 4px;
	height: 200px;
	transition: background-color 0.3s ease, height 0.3s ease;
}

.mortgage-product-card--bg-image .mortgage-product-card__logo-container {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.mortgage-product-card__logo {
	height: 50%;
	transition: height 0.3s ease;
}

.mortgage-product-card--bg-image .mortgage-product-card__logo {
	display: none;
}

.mortgage-product-card__text {
	font-family: var(--mortgage-font-body);
	padding: 0 16px;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

.mortgage-product-card__title {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.25rem, 1.193rem + 0.24vw, 1.375rem);
	font-weight: 800;
	color: #0a2540;
	line-height: normal;
	margin: 20px 0 8px;
}

.mortgage-product-card__desc {
	font-size: clamp(0.875rem, 0.818rem + 0.24vw, 1rem);
	font-weight: 400;
	line-height: 23px;
	color: var(--mortgage-text-body);
	margin: 0;
}

.mortgage-product-card__bullets {
	color: var(--mortgage-text-body);
	font-size: clamp(0.875rem, 0.818rem + 0.24vw, 1rem);
	font-weight: 400;
	line-height: 18px;
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	visibility: hidden;
	margin: 0;
	padding: 0 0 0 20px;
	transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s ease;
	list-style: disc outside;
}

.mortgage-product-card__bullets li {
	margin-bottom: 8px;
	line-height: 18px;
}

/* Hover: shrink logo container, reveal bullets */
.mortgage-product-card:hover .mortgage-product-card__bullets {
	opacity: 1;
	max-height: 200px;
	visibility: visible;
	margin-top: 8px;
}

.mortgage-product-card:hover .mortgage-product-card__logo-container {
	background-color: var(--product-bg-hover);
	height: 130px;
}

.mortgage-product-card:hover .mortgage-product-card__logo {
	height: 65%;
}


/* ========================================
   Refinance Section
   ======================================== */

.mortgage-refinance {
	background-color: var(--mortgage-navy);
	padding: 64px 0;
}

.mortgage-refinance__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.mortgage-refinance__quote {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 48px;
	align-items: center;
	margin-bottom: 64px;
}

.mortgage-refinance__quote-image img {
	width: 100%;
	border-radius: var(--mortgage-radius);
}

.mortgage-refinance__quote-text p {
	font-size: clamp(1rem, 0.886rem + 0.48vw, 1.25rem);
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.6;
	margin: 0;
}

.mortgage-refinance__header {
	text-align: center;
	margin-bottom: 40px;
}

.mortgage-refinance__title {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.75rem, 1.523rem + 0.97vw, 2.25rem);
	font-weight: 800;
	color: var(--mortgage-gold);
	margin: 0 0 12px;
}

.mortgage-refinance__subtitle {
	font-family: var(--mortgage-font-body);
	font-size: clamp(1rem, 0.943rem + 0.24vw, 1.125rem);
	font-weight: 400;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
	line-height: 1.5;
}

.mortgage-refinance__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.mortgage-refinance__card {
	background-color: #fff;
	border: 1px solid var(--mortgage-border);
	border-radius: 12px;
	padding: 28px 24px;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mortgage-refinance__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px -8px rgba(0, 40, 85, 0.12);
}

.mortgage-refinance__card-image {
	width: 64px;
	height: auto;
	margin-bottom: 16px;
}

.mortgage-refinance__card-title {
	font-family: var(--mortgage-font-display);
	font-size: 20px;
	font-weight: 700;
	color: var(--mortgage-sapphire);
	margin: 0 0 12px;
	line-height: 1.2;
	text-wrap: balance;
}

.mortgage-refinance__card-list {
	list-style: none;
	padding: 0;
	margin: 0 0 auto;
	padding-bottom: 24px;
}

.mortgage-refinance__card-list li {
	font-size: 16px;
	padding: 6px 0 6px 28px;
	position: relative;
	color: var(--mortgage-text-body);
	line-height: 1.4;
}

.mortgage-refinance__card-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background-color: var(--mortgage-blue);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
	background-size: 11px;
	background-position: center;
	background-repeat: no-repeat;
}


/* ========================================
   Contact Section
   ======================================== */

.mortgage-contact {
	background-color: var(--mortgage-contact-bg);
	padding: 64px 0;
}

.mortgage-contact__container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 24px;
	text-align: center;
}

.mortgage-contact__title {
	font-family: var(--mortgage-font-display);
	font-size: clamp(1.5rem, 1.273rem + 0.97vw, 2rem);
	font-weight: 800;
	color: var(--mortgage-sapphire);
	margin: 0 0 12px;
}

.mortgage-contact__subtitle {
	font-size: clamp(1rem, 0.943rem + 0.24vw, 1.125rem);
	color: var(--mortgage-text-body);
	margin: 0 0 32px;
	line-height: 1.6;
}

.mortgage-contact__form {
	background-color: #fff;
	border: 1px solid var(--mortgage-border);
	border-radius: var(--mortgage-radius);
	padding: 32px;
	text-align: left;
	box-shadow: var(--mortgage-shadow);
}

/* Gravity Forms button styling within mortgage page */
.mortgage-contact__form .gform_button,
.mortgage-contact__form input[type="submit"] {
	background-color: var(--mortgage-sapphire) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 12px 24px !important;
	font-family: var(--mortgage-font-body) !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	transition: background-color 0.3s ease !important;
}

.mortgage-contact__form .gform_button:hover,
.mortgage-contact__form input[type="submit"]:hover {
	background-color: var(--mortgage-dark-blue) !important;
}


/* ========================================
   Responsive
   ======================================== */

@media (max-width: 980px) {
	.mortgage-leadership {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.mortgage-leadership__image {
		width: 100%;
		max-width: none;
		margin: 0 auto;
	}

	.mortgage-leadership__image img {
		max-height: 360px;
		object-position: center 20%;
	}

	.mortgage-steps__grid {
		grid-template-columns: 1fr;
		max-width: 440px;
		margin: 0 auto 40px;
	}

	.mortgage-homerise__container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.mortgage-homerise__list li {
		text-align: left;
	}

	.mortgage-products .products-grid {
		grid-template-columns: 1fr;
	}

	.mortgage-refinance__quote {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.mortgage-refinance__quote-image {
		max-width: 280px;
		margin: 0 auto;
	}

	.mortgage-refinance__grid {
		grid-template-columns: 1fr;
		max-width: 440px;
		margin: 0 auto;
	}
}

@media (max-width: 576px) {
	.mortgage-hero {
		min-height: 500px;
		background-position: 70% center;
	}

	.mortgage-hero__overlay {
		background: linear-gradient(180deg, rgba(0, 47, 82, 0.8) 0%, rgba(0, 47, 82, 0.45) 60%, rgba(0, 47, 82, 0.7) 100%);
	}

	.mortgage-hero__cta {
		gap: 12px;
		bottom: 20px;
	}

	.mortgage-hero__cta-img {
		width: 60px;
	}

	.mortgage-hero__curve svg {
		height: 60px;
	}

	.mortgage-leadership__image img {
		max-height: 240px;
	}

	.mortgage-hero__content {
		padding: 48px 20px;
	}

	.mortgage-about,
	.mortgage-calculator,
	.mortgage-homerise,
	.mortgage-products,
	.mortgage-refinance,
	.mortgage-contact,
	.mortgage-lenders,
	.mortgage-steps {
		padding: 48px 0;
	}

	.mortgage-about__container,
	.mortgage-calculator__container,
	.mortgage-homerise__container,
	.mortgage-products__container,
	.mortgage-refinance__container,
	.mortgage-contact__container,
	.mortgage-lenders__container,
	.mortgage-steps__container {
		padding: 0 20px;
	}

	.mortgage-dpa {
		padding: 48px 20px;
		min-height: 320px;
	}

	.mortgage-contact__form {
		padding: 20px;
	}

	.mortgage-product-card {
		height: auto;
		overflow: visible;
	}

	.mortgage-product-card__text {
		overflow: visible;
	}

	.mortgage-product-card__bullets {
		opacity: 1;
		max-height: none;
		visibility: visible;
		margin-top: 8px;
	}

	.mortgage-product-card__logo-container {
		height: 120px;
	}
}
