/**
 * Members Page Styles
 * Comprehensive membership page with SaaS-style comparison table
 *
 * @package CHV_Theme
 */

/* ============================================
   Hero Section
   ============================================ */
.chv-members-hero {
	background: linear-gradient(135deg, #1E3A5F 0%, #2B5A8C 100%);
	color: var(--chv-text-light);
	padding: var(--chv-spacing-section) var(--chv-page-padding);
	width: 100%;
	box-sizing: border-box;
}

.chv-members-hero-content {
	max-width: var(--chv-container-max);
	margin: 0 auto;
	display: flex;
	align-items: flex-start;
	gap: var(--chv-spacing-xl);
}

.chv-members-hero-text {
	flex: 1;
	text-align: left;
}

.chv-members-hero-image {
	flex: 1.4;
	max-width: 500px;
}

.chv-members-hero-image img {
	width: 100%;
	height: auto;
	border-radius: var(--chv-radius-xl);
	box-shadow: var(--chv-shadow-xl);
}

.chv-members-hero-title {
	font-size: var(--chv-font-hero);
	font-weight: var(--chv-font-weight-bold);
	margin: 0 0 var(--chv-spacing-md) 0;
	line-height: 1.2;
}

.chv-members-hero-subtitle {
	font-size: var(--chv-font-lg);
	margin: 0 0 var(--chv-spacing-xl) 0;
	opacity: 0.95;
	line-height: 1.6;
}

.chv-members-hero-ctas {
	display: flex;
	gap: var(--chv-spacing-md);
	justify-content: flex-start;
	align-items: center;
	flex-wrap: wrap;
}

.chv-members-hero-cta {
	display: inline-block;
	padding: 16px 32px;
	border-radius: var(--chv-radius-lg);
	font-size: var(--chv-font-base);
	font-weight: var(--chv-font-weight-semibold);
	text-decoration: none;
	transition: var(--chv-transition);
	box-shadow: var(--chv-shadow-btn);
	box-sizing: border-box;
}

.chv-members-hero-cta-primary {
	background: var(--chv-text-light);
	color: var(--chv-primary-blue);
}

.chv-members-hero-cta-primary:hover {
	background: var(--chv-light-blue-bg);
	transform: translateY(-2px);
	box-shadow: var(--chv-shadow-hover-soft);
}

.chv-members-hero-cta-secondary {
	background: transparent;
	color: var(--chv-text-light);
	border: 2px solid var(--chv-text-light);
}

.chv-members-hero-cta-secondary:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-2px);
	box-shadow: var(--chv-shadow-hover-soft);
}

/* All content sections use light background */
.chv-members-page .chv-section:not(.chv-members-cta) {
	background: var(--chv-light-blue-bg);
}

/* ============================================
   Overview Section
   ============================================ */
.chv-overview-content {
	text-align: center;
	max-width: 900px;
	margin: 0 auto;
}

.chv-overview-intro {
	font-size: var(--chv-font-base);
	text-align: center;
	margin: 0 0 var(--chv-spacing-md) 0;
	color: var(--chv-text-gray);
	line-height: 1.8;
}

.chv-overview-intro:last-child {
	margin-bottom: var(--chv-spacing-xl);
}

/* ============================================
   Service Area Section
   ============================================ */
.chv-service-area-layout {
	display: grid;
	grid-template-columns: 1fr 500px;
	gap: var(--chv-spacing-xl);
	align-items: center;
}

.chv-service-area-text {
	text-align: left;
}

.chv-service-area-text h2 {
	font-size: var(--chv-font-section);
	font-weight: var(--chv-font-weight-bold);
	color: var(--chv-text-dark);
	margin: 0 0 var(--chv-spacing-md) 0;
}

.chv-service-area-text p {
	font-size: var(--chv-font-base);
	color: var(--chv-text-gray);
	line-height: var(--chv-line-height-relaxed);
	margin: 0 0 var(--chv-spacing-sm) 0;
}

.chv-service-area-text p:last-child {
	margin-bottom: 0;
}

.chv-service-area-text a {
	color: var(--chv-primary-blue);
	text-decoration: none;
	font-weight: var(--chv-font-weight-medium);
}

.chv-service-area-text a:hover {
	text-decoration: underline;
}

.chv-service-area-map {
	background: var(--chv-text-light);
	padding: var(--chv-spacing-md);
	border-radius: var(--chv-radius-xl);
	box-shadow: var(--chv-shadow-sm);
}

.chv-service-area-map iframe {
	display: block;
	border: none;
	border-radius: var(--chv-radius-lg);
}

.chv-overview-intro:last-of-type {
	margin-bottom: var(--chv-spacing-xl);
}

.chv-overview-content .chv-benefits-grid {
	margin-top: var(--chv-spacing-xl);
}

/* ============================================
   Membership Tiers - SaaS Style Comparison Table
   ============================================ */
.chv-membership-tiers {
	padding: var(--chv-spacing-section) var(--chv-spacing-md);
}

.chv-tiers-intro {
	font-size: var(--chv-font-base);
	text-align: center;
	max-width: 800px;
	margin: 0 auto var(--chv-spacing-sm) auto;
	color: var(--chv-text-gray);
}

/* Financial Assistance Hint - subtle, above table */
.chv-assistance-hint {
	text-align: center;
	color: var(--chv-text-gray);
	font-size: var(--chv-font-base);
	margin: 0 0 var(--chv-spacing-lg) 0;
}

.chv-assistance-hint svg {
	color: var(--chv-accent-red);
	vertical-align: middle;
	margin-right: 6px;
}

.chv-assistance-hint a {
	color: var(--chv-primary-blue);
	font-weight: var(--chv-font-weight-semibold);
	text-decoration: none;
}

.chv-assistance-hint a:hover {
	text-decoration: underline;
}

/* ============================================
   Comparison Table (HTML Table)
   ============================================ */

/* Wrapper for horizontal scroll */
.chv-comparison-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	margin: var(--chv-spacing-lg) 0 0 0;
}

/* Table base */
.chv-comparison-table {
	width: 100%;
	min-width: 750px;
	border-collapse: collapse;
}

/* Feature name column gets the majority of space */
.chv-comparison-table th:first-child,
.chv-comparison-table td:first-child {
	width: 40%;
}

/* Tier columns: sized to content (checkmarks, prices) */
.chv-comparison-table th:not(:first-child),
.chv-comparison-table td:not(:first-child) {
	white-space: nowrap;
}

/* Header cells */
.chv-comparison-table th {
	background: var(--chv-text-light);
	border: 2px solid var(--chv-border-light);
	padding: var(--chv-spacing-lg);
	text-align: center;
	font-size: var(--chv-font-lg);
	font-weight: var(--chv-font-weight-bold);
	color: var(--chv-text-dark);
	vertical-align: middle;
}

/* Feature header (first column header) */
.chv-comparison-table th.chv-feature-header {
	background: var(--chv-text-light);
	border: none;
	border-bottom: 1px solid var(--chv-border-light);
	text-align: left;
}

/* Sticky first column */
.chv-comparison-table th:first-child,
.chv-comparison-table td:first-child {
	position: sticky;
	left: 0;
	z-index: 10;
}

.chv-comparison-table td:first-child {
	background: var(--chv-text-light);
	box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

/* Data cells */
.chv-comparison-table td {
	background: var(--chv-text-light);
	border: 2px solid var(--chv-border-light);
	border-top: none;
	padding: var(--chv-spacing-sm) var(--chv-spacing-md);
	text-align: center;
	vertical-align: middle;
	font-size: var(--chv-font-sm);
}

/* Feature name cells */
.chv-comparison-table td.chv-feature-name {
	text-align: left;
	font-weight: var(--chv-font-weight-medium);
	color: var(--chv-text-dark);
	background: var(--chv-text-light);
	border-left: none;
	border-right: none;
	overflow-wrap: break-word;
}

/* Recommended column highlight - blue border only on OUTSIDE perimeter */
/* Header: blue on top, left, right */
.chv-comparison-table th.chv-recommended {
	border-top: 3px solid var(--chv-primary-blue);
	border-left: 3px solid var(--chv-primary-blue);
	border-right: 3px solid var(--chv-primary-blue);
	border-bottom: 2px solid var(--chv-border-light);
}

/* Body and footer cells: blue on left and right only, gray bottom */
.chv-comparison-table td.chv-recommended {
	border-left: 3px solid var(--chv-primary-blue);
	border-right: 3px solid var(--chv-primary-blue);
	border-bottom: 2px solid var(--chv-border-light);
	border-top: none;
}


/* Checkmark and dash */
.chv-checkmark {
	color: var(--chv-accent-green);
	font-size: var(--chv-font-card);
	font-weight: var(--chv-font-weight-bold);
}

.chv-dash {
	color: var(--chv-gray-muted);
	font-size: var(--chv-font-lg);
}

.chv-fee-service {
	color: var(--chv-text-gray);
	font-size: var(--chv-font-sm);
	line-height: 1.4;
}

/* Pricing rows */
.chv-pricing-row td {
	padding: var(--chv-spacing-md);
	vertical-align: middle;
	text-align: center;
	border-bottom: none;
}

/* First column in pricing row - only right border, right-aligned text */
.chv-pricing-row td:first-child {
	border: none;
	border-right: 2px solid var(--chv-border-light);
	text-align: right;
	padding-right: var(--chv-spacing-md);
}

/* Keep blue side borders on recommended pricing cells */
.chv-pricing-row td.chv-recommended {
	border-left: 3px solid var(--chv-primary-blue);
	border-right: 3px solid var(--chv-primary-blue);
	border-bottom: none;
}

/* Household row (second pricing row) - add bottom border on tier columns only */
.chv-pricing-row + .chv-pricing-row td {
	border-bottom: 2px solid var(--chv-border-light);
}

.chv-pricing-row + .chv-pricing-row td:first-child {
	border-bottom: none;
}

.chv-pricing-row + .chv-pricing-row td.chv-recommended {
	border-bottom: 3px solid var(--chv-primary-blue);
}

.chv-price-annual {
	font-size: var(--chv-font-lg);
	font-weight: var(--chv-font-weight-bold);
	color: var(--chv-primary-blue);
}

.chv-price-monthly {
	font-size: var(--chv-font-sm);
	color: var(--chv-text-gray);
}

/* CTA row */
.chv-cta-row td {
	padding: var(--chv-spacing-lg);
	text-align: center;
	vertical-align: middle;
	border: none;
}

/* First column in CTA row - no borders */
.chv-cta-row td:first-child {
	border: none;
	background: var(--chv-text-light);
}

/* Recommended column in CTA row - no borders */
.chv-cta-row td.chv-recommended {
	border: none;
}

/* Assistance row (spans columns 2-4) */
.chv-assistance-row td {
	border: none;
	padding: var(--chv-spacing-md);
	text-align: center;
	background: transparent;
}

.chv-financial-info {
	text-align: left;
	padding: var(--chv-spacing-lg);
	margin-top: var(--chv-spacing-lg);
	border-left: 4px solid var(--chv-accent-warm);
	background: var(--chv-text-light);
	border-radius: 0 var(--chv-radius-lg) var(--chv-radius-lg) 0;
}

.chv-financial-title {
	font-size: var(--chv-font-lg);
	font-weight: var(--chv-font-weight-bold);
	color: var(--chv-primary-blue);
	margin: 0 0 var(--chv-spacing-sm) 0;
}

.chv-financial-text {
	font-size: var(--chv-font-base);
	line-height: var(--chv-line-height-relaxed);
	color: var(--chv-text-gray);
	margin: 0 0 var(--chv-spacing-sm) 0;
}

.chv-financial-text a {
	color: var(--chv-primary-blue);
	text-decoration: none;
}

.chv-financial-text a:hover {
	text-decoration: underline;
}

.chv-financial-contact {
	font-size: var(--chv-font-base);
	color: var(--chv-text-gray);
	margin: 0;
}

.chv-financial-contact a {
	color: var(--chv-primary-blue);
	font-weight: var(--chv-font-weight-semibold);
	text-decoration: none;
}

.chv-financial-contact a:hover {
	text-decoration: underline;
}

.chv-assistance-row a {
	color: var(--chv-primary-blue);
	font-weight: var(--chv-font-weight-semibold);
	text-decoration: none;
}

.chv-assistance-row a:hover {
	text-decoration: underline;
}

/* Ensure all tfoot cells align consistently */
.chv-comparison-table tfoot td {
	vertical-align: middle;
}

.chv-tier-button {
	display: inline-block;
	padding: 12px 18px;
	background: var(--chv-text-light);
	color: var(--chv-primary-blue);
	border: 2px solid var(--chv-primary-blue);
	border-radius: var(--chv-radius-lg);
	font-size: var(--chv-font-sm);
	font-weight: var(--chv-font-weight-semibold);
	text-align: center;
	text-decoration: none;
	transition: var(--chv-transition);
	cursor: pointer;
	box-sizing: border-box;
	white-space: nowrap;
}

.chv-tier-button:hover {
	background: var(--chv-light-blue-bg);
	transform: translateY(-2px);
}

.chv-tier-button-primary {
	background: var(--chv-primary-blue);
	color: var(--chv-text-light);
	border-color: var(--chv-primary-blue);
}

.chv-tier-button-primary:hover {
	background: var(--chv-secondary-blue);
	border-color: var(--chv-secondary-blue);
}

.chv-tiers-note {
	font-size: var(--chv-font-sm);
	color: var(--chv-text-gray);
	text-align: center;
	margin-top: var(--chv-spacing-lg);
	font-style: italic;
}

/* ============================================
   Benefits Grid
   ============================================ */
.chv-benefits-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--chv-spacing-lg);
	margin-top: var(--chv-spacing-xl);
}

.chv-benefit-card {
	background: var(--chv-text-light);
	padding: var(--chv-spacing-lg);
	border-radius: var(--chv-radius-xl);
	box-shadow: var(--chv-shadow-md);
	transition: var(--chv-transition);
}

.chv-benefit-card:hover {
	box-shadow: var(--chv-shadow-lg);
	transform: translateY(-4px);
}

.chv-benefit-header {
	display: flex;
	align-items: center;
	gap: var(--chv-spacing-sm);
	margin-bottom: var(--chv-spacing-sm);
}

.chv-benefit-icon {
	color: var(--chv-accent-warm);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	line-height: 0;
}

.chv-benefit-card h3 {
	font-size: var(--chv-font-card);
	font-weight: var(--chv-font-weight-semibold);
	margin: 0;
	color: var(--chv-text-dark);
}

.chv-benefit-card p {
	font-size: var(--chv-font-base);
	line-height: 1.6;
	color: var(--chv-text-gray);
	margin: 0;
}

/* ============================================
   Testimonials
   ============================================ */
.chv-testimonials-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--chv-spacing-lg);
	margin-top: var(--chv-spacing-xl);
}

.chv-testimonial-card {
	background: var(--chv-text-light);
	padding: var(--chv-spacing-lg);
	border-radius: var(--chv-radius-xl);
	box-shadow: var(--chv-shadow-md);
	border-left: 4px solid var(--chv-accent-warm);
}

.chv-testimonial-text {
	font-size: var(--chv-font-base);
	line-height: 1.6;
	color: var(--chv-text-dark);
	margin: 0 0 var(--chv-spacing-md) 0;
	font-style: italic;
}

.chv-testimonial-author {
	font-size: var(--chv-font-sm);
	font-weight: var(--chv-font-weight-semibold);
	color: var(--chv-primary-blue);
	margin: 0;
}

/* ============================================
   Contact Section (Questions? We're Here to Help)
   ============================================ */
.chv-contact-section {
	background: var(--chv-light-blue-bg);
}

/* Financial Assistance Subsection */
.chv-financial-assistance-subsection {
	padding-top: var(--chv-spacing-lg);
	border-top: 1px solid var(--chv-border-light);
}

.chv-subsection-title {
	font-size: var(--chv-font-card);
	font-weight: var(--chv-font-weight-semibold);
	color: var(--chv-text-dark);
	margin: 0 0 var(--chv-spacing-md) 0;
}

.chv-assistance-intro {
	font-size: var(--chv-font-base);
	line-height: 1.7;
	color: var(--chv-text-gray);
	margin: 0 0 var(--chv-spacing-md) 0;
}

.chv-assistance-cta {
	font-size: var(--chv-font-base);
	font-weight: var(--chv-font-weight-semibold);
	color: var(--chv-text-dark);
	margin: 0;
}

/* ============================================
   How to Join
   ============================================ */
.chv-join-content {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: var(--chv-spacing-xl);
	margin-top: var(--chv-spacing-xl);
}

.chv-join-steps {
	display: flex;
	flex-direction: column;
	gap: var(--chv-spacing-lg);
}

.chv-join-step {
	display: flex;
	gap: var(--chv-spacing-md);
	align-items: flex-start;
}

.chv-step-number {
	background: var(--chv-primary-blue);
	color: var(--chv-text-light);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--chv-font-card);
	font-weight: var(--chv-font-weight-bold);
	flex-shrink: 0;
}

.chv-step-content h3 {
	font-size: var(--chv-font-card);
	font-weight: var(--chv-font-weight-semibold);
	margin: 0 0 var(--chv-spacing-sm) 0;
	color: var(--chv-text-dark);
}

.chv-step-content p {
	font-size: var(--chv-font-base);
	line-height: 1.6;
	color: var(--chv-text-gray);
	margin: 0 0 var(--chv-spacing-md) 0;
}

.chv-application-links {
	display: flex;
	flex-direction: column;
	gap: var(--chv-spacing-sm);
}

.chv-download-link {
	display: inline-block;
	color: var(--chv-primary-blue);
	font-weight: var(--chv-font-weight-semibold);
	text-decoration: none;
	padding: var(--chv-spacing-sm) 0;
	transition: var(--chv-transition);
}

.chv-download-link:hover {
	color: var(--chv-secondary-blue);
	text-decoration: underline;
}

.chv-join-contact {
	background: var(--chv-text-light);
	padding: var(--chv-spacing-lg);
	border-radius: var(--chv-radius-xl);
	height: fit-content;
	box-shadow: var(--chv-shadow-sm);
}

.chv-join-contact h3 {
	font-size: var(--chv-font-card);
	font-weight: var(--chv-font-weight-semibold);
	margin: 0 0 var(--chv-spacing-md) 0;
	color: var(--chv-text-dark);
}

.chv-contact-info p {
	font-size: var(--chv-font-base);
	line-height: 1.6;
	margin: 0 0 var(--chv-spacing-md) 0;
	color: var(--chv-text-gray);
}

.chv-contact-info a {
	color: var(--chv-primary-blue);
	text-decoration: none;
	font-weight: var(--chv-font-weight-semibold);
}

.chv-contact-info a:hover {
	text-decoration: underline;
}

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

/* Tablets */
@media (max-width: 992px) {
	.chv-service-area-layout {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.chv-service-area-text {
		text-align: center;
	}

	.chv-service-area-map {
		max-width: 500px;
		margin: 0 auto;
	}

	.chv-comparison-table {
		min-width: 650px;
	}

	.chv-testimonials-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile */
@media (max-width: 768px) {
	.chv-members-hero-content {
		flex-direction: column;
		text-align: center;
	}

	.chv-members-hero-text {
		text-align: center;
	}

	.chv-members-hero-image {
		max-width: 100%;
	}

	.chv-members-hero-ctas {
		flex-direction: column;
		width: 100%;
		justify-content: center;
		align-items: center;
	}

	.chv-pricing-row td:first-child {
		text-align: center;
		border-right: none;
	}

	.chv-members-hero-cta {
		width: 100%;
		text-align: center;
		padding: 14px 20px;
	}

	/* Comparison table mobile */
	.chv-comparison-table {
		min-width: 580px;
		font-size: var(--chv-font-sm);
	}

	.chv-comparison-table th:first-child,
	.chv-comparison-table td:first-child {
		width: 35%;
	}

	.chv-comparison-table th {
		padding: var(--chv-spacing-sm);
		font-size: var(--chv-font-base);
	}

	.chv-comparison-table td {
		padding: var(--chv-spacing-xs) var(--chv-spacing-sm);
	}

	.chv-benefits-grid {
		grid-template-columns: 1fr;
	}

	.chv-testimonials-grid {
		grid-template-columns: 1fr;
	}

	.chv-join-content {
		grid-template-columns: 1fr;
	}

	.chv-cta-buttons {
		flex-direction: column;
	}

	.chv-cta-btn {
		width: 100%;
		padding: 14px 24px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.chv-members-hero,
	.chv-section {
		padding: 40px var(--chv-spacing-sm);
	}

	.chv-benefit-card,
	.chv-testimonial-card,
	.chv-join-contact {
		padding: var(--chv-spacing-md);
	}

	.chv-step-number {
		width: 40px;
		height: 40px;
		font-size: var(--chv-font-lg);
	}

}
