/**
 * FAQ Accordion Styles
 * 
 * Mobile-first, accessible FAQ accordion with Palette A styling
 *
 * @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;
}

/* FAQ Section - Standardized with other sections */
.gh-faq-section {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 2rem 1rem;
	box-sizing: border-box;
	display: block;
	visibility: visible;
	opacity: 1;
	position: relative;
	background-image: 
		radial-gradient(circle at 10% 20%, rgba(198, 40, 40, 0.04) 0%, transparent 50%),
		radial-gradient(circle at 90% 80%, rgba(255, 111, 97, 0.03) 0%, transparent 50%);
}

/* Mobile: Reduced FAQ section padding to match other sections */
@media (max-width: 767px) {
	.gh-faq-section {
		padding: 1rem 0.875rem;
		max-width: 100%;
	}
}

.gh-faq-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, var(--gh-accent) 20%, var(--gh-accent-2) 50%, var(--gh-accent) 80%, transparent 100%);
	opacity: 0.3;
}

.gh-faq-section::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, var(--gh-accent) 20%, var(--gh-accent-2) 50%, var(--gh-accent) 80%, transparent 100%);
	opacity: 0.3;
}

/* FAQ Header - Enhanced with graphics */
.gh-faq-header {
	margin-bottom: 1.5rem;
	text-align: center;
	position: relative;
	padding: 2rem 1rem;
	background: 
		radial-gradient(circle at 20% 50%, rgba(198, 40, 40, 0.1) 0%, transparent 60%),
		radial-gradient(circle at 80% 50%, rgba(255, 111, 97, 0.08) 0%, transparent 60%),
		linear-gradient(180deg, transparent 0%, rgba(198, 40, 40, 0.05) 100%);
	border-radius: 16px;
	border: 1px solid rgba(198, 40, 40, 0.15);
	box-shadow: 
		inset 0 1px 2px rgba(255, 255, 255, 0.05),
		0 4px 16px rgba(0, 0, 0, 0.25),
		0 0 0 1px rgba(255, 111, 97, 0.1);
	overflow: hidden;
}

.gh-faq-header::after {
	content: '';
	position: absolute;
	top: -50%;
	right: -10%;
	width: 200px;
	height: 200px;
	background: radial-gradient(circle, rgba(255, 111, 97, 0.1) 0%, transparent 70%);
	border-radius: 50%;
	animation: float 6s ease-in-out infinite;
}

@keyframes float {
	0%, 100% {
		transform: translateY(0) translateX(0);
	}
	50% {
		transform: translateY(-20px) translateX(10px);
	}
}

.gh-faq-header-graphic {
	width: 80px;
	height: 80px;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	animation: fadeInDown 0.8s ease-out;
}

.gh-faq-header-graphic svg {
	filter: drop-shadow(0 4px 12px rgba(198, 40, 40, 0.3));
	animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.8;
		transform: scale(1.05);
	}
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Mobile: Consistent spacing - smaller */
@media (max-width: 767px) {
	.gh-faq-header {
		margin-bottom: 1rem;
		padding: 1.25rem 0.75rem 1rem;
		border-radius: 8px;
	}
	
	.gh-faq-header-graphic {
		width: 60px;
		height: 60px;
		margin-bottom: 0.75rem;
	}
	
	.gh-faq-header-graphic svg {
		width: 60px;
		height: 60px;
	}
}

.gh-faq-header-graphic {
	width: 80px;
	height: 80px;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	animation: fadeInDown 0.8s ease-out;
}

.gh-faq-header-graphic svg {
	filter: drop-shadow(0 4px 12px rgba(198, 40, 40, 0.3));
	animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.8;
		transform: scale(1.05);
	}
}

.gh-faq-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent 0%, var(--gh-accent) 50%, transparent 100%);
	border-radius: 16px 16px 0 0;
}

.gh-faq-title {
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.5px;
	color: var(--gh-text);
	position: relative;
	display: inline-block;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile: Smaller FAQ title to match other sections */
@media (max-width: 767px) {
	.gh-faq-title {
		font-size: 1.25rem;
		margin: 0 0 0.375rem 0;
	}
}

.gh-faq-title::after {
	content: '';
	position: absolute;
	bottom: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 3px;
	background: linear-gradient(90deg, var(--gh-accent) 0%, var(--gh-accent-2) 100%);
	border-radius: 2px;
	box-shadow: 0 2px 4px rgba(198, 40, 40, 0.4);
	animation: fadeInUnderline 0.6s ease-out 0.3s both;
}

@keyframes fadeInUnderline {
	from {
		width: 0;
		opacity: 0;
	}
	to {
		width: 60px;
		opacity: 1;
	}
}

/* FAQ Subtitle Line - Standardized */
.gh-faq-subtitle-line {
	margin-top: 0.75rem;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

/* Mobile: Reduced spacing */
@media (max-width: 767px) {
	.gh-faq-subtitle-line {
		margin-top: 0.5rem;
		gap: 0.5rem;
	}
}

.gh-faq-subtitle-line::before,
.gh-faq-subtitle-line::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, var(--gh-accent) 50%, transparent 100%);
	max-width: 80px;
}

.gh-faq-subtitle-line::before {
	background: linear-gradient(90deg, transparent 0%, var(--gh-accent) 100%);
}

.gh-faq-subtitle-line::after {
	background: linear-gradient(90deg, var(--gh-accent) 0%, transparent 100%);
}

.gh-faq-subtitle {
	font-size: 0.875rem;
	color: var(--gh-muted);
	font-weight: 400;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	position: relative;
	padding: 0 0.5rem;
}

/* FAQ List */
.gh-faq-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
}

/* Mobile: Smaller FAQ list gap */
@media (max-width: 767px) {
	.gh-faq-list {
		gap: 0.5rem;
	}
}

/* FAQ Item */
.gh-faq-item {
	margin: 0;
	padding: 0;
	display: block;
	width: 100%;
	min-height: 60px;
	position: relative;
}

.gh-faq-item-wrapper {
	position: relative;
	width: 100%;
}

/* Mobile: Reduce FAQ item spacing and size */
@media (max-width: 767px) {
	.gh-faq-item {
		min-height: 40px;
	}
}

/* FAQ Question Button */
.gh-faq-question {
	width: 100%;
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1.25rem 1rem;
	margin: 0;
	border: none;
	background: 
		linear-gradient(135deg, var(--gh-surface) 0%, rgba(20, 22, 24, 0.95) 100%),
		radial-gradient(circle at 0% 50%, rgba(198, 40, 40, 0.05) 0%, transparent 50%);
	color: var(--gh-text);
	text-align: left;
	cursor: pointer;
	border-radius: 12px;
	border: 1px solid rgba(198, 40, 40, 0.15);
	box-shadow: 
		inset 0 1px 2px rgba(255, 255, 255, 0.05),
		0 2px 8px rgba(0, 0, 0, 0.2),
		0 0 0 0 rgba(198, 40, 40, 0);
	transition: 
		transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.3s ease,
		background 0.3s ease,
		border-color 0.3s ease;
	position: relative;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	overflow: visible;
}

/* Mobile: Smaller FAQ question padding and font */
@media (max-width: 767px) {
	.gh-faq-question {
		padding: 0.625rem 0.625rem;
		font-size: 0.8125rem;
		gap: 0.5rem;
		border-radius: 6px;
		line-height: 1.4;
	}
}

.gh-faq-question::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(198, 40, 40, 0.1), transparent);
	transition: left 0.5s ease;
}

.gh-faq-question:hover::before {
	left: 100%;
}

.gh-faq-question:hover {
	transform: translateY(-3px);
	box-shadow: 
		inset 0 1px 2px rgba(255, 255, 255, 0.08),
		0 6px 20px rgba(0, 0, 0, 0.35),
		0 0 0 3px rgba(198, 40, 40, 0.25),
		0 0 20px rgba(255, 111, 97, 0.15);
	background: 
		linear-gradient(135deg, rgba(20, 22, 24, 0.95) 0%, rgba(20, 22, 24, 0.9) 100%),
		radial-gradient(circle at 0% 50%, rgba(198, 40, 40, 0.12) 0%, transparent 50%);
	border-color: rgba(198, 40, 40, 0.3);
}

.gh-faq-question[aria-expanded="true"] {
	background: 
		linear-gradient(135deg, rgba(198, 40, 40, 0.08) 0%, rgba(255, 111, 97, 0.05) 100%),
		radial-gradient(circle at 0% 50%, rgba(198, 40, 40, 0.1) 0%, transparent 50%);
	border-color: rgba(198, 40, 40, 0.3);
	box-shadow: 
		inset 0 1px 2px rgba(255, 255, 255, 0.08),
		0 4px 16px rgba(0, 0, 0, 0.3),
		0 0 0 2px rgba(255, 111, 97, 0.2),
		0 0 15px rgba(255, 111, 97, 0.1);
}

.gh-faq-question:focus {
	outline: none;
	box-shadow: 
		inset 0 1px 2px rgba(255, 255, 255, 0.05),
		0 0 0 3px rgba(198, 40, 40, 0.4),
		0 2px 4px rgba(0, 0, 0, 0.2);
}

.gh-faq-question:focus-visible {
	outline: 3px solid var(--gh-accent);
	outline-offset: 2px;
}

/* Question Number Icon */
.gh-faq-question-number {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(198, 40, 40, 0.2) 0%, rgba(255, 111, 97, 0.15) 100%);
	border: 2px solid rgba(198, 40, 40, 0.3);
	border-radius: 50%;
	color: var(--gh-accent-2);
	position: relative;
	box-shadow: 
		0 2px 8px rgba(198, 40, 40, 0.2),
		inset 0 1px 2px rgba(255, 255, 255, 0.1);
	transition: all 0.3s ease;
}

.gh-faq-question:hover .gh-faq-question-number {
	background: linear-gradient(135deg, rgba(198, 40, 40, 0.3) 0%, rgba(255, 111, 97, 0.25) 100%);
	border-color: var(--gh-accent-2);
	transform: scale(1.1);
	box-shadow: 
		0 4px 12px rgba(198, 40, 40, 0.3),
		inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.gh-faq-question[aria-expanded="true"] .gh-faq-question-number {
	background: linear-gradient(135deg, var(--gh-accent) 0%, var(--gh-accent-2) 100%);
	border-color: var(--gh-accent-2);
	color: var(--gh-text);
	box-shadow: 
		0 4px 16px rgba(198, 40, 40, 0.4),
		inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.gh-faq-question-number svg {
	width: 100%;
	height: 100%;
}

.gh-faq-question-number text {
	fill: currentColor;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Question Content Wrapper */
.gh-faq-question-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

/* Question Label (Q1., Q2., etc.) */
.gh-faq-question-label {
	font-weight: 700;
	color: var(--gh-accent-2);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	opacity: 0.8;
}

/* Mobile: Smaller FAQ question label and icon */
@media (max-width: 767px) {
	.gh-faq-question-label {
		font-size: 0.75rem;
		min-width: 2rem;
		padding: 0.1875rem 0.375rem;
	}
	
	.gh-faq-icon {
		width: 18px;
		height: 18px;
		padding: 3px;
	}
}

/* Question Text */
.gh-faq-question-text {
	flex: 1;
	font-weight: 500;
}

/* FAQ Icon (chevron) */
.gh-faq-icon {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gh-accent-2);
	background: linear-gradient(135deg, rgba(198, 40, 40, 0.15) 0%, rgba(255, 111, 97, 0.1) 100%);
	border: 1px solid rgba(198, 40, 40, 0.2);
	border-radius: 50%;
	padding: 6px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	box-shadow: 0 2px 6px rgba(198, 40, 40, 0.15);
}

.gh-faq-question:hover .gh-faq-icon {
	background: linear-gradient(135deg, rgba(198, 40, 40, 0.25) 0%, rgba(255, 111, 97, 0.2) 100%);
	border-color: var(--gh-accent-2);
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(198, 40, 40, 0.25);
}

.gh-faq-question[aria-expanded="true"] .gh-faq-icon {
	transform: rotate(180deg);
	background: linear-gradient(135deg, var(--gh-accent) 0%, var(--gh-accent-2) 100%);
	border-color: var(--gh-accent-2);
	color: var(--gh-text);
	box-shadow: 0 4px 16px rgba(198, 40, 40, 0.4);
}

/* FAQ Answer Panel */
.gh-faq-answer {
	overflow: hidden;
	background: 
		linear-gradient(180deg, rgba(20, 22, 24, 0.8) 0%, rgba(20, 22, 24, 0.6) 100%),
		radial-gradient(circle at 10% 50%, rgba(198, 40, 40, 0.1) 0%, transparent 50%);
	border-radius: 0 0 12px 12px;
	margin-top: -8px;
	padding-top: 1.5rem;
	border-left: 3px solid rgba(198, 40, 40, 0.3);
	border-right: 1px solid rgba(198, 40, 40, 0.15);
	border-bottom: 1px solid rgba(198, 40, 40, 0.15);
	box-shadow: 
		inset 0 2px 4px rgba(0, 0, 0, 0.1),
		0 4px 12px rgba(0, 0, 0, 0.2),
		inset 3px 0 0 rgba(255, 111, 97, 0.2);
	position: relative;
	transition: 
		max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.3s ease,
		padding 0.3s ease,
		border-color 0.3s ease;
}

.gh-faq-answer::after {
	content: '';
	position: absolute;
	top: 1.5rem;
	left: 0;
	width: 3px;
	height: calc(100% - 1.5rem);
	background: linear-gradient(180deg, var(--gh-accent-2) 0%, rgba(198, 40, 40, 0.4) 50%, transparent 100%);
	opacity: 0.6;
	border-radius: 0 2px 2px 0;
}

/* Mobile: Smaller FAQ answer padding */
@media (max-width: 767px) {
	.gh-faq-answer {
		margin-top: -6px;
		padding-top: 1rem;
		border-radius: 0 0 6px 6px;
	}
}

.gh-faq-answer::before {
	content: '';
	position: absolute;
	top: 1rem;
	left: 0;
	width: 2px;
	height: calc(100% - 1rem);
	background: linear-gradient(180deg, var(--gh-accent) 0%, rgba(198, 40, 40, 0.3) 100%);
	opacity: 0.6;
}

.gh-faq-answer.gh-faq-hidden {
	max-height: 0;
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
	margin-top: 0;
}

.gh-faq-answer.gh-faq-hidden::before {
	display: none;
}

.gh-faq-answer.gh-faq-open {
	max-height: 2000px;
	opacity: 1;
}

/* Answer Content */
.gh-faq-answer-content {
	padding: 0 1rem 1.5rem 1rem;
	color: var(--gh-muted);
	line-height: 1.8;
	font-size: 0.95rem;
	position: relative;
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.gh-faq-answer-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gh-accent-2);
	background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(198, 40, 40, 0.1) 100%);
	border-radius: 50%;
	padding: 4px;
	margin-top: 0.25rem;
	border: 1px solid rgba(76, 175, 80, 0.2);
	box-shadow: 0 2px 6px rgba(76, 175, 80, 0.15);
}

.gh-faq-answer-icon svg {
	width: 100%;
	height: 100%;
}

.gh-faq-answer-text {
	flex: 1;
	min-width: 0;
}

/* Mobile: Smaller FAQ answer padding and font */
@media (max-width: 767px) {
	.gh-faq-answer-content {
		padding: 0 0.625rem 0.875rem 0.625rem;
		font-size: 0.8125rem;
		line-height: 1.5;
		gap: 0.75rem;
	}
	
	.gh-faq-answer-icon {
		width: 20px;
		height: 20px;
		padding: 3px;
	}
	
	.gh-faq-question-number {
		width: 32px;
		height: 32px;
	}
	
	.gh-faq-icon {
		width: 28px;
		height: 28px;
		padding: 5px;
	}
}

.gh-faq-answer-content::before {
	display: none; /* Removed - using icon instead */
}

.gh-faq-answer-content p {
	margin: 0 0 1rem 0;
}

.gh-faq-answer-content p:last-child {
	margin-bottom: 0;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.gh-faq-question,
	.gh-faq-answer,
	.gh-faq-icon,
	.gh-faq-title::after,
	.gh-faq-question::before {
		transition: none;
		animation: none;
	}
	
	.gh-faq-question::before {
		display: none;
	}
	
	.gh-faq-title::after {
		width: 60px;
		opacity: 1;
	}
	
	.gh-faq-answer.gh-faq-hidden {
		max-height: none;
		opacity: 0;
	}
	
	.gh-faq-answer.gh-faq-open {
		max-height: none;
		opacity: 1;
	}
}

/* Tablet Styles - Reduced to match other sections */
@media (min-width: 768px) {
	.gh-faq-section {
		padding: 2rem 1.5rem;
	}
	
	.gh-faq-header {
		padding: 1.75rem 1.5rem;
		margin-bottom: 1.75rem;
	}
	
	.gh-faq-title {
		font-size: 1.75rem;
	}
	
	.gh-faq-subtitle {
		font-size: 0.9rem;
	}
	
	.gh-faq-list {
		gap: 1rem;
	}
	
	.gh-faq-question {
		padding: 1.25rem 1rem;
		font-size: 1rem;
	}
	
	.gh-faq-answer-content {
		padding: 0 1rem 1.5rem 1rem;
		font-size: 0.95rem;
		gap: 1rem;
	}
}

/* Desktop Styles - Reduced to match other sections */
@media (min-width: 1024px) {
	.gh-faq-section {
		padding: 2.5rem 2rem;
	}
	
	.gh-faq-header {
		padding: 2rem 2rem;
		margin-bottom: 2rem;
	}
	
	.gh-faq-title {
		font-size: 1.875rem;
	}
	
	.gh-faq-title::after {
		width: 70px;
	}
	
	@keyframes fadeInUnderline {
		from {
			width: 0;
			opacity: 0;
		}
		to {
			width: 70px;
			opacity: 1;
		}
	}
	
	.gh-faq-subtitle {
		font-size: 0.9375rem;
	}
	
	.gh-faq-list {
		gap: 1rem;
	}
	
	.gh-faq-question {
		padding: 1.25rem 1.125rem;
		font-size: 1.05rem;
	}
	
	.gh-faq-answer-content {
		padding: 0 1.125rem 1.5rem 1.125rem;
		font-size: 0.95rem;
		gap: 1.25rem;
	}
	
	.gh-faq-answer-icon {
		width: 28px;
		height: 28px;
	}
}

