/* IMM Social Feed 0.1.0 - cards for the YouTube section of [imm_social_feed].
   Navy #14305E and gold #C9A54A are the site's colours. Nothing here loads a font or an image from outside. */

.imm-sf {
	--imm-sf-navy: #14305e;
	--imm-sf-gold: #c9a54a;
	margin: 0 0 3rem;
}
.imm-sf * {
	box-sizing: border-box;
}
.imm-sf .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.imm-sf__title {
	margin: 0 0 1.25rem;
	color: var(--imm-sf-navy);
}
.imm-sf__subtitle {
	margin: 2rem 0 1rem;
	color: var(--imm-sf-navy);
	font-size: 1.25rem;
}

/* grids: one list per kind; Shorts are vertical (9:16), videos are wide (16:9) */
.imm-sf__grid {
	display: grid;
	gap: 1.5rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.imm-sf__grid--video {
	grid-template-columns: 1fr;
}
.imm-sf__grid--short {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem 1rem;
}
@media screen and (min-width: 600px) {
	.imm-sf__grid--video {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.imm-sf__grid--short {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media screen and (min-width: 1000px) {
	.imm-sf__grid--video {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.imm-sf__grid--short {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.imm-sf__card {
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}
.imm-sf__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 14px;
	background: var(--imm-sf-navy);
	box-shadow: 0 2px 10px rgba(20, 48, 94, 0.15);
	aspect-ratio: 16 / 9;
}
.imm-sf__card--short .imm-sf__media {
	aspect-ratio: 9 / 16;
}
.imm-sf__media img,
.imm-sf__media iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: cover;
}
.imm-sf__media img {
	transition: transform 0.35s ease;
}
.imm-sf__media:hover img,
.imm-sf__media:focus-visible img {
	transform: scale(1.04);
}
.imm-sf__media:focus-visible,
.imm-sf__button:focus-visible,
.imm-sf__name a:focus-visible {
	outline: 3px solid var(--imm-sf-gold);
	outline-offset: 3px;
}

/* play badge, drawn in CSS */
.imm-sf__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 3.5rem;
	height: 3.5rem;
	margin: -1.75rem 0 0 -1.75rem;
	border-radius: 50%;
	background: rgba(20, 48, 94, 0.86);
	box-shadow: 0 0 0 2px #fff;
	transition: background 0.2s ease;
}
.imm-sf__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -0.55rem 0 0 -0.3rem;
	border-style: solid;
	border-width: 0.55rem 0 0.55rem 0.95rem;
	border-color: transparent transparent transparent #fff;
}
.imm-sf__media:hover .imm-sf__play,
.imm-sf__media:focus-visible .imm-sf__play {
	background: var(--imm-sf-gold);
}
.imm-sf__media.is-playing .imm-sf__play {
	display: none;
}

.imm-sf__name {
	margin: 0.75rem 0 0.25rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
}
.imm-sf__name a {
	display: -webkit-box;
	overflow: hidden;
	color: var(--imm-sf-navy);
	text-decoration: none;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.imm-sf__name a:hover {
	text-decoration: underline;
}
.imm-sf__meta {
	margin: 0;
	color: #5a6478;
	font-size: 0.875rem;
}

.imm-sf__empty {
	margin: 0 0 1rem;
}
.imm-sf__more {
	margin: 2rem 0 0;
}
.imm-sf__button {
	display: inline-block;
	padding: 0.75rem 2rem;
	border-radius: 9999px;
	background: var(--imm-sf-navy);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.imm-sf__button:hover,
.imm-sf__button:focus-visible {
	background: var(--imm-sf-gold);
	color: var(--imm-sf-navy);
}

@media (prefers-reduced-motion: reduce) {
	.imm-sf__media img,
	.imm-sf__play,
	.imm-sf__button {
		transition: none;
	}
	.imm-sf__media:hover img,
	.imm-sf__media:focus-visible img {
		transform: none;
	}
}

/* the Instagram feed of the other plugin: only spacing, its own style stays */
.imm-sf--instagram #sb_instagram {
	margin-top: 0;
}
