/*
 * Media Room page: the videos and link cards. Rob's podcast list keeps the theme's own
 * .audio-page / .audio-item styles; this file only adds what is new, in the same dark look.
 */

.media-room {
	--mr-card: rgba(255, 255, 255, 0.1);
	--mr-card-hover: rgba(255, 255, 255, 0.16);
	--mr-accent: #fdbf56;
	--mr-muted: rgba(255, 255, 255, 0.7);
}

/* Visually hidden, still read by screen readers. */
.mr-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mr-heading {
	margin: 0 0 24px;
	color: #fff;
}

.media-room section {
	margin-top: 72px;
}

/* Jump links under the title. */
.mr-jump {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 8px 0 0;
}

.mr-jump a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	color: #fff;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.mr-jump a:hover,
.mr-jump a:focus-visible {
	color: var(--mr-accent);
	text-decoration: none;
	border-color: var(--mr-accent);
}

/* ---------- Video cards ---------- */

.mr-videos__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.mr-video {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--mr-card);
	border-radius: 12px;
}

.mr-video[hidden] {
	display: none;
}

.mr-video__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
}

.mr-video__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover; /* crops the black bars YouTube adds to its 4:3 thumbnails */
	transition: transform 0.3s ease;
}

.mr-video__media:hover .mr-video__thumb,
.mr-video__media:focus-visible .mr-video__thumb {
	transform: scale(1.03);
}

.mr-video__media:focus-visible {
	outline: 3px solid var(--mr-accent);
	outline-offset: -3px;
}

.mr-video__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	color: #1a1a1a;
	background: var(--mr-accent);
	border-radius: 50%;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease;
}

.mr-video__media:hover .mr-video__icon {
	transform: translate(-50%, -50%) scale(1.08);
}

/* The player that replaces the picture when a reader presses play. */
.mr-video__frame {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.mr-video__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 18px 20px 22px;
}

.mr-video__series {
	margin: 0 0 6px;
	color: var(--mr-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.mr-video__title {
	margin: 0;
	color: #fff;
	font-size: 22px;
	line-height: 1.3;
}

.mr-video__text {
	margin: 10px 0 0;
	color: var(--mr-muted);
	font-size: 15px;
	line-height: 1.5;
}

.mr-video__watch {
	margin-top: auto;
	padding-top: 14px;
	color: #fff;
	font-size: 14px;
	text-decoration: underline;
}

.mr-video__watch:hover {
	color: var(--mr-accent);
}

/* The featured video: large, picture beside the text. */
.mr-featured {
	margin-top: 48px;
}

.mr-video--featured {
	flex-direction: row;
	align-items: stretch;
}

.mr-video--featured .mr-video__media {
	flex: 0 0 62%;
	aspect-ratio: 16 / 9;
}

.mr-video--featured .mr-video__body {
	justify-content: center;
	padding: 32px;
}

.mr-video--featured .mr-video__title {
	font-size: 34px;
}

.mr-video--featured .mr-video__series::before {
	content: "Featured \00b7  ";
}

/* ---------- Series filter ---------- */

.mr-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 28px;
}

.mr-filter[hidden] {
	display: none;
}

.mr-filter__button {
	min-height: 44px;
	padding: 0 20px;
	color: #fff;
	font: inherit;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mr-filter__button:hover {
	border-color: var(--mr-accent);
}

.mr-filter__button[aria-pressed="true"] {
	color: #1a1a1a;
	background: var(--mr-accent);
	border-color: var(--mr-accent);
}

.mr-filter__button:focus-visible {
	outline: 3px solid var(--mr-accent);
	outline-offset: 2px;
}

/* ---------- "More from the ANA" link cards ---------- */

.mr-more__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
}

.mr-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px;
	color: #fff;
	text-decoration: none;
	background: var(--mr-card);
	border-radius: 12px;
	transition: background 0.2s ease;
}

.mr-card:hover,
.mr-card:focus-visible {
	color: #fff;
	text-decoration: none;
	background: var(--mr-card-hover);
}

.mr-card__title {
	font-family: "Oswald", sans-serif;
	font-size: 26px;
	line-height: 1.2;
}

.mr-card__text {
	color: var(--mr-muted);
	font-size: 16px;
	line-height: 1.5;
}

.mr-card__button {
	align-self: flex-start;
	margin-top: auto;
	padding: 8px 18px;
	color: #1a1a1a;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--mr-accent);
	border-radius: 999px;
}

.mr-empty {
	margin-top: 64px;
	color: var(--mr-muted);
	text-align: center;
}

/* ---------- Podcast episodes (Rob's list) ---------- */

.mr-episodes .audio-year-heading {
	margin: 0 0 20px;
	font-size: 32px;
}

.mr-episodes .audio-item__title {
	margin-top: 0;
}

/* ---------- Tablets and phones ---------- */

@media (max-width: 1023px) {
	.mr-videos__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mr-video--featured {
		flex-direction: column;
	}

	.mr-video--featured .mr-video__media {
		flex-basis: auto;
	}

	.mr-video--featured .mr-video__body {
		padding: 22px;
	}

	.mr-video--featured .mr-video__title {
		font-size: 26px;
	}
}

@media (max-width: 639px) {
	.media-room section {
		margin-top: 52px;
	}

	.mr-videos__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.mr-video__title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mr-video__thumb,
	.mr-video__icon {
		transition: none;
	}

	.mr-video__media:hover .mr-video__thumb,
	.mr-video__media:hover .mr-video__icon {
		transform: none;
	}

	.mr-video__media:hover .mr-video__icon {
		transform: translate(-50%, -50%);
	}
}

/* Heading line under the page title: Montserrat, 14px (client feedback, 11/11). */
.media-room .headline p {
	font-family: "Montserrat", "Lato", sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
}

/* ---------- Podcast player (Buzzsprout, newest episode) ---------- */

.mr-podcast {
	margin-top: 56px;
}

/* Buzzsprout puts an iframe in this box; the card keeps a steady height while it loads. */
.mr-podcast__player {
	min-height: 200px;
	padding: 16px;
	background: var(--mr-card);
	border-radius: 10px;
}

.mr-podcast__player iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	border: 0;
}

.mr-podcast__link {
	margin: 14px 0 0;
	font-size: 14px;
}

.mr-podcast__link a {
	color: #fff;
	text-decoration: underline;
}

.mr-podcast__link a:hover,
.mr-podcast__link a:focus-visible {
	color: var(--mr-accent);
}

/* Featured episodes: two players side by side, one under the other on small screens. */
.mr-podcast__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.mr-podcast__grid > :only-child {
	grid-column: 1 / -1;
}

@media (max-width: 899px) {
	.mr-podcast__grid {
		grid-template-columns: 1fr;
	}
}

/* The jump links land below the fixed site header. */
.mr-podcast,
.mr-featured,
.mr-more,
.mr-videos {
	scroll-margin-top: 100px;
}
