/**
 * FAQ page template: page-templates/template-faq.php
 * .gii-page-hero / .gii-page-content are generic (reusable by About / Contact).
 */

/* Header image */
.gii-page-hero {
	padding: 2rem 0 0;
}

.gii-page-hero__banner {
	position: relative;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	border-radius: 10px;
}

.gii-page-hero--image .gii-page-hero__banner {
	min-height: clamp(200px, 28vw, 420px);
	background: #242429;
}

.gii-page-hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gii-page-hero--image .gii-page-hero__banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.15) 100%);
	pointer-events: none;
}

.gii-page-hero__title {
	position: relative;
	z-index: 1;
	max-width: 100%;
	overflow-wrap: anywhere;
	margin: 0;
	color: #242429;
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.gii-page-hero--image .gii-page-hero__title {
	padding: 2rem 2.5rem;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
	.gii-page-hero {
		padding-top: 1.25rem;
	}

	.gii-page-hero__title {
		font-size: 1.75rem;
	}

	.gii-page-hero--image .gii-page-hero__title {
		padding: 1.25rem 1.25rem;
	}
}

/* Body text */
.gii-page-content {
	overflow-wrap: break-word;
	color: #374151;
	font-size: 1rem;
	line-height: 1.7;
}

.gii-page-content > :first-child {
	margin-top: 0;
}

.gii-page-content > :last-child {
	margin-bottom: 0;
}

.gii-page-content p,
.gii-page-content ul,
.gii-page-content ol {
	margin: 0 0 1em;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.gii-page-content ul,
.gii-page-content ol {
	padding-left: 1.5em;
}

.gii-page-content ul {
	list-style: disc;
}

.gii-page-content ol {
	list-style: decimal;
}

.gii-page-content li {
	margin: 0 0 0.35em;
	padding: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	list-style: inherit;
}

.gii-page-content a {
	color: var(--accent, #0080d7);
	text-decoration: underline;
}

/* FAQ */
.gii-faq__body {
	padding: 2.5rem 0 4rem;
}

.gii-faq__intro {
	margin-bottom: 2rem;
	padding: 0 1rem;
}

.gii-faq__list {
	border-top: 1px solid #e5e7eb;
}

.gii-faq__item {
	border-bottom: 1px solid #e5e7eb;
	scroll-margin-top: 90px;
}

.gii-faq__question {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1rem;
	color: #242429;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.gii-faq__question::-webkit-details-marker {
	display: none;
}

.gii-faq__question-text {
	min-width: 0;
	overflow-wrap: anywhere;
}

.gii-faq__question:hover,
.gii-faq__question:focus-visible,
.gii-faq__item[open]:not(.is-closing) .gii-faq__question {
	color: var(--accent, #0080d7);
}

.gii-faq__question:focus-visible {
	outline: 2px solid var(--accent, #0080d7);
	outline-offset: 2px;
}

/* Plus / minus (inherits question color) */
.gii-faq__icon {
	position: relative;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	/* Center on the first line of the question (line-height 1.4). */
	margin-top: calc((1.4em - 1rem) / 2);
}

.gii-faq__icon::before,
.gii-faq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	margin-top: -1px;
	border-radius: 2px;
	background: currentColor;
}

.gii-faq__icon::after {
	transform: rotate(90deg);
}

.gii-faq__item[open]:not(.is-closing) .gii-faq__icon {
	transform: rotate(180deg);
}

.gii-faq__item[open]:not(.is-closing) .gii-faq__icon::after {
	transform: rotate(0deg);
}

.gii-faq__answer {
	overflow: hidden;
}

.gii-faq__answer-inner {
	padding: 0 1rem 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
	.gii-faq__question,
	.gii-page-content a {
		transition: color 0.25s ease;
	}

	.gii-faq__icon,
	.gii-faq__icon::after {
		transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
	}
}

@media (max-width: 640px) {
	.gii-faq__body {
		padding: 1.75rem 0 3rem;
	}

	.gii-faq__question {
		font-size: 1rem;
		padding: 1rem 0.75rem;
	}

	.gii-faq__intro {
		padding: 0 0.75rem;
	}

	.gii-faq__answer-inner {
		padding: 0 0.75rem 1.25rem;
	}
}
