/* BlueWave FAQ — scoped under .bw-faq */

/* ---- Section ---- */
.bw-faq {
	background: #d3e3eb;
	padding: 60px 0 130px;
	position: relative;
}

/* ---- Inner container ---- */
.bw-faq__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0;
}

/* ---- Flat 3-row × 2-col grid ----
 *
 * Row 1: eyebrow  (left)  | (empty)       (right)
 * Row 2: heading  (left)  | intro text    (right)
 * Row 3: portrait (left)  | FAQ accordion (right)
 * ---------------------------------------------------------- */
.bw-faq__grid {
	display: grid;
	grid-template-columns: 1fr 1.15fr;
	grid-template-rows: auto auto 1fr;
	column-gap: 64px;
	row-gap: 28px;
	align-items: start;
}

/* ---- Default column placement ---- */
.bw-faq__eyebrow       { grid-column: 1; grid-row: 1; align-self: start; }
.bw-faq__heading       { grid-column: 1; grid-row: 2; align-self: start; }
.bw-faq__portrait-wrap { grid-column: 1; grid-row: 3; align-self: stretch; }
.bw-faq__intro         { grid-column: 2; grid-row: 2; }
.bw-faq__list          { grid-column: 2; grid-row: 3; }

/* ---- Reversed layout ---- */
.bw-faq__grid--reversed .bw-faq__eyebrow,
.bw-faq__grid--reversed .bw-faq__heading,
.bw-faq__grid--reversed .bw-faq__portrait-wrap { grid-column: 2; }

.bw-faq__grid--reversed .bw-faq__intro,
.bw-faq__grid--reversed .bw-faq__list { grid-column: 1; }

/* ---- Eyebrow ---- */
.bw-faq__eyebrow {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 400;
	color: #023c5a;
	margin: 0;
}

/* ---- Heading ---- */
.bw-faq__heading {
	font-size: 49px;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0;
	color: #0b2233;
}

.bw-faq__heading .bw-faq__span {
	/* font-family intentionally omitted — inherits site h1 font */
	font-style: italic;
	font-weight: 400;
	color: #1f6489;
	text-transform: none;
}

/* ---- Intro text ---- */
.bw-faq__intro {
	font-size: 17px;
	color: #2a4154;
	line-height: 1.6;
	margin: 0;
}

.bw-faq__intro p { margin: 0 0 1em; }
.bw-faq__intro p:last-child { margin-bottom: 0; }

/* ---- Accordion list ---- */
.bw-faq__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 100%;
	overflow: hidden;
}

/* ---- Accordion item ---- */
.bw-faq__item {
	background-color: #fff;
	border-radius: 999px;
	transition: border-radius 0.25s ease, background 0.2s ease, box-shadow 0.2s ease;
	border: 1.5px solid transparent;
	overflow: hidden;
	max-width: 100%;
}

.bw-faq__item.is-open {
	background: linear-gradient(140deg, #0a4866 0%, #023c5a 60%, #02283c 100%);
	border-radius: 22px;
	border-color: rgba(2, 60, 90, 0.2);
	box-shadow: 0 18px 50px -25px rgba(2, 60, 90, 0.35);
}

/* ---- Question button ---- */
.bw-faq__q {
	appearance: none;
	-webkit-appearance: none;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	border: 0;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	padding: 18px 24px;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	text-align: left;
	cursor: pointer;
	font-size: 17px;
	color: #023c5a;
	line-height: 1.35;
	white-space: normal !important; /* override any Elementor global button nowrap */
}

/* Text wrapper — takes remaining width, wraps long text, leaves gap before toggle */
.bw-faq__q-text {
	flex: 1 1 0;
	min-width: 0;
	overflow-wrap: break-word;
	word-break: break-word;
	padding-right: 8px; /* breathing room before the toggle */
}

.bw-faq__item.is-open .bw-faq__q {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: #fff !important;
	padding: 22px 26px 12px;
}

/* ---- Toggle icon ---- */
.bw-faq__toggle {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #d3e3eb;
	color: #023c5a;
	display: grid;
	place-items: center;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bw-faq__toggle svg {
	width: 14px;
	height: 14px;
}

.bw-faq__item.is-open .bw-faq__toggle {
	background: #eab26a;
	color: #023c5a;
	transform: rotate(-90deg);
}

/* ---- Answer panel ---- */
.bw-faq__a {
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.35s ease;
}

.bw-faq__item.is-open .bw-faq__a {
	max-height: 500px;
}

.bw-faq__a-inner {
	padding: 0 26px 24px;
	font-size: 16px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
}

/* ---- Portrait wrap (grid item) ---- */
.bw-faq__portrait-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: -35px; /* cancels gap + dots height so wrap doesn't exceed row height */
}

/* ---- Portrait slides container ---- */
.bw-faq__portrait-slides {
	border-radius: 22px;
	overflow: hidden;
	background: linear-gradient(140deg, #d8e6ec 0%, #c2d4dc 60%, #b1c3cd 100%);
	min-height: 360px;
	box-shadow: 0 30px 70px -30px rgba(2, 60, 90, 0.4);
	isolation: isolate;
	position: relative;
	flex: 1;
}

.bw-faq__portrait-slides::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(2, 60, 90, 0.65) 100%);
	z-index: 2;
	pointer-events: none;
}

/* ---- Individual portrait slide (fades in/out) ---- */
.bw-faq__portrait-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

.bw-faq__portrait-slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

.bw-faq__portrait-slide img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* ---- Portrait card (overlaid at bottom of slide) ---- */
.bw-faq__portrait-card {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 24px;
	z-index: 3;
	background: #fff;
	border-radius: 16px;
	padding: 18px 22px;
}

.bw-faq__pc-name {
	font-weight: 700;
	font-size: 16px;
	color: #023c5a;
	letter-spacing: -0.01em;
}

.bw-faq__pc-role {
	font-style: italic;
	font-size: 14px;
	color: #2a4154;
	margin-top: 2px;
}

/* Quote — appears below name/title, left-aligned */
.bw-faq__pc-quote {
	font-style: italic;
	font-size: 14px;
	color: #2a4154;
	line-height: 1.5;
	margin: 10px 0 0;
}

/* ---- Dot navigation (below portrait-slides, flex sibling in portrait-wrap) ---- */
.bw-faq__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.bw-faq__dot {
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: rgba(2, 60, 90, 0.22);
	border: 0;
	padding: 7px !important; /* overrides Elementor global button padding */
	cursor: pointer;
	transition: background 0.2s ease, width 0.2s ease;
}

.bw-faq__dot.is-active {
	background: #023c5a;
	width: 26px;
}

/* ---- Responsive ---- */
@media (max-width: 1023px) {
	.bw-faq__grid {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
	}

	/* Reset explicit grid placement */
	.bw-faq__eyebrow,
	.bw-faq__heading,
	.bw-faq__portrait-wrap,
	.bw-faq__intro,
	.bw-faq__list,
	.bw-faq__grid--reversed .bw-faq__eyebrow,
	.bw-faq__grid--reversed .bw-faq__heading,
	.bw-faq__grid--reversed .bw-faq__portrait-wrap,
	.bw-faq__grid--reversed .bw-faq__intro,
	.bw-faq__grid--reversed .bw-faq__list {
		grid-column: 1 !important;
		grid-row: auto !important;
	}

	/* Stack order: eyebrow → heading → intro → portrait → FAQ */
	.bw-faq__eyebrow       { order: 1; }
	.bw-faq__heading       { order: 2; }
	.bw-faq__intro         { order: 3; }
	.bw-faq__portrait-wrap { order: 4; }
	.bw-faq__list          { order: 5; }

	.bw-faq__portrait-wrap { display: none; }
	.bw-faq__heading { font-size: 38px; }
}

@media (max-width: 767px) {
	/* Replace pill shape with a flat radius so multi-line questions aren't clipped */
	.bw-faq__item {
		border-radius: 18px;
	}
	.bw-faq__q {
		padding: 16px !important; /* overrides Elementor global button padding */
		font-size: 16px;
		align-items: center;
		gap: 12px;
	}
	.bw-faq__item.is-open .bw-faq__q {
		padding: 16px 16px 8px !important;
	}
	.bw-faq__a-inner {
		padding: 0 16px 16px;
	}
}

@media (max-width: 600px) {
	.bw-faq { padding: 40px 0 80px; }
	.bw-faq__heading { font-size: 30px; }
}
