/**
 * AAA Faith Journey Shortcode Styles
 *
 * @package AAA_Templates
 */

/* ──────────────────────────────────────────
   Container
   ────────────────────────────────────────── */
.aaa-faith-journey {
	font-family: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ──────────────────────────────────────────
   Tab trigger cards
   ────────────────────────────────────────── */
.aaa-faith-journey__tabs {
	display: flex;
	gap: 20px;
	margin-bottom: 0;
}

.aaa-faith-journey__tab {
	--tabGirth: 12px;
	flex: 1;
	display: flex;
	padding: 0;
	/* Inactive: solid panel tint with a hard 16px white strip at the bottom,
	   so the tab visually detaches from the panel's #F0F7FD surface. */
	background: linear-gradient(180deg, #F0F7FD calc(100% - 16px), #FFFFFF calc(100% - 16px));
	border: none;
	border-radius: 0;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	position: relative;
	transition: background 0.25s ease;
	/* Same folder-tab silhouette for every tab — rounded top corners,
	   inverse rounded bottom corners. Inactive tabs pair visually with
	   the panel via their fill colour alone, not their shape. */
	clip-path: shape(
		from bottom left,
		curve to var(--tabGirth) calc(100% - var(--tabGirth)) with var(--tabGirth) 100%,
		vline to var(--tabGirth),
		curve to calc(var(--tabGirth) * 2) 0 with var(--tabGirth) 0,
		hline to calc(100% - calc(var(--tabGirth) * 2)),
		curve to calc(100% - var(--tabGirth)) var(--tabGirth) with calc(100% - var(--tabGirth)) 0,
		vline to calc(100% - var(--tabGirth)),
		curve to 100% 100% with calc(100% - var(--tabGirth)) 100%
	);
}

.aaa-faith-journey__tab-inner {
	display: flex;
	flex-direction: column;
	gap: 38px;
	/* Bottom padding = 24px + 16px white strip so content clears the strip. */
	padding: 24px 32px calc(24px + 16px);
	width: 100%;
}

.aaa-faith-journey__tab.is-active {
	background: #F0F7FD;
	z-index: 1;
}

/* Tab header: icon + label */
.aaa-faith-journey__tab-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.aaa-faith-journey__tab-icon {
	width: 62px;
	height: 62px;
	background: #bf1d2d;
	border: 2.583px solid #ff96a1;
	border-radius: 85.25px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

.aaa-faith-journey__tab-icon img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	display: block;
}

.aaa-faith-journey__tab-label {
	font-size: 16px;
	font-weight: 500;
	color: #1685cd;
	line-height: 1.32;
	white-space: nowrap;
}

/* Tab body: subtitle + description */
.aaa-faith-journey__tab-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.aaa-faith-journey__tab-subtitle {
	font-size: 24px;
	font-weight: 500;
	color: #000;
	margin: 0;
	line-height: 1.2;
	letter-spacing: -0.48px;
}

.aaa-faith-journey__tab-desc {
	font-size: 16px;
	font-weight: 500;
	color: #3f3f3f;
	margin: 0;
	line-height: 1.32;
}

/* ──────────────────────────────────────────
   Tab content panels
   ────────────────────────────────────────── */
.aaa-faith-journey__panels {
	position: relative;
	background: #F0F7FD;
	padding: 32px;
	width: 100vw;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

.aaa-faith-journey__panel {
	display: none;
	max-width: var(--container);
	margin-inline: auto;
}

.aaa-faith-journey__panel.is-active {
	display: block;
}

/* Content heading per tab */
.aaa-faith-journey__content-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 24px;
}

.aaa-faith-journey__content-title {
	font-size: 32px;
	font-weight: 500;
	color: #000;
	margin: 0;
	line-height: 1.4;
}

.aaa-faith-journey__content-desc {
	font-size: 18px;
	font-weight: 500;
	color: #3f3f3f;
	margin: 0;
	line-height: 1.32;
}

/* ──────────────────────────────────────────
   Resource card grid
   ────────────────────────────────────────── */
.aaa-faith-journey__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* ──────────────────────────────────────────
   Resource card
   ────────────────────────────────────────── */
.aaa-faith-journey__card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Card image */
.aaa-faith-journey__card-image {
	position: relative;
	width: 100%;
	height: 399px;
	overflow: hidden;
	background: #b4b4b4;
}

.aaa-faith-journey__card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aaa-faith-journey__card-placeholder {
	width: 100%;
	height: 100%;
}

/* Play button */
.aaa-faith-journey__play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 48px;
	height: 48px;
	background: #fff;
	border: none;
	border-radius: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	z-index: 1;
	padding-left: 3px;
}

.aaa-faith-journey__play-btn:hover {
	transform: translate(-50%, -50%) scale(1.1);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Card content */
.aaa-faith-journey__card-content {
	padding: 24px 6px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 365px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.aaa-faith-journey__card-title {
	font-size: 24px;
	font-weight: 500;
	color: #000;
	margin: 0;
	line-height: 1.2;
	letter-spacing: -0.48px;
}

.aaa-faith-journey__card-excerpt {
	font-size: 16px;
	font-weight: 500;
	color: #3f3f3f;
	margin: 0;
	line-height: 1.56;
}

.aaa-faith-journey__read-more {
	font-weight: 700;
	font-style: italic;
	color: #1685cd;
	text-decoration: none;
}

.aaa-faith-journey__read-more:hover {
	text-decoration: underline;
}

/* ──────────────────────────────────────────
   Video modal
   ────────────────────────────────────────── */
.aaa-faith-journey__modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	align-items: center;
	justify-content: center;
}

.aaa-faith-journey__modal.is-open {
	display: flex;
}

.aaa-faith-journey__modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
}

.aaa-faith-journey__modal-content {
	position: relative;
	width: 90%;
	max-width: 900px;
	z-index: 1;
}

.aaa-faith-journey__modal-close {
	position: absolute;
	top: -48px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 8px;
	z-index: 2;
	transition: opacity 0.2s ease;
}

.aaa-faith-journey__modal-close:hover {
	opacity: 0.7;
}

.aaa-faith-journey__player {
	border-radius: 8px;
	overflow: hidden;
	background: #000;
}

.aaa-faith-journey__player video,
.aaa-faith-journey__player iframe {
	width: 100%;
	display: block;
}

/* ──────────────────────────────────────────
   Responsive — Tablet
   ────────────────────────────────────────── */
@media (max-width: 1024px) {
	.aaa-faith-journey__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.aaa-faith-journey__card-image {
		height: 300px;
	}

	.aaa-faith-journey__tabs {
		gap: 12px;
	}

	.aaa-faith-journey__tab-inner {
		padding: 16px;
	}

	.aaa-faith-journey__tab-subtitle {
		font-size: 20px;
	}

	.aaa-faith-journey__tab-desc {
		font-size: 14px;
	}

	.aaa-faith-journey__panels {
		padding: 24px;
	}
}

/* ──────────────────────────────────────────
   Responsive — Mobile
   ────────────────────────────────────────── */
@media (max-width: 768px) {
	/* Tabs: horizontal scroll */
	.aaa-faith-journey__tabs {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		flex-wrap: nowrap;
		gap: 12px;
		margin-bottom: 24px;
		padding-bottom: 4px;
	}

	.aaa-faith-journey__tabs::-webkit-scrollbar {
		display: none;
	}

	.aaa-faith-journey__tabs {
		-ms-overflow-style: none;
		scrollbar-width: none;
	}

	.aaa-faith-journey__tab {
		min-width: 260px;
		flex-shrink: 0;
		scroll-snap-align: start;
		/* On mobile the tabs scroll horizontally and aren't glued to a panel,
		   so drop the folder-tab silhouette for a normal pill shape. */
		border-radius: 16px;
		clip-path: none;
	}

	.aaa-faith-journey__tab-inner {
		gap: 20px;
		padding: 16px;
	}

	.aaa-faith-journey__tab.is-active {
		background: #F0F7FD;
	}

	.aaa-faith-journey__panels {
		padding: 24px 16px;
	}

	.aaa-faith-journey__tab-subtitle {
		font-size: 18px;
	}

	.aaa-faith-journey__tab-desc {
		font-size: 14px;
	}

	/* Content heading */
	.aaa-faith-journey__content-title {
		font-size: 24px;
	}

	.aaa-faith-journey__content-desc {
		font-size: 16px;
	}

	/* Card grid: horizontal scroll */
	.aaa-faith-journey__grid {
		display: flex;
		gap: 16px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		padding-bottom: 4px;
	}

	.aaa-faith-journey__grid::-webkit-scrollbar {
		display: none;
	}

	.aaa-faith-journey__grid {
		-ms-overflow-style: none;
		scrollbar-width: none;
	}

	.aaa-faith-journey__card {
		min-width: 280px;
		max-width: 280px;
		flex-shrink: 0;
		scroll-snap-align: start;
	}

	.aaa-faith-journey__card-image {
		height: 280px;
	}

	/* Modal: full width */
	.aaa-faith-journey__modal-content {
		width: 95%;
	}
}
