/**
 * Benefits Section Styles - Mobile First
 * 
 * Responsive benefits grid layout
 * Uses Palette A CSS variables for consistent theming
 *
 * @package Garage_At_Home
 */

/* Palette A CSS Variables */
:root {
	--gh-bg: #0F1113;
	--gh-surface: #141618;
	--gh-accent: #C62828;
	--gh-accent-2: #FF6F61;
	--gh-text: #F5F6F7;
	--gh-muted: #BFC4C6;
}

/* Benefits Section Container - Standardized */
.gh-benefits-section {
	background-color: var(--gh-bg);
	padding: 2rem 0;
	position: relative;
	width: 100%;
	max-width: 100vw;
	overflow-x: hidden;
	box-sizing: border-box;
}

/* Mobile: Consistent padding */
@media (max-width: 767px) {
	.gh-benefits-section {
		padding: 1.5rem 0;
	}
}

.gh-benefits-container {
	max-width: min(1200px, 100%);
	margin: 0 auto;
	padding: 0 1rem;
	width: 100%;
	box-sizing: border-box;
}

/* Benefits Header */
.gh-benefits-header {
	margin-bottom: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Mobile: Reduce benefits header margin */
@media (max-width: 767px) {
	.gh-benefits-header {
		margin-bottom: 1.5rem;
		gap: 0.75rem;
	}
}

.gh-benefits-header-content {
	flex: 1;
}

.gh-benefits-title {
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.5px;
	color: var(--gh-text);
}

/* Mobile: Smaller benefits title */
@media (max-width: 767px) {
	.gh-benefits-title {
		font-size: 1.375rem;
		margin: 0 0 0.375rem 0;
	}
}

.gh-benefits-subtitle {
	font-size: 0.875rem;
	color: var(--gh-muted);
	margin: 0;
	font-weight: 400;
	letter-spacing: 0.3px;
}

/* Benefits CTA Button */
.gh-benefits-cta {
	background: transparent;
	color: var(--gh-accent-2);
	border: 1px solid var(--gh-accent-2);
	padding: 0.625rem 1rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	align-self: flex-start;
}

.gh-benefits-cta:hover {
	background: var(--gh-accent-2);
	color: var(--gh-text);
	transform: translateX(4px);
}

.gh-benefits-cta:focus {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 4px;
}

.gh-benefits-cta svg {
	width: 16px;
	height: 16px;
	transition: transform 0.3s ease;
}

.gh-benefits-cta:hover svg {
	transform: translateX(2px);
}

/* Benefits Wrapper */
.gh-benefits-wrapper {
	width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
}

/* Benefits Grid - Mobile: 1 column */
.gh-benefits-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin: 0;
	list-style: none;
	box-sizing: border-box;
}

/* Benefit Card */
.gh-benefit-card {
	background: var(--gh-text);
	border-radius: 16px;
	padding: 1.5rem;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid rgba(255, 111, 97, 0.1);
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	cursor: pointer;
	outline: none;
	min-height: 100px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	/* Allow page scroll when touching cards */
	touch-action: manipulation;
}

.gh-benefit-card:hover {
	transform: translateY(-4px);
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(255, 111, 97, 0.15);
	border-color: rgba(255, 111, 97, 0.3);
}

.gh-benefit-card:hover .gh-benefit-icon {
	transform: scale(1.1) rotate(5deg);
	background: rgba(255, 111, 97, 0.2);
}

.gh-benefit-card:focus {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 4px;
}

.gh-benefit-card:active {
	transform: translateY(-2px);
}

/* Benefit Icon Container */
.gh-benefit-icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: rgba(255, 111, 97, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	overflow: hidden;
	transition: transform 0.3s ease, background 0.3s ease;
}

.gh-benefit-icon::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255, 111, 97, 0.1) 0%, rgba(198, 40, 40, 0.1) 100%);
	border-radius: 12px;
	z-index: 0;
}

.gh-benefit-icon img,
.gh-benefit-icon svg {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 8px;
	position: relative;
	z-index: 1;
}

.gh-benefit-icon svg {
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Benefit Content */
.gh-benefit-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.gh-benefit-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--gh-bg);
	margin: 0;
	line-height: 1.3;
	letter-spacing: 0.2px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	word-wrap: break-word;
	overflow-wrap: break-word;
	max-width: 100%;
}

.gh-benefit-title::before {
	content: '';
	width: 4px;
	height: 20px;
	background: linear-gradient(180deg, var(--gh-accent) 0%, var(--gh-accent-2) 100%);
	border-radius: 2px;
	flex-shrink: 0;
}

.gh-benefit-sub {
	font-size: 0.875rem;
	color: #4A4A4A;
	margin: 0;
	line-height: 1.5;
	font-weight: 400;
	word-wrap: break-word;
	overflow-wrap: break-word;
	max-width: 100%;
	/* Ensure description is always visible */
	overflow: visible;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	max-height: 4.5em;
	text-overflow: ellipsis;
}

/* Modal Overlay */
.gh-benefits-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 17, 19, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 1rem;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.gh-benefits-modal-overlay[hidden] {
	display: none;
}

.gh-benefits-modal-overlay:not([hidden]) {
	opacity: 1;
}

/* Modal Content */
.gh-benefits-modal-content {
	background: var(--gh-surface);
	border-radius: 16px;
	width: 100%;
	max-width: 500px;
	padding: 2rem;
	position: relative;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 111, 97, 0.2);
}

.gh-benefits-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: transparent;
	border: none;
	color: var(--gh-text);
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 8px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
}

.gh-benefits-modal-close:hover {
	background: rgba(255, 111, 97, 0.1);
	color: var(--gh-accent-2);
}

.gh-benefits-modal-close:focus {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 2px;
}

.gh-benefits-modal-title {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--gh-text);
	margin: 0 0 1.5rem 0;
	letter-spacing: -0.5px;
}

/* Selling Points */
.gh-benefits-selling-points {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.gh-benefits-selling-point {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 1rem;
	color: var(--gh-text);
	line-height: 1.5;
}

.gh-benefits-point-icon {
	flex-shrink: 0;
	color: var(--gh-accent-2);
	width: 20px;
	height: 20px;
	filter: drop-shadow(0 1px 2px rgba(255, 111, 97, 0.3));
}

.gh-benefits-selling-point {
	background: rgba(255, 111, 97, 0.05);
	padding: 0.75rem 1rem;
	border-radius: 8px;
	border-left: 3px solid var(--gh-accent-2);
	transition: all 0.3s ease;
}

.gh-benefits-selling-point:hover {
	background: rgba(255, 111, 97, 0.1);
	transform: translateX(4px);
}

/* Tablet Layout */
@media (min-width: 768px) {
	.gh-benefits-section {
		padding: 4rem 0;
	}
	
	.gh-benefits-container {
		padding: 0 2rem;
		max-width: min(1200px, calc(100% - 4rem));
	}
	
	.gh-benefits-header {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		margin-bottom: 2.5rem;
	}
	
	.gh-benefits-title {
		font-size: 2.25rem;
	}
	
	.gh-benefits-subtitle {
		font-size: 1rem;
	}
	
	.gh-benefits-cta {
		align-self: flex-start;
		margin-top: 0.5rem;
	}
	
	.gh-benefits-wrapper {
		overflow-x: hidden;
	}
	
	.gh-benefits-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
		max-width: 100%;
	}
	
	.gh-benefit-card {
		padding: 2rem;
		min-height: 120px;
		width: 100%;
		max-width: 100%;
	}
	
	.gh-benefit-icon {
		width: 64px;
		height: 64px;
		min-width: 64px;
		max-width: 64px;
	}
	
	.gh-benefit-title {
		font-size: 1.25rem;
	}
	
	.gh-benefit-sub {
		font-size: 0.9375rem;
	}
}

/* Desktop Layout - Auto-scrolling horizontal container */
@media (min-width: 1024px) {
	.gh-benefits-container {
		padding: 0 2rem;
		max-width: min(1200px, calc(100% - 4rem));
	}
	
	.gh-benefits-wrapper {
		overflow: hidden;
		width: 100%;
		position: relative;
	}
	
	.gh-benefits-grid {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 2rem;
		width: max-content;
		animation: scrollBenefits 30s linear infinite;
		padding: 0 1rem;
	}
	
	.gh-benefits-grid:hover {
		animation-play-state: paused;
	}
	
	.gh-benefit-card {
		flex: 0 0 auto;
		width: 280px;
		min-width: 280px;
		max-width: 280px;
		padding: 2.5rem;
		min-height: 140px;
	}
	
	.gh-benefit-icon {
		width: 72px;
		height: 72px;
		min-width: 72px;
		max-width: 72px;
	}
	
	.gh-benefit-title {
		font-size: 1.375rem;
	}
	
	.gh-benefit-sub {
		font-size: 1rem;
	}
}

/* Auto-scroll animation */
@keyframes scrollBenefits {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(calc(-50% - 1rem));
	}
}

/* Large Desktop - Wider cards in auto-scroll */
@media (min-width: 1280px) {
	.gh-benefits-container {
		padding: 0 2rem;
		max-width: min(1200px, calc(100% - 4rem));
	}
	
	.gh-benefits-grid {
		gap: 2.5rem;
	}
	
	.gh-benefit-card {
		width: 300px;
		min-width: 300px;
		max-width: 300px;
		padding: 2.5rem;
		min-height: 160px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.gh-benefits-section {
		padding: 2rem 0;
	}
	
	.gh-benefits-container {
		padding: 0 1rem;
		max-width: calc(100% - 2rem);
	}
	
	.gh-benefits-title {
		font-size: 1.5rem;
	}
	
	.gh-benefits-grid {
		gap: 1.25rem;
		max-width: 100%;
	}
	
	.gh-benefit-card {
		padding: 1.25rem;
		min-height: 90px;
		width: 100%;
		max-width: 100%;
	}
	
	.gh-benefit-icon {
		width: 48px;
		height: 48px;
		min-width: 48px;
		max-width: 48px;
	}
	
	.gh-benefit-title {
		font-size: 1rem;
	}
	
	.gh-benefit-sub {
		font-size: 0.8125rem;
	}
}

/* Keyboard Navigation Enhancement */
.gh-benefit-card:focus-visible {
	outline: 3px solid var(--gh-accent-2);
	outline-offset: 4px;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(255, 111, 97, 0.2);
}

