/* ==========================================================================
   Trigg Island SLSC — homepage roll-over panels
   Each panel sticks when its bottom meets the viewport bottom (top is set by
   js/home-rollover.js); the next panel slides up over it.
   ========================================================================== */

.tgi-rollover .tgi-roll__panel {
	--tgi-roll-radius: 0px; /* square tops (was clamp(18px, 2.5vw, 32px) for rounded) */
	position: sticky;
	top: 0;
	background: #fff;
	overflow: clip;
	transform-origin: 50% 100%;
	transform: scale(calc(1 - var(--tgi-roll, 0) * 0.05));
	will-change: transform;
}

/* Every panel after the first overlaps the one above with rounded top corners. */
.tgi-rollover .tgi-roll__panel + .tgi-roll__panel {
	margin-top: calc(var(--tgi-roll-radius) * -1);
	padding-top: var(--tgi-roll-radius);
	border-radius: var(--tgi-roll-radius) var(--tgi-roll-radius) 0 0;
	box-shadow: 0 -22px 44px -24px rgba(19, 40, 62, 0.45);
}

.tgi-rollover .tgi-roll__panel:nth-child(1) { z-index: 1; }
.tgi-rollover .tgi-roll__panel:nth-child(2) { z-index: 2; }
.tgi-rollover .tgi-roll__panel:nth-child(3) { z-index: 3; }
.tgi-rollover .tgi-roll__panel:nth-child(4) { z-index: 4; }
.tgi-rollover .tgi-roll__panel:nth-child(5) { z-index: 5; }

/* Community + shop banner panel: room at the bottom so the partners curve doesn't cover the banner. */
.tgi-rollover .tgi-roll__panel--shop .tgi-shop { margin-bottom: 0; padding-top: 8px; padding-bottom: calc(var(--tgi-roll-radius) + clamp(24px, 3vw, 40px)); }

/* Partners panel. */
.tgi-rollover .tgi-roll__panel--partners { padding-top: 0; background: #f6f4ef; }

/* Acknowledgement + footer (added by footer.php) roll over the partners. */
.tgi-rollover .tgi-roll__panel--footer { padding-top: 0; background: #00a94e; }
.tgi-rollover .tgi-roll__panel--footer .acknowledgement { margin-top: 0; }

/* The red panel holds the Updates + Subscribe sections. */
.tgi-rollover .tgi-roll__panel--red { background: #e51836; }

/* The last panel (shop + partners) just scrolls over; nothing covers it. */
.tgi-rollover .tgi-roll__panel--last {
	position: relative;
	transform: none;
}

/* Darken the panel being covered. */
.tgi-rollover .tgi-roll__panel::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #13283e;
	opacity: calc(var(--tgi-roll, 0) * 0.35);
	pointer-events: none;
	border-radius: inherit;
}
.tgi-rollover .tgi-roll__panel--last::after { display: none; }

@media (prefers-reduced-motion: reduce) {
	.tgi-rollover .tgi-roll__panel { transform: none; will-change: auto; }
	.tgi-rollover .tgi-roll__panel::after { display: none; }
}
