/* ==========================================================================
   Pankaj Yogpeeth: category.css
   A centre's course page (service-category.php). Loads after blog.css,
   whose compact cover, mint field, glass rows and glass sidebar it reuses;
   only the centre's own parts live here (and the programme page's,
   service-subcategory.php, which shares them):
     1. the address in the cover;
     2. programme groups and the course rows' facts, fee, date and Enquire;
     3. the sidebar's dates, centre and other-centre panels;
     4. the questions;
     5. small screens.
   ========================================================================== */

/* 1. The address under the lede */
.pyp-cat-address {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin-top: 8px;
	font-size: 13.5px;
	color: var(--pyp-ink-soft);
}

.pyp-cat-address .bi {
	margin-top: 2px;
	color: var(--pyp-green);
}

/* 2. A programme: its icon, name (to the programme page) and count, then its courses */
.pyp-cat-group + .pyp-cat-group {
	margin-top: clamp(26px, 3vw, 40px);
}

.pyp-cat-group {
	scroll-margin-top: calc(var(--pyp-navbar-h) + 18px);
}

.pyp-cat-group__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.pyp-cat-group__icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: var(--pyp-tile);
	box-shadow: 0 10px 20px -12px rgba(15, 59, 39, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
	color: #fff;
}

.pyp-cat-group__icon .pyp-icon,
.pyp-cat-group__icon svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.pyp-cat-group__title {
	margin: 0;
	font: 500 clamp(19px, 1.6vw, 23px)/1.2 var(--pyp-font-menu);
	color: var(--pyp-forest);
}

.pyp-cat-group__title a {
	color: inherit;
	text-decoration: none;
}

.pyp-cat-group__count {
	margin: 4px 0 0;
	font: 600 10.5px/1 var(--pyp-font-sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pyp-green);
}

.pyp-cat-group__all {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font: 600 13px/1 var(--pyp-font-sans);
	color: var(--pyp-green);
	text-decoration: none;
	white-space: nowrap;
}

.pyp-cat-group__all .bi {
	transition: transform var(--pyp-dur) var(--pyp-ease-out);
}

/* Course photos are wide landscape shots (no text in them): shown at their own shape */
.pyp-cat-course .pyp-blog-post__media {
	aspect-ratio: 16 / 9;
}

.pyp-cat-course .pyp-blog-post__media img {
	object-fit: cover;
}

.pyp-cat-course__facts {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pyp-cat-course__facts li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
	font: 600 11px/1 var(--pyp-font-sans);
	letter-spacing: 0.04em;
	color: var(--pyp-forest);
}

.pyp-cat-course__facts .bi {
	color: var(--pyp-green);
}

.pyp-cat-course__foot {
	position: relative;
	z-index: 2; /* above the stretched title link, so Enquire stays its own button */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px solid rgba(15, 59, 39, 0.08);
}

.pyp-cat-course__price {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin: 0;
}

.pyp-cat-course__price small {
	font: 600 10px/1 var(--pyp-font-sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pyp-ink-soft);
}

.pyp-cat-course__price b {
	font: 600 20px/1 var(--pyp-font-menu);
	color: var(--pyp-forest);
	font-variant-numeric: tabular-nums;
}

.pyp-cat-course__next {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font: 500 13px/1.3 var(--pyp-font-sans);
	color: var(--pyp-ink-soft);
}

.pyp-cat-course__next .bi {
	color: var(--pyp-green);
}

.pyp-cat-course__next span {
	color: var(--pyp-green);
	font-weight: 600;
}

.pyp-cat-course__enquire {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	margin-left: auto;
	padding: 0 6px 0 16px;
	border-radius: 999px;
	background: var(--pyp-tile);
	box-shadow: 0 10px 20px -12px rgba(15, 59, 39, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
	font: 500 14px/1 var(--pyp-font-menu);
	color: #fff;
	text-decoration: none;
	transition: transform 140ms var(--pyp-ease-out), box-shadow var(--pyp-dur) var(--pyp-ease-out);
}

.pyp-cat-course__enquire .bi {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #c8e6a0;
	font-size: 13px;
	color: var(--pyp-forest);
	transition: transform var(--pyp-dur) var(--pyp-ease-out);
}

.pyp-cat-course__enquire:active {
	transform: scale(0.97);
}

.pyp-cat-course__enquire:focus-visible,
.pyp-cat-group__all:focus-visible {
	outline: 2px solid var(--pyp-green);
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.pyp-cat-course__enquire:hover {
		color: #fff;
		box-shadow: 0 14px 26px -12px rgba(15, 59, 39, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
	}

	.pyp-cat-course__enquire:hover .bi,
	.pyp-cat-group__all:hover .bi {
		transform: translateX(3px);
	}

	.pyp-cat-group__title a:hover {
		color: var(--pyp-green);
	}
}

/* 3. Sidebar panels */
.pyp-cat-dates ul,
.pyp-cat-others ul {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pyp-cat-dates a,
.pyp-cat-others a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: 14px;
	color: var(--pyp-forest);
	text-decoration: none;
	transition: background-color var(--pyp-dur-fast) var(--pyp-ease-out);
}

.pyp-cat-dates__day {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	align-content: center;
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.75);
	box-shadow: inset 0 1px 0 #fff, 0 6px 14px -10px rgba(15, 59, 39, 0.5);
}

.pyp-cat-dates__day b {
	font: 600 18px/1 var(--pyp-font-menu);
	color: var(--pyp-forest);
}

.pyp-cat-dates__day small {
	margin-top: 2px;
	font: 600 9.5px/1 var(--pyp-font-sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pyp-green);
}

.pyp-cat-dates__text,
.pyp-cat-others__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.pyp-cat-dates__text b,
.pyp-cat-others__text b {
	font: 500 14.5px/1.25 var(--pyp-font-menu);
	color: var(--pyp-forest);
}

.pyp-cat-dates__text small,
.pyp-cat-others__text small {
	font: 400 12.5px/1.35 var(--pyp-font-sans);
	color: var(--pyp-ink-soft);
}

.pyp-cat-centre__name {
	margin: 0;
	font: 500 17px/1.25 var(--pyp-font-menu);
	color: var(--pyp-forest);
}

.pyp-cat-centre__address {
	margin: 6px 0 0;
	font: 400 13.5px/1.6 var(--pyp-font-sans);
	color: var(--pyp-ink-soft);
}

.pyp-cat-centre__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.pyp-cat-centre__actions a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	border: var(--pyp-glass-edge);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	font: 500 13.5px/1 var(--pyp-font-menu);
	color: var(--pyp-forest);
	text-decoration: none;
	transition: background-color var(--pyp-dur-fast) var(--pyp-ease-out);
}

.pyp-cat-centre__actions .bi {
	color: var(--pyp-green);
}

.pyp-cat-others__icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--pyp-tile);
	color: #fff;
}

.pyp-cat-others__icon .pyp-icon {
	width: 22px;
	height: 22px;
}

.pyp-cat-others a > .bi {
	color: var(--pyp-green);
	transition: transform var(--pyp-dur) var(--pyp-ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.pyp-cat-dates a:hover,
	.pyp-cat-others a:hover,
	.pyp-cat-centre__actions a:hover {
		background: rgba(255, 255, 255, 0.85);
		color: var(--pyp-forest);
	}

	.pyp-cat-others a:hover > .bi {
		transform: translateX(3px);
	}
}

/* 4. Questions: glass rows that open one by one */
.pyp-cat-faq {
	margin-top: clamp(32px, 4vw, 52px);
}

.pyp-cat-faq__list {
	margin-top: 14px;
	padding: 4px 18px;
	border: var(--pyp-glass-edge);
	border-radius: 24px;
	background: var(--pyp-glass-bg);
	-webkit-backdrop-filter: var(--pyp-glass-blur);
	backdrop-filter: var(--pyp-glass-blur);
	box-shadow: var(--pyp-glass-shadow);
}

.pyp-cat-faq__item + .pyp-cat-faq__item {
	border-top: 1px solid rgba(15, 59, 39, 0.08);
}

.pyp-cat-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 0;
	font: 500 16.5px/1.35 var(--pyp-font-menu);
	color: var(--pyp-forest);
	list-style: none;
	cursor: pointer;
}

.pyp-cat-faq__item summary::-webkit-details-marker {
	display: none;
}

.pyp-cat-faq__item summary .bi {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(29, 112, 68, 0.08);
	font-size: 13px;
	color: var(--pyp-green);
	transition: transform 360ms var(--pyp-ease-out), background-color 240ms ease, color 240ms ease;
}

.pyp-cat-faq__item[open] summary .bi {
	background: var(--pyp-green);
	color: #fff;
	transform: rotate(45deg);
}

.pyp-cat-faq__item summary:focus-visible {
	outline: 2px solid var(--pyp-green);
	outline-offset: 2px;
	border-radius: 10px;
}

.pyp-cat-faq__answer {
	padding: 0 44px 16px 0;
	font-size: 15px;
}

.pyp-cat-faq__answer > :first-child { margin-top: 0; }
.pyp-cat-faq__answer > :last-child { margin-bottom: 0; }

/* 4b. A programme's page (service-subcategory.php): the comparison and every date */
.pyp-prog-compare,
.pyp-prog-dates {
	margin-top: clamp(32px, 4vw, 52px);
}

.pyp-prog-compare__wrap {
	margin-top: 14px;
	overflow-x: auto;
	border: var(--pyp-glass-edge);
	border-radius: 24px;
	background: var(--pyp-glass-bg);
	-webkit-backdrop-filter: var(--pyp-glass-blur);
	backdrop-filter: var(--pyp-glass-blur);
	box-shadow: var(--pyp-glass-shadow);
}

.pyp-prog-compare__wrap:focus-visible {
	outline: 2px solid var(--pyp-green);
	outline-offset: 3px;
}

.pyp-prog-compare__table {
	width: 100%;
	min-width: 620px;
	margin: 0;
	border-collapse: collapse;
	font: 400 14px/1.4 var(--pyp-font-sans);
	color: var(--pyp-ink);
}

.pyp-prog-compare__table th,
.pyp-prog-compare__table td {
	padding: 14px 16px;
	text-align: left;
	vertical-align: middle;
}

.pyp-prog-compare__table thead th {
	font: 600 10.5px/1 var(--pyp-font-sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pyp-green);
	border-bottom: 1px solid rgba(15, 59, 39, 0.1);
}

.pyp-prog-compare__table tbody tr + tr > * {
	border-top: 1px solid rgba(15, 59, 39, 0.07);
}

.pyp-prog-compare__table tbody th a {
	font: 500 15px/1.3 var(--pyp-font-menu);
	color: var(--pyp-forest);
	text-decoration: none;
}

.pyp-prog-compare__table td b {
	font: 600 16px/1 var(--pyp-font-menu);
	color: var(--pyp-forest);
	font-variant-numeric: tabular-nums;
}

.pyp-prog-dates__list {
	display: grid;
	gap: 10px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.pyp-prog-date {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	padding: 10px 12px;
	border: var(--pyp-glass-edge);
	border-radius: 20px;
	background: var(--pyp-glass-bg);
	-webkit-backdrop-filter: var(--pyp-glass-blur);
	backdrop-filter: var(--pyp-glass-blur);
	box-shadow: var(--pyp-glass-shadow);
}

.pyp-prog-date__text {
	display: flex;
	flex: 1 1 220px;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.pyp-prog-date__text b {
	font: 500 16px/1.25 var(--pyp-font-menu);
	color: var(--pyp-forest);
}

.pyp-prog-date__text small {
	font: 400 13px/1.4 var(--pyp-font-sans);
	color: var(--pyp-ink-soft);
}

.pyp-prog-date__text .is-low {
	color: var(--pyp-saffron-deep);
	font-weight: 600;
}

.pyp-prog-date__fee {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
}

.pyp-prog-date__fee small {
	font: 600 10px/1 var(--pyp-font-sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pyp-ink-soft);
}

.pyp-prog-date__fee b {
	font: 600 18px/1 var(--pyp-font-menu);
	color: var(--pyp-forest);
	font-variant-numeric: tabular-nums;
}

.pyp-prog-date .pyp-cat-course__enquire {
	margin-left: 0;
}

.pyp-prog-dates__more {
	margin-top: 10px;
}

.pyp-prog-dates__more summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: var(--pyp-glass-edge);
	border-radius: 999px;
	background: var(--pyp-glass-bg);
	box-shadow: var(--pyp-glass-shadow);
	font: 500 14px/1 var(--pyp-font-menu);
	color: var(--pyp-forest);
	list-style: none;
	cursor: pointer;
}

.pyp-prog-dates__more summary::-webkit-details-marker {
	display: none;
}

.pyp-prog-dates__more summary .bi {
	color: var(--pyp-green);
	transition: transform 300ms var(--pyp-ease-out);
}

.pyp-prog-dates__more[open] summary .bi {
	transform: rotate(180deg);
}

.pyp-prog-dates__more[open] summary {
	margin-bottom: 0;
}

.pyp-prog-dates__more summary:focus-visible {
	outline: 2px solid var(--pyp-green);
	outline-offset: 3px;
}

.pyp-prog-date.is-full {
	opacity: 0.6;
}

.pyp-prog-date__full {
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(15, 59, 39, 0.08);
	font: 600 12px/1 var(--pyp-font-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pyp-ink-soft);
}

.pyp-cat-centre__name a {
	color: inherit;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.pyp-prog-compare__table tbody th a:hover,
	.pyp-cat-centre__name a:hover {
		color: var(--pyp-green);
	}
}

@media (max-width: 699.98px) {
	/* the course column stays put while the table scrolls sideways */
	.pyp-prog-compare__table tbody th,
	.pyp-prog-compare__table thead th:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		min-width: 150px;
		background: #f7fbf4;
		box-shadow: 1px 0 0 rgba(15, 59, 39, 0.08);
	}

	.pyp-prog-compare__table th,
	.pyp-prog-compare__table td {
		padding: 12px;
	}

	.pyp-prog-date {
		gap: 10px 12px;
	}

	.pyp-prog-date__fee {
		align-items: flex-start;
		margin-left: 58px;
	}

	.pyp-prog-date .pyp-cat-course__enquire {
		margin-left: auto;
	}
}

/* 4c. All courses (courses.php): each row names its centre and programme; the
   programme and level filters are pills with counts, the chosen one filled */
.pyp-all-where {
	position: relative;
	z-index: 2; /* above the stretched title link */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0;
	font: 600 11px/1.3 var(--pyp-font-sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(15, 59, 39, 0.3);
}

.pyp-all-where a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--pyp-green);
	text-decoration: none;
}

.pyp-all-filter .pyp-blog-tags a {
	gap: 8px;
	padding: 6px 6px 6px 12px;
}

.pyp-all-filter .pyp-blog-tags b {
	min-width: 24px;
	padding: 4px 7px;
	font-size: 11px;
}

.pyp-all-filter .pyp-blog-tags a.is-on {
	border-color: transparent;
	background: var(--pyp-tile);
	color: #fff;
}

.pyp-all .pyp-blog-list__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px 16px;
}

@media (hover: hover) and (pointer: fine) {
	.pyp-all-where a:hover {
		color: var(--pyp-forest);
	}

	.pyp-all-filter .pyp-blog-tags a.is-on:hover {
		background: var(--pyp-tile);
		color: #fff;
	}
}

/* Phones and tablets: the filters as sideways rows of pills above the courses */
@media (max-width: 991.98px) {
	.pyp-all-filter {
		order: 2;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	.pyp-all-filter .pyp-blog-panel__title {
		margin-bottom: 8px;
	}

	.pyp-all-filter .pyp-blog-tags {
		flex-wrap: nowrap;
		margin-inline: calc(-1 * var(--pyp-gutter));
		padding: 2px var(--pyp-gutter) 6px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.pyp-all-filter .pyp-blog-tags::-webkit-scrollbar {
		display: none;
	}

	.pyp-all-filter .pyp-blog-tags a {
		flex: none;
		white-space: nowrap;
		border: var(--pyp-glass-edge);
		background: var(--pyp-glass-bg);
		box-shadow: var(--pyp-glass-shadow);
	}

	.pyp-all-filter .pyp-blog-sort {
		max-width: 320px;
	}
}

/* 5. Below 992px the sidebar dissolves (blog.css): the programmes become pills above the
   courses, and the dates, centre and other centres follow the courses */
@media (max-width: 991.98px) {
	.pyp-cat-dates,
	.pyp-cat-centre,
	.pyp-cat-others {
		order: 4;
	}

	.pyp-cat-side > * + * {
		margin-top: 0;
	}

	.pyp-cat .pyp-blog-layout {
		row-gap: 14px;
	}
}

@media (max-width: 699.98px) {
	.pyp-cat-group__all {
		display: none; /* the programme's name is the link */
	}

	.pyp-cat-course__enquire {
		margin-left: 0;
	}

	.pyp-cat-course__foot {
		justify-content: space-between;
	}

	.pyp-cat-course__next {
		flex-basis: 100%;
		order: -1;
	}

	.pyp-cat-faq__list {
		padding: 2px 14px;
	}

	.pyp-cat-faq__answer {
		padding-right: 0;
	}
}
