/* ================================================================
 * Card và lưới dự án dùng chung
 * ================================================================ */
.webvip-project-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}

.webvip-project-card {
	margin: 0;
}

.webvip-project-card__link {
	display: block;
}

.webvip-project-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: 14px;
	background: #eee;
	box-shadow: 0 8px 24px rgba(24, 24, 24, .08);
}

.webvip-project-card__image,
.webvip-project-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s ease;
}

.webvip-project-card__placeholder {
	background: linear-gradient(135deg, #eee, #ddd);
}

.webvip-project-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, .82) 100%);
	transition: background .3s ease;
}

.webvip-project-card__content {
	position: absolute;
	right: 18px;
	bottom: 16px;
	left: 18px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 3px 12px;
	color: #fff;
}

.webvip-project-card__category {
	grid-column: 1 / -1;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	line-height: 1.3;
	opacity: .82;
	text-transform: uppercase;
}

.webvip-project-card__title {
	display: -webkit-box;
	overflow: hidden;
	text-align: left;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.webvip-project-card__arrow {
	font-size: 20px;
	line-height: 1;
	transition: transform .25s ease;
}

.webvip-project-card__link:hover .webvip-project-card__image {
	transform: scale(1.045);
}

.webvip-project-card__link:hover .webvip-project-card__shade {
	background: linear-gradient(180deg, rgba(0, 0, 0, .04) 25%, rgba(0, 0, 0, .9) 100%);
}

.webvip-project-card__link:hover .webvip-project-card__arrow {
	transform: translateX(4px);
}

.webvip-projects-slider {
	position: relative;
	padding: 0 8px 34px;
}

.webvip-projects-slider__viewport {
	overflow: hidden;
}

.webvip-projects-slider__track,
.webvip-projects-slider__page {
	display: grid;
	grid-template-columns: repeat(var(--projects-mobile), minmax(0, 1fr));
	gap: 16px;
}

.webvip-projects-slider.is-ready .webvip-projects-slider__track {
	display: block;
}

.webvip-projects-slider__page {
	display: none;
}

.webvip-projects-slider__page.is-active {
	display: grid;
}

.webvip-projects-slider__item {
	min-width: 0;
}

.webvip-projects-slider__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: none;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .72);
	border-radius: 50%;
	color: #111;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	font-size: 18px;
	line-height: 40px;
	text-align: center;
	transform: translateY(-50%);
	cursor: pointer;
}

.webvip-projects-slider.has-navigation .webvip-projects-slider__nav {
	display: block;
}

.webvip-projects-slider__prev {
	left: 8px;
}

.webvip-projects-slider__next {
	right: 8px;
}

.webvip-projects-slider__nav:hover,
.webvip-projects-slider__nav:focus-visible {
	color: #fff;
	background: var(--primary-color, #b36b74);
}

.webvip-projects-slider__dots {
	position: absolute;
	right: 0;
	bottom: 5px;
	left: 0;
	display: none;
	justify-content: center;
	gap: 7px;
}

.webvip-projects-slider.has-dots .webvip-projects-slider__dots {
	display: flex;
}

.webvip-projects-slider__dot {
	width: 9px;
	height: 9px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(128, 128, 128, .5);
	box-shadow: none;
	cursor: pointer;
}

.webvip-projects-slider__dot.is-active {
	background: var(--primary-color, #b36b74);
}

/* ================================================================
 * Trang archive và taxonomy dự án
 * ================================================================ */
.webvip-project-archive {
	padding: 38px 0 70px;
}

.webvip-project-archive__header {
	margin-bottom: 32px;
}

.webvip-project-breadcrumb {
	margin-bottom: 20px;
	font-size: 14px;
}

.webvip-project-archive__eyebrow,
.webvip-project-section-heading > span {
	display: block;
	margin-bottom: 8px;
	color: var(--primary-color, #b36b74);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.webvip-project-archive__title {
	max-width: 850px;
	margin: 0 0 10px;
	font-size: clamp(30px, 4vw, 50px);
	letter-spacing: -.025em;
	line-height: 1.12;
}

.webvip-project-archive__intro {
	max-width: 720px;
	margin: 0;
	color: #686868;
	font-size: 16px;
	line-height: 1.7;
}

.webvip-project-archive__intro p:last-child {
	margin-bottom: 0;
}

.webvip-project-pagination {
	display: flex;
	justify-content: center;
	gap: 7px;
	margin-top: 38px;
}

.webvip-project-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid #ddd;
	border-radius: 50px;
	color: #333;
	font-weight: 600;
}

.webvip-project-pagination .page-numbers.current,
.webvip-project-pagination .page-numbers:hover {
	border-color: var(--primary-color, #b36b74);
	color: #fff;
	background: var(--primary-color, #b36b74);
}

.webvip-project-empty {
	padding: 36px;
	border-radius: 12px;
	color: #666;
	text-align: center;
	background: #f7f7f7;
}

/* ================================================================
 * Trang chi tiết dự án và gallery
 * ================================================================ */
.webvip-project-single {
	padding: 34px 0 70px;
}

.webvip-project-single__title {
	margin: 0 0 24px;
	font-size: clamp(28px, 3.3vw, 44px);
	letter-spacing: -.02em;
	line-height: 1.18;
}

.webvip-project-gallery {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
	grid-template-rows: minmax(0, 1fr);
	gap: 10px;
	height: clamp(340px, 37vw, 490px);
	margin-bottom: 22px;
	overflow: hidden;
	border-radius: 12px;
}

.webvip-project-gallery--count-1 {
	display: block;
	height: auto;
}

.gallery-main,
.thumb-item {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 12px;
	cursor: zoom-in;
	background: #eee;
}

.webvip-project-gallery--count-1 .gallery-main {
	aspect-ratio: 16 / 9;
	max-height: 600px;
}

.gallery-main img,
.thumb-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease, filter .4s ease;
}

.gallery-main:hover img,
.thumb-item:hover img {
	transform: scale(1.025);
	filter: brightness(.92);
}

.gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 10px;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.webvip-project-gallery--count-2 .gallery-thumbs {
	grid-template-columns: 1fr;
	grid-template-rows: 1fr;
}

.webvip-project-gallery--count-3 .gallery-thumbs {
	grid-template-columns: 1fr;
	grid-template-rows: repeat(2, minmax(0, 1fr));
}

.webvip-project-gallery--count-4 .thumb-item:first-child {
	grid-row: 1 / 3;
}

.more-photo {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	color: #fff;
	background: rgba(0, 0, 0, .58);
	font-size: 24px;
	font-weight: 700;
}

.more-photo small {
	font-size: 14px;
}

/* Hộp gallery toàn màn hình. */
.gallery-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 40px 70px;
	background: rgba(8, 8, 8, .94);
}

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

.gallery-modal .roomSwiper {
	width: min(1200px, 100%);
	height: min(84vh, 850px);
}

.gallery-modal .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-modal .swiper-slide img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.gallery-modal .swiper-button-next,
.gallery-modal .swiper-button-prev {
	color: #fff;
}

.close-gallery {
	position: absolute;
	top: 18px;
	right: 24px;
	z-index: 2;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	color: #fff;
	font-size: 24px;
	line-height: 42px;
	background: rgba(255, 255, 255, .08);
}

.webvip-gallery-open {
	overflow: hidden;
}

/* Thông tin nhanh của dự án. */
.box_meta_single_content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 1px;
	margin: 0 0 34px;
	overflow: hidden;
	border-radius: 12px;
	background: rgba(255, 255, 255, .3);
	box-shadow: 0 7px 24px rgba(0, 0, 0, .08);
}

.box_meta_single_content .item {
	display: flex;
	align-items: center;
	gap: 13px;
	min-width: 0;
	padding: 17px 16px;
	background: var(--primary-color, #b36b74);
}

.box_meta_single_content .item img {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	padding: 6px;
	border-radius: 9px;
	object-fit: contain;
	background: rgba(255, 255, 255, .92);
}

.box_meta_single_content .item > div {
	min-width: 0;
}

.box_meta_single_content .fw-b {
	margin-bottom: 3px;
	color: rgba(255, 255, 255, .78);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.box_meta_single_content .fs-12 {
	overflow-wrap: anywhere;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.42;
}

.webvip-project-single__content {
	color: #333;
	font-size: 16px;
	line-height: 1.8;
}

/* ================================================================
 * Sidebar dự án mới nhất
 * ================================================================ */
.webvip-project-sidebar {
	padding-left: 22px;
}

.webvip-project-sidebar__latest,
.webvip-project-sidebar .widget {
	overflow: hidden;
	margin-bottom: 28px;
	padding: 14px;
	border: 1px solid #e7e7e7;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .06);
}

.webvip-project-sidebar__title,
.webvip-project-sidebar .sidebar_title {
	display: flex;
	align-items: center;
	width: calc(100% + 28px);
	max-width: none;
	min-height: 52px;
	margin: -14px -14px 14px;
	padding: 14px 16px;
	box-sizing: border-box;
	border: 0;
	border-radius: 13px 13px 0 0;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	background: var(--primary-color, #b36b74);
}

.webvip-project-sidebar__item {
	margin: 0;
	padding: 0 0 14px;
}

.webvip-project-sidebar__item + .webvip-project-sidebar__item {
	padding-top: 14px;
	border-top: 1px solid #ececec;
}

.webvip-project-sidebar__item:last-child {
	padding-bottom: 0;
}

.webvip-project-sidebar__image {
	display: block;
	overflow: hidden;
	margin-bottom: 9px;
	aspect-ratio: 16 / 9;
	border-radius: 9px;
	background: #eee;
}

.webvip-project-sidebar__image img,
.webvip-project-sidebar__image .webvip-project-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.webvip-project-sidebar__image:hover img {
	transform: scale(1.04);
}

.webvip-project-sidebar__item h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}

.webvip-project-sidebar__item h3 a {
	color: #333;
}

.webvip-project-sidebar__item h3 a:hover {
	color: var(--primary-color, #b36b74);
}

/* Widget dự án cũ vẫn được hỗ trợ nếu người dùng tự thêm vào sidebar. */
.webvip-project-sidebar .sidebar_list_post .item {
	display: grid;
	grid-template-columns: 82px minmax(0, 1fr);
	gap: 11px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #ececec;
}

.webvip-project-sidebar .sidebar_list_post .item:last-child {
	border-bottom: 0;
}

.webvip-project-sidebar .sidebar_list_post .thumb img {
	width: 82px;
	height: 64px;
	border-radius: 7px;
	object-fit: cover;
}

.webvip-project-sidebar .sidebar_list_post .title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

/* ================================================================
 * Dự án liên quan
 * ================================================================ */
.webvip-related-projects {
	margin-top: 60px;
	padding-top: 45px;
	border-top: 1px solid #e8e8e8;
}

.webvip-project-section-heading {
	margin-bottom: 24px;
	text-align: center;
}

.webvip-project-section-heading h2 {
	margin: 0;
	font-size: clamp(27px, 3vw, 38px);
}

@media (min-width: 550px) {
	.webvip-projects-slider__track,
	.webvip-projects-slider__page {
		grid-template-columns: repeat(var(--projects-tablet), minmax(0, 1fr));
	}
}

@media (min-width: 850px) {
	.webvip-projects-slider__track,
	.webvip-projects-slider__page {
		grid-template-columns: repeat(var(--projects-desktop), minmax(0, 1fr));
	}
}

@media (max-width: 1099px) {
	.webvip-project-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.webvip-project-gallery {
		grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
	}
}

@media (max-width: 849px) {
	.webvip-project-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.webvip-project-single__layout {
		display: flex;
		flex-direction: column;
	}

	.webvip-project-single__main,
	.webvip-project-sidebar {
		max-width: 100%;
		flex-basis: 100%;
	}

	.webvip-project-sidebar {
		order: 2;
		margin-top: 36px;
		padding-left: 15px;
	}

	.webvip-project-gallery {
		height: 390px;
	}
}

@media (max-width: 549px) {
	.webvip-project-archive,
	.webvip-project-single {
		padding-top: 24px;
	}

	.webvip-project-grid {
		grid-template-columns: 1fr;
	}

	.webvip-project-card__media {
		aspect-ratio: 4 / 3;
	}

	.webvip-project-gallery {
		display: block;
		height: auto;
	}

	.gallery-main,
	.webvip-project-gallery--count-1 .gallery-main {
		height: auto;
		aspect-ratio: 4 / 3;
	}

	.gallery-thumbs,
	.webvip-project-gallery--count-2 .gallery-thumbs,
	.webvip-project-gallery--count-3 .gallery-thumbs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
		grid-auto-rows: 115px;
		margin-top: 8px;
	}

	.webvip-project-gallery--count-2 .gallery-thumbs {
		grid-template-columns: 1fr;
	}

	.webvip-project-gallery--count-4 .thumb-item:first-child {
		grid-row: auto;
	}

	.gallery-modal {
		padding: 55px 18px 25px;
	}

	.box_meta_single_content {
		grid-template-columns: 1fr;
		margin-bottom: 26px;
	}

	.box_meta_single_content .item {
		padding: 14px;
	}

	.webvip-related-projects {
		margin-top: 42px;
		padding-top: 34px;
	}
}
