/*
 * Giltech Premium FAQ – Elementor widget styles.
 * Everything is scoped under .gwfaq-section so it cannot leak into the theme or into the
 * other widgets of this plugin. Values reproduce the original HTML exactly (base rules +
 * "premium UI polish" rules merged). Elementor style controls only change the CSS variables
 * below (or the plain properties of non-stateful elements), so hover / open states always
 * keep working.
 */

.gwfaq-section,
.gwfaq-section *,
.gwfaq-section *::before,
.gwfaq-section *::after {
	box-sizing: border-box;
}

.gwfaq-section {
	--gwfaq-ease: cubic-bezier(.2, .72, .2, 1);

	/* Colour tokens (Elementor controls override these). */
	--gwfaq-bg-top: #fcfcfb;
	--gwfaq-bg-bottom: #f7f7f5;
	--gwfaq-line: #E2E4E6;
	--gwfaq-head-edge: #E2E4E6;
	--gwfaq-head-mid: rgba(49, 95, 168, .28);
	--gwfaq-item-hover: rgba(255, 255, 255, .46);
	--gwfaq-bar-a: #E30613;
	--gwfaq-bar-b: #315FA8;
	--gwfaq-q: #16181B;
	--gwfaq-q-hover: #E30613;
	--gwfaq-q-active: #16181B;
	--gwfaq-i-color: #315FA8;
	--gwfaq-i-bg: #FFFFFF;
	--gwfaq-i-border: #dadde0;
	--gwfaq-i-color-o: #E30613;
	--gwfaq-i-bg-o: #fff5f5;
	--gwfaq-i-border-o: #efc8cc;

	position: relative;
	width: 100%;
	margin: 0;
	padding: 76px clamp(20px, 5vw, 78px) 82px;
	overflow: hidden;
	color: #16181B;
	font-family: "DM Sans", Manrope, Arial, sans-serif;
	text-align: start;
	-webkit-font-smoothing: antialiased;
	background:
		radial-gradient(circle at 94% 8%, rgba(49, 95, 168, .055), transparent 22rem),
		radial-gradient(circle at 5% 92%, rgba(227, 6, 19, .035), transparent 20rem),
		linear-gradient(180deg, var(--gwfaq-bg-top) 0%, var(--gwfaq-bg-bottom) 100%);
}

/* Edge-to-edge: CSS fallback, the script then sets exact pixel values. */
.gwfaq-section.gwfaq-fullwidth {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* Decorative soft glows. */
.gwfaq-section::before {
	content: "";
	position: absolute;
	right: -170px;
	top: -220px;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(49, 95, 168, .06), transparent 68%);
	pointer-events: none;
}

.gwfaq-section::after {
	content: "";
	position: absolute;
	left: -180px;
	bottom: -220px;
	width: 360px;
	height: 360px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(227, 6, 19, .045), transparent 68%);
	pointer-events: none;
}

.gwfaq-section.gwfaq-no-glow {
	background: linear-gradient(180deg, var(--gwfaq-bg-top) 0%, var(--gwfaq-bg-bottom) 100%);
}

.gwfaq-section.gwfaq-no-glow::before,
.gwfaq-section.gwfaq-no-glow::after {
	display: none;
}

.gwfaq-section .gwfaq-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
}

/* ---------- Header ---------- */
.gwfaq-section .gwfaq-head {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 40px;
	margin: 0;
	padding: 0 0 30px;
	border: 0;
}

.gwfaq-section .gwfaq-head::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, var(--gwfaq-head-edge), var(--gwfaq-head-mid), var(--gwfaq-head-edge));
}

.gwfaq-section .gwfaq-kicker {
	margin: 0 0 14px;
	color: #E30613;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.gwfaq-section .gwfaq-title {
	margin: 0;
	padding: 0;
	color: #16181B;
	font-family: inherit;
	font-size: clamp(40px, 5vw, 64px);
	font-style: normal;
	font-weight: 400;
	line-height: .96;
	letter-spacing: -.055em;
	text-transform: none;
}

.gwfaq-section .gwfaq-head-copy {
	max-width: 470px;
	margin: 0;
	padding: 0;
	color: #73777E;
	font-size: 14px;
	line-height: 1.8;
}

/* ---------- List ---------- */
.gwfaq-section .gwfaq-list {
	width: 100%;
	margin: 10px 0 0;
	padding: 0;
	border-top: 1px solid var(--gwfaq-line);
}

.gwfaq-section .gwfaq-item {
	position: relative;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--gwfaq-line);
	transition: background .28s var(--gwfaq-ease);
}

/* Gradient accent bar that grows when an item is open. */
.gwfaq-section .gwfaq-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(180deg, var(--gwfaq-bar-a), var(--gwfaq-bar-b));
	transform: scaleY(0);
	transform-origin: center;
	transition: transform .3s var(--gwfaq-ease);
}

.gwfaq-section .gwfaq-item.gwfaq-open::before {
	transform: scaleY(1);
}

/* ---------- Entrance animation (optional via switch) ---------- */
.gwfaq-section.gwfaq-animate .gwfaq-item {
	opacity: 0;
	transform: translateY(15px);
	animation: gwfaqIn .6s var(--gwfaq-ease) forwards;
}

.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(1)  { animation-delay: .04s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(2)  { animation-delay: .09s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(3)  { animation-delay: .14s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(4)  { animation-delay: .19s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(5)  { animation-delay: .24s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(6)  { animation-delay: .29s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(7)  { animation-delay: .34s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(8)  { animation-delay: .39s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(9)  { animation-delay: .44s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(10) { animation-delay: .49s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(11) { animation-delay: .54s; }
.gwfaq-section.gwfaq-animate .gwfaq-item:nth-child(n+12) { animation-delay: .59s; }

@keyframes gwfaqIn {
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Question button ----------
 * Selector is deliberately (0,3,0): stronger than theme / Elementor-kit button rules such as
 * `.elementor-kit-N button:focus`, but weaker than Elementor's own generated selectors, so the
 * "Row Padding" control can still override it. */
.gwfaq-section .gwfaq-list .gwfaq-question {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) minmax(44px, auto);
	gap: 20px;
	align-items: center;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 22px 6px 22px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--gwfaq-q);
	font-family: inherit;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	letter-spacing: normal;
	line-height: normal;
	text-align: left;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

/* Themes / Elementor kits restyle button states – keep the button itself neutral. */
.gwfaq-section .gwfaq-question:hover,
.gwfaq-section .gwfaq-question:focus,
.gwfaq-section .gwfaq-question:active {
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--gwfaq-q);
	text-decoration: none;
	transform: none;
}

.gwfaq-section .gwfaq-question:focus-visible {
	outline: 2px solid var(--gwfaq-bar-a);
	outline-offset: 2px;
}

.gwfaq-section .gwfaq-number {
	color: #9da1a6;
	font-size: 10px;
	font-weight: 400;
	line-height: normal;
	letter-spacing: .13em;
}

.gwfaq-section .gwfaq-question-text {
	color: var(--gwfaq-q);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: -.015em;
	overflow-wrap: break-word;
	transition: color .2s ease;
}

/* ---------- Toggle button (+) ---------- */
.gwfaq-section .gwfaq-icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--gwfaq-i-border);
	border-radius: 11px;
	background: var(--gwfaq-i-bg);
	box-shadow: 0 4px 12px rgba(20, 22, 25, .035);
	color: var(--gwfaq-i-color);
	font-size: 21px;
	font-weight: 400;
	line-height: normal;
	transition: transform .25s var(--gwfaq-ease), border-color .25s ease, background .25s ease, color .25s ease;
}

/* Hover only on devices that really hover (no sticky hover after a tap on phones). */
@media (hover: hover) {
	.gwfaq-section .gwfaq-item:hover {
		background: var(--gwfaq-item-hover);
	}

	.gwfaq-section .gwfaq-question:hover .gwfaq-question-text {
		color: var(--gwfaq-q-hover);
	}

	.gwfaq-section .gwfaq-question:hover .gwfaq-icon {
		border-color: var(--gwfaq-i-border-h, var(--gwfaq-i-border));
		background: var(--gwfaq-i-bg-h, var(--gwfaq-i-bg));
		color: var(--gwfaq-i-color-h, var(--gwfaq-i-color));
	}
}

/* Open state – declared after the hover rules so it always wins. */
.gwfaq-section .gwfaq-item.gwfaq-open .gwfaq-question-text {
	color: var(--gwfaq-q-active);
}

.gwfaq-section .gwfaq-item.gwfaq-open .gwfaq-icon {
	transform: rotate(45deg);
	border-color: var(--gwfaq-i-border-o);
	background: var(--gwfaq-i-bg-o);
	color: var(--gwfaq-i-color-o);
}

/* ---------- Answer ---------- */
.gwfaq-section .gwfaq-answer {
	display: grid;
	grid-template-rows: 0fr;
	margin: 0;
	padding: 0;
	transition: grid-template-rows .3s var(--gwfaq-ease);
}

/* Collapsed content is also hidden from keyboard / screen readers (links inside answers). */
.gwfaq-section .gwfaq-answer > div {
	min-height: 0;
	overflow: hidden;
	visibility: hidden;
	transition: visibility 0s linear .3s;
}

.gwfaq-section .gwfaq-item.gwfaq-open .gwfaq-answer {
	grid-template-rows: 1fr;
}

.gwfaq-section .gwfaq-item.gwfaq-open .gwfaq-answer > div {
	visibility: visible;
	transition-delay: 0s;
}

.gwfaq-section .gwfaq-answer-text {
	max-width: 820px;
	margin: 0;
	padding: 0 65px 0 72px;
	color: #6f7378;
	font-size: 14px;
	line-height: 1.9;
}

.gwfaq-section .gwfaq-answer-text a {
	color: inherit;
	text-decoration: underline;
}

.gwfaq-section .gwfaq-item.gwfaq-open .gwfaq-answer-text {
	padding-bottom: 24px;
}

/* Numbers hidden: question and answer start at the left edge. */
.gwfaq-section.gwfaq-no-number .gwfaq-question {
	grid-template-columns: minmax(0, 1fr) minmax(44px, auto);
}

.gwfaq-section.gwfaq-no-number .gwfaq-answer-text {
	padding-left: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
	.gwfaq-section {
		padding: 52px 16px 56px;
	}

	.gwfaq-section .gwfaq-head {
		display: block;
	}

	.gwfaq-section .gwfaq-head-copy {
		margin-top: 13px;
		font-size: 12px;
	}

	.gwfaq-section .gwfaq-title {
		font-size: 41px;
	}

	.gwfaq-section .gwfaq-list {
		margin-top: 7px;
	}

	.gwfaq-section .gwfaq-list .gwfaq-question {
		grid-template-columns: 34px minmax(0, 1fr) minmax(34px, auto);
		gap: 12px;
		padding: 17px 0;
	}

	.gwfaq-section .gwfaq-question-text {
		font-size: 14px;
	}

	.gwfaq-section .gwfaq-icon {
		width: 30px;
		height: 30px;
		font-size: 18px;
	}

	.gwfaq-section .gwfaq-answer-text {
		padding: 0 0 0 46px;
		font-size: 12px;
		line-height: 1.75;
	}

	.gwfaq-section .gwfaq-item.gwfaq-open .gwfaq-answer-text {
		padding-bottom: 18px;
	}

	.gwfaq-section.gwfaq-no-number .gwfaq-question {
		grid-template-columns: minmax(0, 1fr) minmax(34px, auto);
	}

	.gwfaq-section.gwfaq-no-number .gwfaq-answer-text {
		padding-left: 0;
	}
}

/* ---------- Very small phones ---------- */
@media (max-width: 380px) {
	.gwfaq-section {
		padding: 44px 14px 48px;
	}

	.gwfaq-section .gwfaq-title {
		font-size: 36px;
	}

	.gwfaq-section .gwfaq-list .gwfaq-question {
		grid-template-columns: 28px minmax(0, 1fr) minmax(30px, auto);
		gap: 10px;
	}

	.gwfaq-section .gwfaq-question-text {
		font-size: 13.5px;
	}

	.gwfaq-section .gwfaq-icon {
		width: 28px;
		height: 28px;
		font-size: 17px;
	}

	.gwfaq-section .gwfaq-answer-text {
		padding-left: 38px;
	}

	.gwfaq-section.gwfaq-no-number .gwfaq-question {
		grid-template-columns: minmax(0, 1fr) minmax(30px, auto);
	}

	.gwfaq-section.gwfaq-no-number .gwfaq-answer-text {
		padding-left: 0;
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.gwfaq-section.gwfaq-animate .gwfaq-item {
		opacity: 1;
		transform: none;
		animation: none;
	}

	.gwfaq-section *,
	.gwfaq-section *::before,
	.gwfaq-section *::after {
		transition: none !important;
	}
}
