/* ==========================================================================
   RS Ning Doctor — Front-end Styles
   Scoped under .rsningdoctor-loop / .rsningdoctor-single to avoid leaking.
   ========================================================================== */

/* ---------- Reset for links inside cards -------------------------------- */
.rsningdoctor-card,
.rsningdoctor-card:hover,
.rsningdoctor-card:focus {
	text-decoration: none;
	color: inherit;
	outline: none;
}

/* ==========================================================================
   LOOP — Grid
   ========================================================================== */

.rsningdoctor-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 60px 48px;
}

/* ==========================================================================
   LOOP — Card
   ========================================================================== */

.rsningdoctor-card {
	display: flex;
	flex-direction: column;
	gap: 31px;
}

.rsningdoctor-card--hidden {
	display: none;
}

/* ---- Image area -------------------------------------------------------- */

.rsningdoctor-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 574 / 409;
	overflow: hidden;
	/* Fallback gradient when no featured image is set */
	background: linear-gradient(135deg, #E7C9A3 0%, #F9F2EF 100%),
	            linear-gradient(180deg, #F4F0EC 0%, #EBE6DC 100%);
	background-size: cover;
	background-position: center;
}

/* Hover overlay */
.rsningdoctor-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(114, 46, 43, 0.70);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.rsningdoctor-card:hover .rsningdoctor-card__overlay,
.rsningdoctor-card.rsningdoctor-card--touched .rsningdoctor-card__overlay {
	opacity: 1;
}

/* "View Profile" label on overlay */
.rsningdoctor-card__viewprofile {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid #fff;
	color: #fff;
	font-family: 'Libertinus Sans', 'Georgia', serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 0.8px;
}

.rsningdoctor-card__viewprofile svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* ---- Info area --------------------------------------------------------- */

.rsningdoctor-card__info {
	display: flex;
	flex-direction: column;
	gap: 31px;
}

.rsningdoctor-card__header {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 20px;
	border-bottom: 1px solid #888;
}

.rsningdoctor-card__title {
	color: #722E2B;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 2.56px;
}

.rsningdoctor-card__name-row {
	display: flex;
	align-items: flex-end;
	gap: 16px;
}

.rsningdoctor-card__name {
	color: #333;
	font-size: 23px;
	font-weight: 500;
	line-height: 29.9px;
	letter-spacing: 2.3px;
}

.rsningdoctor-card__position {
	color: #333;
	font-size: 14px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 2.24px;
}

/* ---- Expert section (shared by card and single) ------------------------ */

.rsningdoctor-card__expert,
.rsningdoctor-single__expert {
	display: flex;
	align-items: flex-start;
	gap: 48px;
}

/* ---- Section label column (shared pattern) ----------------------------- */

.rsningdoctor-section-label,
.rsningdoctor-card__section-label {
	flex-shrink: 0;
	width: 94px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.rsningdoctor-section-label__zh,
.rsningdoctor-card__section-label-zh {
	color: #333;
	font-size: 18px;
	font-weight: 400;
	line-height: 28.8px;
	letter-spacing: 1.8px;
}

.rsningdoctor-section-label__en,
.rsningdoctor-card__section-label-en {
	color: #888;
	font-size: 12px;
	font-weight: 400;
	line-height: 19.2px;
	letter-spacing: 1.2px;
}

/* ---- Pills (expert items) ---------------------------------------------- */
/* 2-column grid; each pill equal width, text centered.                      */

.rsningdoctor-card__pills,
.rsningdoctor-single__pills {
	flex: 1 1 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

.rsningdoctor-card__pill {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	background: #fff;
	border-radius: 9999px;
	outline: 1px solid #DAC2A3;
	outline-offset: -1px;
	color: #333;
	font-size: 14px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 2.24px;
	white-space: nowrap;
}

/* ==========================================================================
   LOOP — Load More
   ========================================================================== */

.rsningdoctor-loadmore {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}

.rsningdoctor-loadmore__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 48px;
	background: transparent;
	border: 1px solid #888;
	border-radius: 0;
	cursor: pointer;
	color: #333;
	font-size: 16px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 1.6px;
	transition: background 0.25s ease, color 0.25s ease;
}

.rsningdoctor-loadmore__btn:hover {
	background: #722E2B;
	border-color: #722E2B;
	color: #fff;
}

.rsningdoctor-loadmore--hidden {
	display: none;
}

/* ==========================================================================
   SINGLE — Top section (image + info)
   ========================================================================== */

.rsningdoctor-single__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 48px;
}

/* ---- Offset image layout ----------------------------------------------- */

.rsningdoctor-single__image-wrapper {
	position: relative;
	flex-shrink: 0;
	width: 470px;
	/* Height = 70px offset + 543px image = 613px */
	aspect-ratio: 470 / 613;
}

.rsningdoctor-single__image-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: calc(100% - 35px);
	height: calc(100% - 70px);
	background: linear-gradient(180deg, #F4F0EC 0%, #EBE6DC 100%);
	border: 1px solid #D5CCC9;
}

.rsningdoctor-single__image {
	position: absolute;
	top: 70px;
	left: 35px;
	width: calc(100% - 35px);
	height: calc(100% - 70px);
	background: linear-gradient(135deg, #E7C9A3 0%, #F9F2EF 100%);
	background-size: cover;
	background-position: center;
}

/* ---- Info panel -------------------------------------------------------- */

.rsningdoctor-single__info {
	flex: 1 1 0;
	max-width: 640px;
	padding-top: 80px;
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.rsningdoctor-single__header {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid #888;
}

.rsningdoctor-single__title {
	color: #722E2B;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 2.56px;
}

.rsningdoctor-single__name-row {
	display: flex;
	align-items: flex-end;
	gap: 16px;
}

.rsningdoctor-single__name {
	color: #333;
	font-size: 32px;
	font-weight: 500;
	line-height: 41.6px;
}

.rsningdoctor-single__position {
	color: #333;
	font-size: 18px;
	font-weight: 400;
	line-height: 28.8px;
	letter-spacing: 1.8px;
}

/* ---- Quote & description ----------------------------------------------- */

.rsningdoctor-single__text-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rsningdoctor-single__quote {
	color: #333;
	font-family: 'Noto Sans TC', sans-serif;
	font-size: 23px;
	font-weight: 400;
	line-height: 36.8px;
	letter-spacing: 2.3px;
}

.rsningdoctor-single__desc {
	color: #333;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 2.56px;
}

/* ==========================================================================
   SINGLE — Bottom section (education + certification)
   ========================================================================== */

.rsningdoctor-single__bottom {
	margin-top: 100px;
	display: flex;
	flex-direction: column;
	gap: 47px;
}

.rsningdoctor-single__section {
	display: flex;
	align-items: flex-start;
	gap: 48px;
}

.rsningdoctor-single__certification {
	padding-top: 32px;
	border-top: 1px solid #888;
}

/* ---- Dot-list items ---------------------------------------------------- */

.rsningdoctor-single__items {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
}

.rsningdoctor-single__items--two-col {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px 40px;
}

.rsningdoctor-single__item {
	display: flex;
	align-items: center;
	gap: 15px;
}

.rsningdoctor-single__dot {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	background: #EADFC9;
	border-radius: 50%;
}

.rsningdoctor-single__item > span:last-child {
	color: #333;
	font-size: 14px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 2.24px;
}

/* ==========================================================================
   FEATURED CARD — [rsningdoctor_card id="..."]
   Desktop: image left, content right, 66px gap.
   ========================================================================== */

.rsningdoctor-featured {
	display: flex;
	gap: 66px;
	align-items: stretch;
}

/* ---- Image ------------------------------------------------------------ */

.rsningdoctor-featured__image {
	flex: 1 1 0;
	min-width: 0;
	aspect-ratio: 574 / 594;
	background: linear-gradient(135deg, #E7C9A3 0%, #F9F2EF 100%);
	background-size: cover;
	background-position: center;
}

/* ---- Content area ----------------------------------------------------- */

.rsningdoctor-featured__content {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	gap: 48px;
}

.rsningdoctor-featured__info {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.rsningdoctor-featured__header {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid #888;
}

.rsningdoctor-featured__title {
	color: #722E2B;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 2.56px;
}

.rsningdoctor-featured__name-row {
	display: flex;
	align-items: flex-end;
	gap: 16px;
}

.rsningdoctor-featured__name {
	color: #333;
	font-size: 32px;
	font-weight: 500;
	line-height: 41.6px;
}

.rsningdoctor-featured__position {
	color: #333;
	font-size: 18px;
	font-weight: 400;
	line-height: 28.8px;
	letter-spacing: 1.8px;
}

.rsningdoctor-featured__text-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rsningdoctor-featured__quote {
	color: #333;
	font-family: 'Noto Sans TC', sans-serif;
	font-size: 23px;
	font-weight: 400;
	line-height: 36.8px;
	letter-spacing: 2.3px;
}

.rsningdoctor-featured__desc {
	color: #333;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 2.56px;
}

/* ---- Expert section --------------------------------------------------- */

.rsningdoctor-featured__expert {
	display: flex;
	align-items: flex-start;
	gap: 48px;
}

.rsningdoctor-featured__pills {
	flex: 1 1 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

/* ---- View Profile link ------------------------------------------------ */

.rsningdoctor-featured__viewlink {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid #333;
	color: #333;
	font-family: 'Libertinus Sans', 'Georgia', serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 32px;
	letter-spacing: 0.8px;
	text-decoration: none;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.rsningdoctor-featured__viewlink:hover {
	color: #722E2B;
	border-color: #722E2B;
}

.rsningdoctor-featured__viewlink svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE — Mobile (≤ 768px)
   ========================================================================== */

@media screen and (max-width: 768px) {

	/* Loop grid → 1 column */
	.rsningdoctor-grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}

	/* Card pills: tighter padding on mobile */
	.rsningdoctor-card__pill {
		padding: 8px 16px;
		font-size: 13px;
	}

	/* Expert section: stack label above pills */
	.rsningdoctor-card__expert,
	.rsningdoctor-single__expert,
	.rsningdoctor-single__section,
	.rsningdoctor-featured__expert {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.rsningdoctor-section-label,
	.rsningdoctor-card__section-label {
		width: auto;
	}

	/* Single top: stack vertically */
	.rsningdoctor-single__top {
		flex-direction: column;
		gap: 32px;
	}

	/* Image wrapper scales to full width */
	.rsningdoctor-single__image-wrapper {
		width: 100%;
		max-width: 400px;
	}

	/* Info panel: remove top padding */
	.rsningdoctor-single__info {
		padding-top: 0;
		max-width: 100%;
	}

	/* Single name: smaller */
	.rsningdoctor-single__name {
		font-size: 26px;
		line-height: 34px;
	}

	/* Bottom gap: tighter */
	.rsningdoctor-single__bottom {
		margin-top: 60px;
		gap: 32px;
	}

	/* Two-column sections → 1 column on mobile */
	.rsningdoctor-single__items--two-col {
		grid-template-columns: 1fr;
	}

	/* Featured card: stack vertically on mobile */
	.rsningdoctor-featured {
		flex-direction: column;
		gap: 32px;
	}

	.rsningdoctor-featured__image {
		/* Override aspect-ratio stretch from align-items:stretch in row mode */
		aspect-ratio: 574 / 594;
	}

	.rsningdoctor-featured__name {
		font-size: 26px;
		line-height: 34px;
	}
}
