/* IG Reels Carousel – front end */
.igrc {
	--igrc-n: var(--igrc-mobile, 1);
	--igrc-gap: 16px;
	--igrc-radius: 12px;
	--igrc-tile-radius: 4px;
	--igrc-accent: #fff;
	position: relative;
	box-sizing: border-box;
}
@media (min-width: 600px) { .igrc { --igrc-n: var(--igrc-tablet, 3); } }
@media (min-width: 1024px) { .igrc { --igrc-n: var(--igrc-desktop, 4); } }
.igrc *, .igrc *::before, .igrc *::after { box-sizing: border-box; }

.igrc__stage { position: relative; }
.igrc__viewport { overflow: hidden; }
.igrc__track {
	display: flex;
	gap: var(--igrc-gap);
	margin: 0;
	padding: 0 0 4px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.igrc__track::-webkit-scrollbar { display: none; }
.igrc__track:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.igrc__slide {
	flex: 0 0 calc((100% - (var(--igrc-n) - 1) * var(--igrc-gap)) / var(--igrc-n));
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}
.igrc__media {
	position: relative;
	aspect-ratio: var(--igrc-ratio, 9 / 16);
	overflow: hidden;
	border-radius: var(--igrc-radius);
	background: #111;
}
.igrc__video, .igrc__fallback img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #111;
	cursor: pointer;
}
.igrc__fallback { display: block; width: 100%; height: 100%; }

.igrc__play {
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: var(--igrc-accent);
	cursor: pointer;
	transition: opacity .2s, background .2s;
}
.igrc__play:hover { background: rgba(0, 0, 0, .75); }
.igrc__play:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #000; }
.igrc__icon-pause { display: none; }
.igrc__slide.is-playing .igrc__icon-play { display: none; }
.igrc__slide.is-playing .igrc__icon-pause { display: block; }
.igrc__slide.is-playing .igrc__play { opacity: 0; }
.igrc__slide.is-playing .igrc__play:focus-visible,
.igrc__slide.is-playing .igrc__media:hover .igrc__play { opacity: 1; }

.igrc__caption {
	margin: .6em 0 0;
	font-size: .9em;
	line-height: 1.4;
	overflow-wrap: anywhere;
}
.igrc__link {
	display: inline-block;
	margin-top: .4em;
	font-size: .85em;
}

.igrc__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 50%;
	background: #fff;
	color: #111;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	cursor: pointer;
	transform: translateY(-50%);
}
.igrc__arrow--prev { left: 8px; }
.igrc__arrow--next { right: 8px; }
.igrc__arrow[disabled] { opacity: 0; pointer-events: none; }
.igrc__arrow:focus-visible { outline: 3px solid #2271b1; outline-offset: 2px; }

.igrc__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}
.igrc__footer.has-follow { align-items: stretch; }
.igrc__footer.has-follow .igrc__dots { justify-content: center; }
.igrc__footer.has-follow .igrc-follow,
.igrc__footer.has-follow .igrc-follow-missing { align-self: flex-end; }
/* Wide screens: dots centred, Follow button at the bottom right on the same row. */
@media (min-width: 600px) {
	.igrc__footer.has-follow {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
	}
	.igrc__footer.has-follow .igrc__dots { grid-column: 2; }
	.igrc__footer.has-follow .igrc-follow,
	.igrc__footer.has-follow .igrc-follow-missing { grid-column: 3; justify-self: end; }
}
.igrc__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}
.igrc__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: currentColor;
	opacity: .25;
	cursor: pointer;
}
.igrc__dot[aria-current="true"] { opacity: .85; }
.igrc__dot:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.igrc .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;
}
.igrc-notice {
	padding: 12px 16px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	color: #1e1e1e;
	font-size: 14px;
}
@media (prefers-reduced-motion: reduce) {
	.igrc__track { scroll-behavior: auto; }
	.igrc__play { transition: none; }
}

/* "Paste reel links" mode: Instagram's official embeds (fixed width ~326–540px). */
.igrc--embeds .igrc__track { align-items: flex-start; padding-bottom: 8px; }
.igrc--embeds .igrc__slide {
	flex: 0 0 clamp(min(326px, 100%), calc((100% - (var(--igrc-n) - 1) * var(--igrc-gap)) / var(--igrc-n)), 540px);
}
.igrc--embeds .igrc__slide .instagram-media,
.igrc--embeds .igrc__slide iframe.instagram-media {
	width: 100% !important;
	min-width: 0 !important;
	max-width: 540px !important;
	margin: 0 !important;
}
.igrc__embed {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}
.igrc__embed-fallback {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 420px;
	padding: 24px 16px;
	color: #262626 !important;
	text-align: center;
	text-decoration: none !important;
	font: 600 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: linear-gradient(180deg, #fafafa, #fff);
}
.igrc__embed-icon { color: #c13584; }
.igrc__embed-code { font-weight: 400; font-size: 12px; color: #8e8e8e; }
.igrc__embed-fallback:hover .igrc__embed-text, .igrc__embed-fallback:focus .igrc__embed-text { text-decoration: underline; }
.igrc-editor-note { margin: 0 0 8px; font-size: 12px; color: #757575; }

/* ---- Follow on Instagram button (bottom right, below the carousel) ---- */
.igrc-follow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 999px;
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	color: #fff !important;
	font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(188, 24, 136, .25);
	transition: filter .2s ease, box-shadow .2s ease;
}
.igrc-follow svg { flex: none; }
.igrc-follow:hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(188, 24, 136, .35); }
.igrc-follow:focus-visible { outline: 3px solid #2271b1; outline-offset: 3px; }
.igrc-follow-missing { margin: 0; }

/* ---- Tiles: portrait cover images, stats on hover/focus ---- */
.igrc--tiles .igrc__track { padding-bottom: 0; }
.igrc-tile {
	position: relative;
	display: block;
	aspect-ratio: var(--igrc-ratio, 9 / 16);
	overflow: hidden;
	border-radius: var(--igrc-tile-radius);
	background: #1f1f1f;
	color: #fff !important;
	text-decoration: none !important;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
}
.igrc-tile__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: filter .3s ease, transform .4s ease;
}
.igrc-tile--nocover { background: linear-gradient(160deg, #515bd4 0%, #8134af 35%, #dd2a7b 70%, #feda77 100%); }
.igrc-tile__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: rgba(255, 255, 255, .85);
	transition: opacity .3s ease;
}
.igrc-tile__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	background: rgba(0, 0, 0, .12);
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.igrc-tile__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 26px;
	font-weight: 700;
	font-size: 19px;
	line-height: 1;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.igrc-tile__stat { display: inline-flex; align-items: center; gap: 8px; }
.igrc-tile__stat svg { width: 24px; height: 24px; }
.igrc-tile__stat svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.igrc-tile__view {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 14px;
	text-align: center;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.igrc-tile__play {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	border: 2px solid rgba(255, 255, 255, .9);
}
.igrc-tile__play svg { margin-left: 3px; }

/* Hover (mouse) and keyboard focus. */
.igrc-tile:hover .igrc-tile__img,
.igrc-tile:focus-visible .igrc-tile__img { filter: blur(6px) brightness(.68); transform: scale(1.08); }
.igrc-tile:hover .igrc-tile__overlay,
.igrc-tile:focus-visible .igrc-tile__overlay { opacity: 1; }
.igrc-tile--nocover:hover .igrc-tile__placeholder,
.igrc-tile--nocover:focus-visible .igrc-tile__placeholder { opacity: .25; }
.igrc-tile:focus-visible { outline: 3px solid #fff; outline-offset: -3px; box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .55); }

/* Touch screens (no hover): keep the image sharp and show the stats as a small badge at the bottom. */
@media (hover: none) and (pointer: coarse) {
	.igrc-tile__overlay {
		opacity: 1;
		align-items: flex-end;
		justify-content: flex-start;
		padding: 10px;
		background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .55));
	}
	.igrc-tile__stats { gap: 14px; font-size: 14px; justify-content: flex-start; }
	.igrc-tile__stat svg { width: 17px; height: 17px; }
	.igrc-tile__view-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
	.igrc-tile__play { width: 34px; height: 34px; border-width: 1.5px; }
	.igrc-tile__play svg { width: 18px; height: 18px; margin-left: 2px; }
	.igrc-tile:hover .igrc-tile__img { filter: none; transform: none; }
	.igrc-tile:active .igrc-tile__img { filter: brightness(.8); }
}

@media (prefers-reduced-motion: reduce) {
	.igrc-tile__img, .igrc-tile__overlay, .igrc-tile__placeholder, .igrc-follow { transition: none; }
	.igrc-tile:hover .igrc-tile__img,
	.igrc-tile:focus-visible .igrc-tile__img { transform: none; }
}

/* ---- On-site player (lightbox) ---- */
html.igrc-modal-open, html.igrc-modal-open body { overflow: hidden !important; }
.igrc-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	overscroll-behavior: contain;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	animation: igrc-fade .2s ease;
}
.igrc-modal[hidden] { display: none; }
.igrc-modal *, .igrc-modal *::before, .igrc-modal *::after { box-sizing: border-box; }
@keyframes igrc-fade { from { opacity: 0; } to { opacity: 1; } }
.igrc-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .88); }
.igrc-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 100vh;
	max-height: 100dvh;
	padding: 12px;
	color: #fff;
}
.igrc-modal__top, .igrc-modal__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
}
.igrc-modal__bottom { justify-content: center; min-height: 32px; }
.igrc-modal__counter { font-size: 14px; opacity: .85; }
.igrc-modal__close, .igrc-modal__nav {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.igrc-modal__close { margin-left: auto; background: rgba(255, 255, 255, .14); color: #fff; }
.igrc-modal__close:hover { background: rgba(255, 255, 255, .25); }
.igrc-modal__nav {
	position: absolute;
	top: 50%;
	width: 48px;
	height: 48px;
	background: #fff;
	color: #111;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .4);
	transform: translateY(-50%);
}
.igrc-modal__nav[hidden] { display: none; }
.igrc-modal__nav--prev { left: -60px; }
.igrc-modal__nav--next { right: -60px; }
.igrc-modal__close:focus-visible, .igrc-modal__nav:focus-visible, .igrc-modal__ig:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #2271b1; }
.igrc-modal__stage {
	position: relative;
	width: min(400px, calc(100vw - 24px));
	max-height: calc(100vh - 128px);
	max-height: calc(100dvh - 128px);
	overflow-y: auto;
	overflow-x: hidden;
	border-radius: 8px;
	background: #fff;
	-webkit-overflow-scrolling: touch;
}
.igrc-modal__stage.is-video { width: auto; background: #000; overflow: hidden; }
.igrc-modal__frame { display: block; width: 100%; min-height: 480px; border: 0; background: #fff; }
.igrc-modal__video {
	display: block;
	height: calc(100vh - 128px);
	height: calc(100dvh - 128px);
	max-width: calc(100vw - 24px);
	aspect-ratio: 9 / 16;
	object-fit: contain;
	background: #000;
}
.igrc-modal__ig {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	color: #fff !important;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 2px;
	opacity: .9;
}
.igrc-modal__ig:hover { opacity: 1; }
.igrc-modal .igrc-sr, .igrc-modal__sentinel {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* Phones / narrow screens: arrows move to the bottom bar. */
@media (max-width: 640px) {
	.igrc-modal__dialog { padding: 8px 8px 4px; }
	.igrc-modal__stage { width: calc(100vw - 16px); max-height: calc(100dvh - 120px); }
	.igrc-modal__video { height: auto; max-height: calc(100dvh - 120px); width: calc(100vw - 16px); }
	.igrc-modal__bottom { min-height: 52px; }
	.igrc-modal__nav { top: auto; bottom: 4px; width: 44px; height: 44px; transform: none; }
	.igrc-modal__nav--prev { left: 8px; }
	.igrc-modal__nav--next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .igrc-modal { animation: none; } }
