/* Pippin Ribbon (Figma "Ribbon", Position = Left / Right).
   End piece 92 x 100: blue square on top, red fold. The bar's own navy shows through behind the fold.
   The navy bar starts under the fold (about 68.5px in) and runs to the far edge, so content in it slides under the end piece.
   The 25px under the blue square is transparent; the negative margin lets the next section show through there.
   The caption and tagline sit in a centered column as wide as the boxed content (--container-max-width), so on any
   screen they line up with the page's content while the ribbon itself spans the full width. */

/* Width = Container: the widget spans its container, even in a centered column. */
.elementor-widget-pippin-ribbon {
	align-self: stretch;
	width: 100%;
	max-width: 100%;
}

/* Overlap the section above (ribbon.js sets the negative top margin): paint over that section. */
.elementor-widget-pippin-ribbon.pt-ribbon-overlap-yes {
	position: relative;
	z-index: 3;
}

/* Width = Full screen: break out of any boxed container to the window's edges (minus the scrollbar, see ribbon.js).
   Margins are relative to the container, so (container - window) / 2 on each side lands on the window's edges
   for a container centered in the window. */
.elementor-widget-pippin-ribbon.pt-ribbon-width-full {
	--pt-ribbon-vw: calc(100vw - var(--pt-scrollbar-w, 0px));
	width: var(--pt-ribbon-vw) !important;
	max-width: none !important;
	margin-left: calc((100% - var(--pt-ribbon-vw)) / 2) !important;
	margin-right: calc((100% - var(--pt-ribbon-vw)) / 2) !important;
}

.pt-ribbon {
	--pt-ribbon-navy: var(--color-secondary, #0F1328);
	--pt-ribbon-red: #EE4651;
	--pt-ribbon-blue: #74CEF4;
	--pt-ribbon-end-w: 92px;
	--pt-ribbon-end-h: 100px;
	--pt-ribbon-fold: calc(var(--pt-ribbon-end-w) * 64 / 86); /* the red fold's left edge (x 64 of 86): where the bar starts */
	--pt-ribbon-bar-h: 62px;  /* the end piece's navy strip */
	--pt-ribbon-text-max: var(--container-max-width, 1140px); /* the boxed content width */
	--pt-ribbon-gutter: var(--gutter, 16px); /* text inset when the screen is narrower than the box: the site gutter (Elementor variables gutter / gutter-tablet / gutter-mobile) */
	--pt-ribbon-end-clear: calc(var(--pt-ribbon-end-w) + 16px); /* keeps text out from under the end piece */
	--pt-ribbon-beside: var(--color-surface, #FFFFFF); /* with a drop: the page color beside it, under the end piece */
	--pt-ribbon-drop-radius: 30px;
	--pt-ribbon-drop-color: var(--pt-ribbon-navy); /* the bar's navy */
	--pt-ribbon-drop-light: rgba(118, 208, 244, 0.13); /* the soft spotlight at the top center (Brand- Blue 400, faint) */
	--pt-ribbon-drop-shadow: inset 0 14px 14px -10px rgba(0, 0, 0, 0.55); /* the bar's shadow falling on the drop */
	--pt-ribbon-drop-pad: var(--inset, 2.5rem); /* drop content's bottom padding */
	--pt-ribbon-drop-pad-top: var(--section-xs, 1.25rem); /* drop content's top padding: close under the tagline, so the drop reads as part of the bar */

	position: relative;
	z-index: 2;
	width: 100%;
	margin-bottom: -25px;
}

.pt-ribbon__end {
	position: absolute;
	bottom: 0;
	z-index: 2;
	display: block;
	width: var(--pt-ribbon-end-w);
	height: var(--pt-ribbon-end-h);
	pointer-events: none;
}
.pt-ribbon__end-red { fill: var(--pt-ribbon-red); }
.pt-ribbon__end-blue { fill: var(--pt-ribbon-blue); }

.pt-ribbon--left .pt-ribbon__end { left: 0; }
.pt-ribbon--right .pt-ribbon__end { right: 0; transform: scaleX(-1); }

.pt-ribbon__head { position: relative; } /* the end piece sits against the head (caption + bar), not the drop */
.pt-ribbon__body { display: flex; flex-direction: column; }

/* Text rows (caption, and the tagline inside the bar): full ribbon width, a centered column of the boxed width. */
.pt-ribbon__caption-row,
.pt-ribbon__bar-inner {
	display: flex;
	justify-content: center;
	padding-left: var(--pt-ribbon-gutter);
	padding-right: var(--pt-ribbon-gutter);
}
.pt-ribbon__caption-row { padding-top: 10px; padding-bottom: 10px; }

.pt-ribbon__caption,
.pt-ribbon__tagline {
	box-sizing: border-box;
	flex: 0 1 var(--pt-ribbon-text-max);
	min-width: 0;
	margin: 0;
	color: var(--color-text-on-dark, #F2F2F2);
	font-family: var(--font-base, "Inter"), sans-serif;
}
/* When the screen is too narrow for the column to clear the end piece, pad the text on the end piece's side.
   (100% is the row's content width; (100% - column) / 2, when positive, is the space the centering already leaves.) */
.pt-ribbon--left .pt-ribbon__caption,
.pt-ribbon--left .pt-ribbon__tagline {
	text-align: right;
	padding-left: max(0px, calc(var(--pt-ribbon-end-clear) - var(--pt-ribbon-gutter) - max(0px, (100% - var(--pt-ribbon-text-max)) / 2)));
}
.pt-ribbon--right .pt-ribbon__caption,
.pt-ribbon--right .pt-ribbon__tagline {
	text-align: left;
	padding-right: max(0px, calc(var(--pt-ribbon-end-clear) - var(--pt-ribbon-gutter) - max(0px, (100% - var(--pt-ribbon-text-max)) / 2)));
}

.pt-ribbon__caption {
	font-size: var(--fs-body, 1rem);
	line-height: 1.5;
	letter-spacing: -0.011em;
	text-shadow: 2px 0 2px rgba(0, 0, 0, 0.75);
}

/* The bar: from the fold to the far edge. */
.pt-ribbon__bar {
	display: flex;
	align-items: center;
	min-height: var(--pt-ribbon-bar-h);
	background-color: var(--pt-ribbon-navy);
	overflow: hidden;
}
.pt-ribbon--left .pt-ribbon__bar { margin-left: var(--pt-ribbon-fold); }
.pt-ribbon--right .pt-ribbon__bar { margin-right: var(--pt-ribbon-fold); }

/* Type = Tagline: vertically centered (12px top and bottom, like Figma). The inner row reaches back under the fold
   to the ribbon's full width, so its column lines up with the caption's. */
.pt-ribbon--tagline .pt-ribbon__bar {
	padding-top: 12px;
	padding-bottom: 12px;
}
.pt-ribbon__bar-inner {
	flex: none;
	box-sizing: border-box;
	width: calc(100% + var(--pt-ribbon-fold));
}
.pt-ribbon--left .pt-ribbon__bar-inner { margin-left: calc(-1 * var(--pt-ribbon-fold)); }
.pt-ribbon--right .pt-ribbon__bar-inner { margin-right: calc(-1 * var(--pt-ribbon-fold)); }

.pt-ribbon__tagline {
	font-weight: 600;
	font-size: var(--fs-h3, 1.375rem);
	line-height: 1.1;
	letter-spacing: -0.018em;
}

/* Type = Content: a saved template fills the whole bar, edge to edge, under the end piece. */
.pt-ribbon__content {
	position: relative;
	z-index: 1; /* its own stacking layer, under the end piece (z 2), whatever z-index the template's containers set */
	flex: 1 1 auto;
	align-self: stretch;
	min-width: 0;
	display: flex;
	align-items: center;
}
.pt-ribbon__content > .elementor {
	width: 100%;
}
.pt-ribbon__placeholder {
	margin: 0;
	padding: 0 35px;
	color: var(--color-text-on-dark, #F2F2F2);
	font-family: var(--font-base, "Inter"), sans-serif;
	opacity: 0.7;
}

@media (max-width: 1024px) {
	.pt-ribbon { --pt-ribbon-gutter: var(--gutter-tablet, 16px); }
}

/* Drop: a navy panel hanging below the bar, from the far edge to the fold, like the ribbon continuing down. A soft
   spotlight falls on its top center (centered on the page, not the panel, which starts at the fold) and the bar's
   shadow runs along its top, so it reads as set slightly behind and below the ribbon.
   The strip beside it (under the end piece) is the page color, so the end piece reads the same as when the next
   section shows through. With a drop there's no show-through, so the negative margin is off. */
.pt-ribbon--has-drop { margin-bottom: 0; }
.pt-ribbon--has-drop .pt-ribbon__head::after {
	content: "";
	position: absolute;
	bottom: 0;
	z-index: 1;
	width: var(--pt-ribbon-fold);
	height: 25px; /* the transparent strip under the blue square */
	background-color: var(--pt-ribbon-beside);
}
.pt-ribbon--left.pt-ribbon--has-drop .pt-ribbon__head::after { left: 0; }
.pt-ribbon--right.pt-ribbon--has-drop .pt-ribbon__head::after { right: 0; }

/* The row itself is the page color, so the panel's rounded bottom corner reads against it even when the ribbon
   sits inside a section with a dark or image background (the case study hero). */
.pt-ribbon__drop { display: flex; align-items: stretch; background-color: var(--pt-ribbon-beside); }
.pt-ribbon--right .pt-ribbon__drop { flex-direction: row-reverse; }
.pt-ribbon__drop-beside {
	flex: 0 0 var(--pt-ribbon-fold);
	background-color: var(--pt-ribbon-beside);
}
.pt-ribbon__drop-panel {
	position: relative;
	z-index: 1; /* same as the bar's content: never over the end piece */
	flex: 1 1 auto;
	min-width: 0;
	--pt-ribbon-drop-center: calc(50% - var(--pt-ribbon-fold) / 2);
	background-color: var(--pt-ribbon-drop-color);
	background-image: radial-gradient(ellipse 60% 90% at var(--pt-ribbon-drop-center) 0, var(--pt-ribbon-drop-light), transparent 70%);
	box-shadow: var(--pt-ribbon-drop-shadow);
	color: var(--color-text-on-dark, #F2F2F2);
}
.pt-ribbon--left .pt-ribbon__drop-panel { border-bottom-left-radius: var(--pt-ribbon-drop-radius); }
.pt-ribbon--right .pt-ribbon__drop-panel { border-bottom-right-radius: var(--pt-ribbon-drop-radius); --pt-ribbon-drop-center: calc(50% + var(--pt-ribbon-fold) / 2); }

/* The content column: reaches back under the fold to the full ribbon width, so it centers on the page and lines
   up with the caption, tagline and boxed content; it keeps clear of the end piece on narrow screens. */
.pt-ribbon__drop-inner {
	box-sizing: border-box;
	width: calc(100% + var(--pt-ribbon-fold));
	padding: var(--pt-ribbon-drop-pad-top) var(--pt-ribbon-gutter) var(--pt-ribbon-drop-pad);
}
.pt-ribbon--left .pt-ribbon__drop-inner { margin-left: calc(-1 * var(--pt-ribbon-fold)); }
.pt-ribbon--right .pt-ribbon__drop-inner { margin-right: calc(-1 * var(--pt-ribbon-fold)); }
.pt-ribbon__drop-inner > .elementor {
	box-sizing: border-box;
	max-width: var(--pt-ribbon-text-max);
	margin-left: auto;
	margin-right: auto;
}
.pt-ribbon--left .pt-ribbon__drop-inner > .elementor {
	padding-left: max(0px, calc(var(--pt-ribbon-end-clear) - var(--pt-ribbon-gutter) - max(0px, (100% - var(--pt-ribbon-text-max)) / 2)));
}
.pt-ribbon--right .pt-ribbon__drop-inner > .elementor {
	padding-right: max(0px, calc(var(--pt-ribbon-end-clear) - var(--pt-ribbon-gutter) - max(0px, (100% - var(--pt-ribbon-text-max)) / 2)));
}

@media (max-width: 1024px) {
	.pt-ribbon { --pt-ribbon-drop-pad: var(--inset-tablet, 2rem); --pt-ribbon-drop-pad-top: var(--section-xs-tablet, 1rem); }
}

@media (max-width: 767px) {
	.pt-ribbon { --pt-ribbon-gutter: var(--gutter-mobile, 16px); --pt-ribbon-drop-pad: var(--inset-mobile, 1.25rem); --pt-ribbon-drop-pad-top: var(--section-xs-mobile, 0.75rem); }
	.pt-ribbon__caption-row { padding-top: 8px; padding-bottom: 8px; }
	.pt-ribbon__tagline { font-size: var(--fs-h3-mobile, 1.125rem); }
	.pt-ribbon--tagline .pt-ribbon__bar { padding-top: 10px; padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.pt-ribbon__content [data-interaction-id] { animation: none !important; transform: none !important; }
}
