/**
 * New Realm Transportation LLC — FAQ Section Styles
 *
 * Centered native accordion (details/summary) layout.
 *
 * @package NewRealm
 * @since   1.0.0
 */

/* ignoring loop detection */
.faq-section {
	background-color: #f8f9fa; /* Light gray background */
	padding: 4.5rem 0;
	color: var(--color-dark);
}

.faq-section__header {
	text-align: center;
	margin-bottom: 4rem;
}

.faq-section__title {
	font-size: 2.75rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--color-dark);
	margin: 0;
	letter-spacing: -0.75px;
}

/* Accordion Container */
.faq-container {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* Native Accordion Item */
.faq-item {
	background-color: var(--color-white, #ffffff);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius, 8px);
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Summary element (Header click target) */
.faq-item__summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem 2rem;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--color-dark);
	cursor: pointer;
	list-style: none;
	user-select: none;
	transition: color 0.3s ease;
}

/* Hide default summary markers across browsers */
.faq-item__summary::-webkit-details-marker {
	display: none;
}

.faq-item__summary::marker {
	display: none;
}

/* Dynamic Toggle Icon (Plus/Minus transition) */
.faq-item__icon-toggle {
	position: relative;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--color-maroon);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item__icon-toggle::before,
.faq-item__icon-toggle::after {
	content: '';
	position: absolute;
	background-color: currentColor;
	transition: transform 0.3s ease;
}

/* Horizontal line of the plus sign */
.faq-item__icon-toggle::before {
	top: 9px;
	left: 0;
	width: 20px;
	height: 2px;
}

/* Vertical line of the plus sign */
.faq-item__icon-toggle::after {
	top: 0;
	left: 9px;
	width: 2px;
	height: 20px;
}

/* Open Accordion State styling */
.faq-item[open] {
	border-color: rgba(128, 0, 32, 0.15);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.faq-item[open] .faq-item__summary {
	color: var(--color-maroon);
	border-bottom: 1px solid var(--color-border);
}

/* Rotate and hide vertical line to convert Plus to Minus */
.faq-item[open] .faq-item__icon-toggle {
	transform: rotate(180deg);
	color: var(--color-gold);
}

.faq-item[open] .faq-item__icon-toggle::after {
	transform: rotate(90deg);
	opacity: 0;
}

/* Answer Content styling */
.faq-item__content {
	padding: 1.5rem 2rem;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--color-text);
	background-color: #fafbfc;
	animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item__content p {
	margin: 0;
}

/* Smooth opening animation keyframe */
@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Hover effects */
.faq-item:hover {
	border-color: rgba(128, 0, 32, 0.15);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.faq-item__summary:hover {
	color: var(--color-maroon);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media screen and (max-width: 991px) {
	.faq-section {
		padding: 3.5rem 0;
	}
	.faq-section__title {
		font-size: 2.5rem;
	}
}

@media screen and (max-width: 768px) {
	.faq-section {
		padding: 3rem 0;
	}
	.faq-section__title {
		font-size: 2.15rem;
	}
	.faq-item__summary {
		padding: 1.25rem 1.5rem;
		font-size: 1.1rem;
	}
	.faq-item__content {
		padding: 1.25rem 1.5rem;
		font-size: 1rem;
	}
}

@media screen and (max-width: 480px) {
	.faq-section__title {
		font-size: 1.85rem;
	}
}
