/**
 * Page Affiliation Styles - 5 Experts v7.0.0
 *
 * @package Forever_BE_Premium
 * @since 7.0.0
 *
 * Expert 2: Thomas ERIKSSON - WordPress Development
 * Expert 5: Sarah CHEN - Performance Optimization
 *
 * Performance Notes:
 * - Critical CSS inlined in template for above-fold content
 * - GPU-accelerated animations with will-change
 * - Contain property for paint isolation
 * - Prefers-reduced-motion respected
 */

/* ==========================================================================
   Performance: CSS Containment
   ========================================================================== */

.section-padding {
	contain: layout style;
}

.affiliation-hero,
.fbo-form-section {
	contain: layout style paint;
}

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

.affiliation-hero {
	background: linear-gradient(135deg, #2D7A3E 0%, #22543d 100%);
	padding: 120px 0 80px;
	color: white;
	position: relative;
	overflow: hidden;
}

.affiliation-hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="50" cy="50" r="2" fill="white" opacity="0.1"/%3E%3C/svg%3E');
	opacity: 0.3;
	pointer-events: none;
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1.5rem;
	margin-top: 2.5rem;
}

.stat-card {
	background: rgba(255, 255, 255, 0.15);
	padding: 1.25rem;
	border-radius: 12px;
	text-align: center;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: transform 0.3s ease, background 0.3s ease;
}

.stat-card:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: translateY(-4px);
}

.stat-number {
	font-size: 2.25rem;
	font-weight: 800;
	display: block;
	margin-bottom: 0.5rem;
	line-height: 1.1;
}

/* ==========================================================================
   Benefit Cards
   ========================================================================== */

.benefit-card {
	background: white;
	padding: 1.75rem;
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	height: 100%;
}

.benefit-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 30px rgba(45, 122, 62, 0.15);
}

.benefit-card:focus-within {
	outline: 3px solid #2D7A3E;
	outline-offset: 2px;
}

/* ==========================================================================
   Pillar Cards
   ========================================================================== */

.pillar-card {
	transition: all 0.3s ease;
}

.pillar-card:hover {
	transform: translateY(-4px);
}

/* ==========================================================================
   Success Stories
   ========================================================================== */

.success-story {
	background: #f9fafb;
	padding: 2rem;
	border-radius: 16px;
	border-left: 4px solid #2D7A3E;
	margin-bottom: 2rem;
	transition: box-shadow 0.3s ease;
}

.success-story:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.success-story:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Timeline Steps
   ========================================================================== */

.timeline-step {
	position: relative;
	padding-left: 4rem;
	padding-bottom: 2.5rem;
}

.timeline-step::before {
	content: "";
	position: absolute;
	left: 1.5rem;
	top: 3.5rem;
	bottom: 0;
	width: 2px;
	background: #2D7A3E;
}

.timeline-step:last-child::before {
	display: none;
}

.timeline-step:last-child {
	padding-bottom: 0;
}

.timeline-icon {
	position: absolute;
	left: 0;
	top: 0;
	width: 3.5rem;
	height: 3.5rem;
	background: linear-gradient(135deg, #2D7A3E, #22543d);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: bold;
	box-shadow: 0 4px 12px rgba(45, 122, 62, 0.3);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-item {
	background: white;
	padding: 1.5rem;
	border-radius: 12px;
	margin-bottom: 1rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.3s ease;
}

.faq-item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.faq-item:last-child {
	margin-bottom: 0;
}

.faq-question {
	font-weight: 700;
	color: #2D7A3E;
	font-size: 1.125rem;
	margin-bottom: 0.75rem;
}

/* ==========================================================================
   CTA Boxes
   ========================================================================== */

.cta-box {
	background: white;
	padding: 2rem;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	text-align: center;
	transition: all 0.3s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.cta-box:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(45, 122, 62, 0.2);
}

.cta-box .btn {
	opacity: 1 !important;
	visibility: visible !important;
	display: inline-block !important;
	color: #ffffff !important;
	text-decoration: none;
	margin-top: auto;
}

.cta-box .bg-brand-green {
	background-color: #2D7A3E !important;
}

.cta-box .bg-gray-800 {
	background-color: #1f2937 !important;
}

.cta-box .btn:hover {
	opacity: 0.9 !important;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.fbo-form-section {
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
	position: relative;
	overflow: hidden;
}

.fbo-form-container {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: 32px;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
	padding: 3rem 2rem;
	border: 2px solid rgba(45, 122, 62, 0.2);
	position: relative;
	overflow: hidden;
}

.fbo-form-container::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: linear-gradient(90deg, #2d7a3e 0%, #fbbf24 50%, #2d7a3e 100%);
	background-size: 200% 100%;
	animation: shimmer 3s infinite linear;
}

.fbo-form-input {
	width: 100%;
	padding: 1rem 1.25rem;
	border: 2px solid #e5e7eb;
	border-radius: 16px;
	font-size: 1rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.fbo-form-input:focus {
	border-color: #2d7a3e;
	box-shadow: 0 0 0 4px rgba(45, 122, 62, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
	outline: none;
}

.fbo-form-select {
	appearance: none;
	background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%232d7a3e%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e');
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 1.5rem;
	padding-right: 3rem;
	cursor: pointer;
}

.fbo-submit-btn {
	width: 100%;
	padding: 1.25rem 2rem;
	font-size: 1.25rem;
	font-weight: 800;
	color: #ffffff;
	background: linear-gradient(135deg, #2d7a3e 0%, #1e5a3e 100%);
	border: none;
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 10px 30px rgba(45, 122, 62, 0.3);
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

.fbo-submit-btn:hover {
	transform: translateY(-4px) scale(1.02);
	box-shadow: 0 20px 40px rgba(45, 122, 62, 0.4), 0 0 0 8px rgba(45, 122, 62, 0.1);
}

.fbo-submit-btn:focus {
	outline: 3px solid #fbbf24;
	outline-offset: 4px;
}

.fbo-submit-btn:active {
	transform: translateY(-2px) scale(0.98);
}

.fbo-submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* ==========================================================================
   Form Response States
   ========================================================================== */

.fbo-form-response {
	padding: 1rem 1.5rem;
	border-radius: 12px;
	margin-top: 1.5rem;
	display: none;
}

.fbo-form-response.success {
	display: block;
	background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
	border: 2px solid #10b981;
	color: #065f46;
}

.fbo-form-response.error {
	display: block;
	background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
	border: 2px solid #ef4444;
	color: #991b1b;
}

/* ==========================================================================
   Consent Checkbox
   ========================================================================== */

.consent-wrapper {
	background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
	border: 2px solid #86efac;
	border-radius: 16px;
	padding: 1.25rem;
	margin-bottom: 1.5rem;
}

.consent-wrapper input[type="checkbox"] {
	width: 1.5rem;
	height: 1.5rem;
	cursor: pointer;
	accent-color: #2d7a3e;
	flex-shrink: 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes float {
	0%, 100% { transform: translate(0, 0) rotate(0deg); }
	33% { transform: translate(30px, -30px) rotate(120deg); }
	66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes shimmer {
	0% { background-position: 200% center; }
	100% { background-position: -200% center; }
}

@keyframes pulse-scale {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

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

@keyframes shimmer-button {
	0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
	100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes bounce-gift {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-5px); }
}

@keyframes arrow-move {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(5px); }
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

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

@media (max-width: 768px) {
	.affiliation-hero {
		padding: 100px 0 60px;
	}

	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}

	.stat-number {
		font-size: 1.75rem;
	}

	.stat-card {
		padding: 1rem;
	}

	.fbo-form-container {
		padding: 2rem 1.5rem;
	}

	.fbo-submit-btn {
		font-size: 1.125rem;
		padding: 1.125rem 1.5rem;
	}

	.timeline-step {
		padding-left: 3.5rem;
	}

	.timeline-icon {
		width: 3rem;
		height: 3rem;
		font-size: 1rem;
	}
}

@media (max-width: 480px) {
	.stats-grid {
		grid-template-columns: 1fr 1fr;
	}

	.benefit-card {
		padding: 1.25rem;
	}
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.affiliation-hero {
		background: #2D7A3E !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.stat-card,
	.benefit-card,
	.cta-box {
		box-shadow: none !important;
		border: 1px solid #e5e7eb;
	}

	.fbo-form-section {
		display: none !important;
	}
}
