/*!
 * Macaneta Group — homepage stylesheet
 * Loads only on the front page. Pairs with the HTML in the Home page's post_content.
 * Brand palette derived from the Primary Logo.
 */

:root {
	--mg-navy: #0d2453;
	--mg-navy-deep: #061229;
	--mg-blue: #2871d8;
	--mg-blue-light: #7cb5e8;
	--mg-slate: #9ba8c2;
	--mg-bg: #ffffff;
	--mg-bg-alt: #f5f7fb;
	--mg-ink: #1a202c;
	--mg-ink-mute: #525d72;
	--mg-line: #e4e9f2;
	--mg-radius: 14px;
	--mg-radius-lg: 22px;
	--mg-shadow: 0 8px 30px rgba(13, 36, 83, 0.08);
	--mg-shadow-strong: 0 18px 60px rgba(13, 36, 83, 0.18);
	--mg-grad-hero: linear-gradient(135deg, #061229 0%, #0d2453 55%, #1c3a7a 100%);
	--mg-grad-blue: linear-gradient(135deg, #2871d8 0%, #7cb5e8 100%);
}

/* Reset only what we need so the theme's other rules win where they should */
.mg-section,
.mg-section * {
	box-sizing: border-box;
}

.mg-section {
	position: relative;
	padding: 88px 0;
	color: var(--mg-ink);
}

.mg-container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
	position: relative;
	z-index: 1;
}

.mg-eyebrow {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--mg-blue-light);
	margin: 0 0 16px;
}

.mg-eyebrow-dark {
	color: var(--mg-blue);
}

.mg-h2 {
	font-size: clamp(28px, 3.4vw, 42px);
	line-height: 1.15;
	font-weight: 700;
	color: var(--mg-navy);
	margin: 0 0 18px;
	letter-spacing: -0.01em;
}

.mg-h2-light {
	color: #fff;
}

.mg-h2-sub {
	color: var(--mg-ink-mute);
	font-weight: 500;
}

.mg-lede {
	font-size: 18px;
	line-height: 1.6;
	color: var(--mg-ink-mute);
	max-width: 720px;
	margin: 0 auto;
}

.mg-section-header {
	text-align: center;
	margin: 0 auto 64px;
	max-width: 820px;
}

.mg-section-header-light .mg-eyebrow,
.mg-section-header-light .mg-lede {
	color: var(--mg-blue-light);
}

/* ---------- Hero ---------- */
.mg-hero {
	background: var(--mg-grad-hero);
	color: #fff;
	overflow: hidden;
	padding: 120px 0 130px;
}

.mg-hero-inner {
	max-width: 880px;
	margin: 0 auto;
	text-align: center;
	position: relative;
	z-index: 2;
}

.mg-hero-headline {
	font-size: clamp(40px, 6vw, 72px);
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 22px;
	color: #fff;
}

.mg-hero-headline .mg-accent {
	background: var(--mg-grad-blue);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.mg-hero-subhead {
	font-size: clamp(18px, 2vw, 22px);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.78);
	margin: 0 auto 38px;
	max-width: 640px;
}

.mg-hero-glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(50% 40% at 80% 20%, rgba(124, 181, 232, 0.22) 0%, transparent 70%),
		radial-gradient(40% 35% at 20% 80%, rgba(40, 113, 216, 0.18) 0%, transparent 70%);
}

/* ---------- Buttons ---------- */
.mg-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	border-radius: 999px;
	border: 1px solid transparent;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
	cursor: pointer;
}

.mg-btn-lg { padding: 17px 32px; font-size: 16px; }

.mg-btn-primary {
	background: var(--mg-grad-blue);
	color: #fff;
	box-shadow: 0 12px 30px rgba(40, 113, 216, 0.35);
}

.mg-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 18px 40px rgba(40, 113, 216, 0.45);
	color: #fff;
}

.mg-btn-ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.32);
}

.mg-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.6);
	color: #fff;
}

.mg-btn-ghost-light {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}

.mg-btn-ghost-light:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.mg-cta-row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	justify-content: center;
}

.mg-cta-row-center { justify-content: center; }

/* ---------- Services grid ---------- */
.mg-services {
	background: var(--mg-bg);
}

.mg-grid {
	display: grid;
	gap: 24px;
}

.mg-grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mg-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mg-card {
	background: #fff;
	padding: 36px 32px;
	border-radius: var(--mg-radius-lg);
	border: 1px solid var(--mg-line);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mg-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--mg-shadow);
	border-color: rgba(40, 113, 216, 0.25);
}

.mg-card-icon {
	width: 56px;
	height: 56px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	background: var(--mg-grad-blue);
	color: #fff;
	margin-bottom: 22px;
}

.mg-card-icon svg { width: 28px; height: 28px; }

.mg-card h3 {
	font-size: 19px;
	font-weight: 700;
	color: var(--mg-navy);
	margin: 0 0 10px;
	line-height: 1.3;
}

.mg-card p {
	color: var(--mg-ink-mute);
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
}

.mg-card-feature {
	background: linear-gradient(160deg, #f3f7ff 0%, #ffffff 100%);
	border-color: rgba(40, 113, 216, 0.18);
}

.mg-link {
	display: inline-flex;
	gap: 6px;
	font-weight: 600;
	color: var(--mg-blue);
	text-decoration: none;
	margin-top: 14px;
}

.mg-link:hover { color: var(--mg-navy); }

/* ---------- Why ---------- */
.mg-why {
	background: var(--mg-grad-hero);
	color: #fff;
}

.mg-why-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px 48px;
	max-width: 1000px;
	margin: 0 auto;
}

.mg-why-list li {
	padding: 0 0 0 56px;
	position: relative;
}

.mg-why-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: var(--mg-grad-blue);
	background-image:
		linear-gradient(135deg, #2871d8, #7cb5e8),
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
	background-blend-mode: normal;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover, 18px 18px;
}

.mg-why-list h3 {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px;
	color: #fff;
}

.mg-why-list p {
	margin: 0;
	color: rgba(255, 255, 255, 0.72);
	font-size: 15px;
	line-height: 1.6;
}

/* ---------- Process ---------- */
.mg-process { background: var(--mg-bg-alt); }

.mg-steps {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	counter-reset: mg-step;
	position: relative;
}

.mg-step {
	background: #fff;
	padding: 36px 32px;
	border-radius: var(--mg-radius-lg);
	border: 1px solid var(--mg-line);
	position: relative;
}

.mg-step-num {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--mg-blue);
	margin-bottom: 16px;
}

.mg-step h3 {
	font-size: 20px;
	font-weight: 700;
	color: var(--mg-navy);
	margin: 0 0 10px;
}

.mg-step p {
	margin: 0;
	color: var(--mg-ink-mute);
	font-size: 15px;
	line-height: 1.6;
}

/* ---------- Proof ---------- */
.mg-proof { background: var(--mg-bg); }

.mg-result {
	padding: 36px 32px;
	border-radius: var(--mg-radius-lg);
	background: linear-gradient(160deg, #0d2453 0%, #1c3a7a 100%);
	color: #fff;
	position: relative;
	overflow: hidden;
}

.mg-result::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(60% 50% at 100% 0%, rgba(124, 181, 232, 0.25) 0%, transparent 70%);
	pointer-events: none;
}

.mg-result-stat {
	font-size: clamp(42px, 5vw, 56px);
	font-weight: 800;
	color: var(--mg-blue-light);
	line-height: 1;
	margin: 0 0 18px;
	letter-spacing: -0.02em;
}

.mg-result h3 {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 10px;
	color: #fff;
	position: relative;
	z-index: 1;
}

.mg-result p {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.72);
	margin: 0;
	line-height: 1.6;
	position: relative;
	z-index: 1;
}

/* ---------- Testimonials ---------- */
.mg-testimonials {
	background: var(--mg-grad-hero);
	color: #fff;
}

.mg-quote {
	margin: 0;
	padding: 36px 32px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--mg-radius-lg);
	backdrop-filter: blur(2px);
}

.mg-quote blockquote {
	font-size: 19px;
	line-height: 1.5;
	margin: 0 0 22px;
	color: #fff;
	font-weight: 500;
}

.mg-quote blockquote::before {
	content: '\201C';
	display: block;
	font-size: 56px;
	line-height: 0.5;
	color: var(--mg-blue-light);
	margin-bottom: 12px;
	font-family: Georgia, serif;
}

.mg-quote figcaption {
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
}

.mg-quote figcaption strong {
	display: block;
	color: #fff;
	font-weight: 700;
	margin-bottom: 2px;
}

/* ---------- CTA ---------- */
.mg-cta {
	padding: 100px 0 120px;
	background: var(--mg-bg);
}

.mg-cta-card {
	background: var(--mg-grad-hero);
	color: #fff;
	padding: 72px 48px;
	border-radius: var(--mg-radius-lg);
	text-align: center;
	box-shadow: var(--mg-shadow-strong);
	position: relative;
	overflow: hidden;
}

.mg-cta-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(60% 50% at 100% 0%, rgba(124, 181, 232, 0.18) 0%, transparent 70%),
		radial-gradient(50% 40% at 0% 100%, rgba(40, 113, 216, 0.22) 0%, transparent 70%);
	pointer-events: none;
}

.mg-cta-card > * { position: relative; z-index: 1; }

.mg-cta-sub {
	font-size: 17px;
	color: rgba(255, 255, 255, 0.78);
	line-height: 1.6;
	max-width: 620px;
	margin: 0 auto 32px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.mg-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mg-steps { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
	.mg-section { padding: 64px 0; }
	.mg-hero { padding: 80px 0 90px; }
	.mg-section-header { margin-bottom: 44px; }
	.mg-grid-3,
	.mg-grid-2,
	.mg-why-list { grid-template-columns: 1fr; }
	.mg-cta-card { padding: 48px 24px; }
	.mg-card,
	.mg-step,
	.mg-quote,
	.mg-result { padding: 28px 24px; }
}

/* ---------- Override Affirm container constraints on the homepage ----------
 * page.php wraps content; make sure full-width sections actually go edge-to-edge.
 */
body.home .uicore-body-content > .container,
body.home .content-area > .container,
body.home article.page > .entry-content {
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	width: 100% !important;
}

body.home .entry-header,
body.home .page-title,
body.home .entry-title {
	display: none;
}

/* Macaneta polish (phase 14): logo sizing fallback + hero refinement */
.uicore .uicore-logo, img.uicore-logo {
    height: 50px !important;
    max-height: 50px !important;
    width: auto !important;
    object-fit: contain;
}
.uicore-branding {
    height: 50px !important;
}

/* Macaneta Group — testimonials section hidden until real client testimonials replace the Client A/B/C placeholders. */
.elementor-element-8257c4d { display: none !important; }

/* Macaneta Group — hero CTA buttons (homepage). Override Elementor kit defaults so the primary and secondary buttons read clearly against the dark navy hero. */

/* Primary: Request a Quote (widget b9a7fb6). Solid white pill on dark hero. */
body.mg-front-page .elementor-element-b9a7fb6 .elementor-button.elementor-button {
	background-color: #ffffff;
	color: var(--mg-navy);
	border: 1px solid #ffffff;
	padding: 16px 30px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
body.mg-front-page .elementor-element-b9a7fb6 .elementor-button.elementor-button:hover,
body.mg-front-page .elementor-element-b9a7fb6 .elementor-button.elementor-button:focus {
	background-color: var(--mg-blue);
	color: #ffffff;
	border-color: var(--mg-blue);
	transform: translateY(-1px);
	box-shadow: 0 10px 30px rgba(40, 113, 216, 0.45);
}

/* Secondary: Explore Services (widget 251c0d7). Outlined ghost button. */
body.mg-front-page .elementor-element-251c0d7 .elementor-button.elementor-button {
	background-color: transparent;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.6);
	padding: 16px 30px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 999px;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
body.mg-front-page .elementor-element-251c0d7 .elementor-button.elementor-button:hover,
body.mg-front-page .elementor-element-251c0d7 .elementor-button.elementor-button:focus {
	background-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-color: #ffffff;
	transform: translateY(-1px);
}

/* Gap between the two hero buttons */
body.mg-front-page .elementor-element-b9a7fb6 {
	margin-right: 12px;
}

/* Header CTA "Request a Quote" — bring into brand palette */
.uicore-navbar a.uicore-btn,
.uicore-navbar a.uicore-btn.uicore-inverted {
	background-color: var(--mg-navy) !important;
	color: #ffffff !important;
	border: 1px solid var(--mg-navy) !important;
	border-radius: 999px !important;
	padding: 11px 22px !important;
	font-size: 12px !important;
	letter-spacing: 0.08em !important;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
}
.uicore-navbar a.uicore-btn:hover,
.uicore-navbar a.uicore-btn.uicore-inverted:hover {
	background-color: var(--mg-blue) !important;
	color: #ffffff !important;
	border-color: var(--mg-blue) !important;
}
/* Transparent header: invert the CTA so it's readable on a dark hero. */
.uicore-transparent:not(.uicore-scrolled) .uicore-navbar a.uicore-btn,
.uicore-transparent:not(.uicore-scrolled) .uicore-navbar a.uicore-btn.uicore-inverted {
	background-color: #ffffff !important;
	color: var(--mg-navy) !important;
	border-color: #ffffff !important;
}
.uicore-transparent:not(.uicore-scrolled) .uicore-navbar a.uicore-btn:hover,
.uicore-transparent:not(.uicore-scrolled) .uicore-navbar a.uicore-btn.uicore-inverted:hover {
	background-color: var(--mg-blue) !important;
	color: #ffffff !important;
	border-color: var(--mg-blue) !important;
}
