/* ==========================================================================
   Instagram Feed Block (Flexible Content: instagram_feed_block)
   Wraps Smash Balloon [instagram-feed] and styles it to the design.
   Enqueued in functions.php (handle: instagram-feed-block).

   Column count (desktop / tablet / mobile) and number of posts are managed
   by Smash Balloon itself (feed settings / shortcode) via its
   sbi_col_X / sbi_tab_col_X / sbi_mob_col_X classes. This file does NOT
   force grid-template-columns or hide items.
   ========================================================================== */

.instagram-feed-block {
	--ifb-blue: #337dff;
	--ifb-navy: #000072;
	--ifb-white: #ffffff;
	--ifb-icon: #e0e0e0;
	--ifb-gap: 8px;

	padding: 56px 0 64px;
	font-family: assistant, arial, sans-serif;
	background: var(--ifb-white);
}

.instagram-feed-block__inner {
	max-width: 1702px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* ---------- Title ---------- */
.instagram-feed-block__title {
	margin: 0 0 45px;
	font-size: 34px;
	font-weight: 700;
	line-height: 44px;
	color: var(--ifb-blue);
}

/* ---------- Feed container ---------- */
.instagram-feed-block__feed {
	width: 100%;
}

/* ---------- Hashtag ---------- */
.instagram-feed-block__hashtag {
	margin: 46px 0 0;
	font-size: 27px;
	font-weight: 400;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--ifb-navy);
}

/* ---------- CTA (pill) ---------- */
.instagram-feed-block__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 214px;
	height: 56px;
	margin-top: 16px;
	padding: 0 32px;
	border-radius: 1000px;
	background: var(--ifb-blue);
	color: var(--ifb-white);
	font-size: 18px;
	font-weight: 700;
	line-height: 21px;
	text-decoration: none;
}

.instagram-feed-block__cta:hover {
	background: #140a61;
	color: var(--ifb-white);
	text-decoration: none;
}

.instagram-feed-block__cta:focus-visible {
	outline: 3px solid var(--ifb-navy);
	outline-offset: 3px;
}

.instagram-feed-block__cta-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	object-fit: contain;
}

/* ==========================================================================
   Smash Balloon overrides (scoped to this block only)
   ========================================================================== */

/* Reset plugin wrapper spacing/width */
.instagram-feed-block #sb_instagram {
	width: 100% !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
}

/* Hide plugin header + its own buttons (we render our own CTA) */
.instagram-feed-block #sb_instagram .sb_instagram_header,
.instagram-feed-block #sb_instagram #sbi_load,
.instagram-feed-block #sb_instagram .sbi_load_btn,
.instagram-feed-block #sb_instagram .sbi_follow_btn,
.instagram-feed-block #sb_instagram .sbi_photo_wrap .sbi_link,
.instagram-feed-block #sb_instagram .sbi_info,
.instagram-feed-block #sb_instagram .sbi_lightbox_action {
	display: none !important;
}

/* Grid spacing only — column count comes from Smash Balloon
   (sbi_col_X / sbi_tab_col_X / sbi_mob_col_X) */
.instagram-feed-block #sb_instagram #sbi_images {
	gap: var(--ifb-gap) !important;
	width: 100% !important;
	padding: 0 !important;
	float: none !important;
}

.instagram-feed-block #sb_instagram #sbi_images .sbi_item {
	position: relative;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

/* Square tiles, cover crop — overrides plugin's JS inline heights */
.instagram-feed-block #sb_instagram .sbi_photo_wrap,
.instagram-feed-block #sb_instagram .sbi_photo {
	position: relative;
	display: block !important;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-size: cover !important;
	background-position: center !important;
}

.instagram-feed-block #sb_instagram .sbi_photo img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transition: transform .4s ease;
}

.instagram-feed-block #sb_instagram .sbi_photo:hover img {
	transform: scale(1.04);
}

.instagram-feed-block #sb_instagram .sbi_photo:focus-visible {
	outline: 3px solid var(--ifb-blue);
	outline-offset: -3px;
}

/* Video / carousel badge — top corner, light grey (per design) */
.instagram-feed-block #sb_instagram .sbi_playbtn,
.instagram-feed-block #sb_instagram .sbi_carousel {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	left: auto !important;
	bottom: auto !important;
	margin: 0 !important;
	transform: none !important;
	width: 30px !important;
	height: 30px !important;
	color: var(--ifb-icon) !important;
	fill: currentColor !important;
	opacity: 1 !important;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, .35));
	z-index: 2;
}

.instagram-feed-block #sb_instagram .sbi_carousel {
	width: 24px !important;
	height: 24px !important;
}

/* ==========================================================================
   Responsive
   (columns per breakpoint are set in Smash Balloon, not here)
   ========================================================================== */

/* Tablet */
@media (max-width: 991px) {
	.instagram-feed-block {
		padding: 48px 0 56px;
	}

	.instagram-feed-block__title {
		margin-bottom: 32px;
		font-size: 30px;
		line-height: 38px;
	}

	.instagram-feed-block__hashtag {
		margin-top: 36px;
		font-size: 24px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.instagram-feed-block {
		--ifb-gap: 6px;
		padding: 40px 0 48px;
	}

	.instagram-feed-block__title {
		margin-bottom: 24px;
		font-size: 26px;
		line-height: 34px;
	}

	.instagram-feed-block__hashtag {
		margin-top: 28px;
		font-size: 20px;
	}

	.instagram-feed-block__cta {
		min-width: 190px;
		height: 50px;
		font-size: 17px;
	}

	.instagram-feed-block #sb_instagram .sbi_playbtn {
		width: 24px !important;
		height: 24px !important;
	}

	.instagram-feed-block #sb_instagram .sbi_carousel {
		width: 20px !important;
		height: 20px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.instagram-feed-block #sb_instagram .sbi_photo img {
		transition: none;
	}

	.instagram-feed-block #sb_instagram .sbi_photo:hover img {
		transform: none;
	}
}