/**
 * Call to Action band (inc/cta.php) — auto-appended near the end of
 * every qualifying page — plus the lightbox its button opens, showing
 * the chosen Contact Form.
 */

.dfi-cta {
	padding: 3.5rem 1.5rem;
	text-align: center;
	background: #f5f5f5;
}

.dfi-cta__inner {
	max-width: 720px;
	margin: 0 auto;
}

.dfi-cta__title {
	margin: 0 0 0.75rem;
	font-size: 2rem;
	line-height: 1.25;
}

.dfi-cta__text {
	margin: 0 0 1.75rem;
	font-size: 1.1rem;
	line-height: 1.6;
	color: #444;
}

.dfi-cta__button {
	position: relative;
	overflow: hidden;
	display: inline-block;
	padding: 0.9rem 2.25rem;
	border: 0;
	border-radius: 6px;
	background: var(--dfi-cta-button-color, #2271b1);
	color: #fff;
	font-size: 1.05rem;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.dfi-cta__button:hover,
.dfi-cta__button:focus-visible {
	filter: brightness(1.08);
}

/* Button animations — each is opt-in per section (see .dfi-cta-anim-*
   applied conditionally in inc/cta.php), sharing --dfi-cta-anim-speed as
   the full cycle length. */

@keyframes dfiCtaPulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.06); }
}

@keyframes dfiCtaBounce {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-8px); }
}

@keyframes dfiCtaShake {
	0%     { transform: translateX(0); }
	12.5%  { transform: translateX(-4px); }
	25%    { transform: translateX(-6px); }
	37.5%  { transform: translateX(-4px); }
	50%    { transform: translateX(0); }
	62.5%  { transform: translateX(4px); }
	75%    { transform: translateX(6px); }
	87.5%  { transform: translateX(4px); }
	100%   { transform: translateX(0); }
}

.dfi-cta-anim-pulse {
	animation: dfiCtaPulse var(--dfi-cta-anim-speed, 3s) ease-in-out infinite;
}

.dfi-cta-anim-bounce {
	animation: dfiCtaBounce var(--dfi-cta-anim-speed, 3s) ease-in-out infinite;
}

.dfi-cta-anim-shake {
	animation: dfiCtaShake var(--dfi-cta-anim-speed, 3s) linear infinite;
}

/* Glossy Swipe: a shine sweeps across the button briefly near the start
   of each cycle, then holds still for the rest of it — reads as "a
   swipe every few seconds" instead of a continuous, distracting loop. */
@keyframes dfiCtaGlossySwipe {
	0%, 100% { transform: translateX(-150%) skewX(-20deg); }
	15%      { transform: translateX(250%) skewX(-20deg); }
}

.dfi-cta-anim-glossy-swipe::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 35%;
	height: 100%;
	background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
	animation: dfiCtaGlossySwipe var(--dfi-cta-anim-speed, 4s) ease-in-out infinite;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.dfi-cta-anim-pulse,
	.dfi-cta-anim-bounce,
	.dfi-cta-anim-shake,
	.dfi-cta-anim-glossy-swipe::after {
		animation: none !important;
	}
}

/* Lightbox */

.dfi-cta-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(0, 0, 0, 0);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, background-color 0.25s ease;
}

.dfi-cta-modal[hidden] {
	display: none;
}

.dfi-cta-modal--visible {
	opacity: 1;
	background: rgba(0, 0, 0, 0.6);
	pointer-events: auto;
}

.dfi-cta-modal__panel {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 10px;
	padding: 2.5rem 2rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: scale(0.92) translateY(10px);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dfi-cta-modal--visible .dfi-cta-modal__panel {
	transform: scale(1) translateY(0);
}

.dfi-cta-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 1rem;
	background: transparent;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
	transition: color 0.15s ease;
}

.dfi-cta-modal__close:hover {
	color: #111;
}

@media (prefers-reduced-motion: reduce) {
	.dfi-cta-modal,
	.dfi-cta-modal__panel {
		transition: none !important;
	}
}

@media (max-width: 600px) {
	.dfi-cta {
		padding: 2.5rem 1.25rem;
	}

	.dfi-cta__title {
		font-size: 1.6rem;
	}

	.dfi-cta-modal__panel {
		padding: 2rem 1.5rem;
	}
}
