/* Instagram strip above the footer (inc/instagram-feed.php) + lightbox. */
.hypro-ig {
	padding-block: 56px 48px;
	background: #fff;
	color: var(--hypro-near-black, #0c0c0a);
	font-family: var(--hypro-font-ui, 'DM Sans', sans-serif);
	overflow: hidden;
}

.hypro-ig__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.hypro-ig__title {
	margin: 0;
	font-size: clamp(1.25rem, 2.2vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.01em;
}

.hypro-ig__handle {
	color: var(--hypro-blue, #1526be);
	font-weight: 700;
	text-decoration: none;
}

.hypro-ig__handle:hover,
.hypro-ig__handle:focus-visible {
	text-decoration: underline;
}

/* Sliding strip: JS clones the items once and the track loops by -50%. */
.hypro-ig__viewport {
	overflow: hidden;
}

.hypro-ig__track {
	display: flex;
	gap: 12px;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hypro-ig.is-sliding .hypro-ig__track {
	animation: hypro-ig-slide var(--hypro-ig-duration, 60s) linear infinite;
}

.hypro-ig.is-sliding .hypro-ig__viewport:hover .hypro-ig__track,
.hypro-ig.is-sliding .hypro-ig__viewport:focus-within .hypro-ig__track {
	animation-play-state: paused;
}

@keyframes hypro-ig-slide {
	to {
		transform: translateX(calc(-50% - 6px)); /* half the strip + half the gap */
	}
}

/* Reduced motion: no auto-slide, the strip scrolls by hand instead. */
@media (prefers-reduced-motion: reduce) {
	.hypro-ig__viewport {
		overflow-x: auto;
	}

	.hypro-ig.is-sliding .hypro-ig__track {
		animation: none;
	}
}

.hypro-ig__item {
	flex: 0 0 auto;
	width: clamp(180px, 22vw, 300px);
}

.hypro-ig__tile {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #eee;
	cursor: zoom-in;
	overflow: hidden;
}

.hypro-ig__tile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.hypro-ig__tile:hover img,
.hypro-ig__tile:focus-visible img {
	transform: scale(1.05);
}

.hypro-ig__tile:focus-visible {
	outline: 3px solid var(--hypro-blue, #1526be);
	outline-offset: -3px;
}

.hypro-ig__play {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(12, 12, 10, 0.65)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E")
		center / 16px no-repeat;
}

/* ── Lightbox ─────────────────────────────────────────────────────────── */
.hypro-ig-lightbox {
	width: min(92vw, 640px);
	max-width: none;
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--hypro-near-black, #0c0c0a);
	font-family: var(--hypro-font-ui, 'DM Sans', sans-serif);
	overflow: hidden;
}

.hypro-ig-lightbox::backdrop {
	background: rgba(12, 12, 10, 0.82);
}

.hypro-ig-lightbox__media {
	display: block;
	width: 100%;
	max-height: 70vh;
	object-fit: contain;
	background: #0c0c0a;
}

.hypro-ig-lightbox__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 20px 20px;
}

.hypro-ig-lightbox__caption {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.hypro-ig-lightbox__link {
	align-self: flex-start;
	color: var(--hypro-blue, #1526be);
	font-weight: 700;
	text-decoration: none;
}

.hypro-ig-lightbox__link:hover,
.hypro-ig-lightbox__link:focus-visible {
	text-decoration: underline;
}

.hypro-ig-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--hypro-near-black, #0c0c0a);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.hypro-ig-lightbox__btn:focus-visible {
	outline: 3px solid var(--hypro-blue, #1526be);
}

.hypro-ig-lightbox__close {
	top: 10px;
	right: 10px;
}

.hypro-ig-lightbox__prev,
.hypro-ig-lightbox__next {
	top: calc(35vh - 20px);
}

.hypro-ig-lightbox__prev {
	left: 10px;
}

.hypro-ig-lightbox__next {
	right: 10px;
}

@media (max-width: 600px) {
	.hypro-ig {
		padding-block: 40px 32px;
	}
}
