/**
 * RB Projects & Ventures — a project / venture's own page.
 * The Noile "case study details" layout: main image (black & white, with a
 * red category label), heading + text + highlight boxes, and beside them the
 * dark info box with Noile's moving stripes and the social links box.
 *
 * Colours follow the Noile theme's custom properties when it is active
 * (Settings can override the accent and the info box). Font: Jost.
 * Logical properties throughout, so RTL mirrors automatically.
 */

.rbns-pp {
	--rbns-pp-accent: var(--noile-base, #FC164B);
	--rbns-pp-accent2: var(--noile-base2, #D60E3C);
	--rbns-pp-dark: var(--noile-primary, #1d1d1d);
	--rbns-pp-info-bg: var(--rbns-pp-dark);
	--rbns-pp-text: #6b6b6b;
	--rbns-pp-muted: var(--noile-secondary, #A0A1A6);
	--rbns-pp-light: var(--noile-white2, #f6f6f6);
	--rbns-pp-font: "Jost", "Segoe UI", sans-serif;
	--rbns-pp-gap: 30px;
	--rbns-pp-pad: 110px;

	position: relative;
	padding-block: var(--rbns-pp-pad);
	background: var(--noile-white, #fff);
	color: var(--rbns-pp-text);
	font-family: var(--rbns-pp-font);
	font-size: 16px;
	line-height: 1.8;
	overflow: hidden;
}

/* Noile's "fixed footer" slides 100px over the end of the page (the theme
   pads its own pages for it the same way). */
.has-fixed-footer .rbns-pp {
	padding-bottom: calc(var(--rbns-pp-pad) + 100px);
}

.rbns-pp *,
.rbns-pp *::before,
.rbns-pp *::after {
	box-sizing: border-box;
}

/* The Noile theme sets its own font on every <p>; keep Jost. */
.rbns-pp p {
	font-family: inherit;
}

/* …and a smaller, lighter size: text paragraphs match the lists. */
.rbns-pp__content p,
.rbns-pp__hl-desc {
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.rbns-pp__container {
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: 15px;
}

/* ---- Main image ---- */
.rbns-pp__img-box {
	position: relative;
	margin: 0 0 var(--rbns-pp-gap);
	overflow: hidden;
	background-color: var(--rbns-pp-dark);
}

.rbns-pp__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 640px;
	object-fit: cover;
	transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.rbns-pp--bw .rbns-pp__img {
	mix-blend-mode: luminosity;
}

.rbns-pp__img-box:hover .rbns-pp__img {
	transform: scale(1.04);
}

.rbns-pp__cat {
	position: absolute;
	inset-inline-start: 30px;
	bottom: 0;
	z-index: 1;
	margin: 0;
	padding: 10px 21px;
	color: #fff;
	background-color: var(--rbns-pp-accent);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.25;
}

/* ---- Two columns: text | info + social ---- */
.rbns-pp__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"main info"
		"main social";
	column-gap: var(--rbns-pp-gap);
	row-gap: 24px;
	align-items: start;
}

.rbns-pp__grid--solo {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "main";
}

.rbns-pp__main { grid-area: main; min-width: 0; }
.rbns-pp__info { grid-area: info; }
.rbns-pp__social { grid-area: social; }

/* Without an info box the social box moves up. */
.rbns-pp__grid:not(:has(.rbns-pp__info)) {
	grid-template-areas: "main social";
	grid-template-rows: auto;
}

/* ---- Heading + text ---- */
.rbns-pp__heading {
	margin: 0 0 10px;
	color: var(--rbns-pp-dark);
	font-family: var(--rbns-pp-font);
	font-size: clamp(26px, 2.4vw, 32px);
	font-weight: 600;
	line-height: 1.3;
}

.rbns-pp__content {
	overflow-wrap: break-word;
}

.rbns-pp__content > :first-child {
	margin-top: 0;
}

.rbns-pp__content > :last-child {
	margin-bottom: 0;
}

.rbns-pp__content p {
	margin: 0 0 1.15em;
}

.rbns-pp__content h2,
.rbns-pp__content h3,
.rbns-pp__content h4,
.rbns-pp__content h5 {
	margin: 1.6em 0 .55em;
	color: var(--rbns-pp-dark);
	font-family: var(--rbns-pp-font);
	font-weight: 600;
	line-height: 1.3;
}

.rbns-pp__content h2 { font-size: clamp(24px, 2.1vw, 28px); }
.rbns-pp__content h3 { font-size: 22px; }
.rbns-pp__content h4 { font-size: 19px; }
.rbns-pp__content h5 { font-size: 17px; }

.rbns-pp__content a {
	color: var(--rbns-pp-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rbns-pp__content a:hover {
	color: var(--rbns-pp-dark);
}

.rbns-pp__content ul,
.rbns-pp__content ol {
	margin: 0 0 1.15em;
	padding-inline-start: 1.3em;
}

.rbns-pp__content li {
	margin-bottom: .35em;
}

.rbns-pp__content li::marker {
	color: var(--rbns-pp-accent);
}

.rbns-pp__content blockquote {
	margin: 1.6em 0;
	padding: 6px 0 6px 24px;
	padding-inline: 24px 0;
	border-inline-start: 4px solid var(--rbns-pp-accent);
	color: var(--rbns-pp-dark);
	font-size: 20px;
	font-style: italic;
}

.rbns-pp__content img,
.rbns-pp__content video,
.rbns-pp__content iframe {
	max-width: 100%;
	height: auto;
}

.rbns-pp__content figure {
	margin: 1.6em 0;
}

/* Sections editor blocks: image, table, callout box, quote. */
.rbns-pp__fig img {
	display: block;
	width: 100%;
	height: auto;
}

.rbns-pp__content figcaption {
	margin-top: 10px;
	color: var(--rbns-pp-muted);
	font-size: 14px;
	line-height: 1.5;
}

.rbns-pp__table {
	overflow-x: auto;
}

.rbns-pp__table table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
}

.rbns-pp__table th,
.rbns-pp__table td {
	padding: 12px 14px;
	border: 1px solid #e6e6e6;
	text-align: start;
	vertical-align: top;
}

.rbns-pp__table th {
	background: var(--rbns-pp-dark);
	border-color: var(--rbns-pp-dark);
	color: #fff;
	font-weight: 600;
}

.rbns-pp__table tbody tr:nth-child(even) td {
	background: var(--rbns-pp-light);
}

.rbns-pp__callout {
	margin: 1.6em 0;
	padding: 22px 26px;
	border-inline-start: 4px solid var(--rbns-pp-accent);
	background: var(--rbns-pp-light);
	color: var(--rbns-pp-dark);
}

.rbns-pp__callout > :last-child {
	margin-bottom: 0;
}

.rbns-pp__content .rbns-pp__callout-title {
	margin: 0 0 6px;
	color: var(--rbns-pp-accent);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.rbns-pp__quote > p:last-of-type {
	margin-bottom: 0;
}

.rbns-pp__quote cite {
	display: block;
	margin-top: 12px;
	color: var(--rbns-pp-muted);
	font-size: 15px;
	font-style: normal;
	font-weight: 500;
}

.rbns-pp__quote cite::before {
	content: "— ";
}

/* ---- Highlights (Noile icon boxes) ---- */
.rbns-pp__hls {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
	margin-top: 40px;
}

.rbns-pp__hl {
	display: flex;
	align-items: flex-start;
	gap: 23px;
}

.rbns-pp__hl-media {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 4px;
	color: var(--rbns-pp-dark);
	transition: transform .4s ease, color .4s ease;
}

.rbns-pp__hl-media--icon {
	justify-content: flex-start;
	width: 60px;
	height: 54px;
	font-size: 42px;
	line-height: 1;
}

.rbns-pp__hl-media--icon svg {
	width: 42px;
	height: 42px;
	fill: currentColor;
}

/* Noile's little red dot under the icon. */
.rbns-pp__hl-media--icon::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: -6px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--rbns-pp-accent);
	transition: transform .4s ease;
}

.rbns-pp__hl-img {
	display: block;
	width: 60px;
	height: 60px;
	object-fit: contain;
}

.rbns-pp__hl:hover .rbns-pp__hl-media {
	transform: translateY(-5px);
	color: var(--rbns-pp-accent);
}

.rbns-pp__hl:hover .rbns-pp__hl-media--icon::after {
	transform: translateX(34px);
}

[dir="rtl"] .rbns-pp__hl:hover .rbns-pp__hl-media--icon::after {
	transform: translateX(-34px);
}

.rbns-pp__hl-title {
	margin: 0 0 9px;
	color: var(--rbns-pp-dark);
	font-family: var(--rbns-pp-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.5;
}

.rbns-pp__hl-desc {
	margin: 0;
}

/* ---- Info box ---- */
.rbns-pp__info {
	position: relative;
	z-index: 1;
	padding: 42px 29px;
	background-color: var(--rbns-pp-info-bg);
	overflow: hidden;
}

.rbns-pp__info-list {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rbns-pp__info-item:not(:last-child) {
	margin-bottom: 24px;
}

.rbns-pp__info-label {
	margin: 0 0 8px;
	color: var(--rbns-pp-muted);
	font-size: 15px;
	line-height: 1.4;
}

.rbns-pp__info-value {
	margin: 0;
	color: #fff;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.rbns-pp__info-link {
	color: inherit;
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
	transition: background-size .4s ease, color .3s ease;
}

.rbns-pp__info-link:hover,
.rbns-pp__info-link:focus-visible {
	color: var(--rbns-pp-muted);
	background-size: 100% 1px;
}

/* Noile's red stripes in the corner, rocking side to side. */
.rbns-pp__info-shape {
	position: absolute;
	inset-inline-end: -20px;
	bottom: -12px;
	z-index: 0;
	width: 222px;
	height: auto;
	max-width: 70%;
}

[dir="rtl"] .rbns-pp__info-shape {
	scale: -1 1;
}

.rbns-pp__info-shape path:nth-child(1),
.rbns-pp__info-shape path:nth-child(2) {
	fill: var(--rbns-pp-accent2);
}

.rbns-pp__info-shape path:nth-child(3) {
	fill: var(--rbns-pp-accent);
}

/* ---- Social box ---- */
.rbns-pp__social {
	padding: 27px 30px 30px;
	background-color: var(--rbns-pp-light);
}

.rbns-pp__social-title {
	margin: 0 0 20px;
	color: var(--rbns-pp-dark);
	font-family: var(--rbns-pp-font);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
}

.rbns-pp__social-list {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rbns-pp__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	background-color: #fff;
	color: var(--rbns-pp-muted);
	transition: background-color .3s ease, color .3s ease, transform .3s ease;
}

.rbns-pp__social-link svg {
	display: block;
	fill: currentColor;
}

.rbns-pp__social-link:hover,
.rbns-pp__social-link:focus-visible {
	background-color: var(--rbns-pp-accent);
	color: #fff;
	transform: translateY(-3px);
}

.rbns-pp a:focus-visible {
	outline: 2px solid var(--rbns-pp-accent);
	outline-offset: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
	.rbns-pp {
		--rbns-pp-pad: 80px;
	}

	/* Phone & tablet: image, info box, text, highlights, social links. */
	.rbns-pp__grid,
	.rbns-pp__grid:not(:has(.rbns-pp__info)) {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto;
		grid-template-areas:
			"info"
			"main"
			"social";
		row-gap: 40px;
	}
}

@media (max-width: 767px) {
	.rbns-pp__hls {
		grid-template-columns: minmax(0, 1fr);
	}

	.rbns-pp__cat {
		inset-inline-start: 15px;
	}
}

@media (max-width: 575px) {
	.rbns-pp {
		--rbns-pp-pad: 60px;
	}

	.rbns-pp__info,
	.rbns-pp__social {
		padding-inline: 20px;
	}
}

/* ---- Motion (Noile WOW style), only when the script is running ---- */
@keyframes rbnsPpZumpX {
	0% { transform: translateX(0); }
	100% { transform: translateX(-13px); }
}

@media (prefers-reduced-motion: no-preference) {
	.rbns-pp__info-shape {
		animation: rbnsPpZumpX 1s infinite alternate;
	}

	.rbns-pp--js .rbns-pp__rv {
		opacity: 0;
		transform: translateY(50px);
		transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1);
		transition-delay: calc(var(--rbns-pp-i, 0) * 180ms);
	}

	/* Info + social slide in from the side (Noile fadeInRight). */
	.rbns-pp--js .rbns-pp__rv--side {
		transform: translateX(60px);
		transition-duration: 1.5s;
	}

	[dir="rtl"] .rbns-pp--js .rbns-pp__rv--side {
		transform: translateX(-60px);
	}

	.rbns-pp--js .rbns-pp__social.rbns-pp__rv--side {
		transition-delay: .2s;
	}

	/* Main image: a curtain opens from the start edge while the photo settles. */
	.rbns-pp--js .rbns-pp__rv--img {
		opacity: 1;
		transform: none;
		clip-path: inset(0 100% 0 0);
		transition: clip-path 1.3s cubic-bezier(.77, 0, .18, 1);
	}

	[dir="rtl"] .rbns-pp--js .rbns-pp__rv--img {
		clip-path: inset(0 0 0 100%);
	}

	.rbns-pp--js .rbns-pp__rv--img .rbns-pp__img {
		transform: scale(1.18);
		transition: transform 1.8s cubic-bezier(.2, .7, .2, 1);
	}

	.rbns-pp--js .rbns-pp__rv--img .rbns-pp__cat {
		transform: translateY(101%);
		transition: transform .7s cubic-bezier(.2, .7, .2, 1) .9s;
	}

	.rbns-pp--js .rbns-pp__rv.is-in {
		opacity: 1;
		transform: none;
	}

	.rbns-pp--js .rbns-pp__rv--img.is-in {
		clip-path: inset(0 0 0 0);
	}

	.rbns-pp--js .rbns-pp__rv--img.is-in .rbns-pp__img,
	.rbns-pp--js .rbns-pp__rv--img.is-in .rbns-pp__cat {
		transform: none;
	}

	.rbns-pp--js .rbns-pp__rv--img.is-in:hover .rbns-pp__img {
		transform: scale(1.04);
	}
}
