/* ==========================================================================
 * RS Ning Treatment UI
 *
 * 1. Care Notes Tabs
 * 2. FAQ Accordion
 * 3. YouTube Carousel
 * ========================================================================== */


/* ==========================================================================
 * 1. CARE NOTES TABS
 * ========================================================================== */

.rsning-care-notes {
	background: #F4F0EC;
	padding: 70px;
	overflow: hidden;
}

/* ── Tab bar wrapper (with bottom divider) ── */

.rsning-care-notes__tabs-wrapper {
	padding-bottom: 40px;
	border-bottom: 1px solid #BEBDB9;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.rsning-care-notes__tabs-wrapper::-webkit-scrollbar {
	display: none;
}

/* ── Pill-shaped tab bar ── */

.rsning-care-notes__tabs {
	display: flex;
	width: fit-content;
	margin: 0 auto;
	background: #fff;
	box-shadow: 1px 4px 20px rgba(136, 136, 136, 0.25);
	border-radius: 27px;
	align-items: center;
}

/* ── Individual tab button ── */

.rsning-care-notes__tab {
	padding: 10px 60px;
	border-radius: 25px;
	text-align: center;
	color: #24292A;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 2.56px;
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease;
	white-space: nowrap;
	border: none;
	background: transparent;
	font-family: inherit;
	flex-shrink: 0;
}

.rsning-care-notes__tab:hover {
	opacity: 0.75;
}

.rsning-care-notes__tab.is-active {
	background: #722E2B;
	color: #fff;
	letter-spacing: 1.6px;
}

.rsning-care-notes__tab.is-active:hover {
	opacity: 1;
}

/* ── Content panels ── */

.rsning-care-notes__panels {
	margin-top: 48px;
}

.rsning-care-notes__panel {
	display: none;
	color: #888;
	font-size: 16px;
	line-height: 32px;
	letter-spacing: 1.6px;
}

.rsning-care-notes__panel.is-active {
	display: block;
}

/* ── Responsive: tabs scroll horizontally on small screens ── */

@media (max-width: 991px) {
	.rsning-care-notes {
		padding: 40px 24px;
	}

	.rsning-care-notes__tab {
		padding: 10px 32px;
		font-size: 14px;
	}
}

@media (max-width: 575px) {
	.rsning-care-notes {
		padding: 32px 16px;
	}

	.rsning-care-notes__tab {
		padding: 8px 20px;
		font-size: 13px;
		letter-spacing: 1px;
	}

	.rsning-care-notes__tab.is-active {
		letter-spacing: 1px;
	}

	.rsning-care-notes__panels {
		margin-top: 32px;
	}

	.rsning-care-notes__panel {
		font-size: 14px;
		line-height: 28px;
	}
}


/* ==========================================================================
 * 2. FAQ ACCORDION
 * ========================================================================== */

.rsning-faq {
	background: transparent;
}

.rsning-faq__item {
	/* No border on the item wrapper; border lives on the header. */
}

.rsning-faq__item.is-open {
	background: #F4F0EC;
}

/* ── Header button ── */

.rsning-faq__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 28px 24px;
	cursor: pointer;
	background: none;
	border: none;
	border-bottom: 1px solid #BEBDB9;
	width: 100%;
	text-align: left;
	font-family: inherit;
	gap: 16px;
}

/* Open state: header loses its border (answer sits below it). */
.rsning-faq__item.is-open .rsning-faq__header {
	border-bottom: none;
}

.rsning-faq__header:hover {
	opacity: 0.75;
}

/* ── Q label + question text ── */

.rsning-faq__label {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1 1 0;
	min-width: 0;
}

.rsning-faq__q {
	color: #333;
	font-size: 23px;
	font-family: 'Libertinus Sans', serif;
	font-weight: 400;
	line-height: 36.8px;
	letter-spacing: 2.3px;
	flex-shrink: 0;
}

.rsning-faq__question {
	color: #333;
	font-size: 16px;
	font-weight: 400;
	line-height: 25.6px;
	letter-spacing: 1.6px;
}

/* ── Chevron icon ── */

.rsning-faq__icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

/* Open state: rotate chevron to point up */
.rsning-faq__item.is-open .rsning-faq__icon {
	transform: rotate(180deg);
}

/* ── Answer panel ── */

.rsning-faq__answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease;
}

.rsning-faq__item.is-open .rsning-faq__answer {
	/* JS sets the exact max-height; this is a fallback. */
	max-height: 2000px;
}

.rsning-faq__answer-inner {
	padding: 32px 24px;
	color: #333;
	font-size: 16px;
	line-height: 25.6px;
	letter-spacing: 1.6px;
}

/* ── Responsive ── */

@media (max-width: 575px) {
	.rsning-faq__header {
		padding: 20px 16px;
	}

	.rsning-faq__q {
		font-size: 20px;
	}

	.rsning-faq__question {
		font-size: 14px;
	}

	.rsning-faq__answer-inner {
		padding: 24px 16px;
		font-size: 14px;
		line-height: 24px;
	}
}


/* ==========================================================================
 * 3. YOUTUBE CAROUSEL
 * ========================================================================== */

.rsning-yt-carousel {
	position: relative;
}

/* Wrapper adds horizontal padding so arrows sit outside the slides. */
.rsning-yt-carousel__wrapper {
	position: relative;
	padding: 0 90px; /* 60px arrow + 30px gap */
}

/* ── Slide ── */

.rsning-yt-carousel__slide {
	position: relative;
	aspect-ratio: 367 / 206;
	overflow: hidden;
	cursor: pointer;
	border-radius: 0;
}

.rsning-yt-carousel__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Play button overlay ── */

.rsning-yt-carousel__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 93px;
	height: 93px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 9999px;
	border: 1px solid #fff;
	pointer-events: none;
}

/* Hide play button when iframe is embedded */
.rsning-yt-carousel__slide.is-playing .rsning-yt-carousel__play {
	display: none;
}

/* ── Embedded iframe (replaces thumbnail on click) ── */

.rsning-yt-carousel__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ── Navigation arrows ── */

.rsning-yt-carousel__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 60px;
	height: 60px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease;
}

.rsning-yt-carousel__nav:hover {
	opacity: 0.8;
}

.rsning-yt-carousel__nav svg {
	display: block;
	width: 60px;
	height: 60px;
}

.rsning-yt-carousel__prev {
	left: 0;
}

.rsning-yt-carousel__next {
	right: 0;
}

/* Flip the right arrow 180 degrees */
.rsning-yt-carousel__next svg {
	transform: rotate(180deg);
}

/* ── Swiper overrides (scoped to this instance) ── */

.rsning-yt-swiper .swiper-slide {
	height: auto;
}

/* ── Responsive ── */

@media (max-width: 1199px) {
	.rsning-yt-carousel__wrapper {
		padding: 0 80px;
	}
}

@media (max-width: 991px) {
	.rsning-yt-carousel__wrapper {
		padding: 0 70px;
	}

	.rsning-yt-carousel__play {
		width: 64px;
		height: 64px;
	}

	.rsning-yt-carousel__nav svg {
		width: 48px;
		height: 48px;
	}
}

@media (max-width: 575px) {
	.rsning-yt-carousel__wrapper {
		padding: 0 50px;
	}

	.rsning-yt-carousel__play {
		width: 48px;
		height: 48px;
	}

	.rsning-yt-carousel__nav svg {
		width: 40px;
		height: 40px;
	}
}
