/* ==================================================
   PORTFOLIO PAGES
================================================== */

.portfolio-page-hero,
.portfolio-gallery-section {
	background: var(--black);
}

/* ==================================================
   PORTFOLIO PAGE HERO
================================================== */

/* .portfolio-page-hero-image img {
	width: 100%;
	max-width: 360px;
	height: 245px;
	object-fit: contain;
} */

/* ==================================================
   PORTFOLIO GALLERY HEADING
================================================== */

.portfolio-gallery-heading {
	max-width: 680px;
	margin-right: auto;
	margin-bottom: 46px;
	margin-left: auto;
}

.portfolio-gallery-heading p {
	max-width: 540px;
	margin-right: auto;
	margin-left: auto;
}

/* ==================================================
   PORTFOLIO GRID
================================================== */

.portfolio-gallery-row {
	align-items: stretch;
	row-gap: 14px;
	margin-right: -7px;
	margin-left: -7px;
}

.portfolio-gallery-row > [class*="col-"] {
	display: flex;
	padding-right: 7px;
	padding-left: 7px;
}

/* ==================================================
   PORTFOLIO CARD
================================================== */

.portfolio-gallery-card {
	position: relative;
	display: flex;
	overflow: hidden;
	width: 100%;
	border: var(--border-primary);
	border-radius: var(--border-radius);
	background: #080808;
}

.portfolio-gallery-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 500 / 333;
	object-fit: contain;
	transition:
		transform 0.45s ease,
		filter 0.45s ease;
}

.portfolio-gallery-card:hover img {
	transform: scale(1.025);
}

/* ==================================================
   LARGE DESKTOP
================================================== */

@media (max-width: 1199px) {

	.portfolio-gallery-heading {
		margin-bottom: 42px;
	}

	.portfolio-gallery-row {
		row-gap: 16px;
		margin-right: -8px;
		margin-left: -8px;
	}

	.portfolio-gallery-row > [class*="col-"] {
		padding-right: 8px;
		padding-left: 8px;
	}

}

/* ==================================================
   TABLET
================================================== */

@media (max-width: 991px) {

	.portfolio-page-hero-image {
		margin-top: 30px;
	}

/* 	.portfolio-page-hero-image img {
		max-width: 420px;
		height: auto;
	} */

	.portfolio-gallery-heading {
		margin-bottom: 36px;
	}

	.portfolio-gallery-row {
		row-gap: 18px;
	}

}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 767px) {

	.portfolio-gallery-heading {
		margin-bottom: 31px;
	}

	.portfolio-gallery-heading p {
		max-width: 500px;
	}

	.portfolio-gallery-row {
		row-gap: 16px;
		margin-right: -6px;
		margin-left: -6px;
	}

	.portfolio-gallery-row > [class*="col-"] {
		padding-right: 6px;
		padding-left: 6px;
	}

}

/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width: 575px) {

	.portfolio-gallery-heading {
		margin-bottom: 27px;
	}

	.portfolio-gallery-row {
		row-gap: 14px;
		margin-right: 0;
		margin-left: 0;
	}

	.portfolio-gallery-row > [class*="col-"] {
		padding-right: 0;
		padding-left: 0;
	}

	.portfolio-gallery-card {
		border-radius: 13px;
	}

}

/* ==================================================
   REDUCED MOTION
================================================== */

@media (prefers-reduced-motion: reduce) {

	.portfolio-gallery-card img {
		transition: none;
	}

	.portfolio-gallery-card:hover img {
		transform: none;
	}

}

/* ==================================================
   WEB DESIGN PORTFOLIO
================================================== */

.web-portfolio-gallery-row {
	row-gap: 28px;
}

.web-portfolio-project {
	display: flex;
	align-items: center;
	flex-direction: column;
	width: 100%;
}

.web-portfolio-card {
	flex: 0 0 auto;
	width: 100%;
}

/*
 * Web project images use the same Figma card ratio.
 */
.web-portfolio-card img {
	aspect-ratio: 500 / 333;
}

/* ==================================================
   WEB PORTFOLIO BUTTON
================================================== */

.web-portfolio-button {
	align-self: center;
	width: auto;
	min-width: 128px;
	min-height: 40px;
	margin-top: 12px;
	padding: 8px 15px;
	font-size: 11px;
	line-height: 18px;
}

.web-portfolio-button svg {
	display: block;
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
}

.web-portfolio-button[aria-disabled="true"] {
	cursor: default;
}

/* ==================================================
   WEB PORTFOLIO TABLET
================================================== */

@media (max-width: 991px) {

	.web-portfolio-gallery-row {
		row-gap: 26px;
	}

}

/* ==================================================
   WEB PORTFOLIO MOBILE
================================================== */

@media (max-width: 767px) {

	.web-portfolio-gallery-row {
		row-gap: 24px;
	}

	.web-portfolio-button {
		min-width: 125px;
		margin-top: 11px;
	}

}

/* ==================================================
   WEB PORTFOLIO SMALL MOBILE
================================================== */

@media (max-width: 575px) {

	.web-portfolio-gallery-row {
		row-gap: 22px;
	}

	.web-portfolio-button {
		width: auto;
		min-width: 130px;
	}

}

/* ==================================================
   DIGITAL MARKETING PORTFOLIO PAGE
================================================== */

.marketing-portfolio-page {
	background: var(--black);
}

/* ==================================================
   MARKETING PORTFOLIO GROUP
================================================== */

.marketing-portfolio-group + .marketing-portfolio-group {
	margin-top: 68px;
}

/* ==================================================
   MARKETING PORTFOLIO HEADING
================================================== */

.marketing-portfolio-heading {
	max-width: 680px;
	margin-right: auto;
	margin-bottom: 38px;
	margin-left: auto;
}

.marketing-portfolio-heading h2 {
	max-width: 680px;
	margin-right: auto;
	margin-left: auto;
}

.marketing-portfolio-heading h2 span {
	display: block;
}

.marketing-portfolio-heading p {
	max-width: 550px;
	margin-right: auto;
	margin-left: auto;
}

/* ==================================================
   MARKETING PORTFOLIO GRID
================================================== */

.marketing-portfolio-row {
	align-items: stretch;
	row-gap: 22px;
	margin-right: -8px;
	margin-left: -8px;
}

.marketing-portfolio-row > [class*="col-"] {
	display: flex;
	padding-right: 8px;
	padding-left: 8px;
}

/* ==================================================
   MARKETING PROJECT
================================================== */

.marketing-portfolio-project {
	display: flex;
	align-items: center;
	flex-direction: column;
	width: 100%;
}

.marketing-portfolio-card {
	position: relative;
	overflow: hidden;
	width: 100%;
	border: var(--border-primary);
	border-radius: var(--border-radius);
	background: #080808;
}

.marketing-portfolio-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 500 / 333;
	object-fit: contain;
	transition: transform 0.45s ease;
}

.marketing-portfolio-card:hover img {
	transform: scale(1.02);
}

/* ==================================================
   MARKETING PROJECT LABEL
================================================== */

.marketing-portfolio-label {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(100% - 46px);
	max-width: 330px;
	min-height: 28px;
	margin-top: -1px;
	padding: 5px 14px;
	border-radius: var(--border-radius);
	background: linear-gradient(
		90deg,
		#11db70 0%,
		#08b85a 100%
	);
	color: var(--black);
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 500;
	line-height: 18px;
	text-align: center;
}

/* ==================================================
   SOCIAL MEDIA PROJECT
================================================== */

.marketing-social-project {
	width: 100%;
}

.marketing-social-card {
	position: relative;
	overflow: hidden;
	width: 100%;
	border: var(--border-primary);
	border-radius: var(--border-radius);
	background: #080808;
}

.marketing-social-card img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

/* ==================================================
   TABLET
================================================== */

@media (max-width: 991px) {

	.marketing-portfolio-group +
	.marketing-portfolio-group {
		margin-top: 58px;
	}

	.marketing-portfolio-heading {
		margin-bottom: 34px;
	}

	.marketing-portfolio-row {
		row-gap: 26px;
	}

}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 767px) {

	.marketing-portfolio-group +
	.marketing-portfolio-group {
		margin-top: 50px;
	}

	.marketing-portfolio-heading {
		margin-bottom: 30px;
	}

	.marketing-portfolio-row {
		row-gap: 24px;
		margin-right: -6px;
		margin-left: -6px;
	}

	.marketing-portfolio-row > [class*="col-"] {
		padding-right: 6px;
		padding-left: 6px;
	}

	.marketing-portfolio-label {
		width: calc(100% - 32px);
	}

}

/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width: 575px) {

	.marketing-portfolio-group +
	.marketing-portfolio-group {
		margin-top: 44px;
	}

	.marketing-portfolio-heading {
		margin-bottom: 27px;
	}

	.marketing-portfolio-row {
		row-gap: 22px;
		margin-right: 0;
		margin-left: 0;
	}

	.marketing-portfolio-row > [class*="col-"] {
		padding-right: 0;
		padding-left: 0;
	}

	.marketing-portfolio-card,
	.marketing-social-card {
		border-radius: 13px;
	}

	.marketing-portfolio-label {
		width: calc(100% - 24px);
		min-height: 27px;
		padding: 5px 11px;
		font-size: 10px;
		line-height: 17px;
	}

}

/* ==================================================
   REDUCED MOTION
================================================== */

@media (prefers-reduced-motion: reduce) {

	.marketing-portfolio-card img {
		transition: none;
	}

	.marketing-portfolio-card:hover img {
		transform: none;
	}

}

/* ==================================================
   PORTFOLIO LIGHTBOX TRIGGER
================================================== */

.portfolio-lightbox-trigger {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: inherit;
	background: transparent;
	box-shadow: none;
	color: inherit;
	cursor: zoom-in;
}

.portfolio-lightbox-trigger:hover,
.portfolio-lightbox-trigger:focus {
	border: 0;
	background: transparent;
	box-shadow: none;
	transform: none;
}

.portfolio-lightbox-trigger:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: -4px;
}

.portfolio-lightbox-trigger img {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: none;
	transition:
		transform 0.4s ease,
		opacity 0.3s ease;
}

.portfolio-lightbox-trigger:hover img {
	opacity: 0.88;
	transform: scale(1.025);
}

/* ==================================================
   SHARED PORTFOLIO MODAL
================================================== */

.portfolio-modal[hidden] {
	display: none;
}

.portfolio-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.portfolio-modal.is-open {
	display: flex;
}

.portfolio-modal-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, 0.88);
	backdrop-filter: blur(9px);
	-webkit-backdrop-filter: blur(9px);
}

.portfolio-modal-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	overflow: hidden;
	border: var(--border-primary);
	border-radius: var(--border-radius);
	background: #050505;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
	animation: portfolio-page-modal-enter 0.3s ease;
}

@keyframes portfolio-page-modal-enter {

	from {
		opacity: 0;
		transform: translateY(15px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}

}

.portfolio-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	min-height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--primary);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.82);
	box-shadow: none;
	color: var(--white);
	cursor: pointer;
	transition:
		background-color 0.3s ease,
		color 0.3s ease,
		transform 0.3s ease;
}

.portfolio-modal-close:hover {
	background: var(--primary);
	color: var(--black);
	transform: rotate(90deg);
}

.portfolio-modal-close:focus-visible {
	outline: 2px solid var(--white);
	outline-offset: 3px;
}

body.portfolio-modal-open {
	overflow: hidden;
}

/* ==================================================
   IMAGE LIGHTBOX
================================================== */

.portfolio-lightbox-dialog {
	display: block;
	width: min(1120px, calc(100vw - 48px));
	max-width: 1120px;
	max-height: calc(100vh - 48px);
	padding: 58px 70px 24px;
	background:
		radial-gradient(
			circle at center,
			rgba(17, 219, 112, 0.08),
			transparent 62%
		),
		#030303;
}

.portfolio-lightbox-content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 104px;
	grid-template-areas:
		"image thumbnails"
		"navigation thumbnails"
		"meta thumbnails";
	grid-template-rows: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px 22px;
	width: 100%;
	min-width: 0;
	min-height: 0;
	max-height: calc(100vh - 130px);
}

.portfolio-lightbox-image {
	grid-area: image;
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: calc(100vh - 240px);
	margin: auto;
	border-radius: 8px;
	object-fit: contain;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-drag: none;
	opacity: 1;
	transition: opacity 0.2s ease;
}

.portfolio-lightbox-image.is-changing {
	opacity: 0;
}

.portfolio-lightbox-navigation {
	grid-area: navigation;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	margin: 2px 0 0;
}

.portfolio-lightbox-arrow {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--primary);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.82);
	box-shadow: none;
	color: var(--white);
	cursor: pointer;
	transform: none;
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease,
		color 0.3s ease,
		opacity 0.3s ease,
		transform 0.3s ease;
}

.portfolio-lightbox-arrow:hover {
	border-color: var(--primary);
	background: var(--primary);
	color: var(--black);
	transform: none;
}

.portfolio-lightbox-arrow:active {
	transform: scale(0.94);
}

.portfolio-lightbox-arrow:focus-visible {
	outline: 2px solid var(--white);
	outline-offset: 3px;
}

.portfolio-lightbox-arrow:disabled {
	opacity: 0.32;
	cursor: not-allowed;
}

.portfolio-lightbox-meta {
	grid-area: meta;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
	width: 100%;
	min-width: 0;
	padding: 0 2px;
}

.portfolio-lightbox-counter {
	margin: 0;
	color: var(--primary);
	font-size: 12px;
	line-height: 20px;
}

.portfolio-lightbox-thumbnails {
	grid-area: thumbnails;
	display: flex;
	flex-direction: column;
	align-self: stretch;
	gap: 9px;
	width: 104px;
	min-height: 0;
	max-height: calc(100vh - 130px);
	padding: 0 5px 0 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(17, 219, 112, 0.55) transparent;
}

.portfolio-lightbox-thumbnails::-webkit-scrollbar {
	width: 4px;
}

.portfolio-lightbox-thumbnails::-webkit-scrollbar-track {
	background: transparent;
}

.portfolio-lightbox-thumbnails::-webkit-scrollbar-thumb {
	border-radius: 20px;
	background: rgba(17, 219, 112, 0.55);
}

.portfolio-lightbox-thumbnail {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 88px;
	height: 64px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 6px;
	background: #111111;
	box-shadow: none;
	cursor: pointer;
	opacity: 0.65;
	transition:
		border-color 0.3s ease,
		opacity 0.3s ease,
		transform 0.3s ease;
}

.portfolio-lightbox-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.portfolio-lightbox-thumbnail:hover,
.portfolio-lightbox-thumbnail.active,
.portfolio-lightbox-thumbnail.is-active,
.portfolio-lightbox-thumbnail[aria-current="true"] {
	border-color: var(--primary);
	opacity: 1;
	transform: none;
}

.portfolio-lightbox-thumbnail:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

/* ==================================================
   WEBSITE IFRAME MODAL
================================================== */

.portfolio-website-dialog {
	display: flex;
	flex-direction: column;
	width: calc(100vw - 40px);
	max-width: 1600px;
	height: calc(100vh - 40px);
}

.portfolio-website-modal-header {
	position: relative;
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	min-height: 66px;
	padding: 14px 76px 14px 22px;
	border-bottom: 1px solid rgba(17, 219, 112, 0.35);
	background: #090909;
}

.portfolio-website-modal-header h2 {
	margin: 0;
	overflow: hidden;
	color: var(--white);
	font-size: 18px;
	line-height: 28px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.portfolio-website-modal-header .portfolio-modal-close {
	top: 50%;
	transform: translateY(-50%);
}

.portfolio-website-modal-header .portfolio-modal-close:hover {
	transform: translateY(-50%) rotate(90deg);
}

.portfolio-website-frame-wrapper {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	background: var(--white);
}

.portfolio-website-frame {
	position: relative;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: var(--white);
}

/* ==================================================
   IFRAME — HIDE SCROLLBAR WITHOUT SHIFTING CONTENT
================================================== */

.portfolio-website-frame-wrapper {
	overflow: hidden;
}

.portfolio-website-frame {
	width: 100%;
	max-width: none;
	margin-right: -18px;
	padding-right: 18px;
	box-sizing: content-box;
}

.portfolio-iframe-loader {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 14px;
	background: #080808;
}

.portfolio-iframe-loader p {
	margin: 0;
	font-size: 13px;
	line-height: 22px;
}

.portfolio-iframe-spinner {
	width: 45px;
	height: 45px;
	border: 3px solid rgba(17, 219, 112, 0.25);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: portfolio-page-iframe-spin 0.8s linear infinite;
}

.portfolio-website-frame-wrapper.is-loaded
.portfolio-iframe-loader {
	display: none;
}

@keyframes portfolio-page-iframe-spin {

	to {
		transform: rotate(360deg);
	}

}

/* ==================================================
   PORTFOLIO LIGHTBOX — TABLET
================================================== */

@media (max-width: 991px) {

	.portfolio-lightbox-dialog {
		width: calc(100vw - 32px);
		padding: 55px 55px 20px;
	}

	.portfolio-lightbox-content {
		grid-template-columns: minmax(0, 1fr) 90px;
		gap: 11px 16px;
	}

	.portfolio-lightbox-image {
		max-height: calc(100vh - 235px);
	}

	.portfolio-lightbox-thumbnails {
		width: 90px;
	}

	.portfolio-lightbox-thumbnail {
		width: 76px;
		height: 56px;
	}

}

/* ==================================================
   PORTFOLIO MODALS — MOBILE
================================================== */

@media (max-width: 767px) {

	.portfolio-modal {
		padding: 10px;
	}

	.portfolio-lightbox-dialog {
		width: calc(100vw - 20px);
		max-height: calc(100dvh - 20px);
		padding: 58px 12px 14px;
	}

	.portfolio-lightbox-content {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		max-height: calc(100dvh - 92px);
	}

	.portfolio-lightbox-image {
		order: 1;
		width: 100%;
		max-height: calc(100dvh - 190px);
		object-fit: contain;
	}

	.portfolio-lightbox-navigation {
		display: none;
	}

	.portfolio-lightbox-meta {
		order: 2;
		gap: 12px;
	}

	.portfolio-lightbox-counter {
		font-size: 10px;
		line-height: 17px;
	}

	.portfolio-lightbox-thumbnails {
		order: 3;
		flex-direction: row;
		align-self: auto;
		gap: 7px;
		width: 100%;
		max-width: 100%;
		height: 66px;
		max-height: none;
		padding: 0 0 5px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-behavior: smooth;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.portfolio-lightbox-thumbnails::-webkit-scrollbar {
		display: none;
	}

	.portfolio-lightbox-thumbnail {
		flex: 0 0 66px;
		width: 66px;
		height: 52px;
		border-radius: 6px;
		scroll-snap-align: center;
	}

	.portfolio-lightbox-thumbnail:hover:not(.active):not(.is-active):not([aria-current="true"]) {
		border-color: rgba(255, 255, 255, 0.25);
		opacity: 0.65;
	}

	.portfolio-lightbox-thumbnail.active,
	.portfolio-lightbox-thumbnail.is-active,
	.portfolio-lightbox-thumbnail[aria-current="true"] {
		border-color: var(--primary);
		opacity: 1;
	}

	.portfolio-lightbox-arrow {
		display: none;
	}

	.portfolio-website-dialog {
		width: 100%;
		height: calc(100vh - 20px);
		border-radius: 13px;
	}

	.portfolio-website-modal-header {
		min-height: 58px;
		padding: 11px 64px 11px 15px;
	}

	.portfolio-website-modal-header h2 {
		font-size: 15px;
		line-height: 24px;
	}

	.portfolio-modal-close {
		top: 10px;
		right: 10px;
		width: 38px;
		height: 38px;
		min-height: 38px;
	}

}

/* ==================================================
   PORTFOLIO LIGHTBOX — SMALL MOBILE
================================================== */

@media (max-width: 575px) {

	.portfolio-lightbox-dialog {
		width: calc(100vw - 14px);
		padding-right: 8px;
		padding-left: 8px;
	}

	.portfolio-lightbox-image {
		max-height: calc(100dvh - 180px);
	}

	.portfolio-lightbox-thumbnail {
		flex-basis: 60px;
		width: 60px;
		height: 48px;
	}

}

/* ==================================================
   REDUCED MOTION — MODALS
================================================== */

@media (prefers-reduced-motion: reduce) {

	.portfolio-modal-dialog,
	.portfolio-lightbox-image,
	.portfolio-lightbox-arrow,
	.portfolio-modal-close,
	.portfolio-lightbox-thumbnail,
	.portfolio-iframe-spinner {
		animation: none;
		transition: none;
	}

}
