/**
 * NT Projektai – public styles.
 *
 * Colors and fonts follow the Optimalūs namai Elementor kit. Override the
 * custom properties below (e.g. in Elementor → Site Settings → Custom CSS)
 * to adjust the look without editing this file.
 */

.nt-projects,
.nt-project-details,
.nt-project-gallery,
.nt-project-page {
	--ntp-accent: #1f5d48;
	--ntp-accent-hover: #164535;
	--ntp-accent-soft: #eaf1ee;
	--ntp-heading: var(--e-global-color-primary, #26292a);
	--ntp-text: var(--e-global-color-46e2dc2, #595c5d);
	--ntp-surface: var(--e-global-color-0ff47fd, #f3f5f6);
	--ntp-border: var(--e-global-color-700a248, #e3e3e3);
	--ntp-white: #fff;
	--ntp-radius: 16px;
	/* Landscape frame for every project photo. 16 / 9 shows uncropped 16:9 originals. */
	--ntp-image-ratio: 4 / 3;
	--ntp-image-position: center center;
	--ntp-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
	--ntp-duration: 0.3s;
	--ntp-font-heading: var(--e-global-typography-secondary-font-family, "Libre Franklin"), sans-serif;
	--ntp-font-body: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
}

.nt-projects {
	width: 100%;
	font-family: var(--ntp-font-body);
	color: var(--ntp-text);
}

.nt-projects *,
.nt-projects *::before,
.nt-projects *::after {
	box-sizing: border-box;
}

.nt-projects__sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/* Hero (widget / [nt_projects hero="yes"])                            */
/* ------------------------------------------------------------------ */

.nt-projects--has-hero {
	--ntp-content-width: 1140px;
	--ntp-gutter: 20px;
	--ntp-hero-height: clamp(420px, 50vh, 640px);
	--ntp-hero-overlay: 1;
	--ntp-hero-radius: 0px;
	--ntp-hero-ink: 15, 42, 33; /* Deep brand green as RGB for overlays. */
	--ntp-dock-height: 64px;
}

.nt-projects-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: var(--ntp-hero-height);
	overflow: hidden;
	border-radius: var(--ntp-hero-radius);
	background: rgb(var(--ntp-hero-ink));
	color: var(--ntp-white);
	isolation: isolate;
}

.nt-projects-hero--no-image {
	background: var(--ntp-accent);
}

.nt-projects-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.nt-projects .nt-projects-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: var(--ntp-hero-position, center center);
	border: 0;
	border-radius: 0;
}

/* Green-tinted overlay: darker bottom-left where the text sits, the photo stays visible top-right. */
.nt-projects-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: var(--ntp-hero-overlay);
	background:
		linear-gradient(90deg, rgba(var(--ntp-hero-ink), 0.7) 0%, rgba(var(--ntp-hero-ink), 0.32) 48%, rgba(var(--ntp-hero-ink), 0) 78%),
		linear-gradient(0deg, rgba(var(--ntp-hero-ink), 0.6) 0%, rgba(var(--ntp-hero-ink), 0) 60%),
		rgba(var(--ntp-hero-ink), 0.16);
	pointer-events: none;
}

.nt-projects-hero--no-image::before {
	content: none;
}

.nt-projects-hero__inner {
	width: 100%;
	max-width: calc(var(--ntp-content-width) + 2 * var(--ntp-gutter));
	margin: 0 auto;
	/* Bottom padding leaves room for the filter dock that overlaps the hero edge. */
	padding: 56px var(--ntp-gutter) calc(var(--ntp-dock-height) / 2 + 48px);
}

.nt-projects-hero__breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	color: rgba(255, 255, 255, 0.78);
	font-family: var(--ntp-font-body);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nt-projects-hero__breadcrumbs li {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
}

/* Thin rule as separator – quieter than arrows or slashes. */
.nt-projects-hero__breadcrumbs li + li::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 1px;
	margin: 0 12px;
	background: currentColor;
	opacity: 0.7;
}

.nt-projects .nt-projects-hero__breadcrumbs a,
.nt-projects .nt-projects-hero__breadcrumbs a:visited {
	color: inherit;
	text-decoration: none;
	transition: color var(--ntp-duration) var(--ntp-ease);
}

.nt-projects .nt-projects-hero__breadcrumbs a:hover,
.nt-projects .nt-projects-hero__breadcrumbs a:focus-visible {
	color: var(--ntp-white);
}

.nt-projects-hero__breadcrumbs [aria-current] {
	color: var(--ntp-white);
}

.nt-projects .nt-projects-hero__title {
	max-width: 760px;
	margin: 0;
	padding: 0;
	color: var(--ntp-white);
	font-family: var(--ntp-font-heading);
	font-size: clamp(36px, 4.4vw, 60px);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -0.015em;
	text-transform: none;
}

.nt-projects .nt-projects-hero__text {
	max-width: 560px;
	margin: 18px 0 0;
	color: rgba(255, 255, 255, 0.88);
	font-family: var(--ntp-font-body);
	font-size: 17px;
	line-height: 1.6;
}

.nt-projects--has-hero .nt-projects__container {
	max-width: calc(var(--ntp-content-width) + 2 * var(--ntp-gutter));
	margin: 0 auto;
	padding: 0 var(--ntp-gutter) 96px;
}

/* Filter dock: white rounded bar floating across the hero's bottom edge. */
.nt-projects--has-hero .nt-projects__filters {
	position: relative;
	z-index: 3;
	width: -moz-fit-content;
	width: fit-content;
	max-width: 100%;
	gap: 4px;
	margin: calc(var(--ntp-dock-height) / -2) 0 52px;
	padding: 6px;
	border-radius: 999px;
	background: var(--ntp-white);
	box-shadow: 0 14px 34px rgba(15, 42, 33, 0.12), 0 2px 6px rgba(15, 42, 33, 0.06);
}

.nt-projects--has-hero .nt-projects__filters .nt-projects__filter {
	min-height: calc(var(--ntp-dock-height) - 12px);
	padding: 10px 22px;
	border-color: transparent;
	background: transparent;
}

.nt-projects--has-hero .nt-projects__filters .nt-projects__filter:hover {
	border-color: transparent;
	background: var(--ntp-accent-soft);
	color: var(--ntp-accent);
}

.nt-projects--has-hero .nt-projects__filters .nt-projects__filter.is-active,
.nt-projects--has-hero .nt-projects__filters .nt-projects__filter.is-active:hover {
	border-color: var(--ntp-accent);
	background: var(--ntp-accent);
	color: var(--ntp-white);
}

.nt-projects--has-hero .nt-projects__filter:hover .nt-projects__filter-count {
	background: var(--ntp-white);
}

.nt-projects--has-hero .nt-projects__filter.is-active .nt-projects__filter-count {
	background: rgba(255, 255, 255, 0.18);
}

/* No filter bar: keep a clean gap below the hero. */
.nt-projects--has-hero .nt-projects-hero + .nt-projects__container > .nt-projects__sr-only:first-child + .nt-projects__grid {
	margin-top: 56px;
}

.nt-projects--has-hero .nt-projects-hero + .nt-projects__container > .nt-projects__empty:first-child {
	margin-top: 48px;
}

@media (max-width: 1024px) {
	.nt-projects--has-hero {
		--ntp-hero-height: clamp(380px, 44vh, 540px);
	}

	.nt-projects .nt-projects-hero__text {
		font-size: 16px;
	}
}

@media (max-width: 767px) {
	.nt-projects--has-hero {
		--ntp-gutter: 16px;
		--ntp-hero-height: clamp(340px, 48vh, 460px);
		--ntp-dock-height: 56px;
	}

	/* Text spans the full width on phones, so darken the lower half more evenly. */
	.nt-projects-hero::before {
		background:
			linear-gradient(0deg, rgba(var(--ntp-hero-ink), 0.82) 0%, rgba(var(--ntp-hero-ink), 0.35) 60%, rgba(var(--ntp-hero-ink), 0.15) 100%);
	}

	.nt-projects-hero__inner {
		padding-top: 40px;
		padding-bottom: calc(var(--ntp-dock-height) / 2 + 32px);
	}

	.nt-projects--has-hero .nt-projects__container {
		padding-bottom: 64px;
	}

	.nt-projects-hero__breadcrumbs ol {
		margin-bottom: 12px;
		font-size: 12px;
	}

	.nt-projects .nt-projects-hero__title {
		font-size: 34px;
	}

	.nt-projects .nt-projects-hero__text {
		margin-top: 12px;
		font-size: 15px;
		line-height: 1.55;
	}

	/* Dock becomes a full-width 2 × 2 panel. */
	.nt-projects--has-hero .nt-projects__filters {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
		margin-bottom: 32px;
		border-radius: 18px;
	}

	.nt-projects--has-hero .nt-projects__filters .nt-projects__filter {
		width: 100%;
		min-height: 48px;
		padding: 8px 10px;
		border-radius: 12px;
	}
}

/* ------------------------------------------------------------------ */
/* Filter bar                                                          */
/* ------------------------------------------------------------------ */

.nt-projects__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 44px;
	padding: 0;
}

/* Full reset – the theme styles plain buttons globally. */
.nt-projects .nt-projects__filter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	margin: 0;
	padding: 10px 22px;
	border: 1px solid var(--ntp-border);
	border-radius: 999px;
	background: var(--ntp-white);
	color: var(--ntp-heading);
	font-family: var(--ntp-font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0.01em;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition:
		background-color var(--ntp-duration) var(--ntp-ease),
		border-color var(--ntp-duration) var(--ntp-ease),
		color var(--ntp-duration) var(--ntp-ease);
}

.nt-projects .nt-projects__filter:hover {
	border-color: var(--ntp-accent);
	background: var(--ntp-white);
	color: var(--ntp-accent);
}

.nt-projects .nt-projects__filter:focus {
	outline: none;
}

.nt-projects .nt-projects__filter:focus-visible {
	outline: 2px solid var(--ntp-accent);
	outline-offset: 3px;
}

.nt-projects .nt-projects__filter.is-active,
.nt-projects .nt-projects__filter.is-active:hover {
	border-color: var(--ntp-accent);
	background: var(--ntp-accent);
	color: var(--ntp-white);
}

.nt-projects__filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ntp-surface);
	color: var(--ntp-text);
	font-size: 12px;
	font-weight: 600;
	transition:
		background-color var(--ntp-duration) var(--ntp-ease),
		color var(--ntp-duration) var(--ntp-ease);
}

.nt-projects__filter:hover .nt-projects__filter-count {
	background: var(--ntp-accent-soft);
	color: var(--ntp-accent);
}

.nt-projects__filter.is-active .nt-projects__filter-count,
.nt-projects__filter.is-active:hover .nt-projects__filter-count {
	background: rgba(255, 255, 255, 0.18);
	color: var(--ntp-white);
}

/* ------------------------------------------------------------------ */
/* Grid                                                                */
/* ------------------------------------------------------------------ */

.nt-projects__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 56px 32px;
}

/* ------------------------------------------------------------------ */
/* Card                                                                */
/* ------------------------------------------------------------------ */

.nt-project-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nt-project-card[hidden] {
	display: none;
}

.nt-project-card.is-entering {
	animation: ntp-fade-in 0.35s var(--ntp-ease) both;
}

@keyframes ntp-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Landscape photo frame – identical size on every card, never square or portrait. */
.nt-project-card__media {
	position: relative;
	aspect-ratio: var(--ntp-image-ratio);
	overflow: hidden;
	border-radius: var(--ntp-radius);
	background: var(--ntp-surface);
	/* Keeps rounded corners clipped while the image scales in Safari. */
	isolation: isolate;
}

/* Fallback for browsers without aspect-ratio (4:3 = 75%). */
@supports not (aspect-ratio: 4 / 3) {
	.nt-project-card__media {
		height: 0;
		padding-top: 75%;
	}

	.nt-project-card__media > .nt-project-card__image,
	.nt-project-card__media > .nt-project-card__placeholder {
		position: absolute;
		top: 0;
		left: 0;
	}
}

.nt-projects .nt-project-card__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: var(--ntp-image-position);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transform: scale(1);
	transition: transform 0.35s var(--ntp-ease);
}

.nt-project-card:hover .nt-project-card__image {
	transform: scale(1.03);
}

.nt-project-card__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 100%;
	background: var(--ntp-accent-soft);
	color: var(--ntp-accent);
	font-size: 14px;
	letter-spacing: 0.02em;
}

.nt-project-card__placeholder svg {
	opacity: 0.5;
}

.nt-project-card__placeholder span {
	color: var(--ntp-text);
}

/* Status badge (also used in the single project details). */
.nt-project-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ntp-heading);
	font-family: var(--ntp-font-body);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.nt-project-card__badge::before {
	content: "";
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ntp-text);
}

.nt-project-card__badge--vykdomas::before {
	background: var(--ntp-accent);
}

.nt-project-card__badge--planuojamas::before {
	background: var(--e-global-color-secondary, #698996);
}

.nt-project-card__badge--ivykdytas::before {
	background: var(--ntp-heading);
}

.nt-project-card__media .nt-project-card__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 1;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* White pill arrow on the photo (bottom-right). Sits under the stretched link, so it is clickable. */
.nt-project-card__arrow {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 38px;
	border-radius: 999px;
	background: var(--ntp-white);
	color: var(--ntp-accent);
	transition:
		background-color var(--ntp-duration) var(--ntp-ease),
		color var(--ntp-duration) var(--ntp-ease);
}

.nt-project-card__arrow svg {
	display: block;
	transition: transform var(--ntp-duration) var(--ntp-ease);
}

.nt-project-card:hover .nt-project-card__arrow,
.nt-project-card:focus-within .nt-project-card__arrow {
	background: var(--ntp-accent);
	color: var(--ntp-white);
}

.nt-project-card:hover .nt-project-card__arrow svg,
.nt-project-card:focus-within .nt-project-card__arrow svg {
	transform: translateX(3px);
}

.nt-project-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px 2px 0;
}

.nt-projects .nt-project-card__title {
	margin: 0;
	padding: 0;
	color: var(--ntp-heading);
	font-family: var(--ntp-font-heading);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.005em;
	text-align: left;
	transition: color var(--ntp-duration) var(--ntp-ease);
}

.nt-projects .nt-project-card__link,
.nt-projects .nt-project-card__link:hover,
.nt-projects .nt-project-card__link:visited {
	color: inherit;
	text-decoration: none;
}

/* The whole card is clickable through the title link. */
.nt-project-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

.nt-projects .nt-project-card__link:focus {
	outline: none;
}

.nt-project-card:focus-within {
	outline: 2px solid var(--ntp-accent);
	outline-offset: 6px;
	border-radius: var(--ntp-radius);
}

.nt-project-card:focus-within:not(:has(:focus-visible)) {
	outline: none;
}

.nt-project-card:hover .nt-project-card__title {
	color: var(--ntp-accent);
}

/* Location · units on one quiet line. */
.nt-projects .nt-project-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nt-projects .nt-project-card__meta-item {
	margin: 0;
	padding: 0;
	color: var(--ntp-text);
	font-size: 15px;
	line-height: 1.5;
}

.nt-project-card__meta-item + .nt-project-card__meta-item::before {
	content: "·";
	margin: 0 10px;
	color: var(--e-global-color-151a8bb, #c4c4c4);
}

.nt-project-card__meta-item strong {
	color: var(--ntp-heading);
	font-weight: 600;
}

.nt-projects .nt-project-card__excerpt {
	margin: 2px 0 0;
	font-size: 15px;
	line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* Empty state                                                         */
/* ------------------------------------------------------------------ */

.nt-projects .nt-projects__empty {
	margin: 0;
	padding: 48px 24px;
	border-radius: var(--ntp-radius);
	background: var(--ntp-surface);
	color: var(--ntp-text);
	font-size: 16px;
	text-align: center;
}

.nt-projects .nt-projects__empty[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Single project: details + gallery                                   */
/* ------------------------------------------------------------------ */

.nt-project-details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 0 0 32px;
	padding: 24px 28px;
	border-radius: var(--ntp-radius);
	background: var(--ntp-surface);
	font-family: var(--ntp-font-body);
}

.nt-project-details__list {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin: 0;
}

.nt-project-details__item dt {
	margin: 0 0 6px;
	color: var(--ntp-text);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.nt-project-details__item dd {
	margin: 0;
	color: var(--ntp-heading);
	font-size: 17px;
	font-weight: 600;
}

.nt-project-details .nt-project-card__badge {
	background: var(--ntp-white);
}

.nt-project-details .nt-project-details__button,
.nt-project-details .nt-project-details__button:visited {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 12px 26px;
	border-radius: 999px;
	background: var(--ntp-accent);
	color: var(--ntp-white);
	font-weight: 500;
	text-decoration: none;
	transition: background-color var(--ntp-duration) var(--ntp-ease);
}

.nt-project-details .nt-project-details__button:hover,
.nt-project-details .nt-project-details__button:focus-visible {
	background: var(--ntp-accent-hover);
	color: var(--ntp-white);
}

.nt-project-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 32px 0 0;
}

.nt-project-gallery__item {
	display: block;
	aspect-ratio: var(--ntp-image-ratio);
	overflow: hidden;
	border-radius: var(--ntp-radius);
	background: var(--ntp-surface);
	isolation: isolate;
}

.nt-project-gallery .nt-project-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--ntp-image-position);
	transition: transform 0.35s var(--ntp-ease);
}

.nt-project-gallery__item:hover .nt-project-gallery__image {
	transform: scale(1.03);
}

.nt-project-gallery__item:focus-visible {
	outline: 2px solid var(--ntp-accent);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

/* Tablet (768–1024px) – matches Elementor's tablet breakpoint. */
@media (max-width: 1024px) {
	.nt-projects__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 44px 24px;
	}

	.nt-projects__filters {
		margin-bottom: 36px;
	}

	.nt-projects .nt-project-card__title {
		font-size: 21px;
	}

	.nt-project-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Mobile (below 768px) – matches Elementor's mobile breakpoint. */
@media (max-width: 767px) {
	.nt-projects {
		--ntp-radius: 14px;
	}

	.nt-projects__filters {
		gap: 8px;
		margin-bottom: 28px;
	}

	.nt-projects .nt-projects__filter {
		flex: 1 1 auto;
		min-height: 46px;
		padding: 10px 16px;
		font-size: 15px;
	}

	.nt-projects__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.nt-project-card__media .nt-project-card__badge {
		top: 12px;
		left: 12px;
	}

	.nt-project-card__arrow {
		right: 12px;
		bottom: 12px;
		width: 52px;
		height: 36px;
	}

	.nt-project-card__body {
		padding-top: 16px;
	}

	.nt-projects .nt-project-card__title {
		font-size: 20px;
	}

	.nt-project-details {
		padding: 20px;
	}

	.nt-project-details .nt-project-details__button {
		width: 100%;
		justify-content: center;
	}

	.nt-project-gallery {
		gap: 10px;
	}
}

/* Touch screens: no sticky hover zoom after a tap. */
@media (hover: none) {
	.nt-project-card:hover .nt-project-card__image,
	.nt-project-gallery__item:hover .nt-project-gallery__image {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nt-project-card.is-entering {
		animation: none;
	}

	.nt-projects .nt-project-card__image,
	.nt-project-card__arrow,
	.nt-project-card__arrow svg,
	.nt-projects .nt-projects__filter,
	.nt-project-gallery .nt-project-gallery__image {
		transition: none;
	}

	.nt-project-card:hover .nt-project-card__image,
	.nt-project-card:hover .nt-project-card__arrow svg,
	.nt-project-card:focus-within .nt-project-card__arrow svg,
	.nt-project-gallery__item:hover .nt-project-gallery__image {
		transform: none;
	}
}
