/*
 * Explore our courses (hub/courses.php). Layout from Grace's shell
 * (explore-courses.png): navy band, search, 2-up "Assigned" cards, 4-up
 * course cards. Type, labels and card language are the site's
 * (system.css tokens: --vis-card-title-size, --vis-label-size, --vis-h3-size).
 */

.vh-courses { background: var(--wp--preset--color--navy-900); padding: 16px 0 var(--vis-section-space, 57px); border-top: 1px solid var(--vis-line); }

/* Tools: format checkboxes and search */
.vh-courses__tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 43px; }
.vh-formats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; border: 0; }
.vh-formats__item { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 24px; color: #fff; font-size: 14px; cursor: pointer; }
.vh-formats__item input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.vh-formats__box { width: 13px; height: 13px; border: 1px solid rgb(255 255 255 / 55%); background: transparent; transition: background-color .15s; }
.vh-formats__item.is-online input:checked + .vh-formats__box { background: var(--vh-chip-soft); border-color: var(--vh-chip-soft); }
.vh-formats__item.is-blended input:checked + .vh-formats__box { background: #2f6fb5; border-color: #5b8fd0; }
.vh-formats__item.is-in-person input:checked + .vh-formats__box { background: #041b3f; border-color: rgb(255 255 255 / 55%); box-shadow: inset 0 0 0 2px #041b3f, inset 0 0 0 7px rgb(255 255 255 / 0%); }
.vh-formats__item input:not(:checked) ~ * { opacity: .55; }
.vh-formats__item:has(input:not(:checked)) { color: rgb(255 255 255 / 55%); }
.vh-formats__item:has(input:focus-visible) { outline: 3px solid var(--vh-gold); outline-offset: 3px; }

.vh-search--dark input { background: #1e344e; border-color: rgb(255 255 255 / 32%); color: #fff; }
.vh-search--dark input::placeholder { color: rgb(255 255 255 / 70%); }
.vh-search--dark input:focus { outline: 2px solid var(--vh-gold); outline-offset: 1px; }

/* Groups */
.vh-courses__group + .vh-courses__group { margin-top: 50px; }
.vh-courses .vh-head { margin-bottom: 20px; align-items: flex-end; }
.vh .vh-courses .vh-h2 { font: 600 var(--vis-h3-size)/1.15 var(--wp--preset--font-family--body) !important; color: var(--vis-ink); text-transform: none !important; font-style: normal !important; }
.vh-courses .vh-note { font-size: 14px; color: rgb(255 255 255 / 85%); }
.vh-courses__none { margin-top: 1.5rem; color: rgb(255 255 255 / 80%); }

.vh-courses__assigned { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vh-courses__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.vh-courses [hidden] { display: none !important; }

/* Course card */
.vh-ccard { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--wp--custom--radius--lg); overflow: hidden; box-shadow: var(--vis-shadow); }
/* Labels on cards: the site's one label style */
.vh-ccard .vh-chip, .vh-ccard__go { font-size: var(--vis-label-size) !important; letter-spacing: var(--vis-label-tracking) !important; }
.vh-ccard__media {
	position: relative; aspect-ratio: 16 / 9; margin: 0; overflow: hidden;
	background: repeating-linear-gradient(135deg, #1b3456 0 18px, #213c61 18px 36px);
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
}
.vh-ccard__media img { width: 100%; height: 100% !important; object-fit: cover; }
.vh-ccard__flag { position: absolute; top: 8px; left: 8px; z-index: 1; }
.vh-ccard__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 18px 18px 29px; }
.vh .vh-ccard__title { margin-top: 10px !important; font: 600 var(--vis-card-title-size)/1.25 var(--wp--preset--font-family--body) !important; color: var(--wp--preset--color--navy-900) !important; letter-spacing: -.01em; text-transform: none !important; font-style: normal !important; }
.vh-ccard__title a { color: inherit; text-decoration: none; }
.vh-ccard__title a::after { content: ""; position: absolute; inset: 0; } /* whole card opens the course */
.vh-ccard__title a:focus-visible { outline: none; }
.vh-ccard:has(.vh-ccard__title a:focus-visible) { outline: 3px solid var(--vh-gold); outline-offset: 3px; }
.vh-ccard__text { margin-top: 8px !important; font-size: 14.5px; line-height: 1.45; color: #56657a; text-wrap: wrap !important; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.vh-ccard :is(.vh-ccard__title, .vh-ccard__steps) { text-wrap: wrap !important; }
.vh-ccard__progress { align-self: stretch; margin-top: 20px; }
.vh-ccard__steps { margin-top: 8px !important; font-size: 13.5px; color: #59687d; }
.vh-ccard__go { position: relative; z-index: 1; margin-top: auto; padding-top: 22px; }
.vh-ccard__flag, .vh-ccard .vh-heart { z-index: 2; }

.vh-bar { align-self: stretch; height: 4px; margin-top: 16px; background: #e3e6ea; }
.vh-bar span { display: block; height: 100%; background: var(--wp--preset--color--gold-500); }
.vh-bar--quiet { height: 3px; margin-top: 0; }

/* Assigned: photo left, wider body */
.vh-ccard--wide { display: grid; grid-template-columns: 209px minmax(0, 1fr); min-height: 206px; }
.vh-ccard--wide .vh-ccard__media { aspect-ratio: auto; height: auto; }
.vh-ccard--wide .vh-ccard__body { padding: 19px 20px 22px; }

.vh-ccard--wide .vh-bar { margin-top: 14px; height: 4px; }
.vh-ccard--wide .vh-ccard__go { padding-top: 22px; }

@media (max-width: 1100px) {
	.vh-courses__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vh-courses__assigned { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.vh-courses__tools { flex-direction: column; align-items: stretch; margin-bottom: 32px; }
	.vh-courses .vh-search { width: 100%; }
	.vh-courses__grid { grid-template-columns: 1fr; }
	.vh-ccard--wide { grid-template-columns: 1fr; }
	.vh-ccard--wide .vh-ccard__media { aspect-ratio: 16 / 9; }
}

/* Site h2 rules (system.css) drop the slant and caps on .vh-display headings; put them back here. */
.vh :is(h1, h2, h3).vh-display { font-family: var(--wp--preset--font-family--display) !important; font-style: italic !important; text-transform: uppercase !important; font-weight: 400 !important; letter-spacing: .005em !important; }
