/* ── Project Detail Container ── */
.project-detail {
	margin: 0 auto;
	padding: 40px 20px 60px;
}

/* ── Breadcrumb ── */
.project-breadcrumb {
	margin-bottom: 16px;
	font-size: 14px;
}

.project-breadcrumb nav {
	line-height: 1.6;
}

/* ── Title ── */
.project-title {
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 24px;
	line-height: 1.3;
}

@media (max-width: 767px) {
	.project-title {
		font-size: 24px;
	}
}

/* ── Gallery (từ shortcode [scf_image_gallery]) ── */
.project-detail .tour-gallery-layout {
	margin-bottom: 20px;
}

/* ── Icon in info label ── */
.project-info-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #888;
}

.project-info-label svg {
	flex-shrink: 0;
	color: #334862;
}

/* ── Content Row ── */
.project-content-row {
	margin-bottom: 30px;
}

/* ── Content Wrap ── */
.project-content-wrap {
	position: relative;
   background: #ffffff;
 	padding: 24px;
}

.project-content-inner {
	max-height: 300px;
	overflow: hidden;
	transition: max-height 0.45s ease;
	position: relative;
}

.project-content-inner.is-open {
	max-height: none;
}

.project-content-inner::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: linear-gradient(to top, #fff, transparent);
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.project-content-inner.is-open::after {
	opacity: 0;
}

.project-content-footer {
	text-align: center;
	margin-top: 12px;
}

.project-content-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: #334862;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 20px;
	transition: background 0.2s ease, color 0.2s ease;
	margin: 0;
}

.project-content-toggle:hover {
	background: rgba(51, 72, 98, 0.08);
	color: #1a2a3a;
}

.project-content-toggle .toggle-text-open {
	display: none;
}

.project-content-toggle .toggle-icon {
	display: inline-flex;
	transition: transform 0.3s ease;
}

.project-content-toggle.is-open .toggle-text {
	display: none;
}

.project-content-toggle.is-open .toggle-text-open {
	display: inline;
}

.project-content-toggle.is-open .toggle-icon {
	transform: rotate(180deg);
}

/* ── Sidebar ── */
.project-sidebar {
	margin-bottom: 30px;
}

.project-info-box {
	background: #fff;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.project-info-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.project-info-value {
	font-size: 15px;
	font-weight: 600;
	color: #222;
   padding-left: 22px;
 	text-transform: uppercase;
}

.project-info-value a {
	color: var(--primary-color);
	text-decoration: none;
}

.project-info-value a:hover {
	text-decoration: underline;
}

/* ── Related Projects ── */
.project-related-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 24px;
}

@media (max-width: 849px) {
	.project-detail {
     padding: 20px 0;
	}

	.project-info-box {
		padding: 20px;
	}
}

/* ═══════════════════════════════════════════════
   GALLERY (Module inc/gallery.php)
   ═══════════════════════════════════════════════ */
.tour-gallery-layout {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 180px 180px;
	gap: 10px;
}

.tour-gallery-item {
	position: relative;
	display: block;
	overflow: hidden;
}

.tour-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tour-gallery-item-1 {
	grid-column: 1 / 2;
	grid-row: 1 / 3;
}

.tour-gallery-item-2 {
	grid-column: 2 / 3;
	grid-row: 1 / 2;
}

.tour-gallery-item-3 {
	grid-column: 3 / 4;
	grid-row: 1 / 2;
}

.tour-gallery-item-4 {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
}

.tour-gallery-item-5 {
	grid-column: 3 / 4;
	grid-row: 2 / 3;
}

.gallery-more-btn {
	position: absolute;
	right: 16px;
	bottom: 14px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 8px 14px;
	font-size: 14px;
	z-index: 2;
}

@media (max-width: 767px) {
	.tour-gallery-layout {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 220px 120px 120px;
	}

	.tour-gallery-item-1 {
		grid-column: 1 / 3;
		grid-row: 1 / 2;
	}

	.tour-gallery-item-2 {
		grid-column: 1 / 2;
		grid-row: 2 / 3;
	}

	.tour-gallery-item-3 {
		grid-column: 2 / 3;
		grid-row: 2 / 3;
	}

	.tour-gallery-item-4 {
		grid-column: 1 / 2;
		grid-row: 3 / 4;
	}

	.tour-gallery-item-5 {
		grid-column: 2 / 3;
		grid-row: 3 / 4;
	}
}

/* Video item trong gallery */
.tour-gallery-video-item {
	position: relative;
	background: #000;
}

.tour-gallery-video-item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.22);
	z-index: 1;
	transition: all 0.25s ease;
}

.tour-gallery-video-item:hover::after {
	background: rgba(0, 0, 0, 0.34);
}

.tour-gallery-play-icon {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.tour-gallery-play-icon svg {
	filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.35));
}

.tour-gallery-play-icon circle {
	fill: rgba(255, 255, 255, 0.92);
}

.tour-gallery-play-icon path {
	fill: #012169;
}

.tour-gallery-video-item:hover .tour-gallery-play-icon {
	transform: translate(-50%, -50%) scale(1.06);
}

@media (max-width: 767px) {
	.tour-gallery-play-icon svg {
		width: 58px;
		height: 58px;
	}
}

/* ═══════════════════════════════════════════════
   FANCYBOX POPUP (Gallery lightbox)
   ═══════════════════════════════════════════════ */
.fancybox__container {
	--fancybox-bg: rgba(0, 0, 0, 0.86);
	z-index: 99999999 !important;
}

.fancybox__backdrop {
	background: rgba(0, 0, 0, 0.86) !important;
}

.fancybox__carousel .fancybox__slide {
	padding: 32px 48px 118px !important;
}

.fancybox__image {
	max-height: calc(100vh - 170px) !important;
	object-fit: contain !important;
}

.fancybox__content {
	background: transparent !important;
	box-shadow: none !important;
}

.fancybox__nav .f-button {
	width: 52px !important;
	height: 52px !important;
	border-radius: 50% !important;
	background: rgba(0, 0, 0, 0.45) !important;
	color: #fff !important;
	opacity: 1 !important;
	backdrop-filter: blur(4px);
}

.fancybox__nav .f-button:hover {
	background: rgba(0, 0, 0, 0.68) !important;
}

.fancybox__toolbar {
	background: transparent !important;
	padding: 0 !important;
}

.fancybox__toolbar .f-button[data-fancybox-close],
.fancybox__toolbar .f-button[title="Close"] {
	position: fixed !important;
	top: 22px !important;
	right: 28px !important;
	width: 42px !important;
	height: 42px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.18) !important;
	color: #fff !important;
	padding: 0;
}

.fancybox__counter {
	position: fixed !important;
	right: 48px !important;
	bottom: 96px !important;
	background: rgba(0, 0, 0, 0.7) !important;
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	padding: 6px 10px !important;
}

.fancybox__footer {
	position: fixed !important;
	left: 50% !important;
	bottom: 24px !important;
	transform: translateX(-50%) !important;
	width: min(900px, calc(100vw - 120px)) !important;
	padding: 0 !important;
	background: transparent !important;
	z-index: 999999 !important;
	pointer-events: auto !important;
}

.f-thumbs {
	--f-thumb-width: 78px !important;
	--f-thumb-height: 56px !important;
	--f-thumb-gap: 10px !important;
	background: transparent !important;
	pointer-events: auto !important;
}

.f-thumbs__viewport {
	overflow: hidden !important;
	pointer-events: auto !important;
}

.f-thumbs__track {
	padding: 0 !important;
	pointer-events: auto !important;
}

.f-thumbs__slide {
	margin: 0 !important;
	padding: 0 !important;
	pointer-events: auto !important;
	overflow: hidden;
}

.f-thumbs__slide__button {
	overflow: hidden !important;
	border: 2px solid transparent !important;
	opacity: 0.72 !important;
	background: transparent !important;
	transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
	cursor: pointer !important;
	pointer-events: auto !important;
}

.f-thumbs__slide__img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	pointer-events: none !important;
}

.f-thumbs__slide.is-nav-selected .f-thumbs__slide__button {
	opacity: 1 !important;
	transform: scale(1.04);
}

.f-thumbs__slide.is-nav-selected {
	border: 1px solid #fff !important;
}

.f-thumbs__slide__button:hover {
	opacity: 1 !important;
}

.f-thumbs__slide__button::before,
.f-thumbs__slide__button::after {
	display: none !important;
}

@media (max-width: 767px) {
	.fancybox__carousel .fancybox__slide {
		padding: 24px 12px 100px !important;
	}

	.fancybox__image {
		max-height: calc(100vh - 150px) !important;
	}

	.fancybox__footer {
		width: calc(100vw - 24px) !important;
		bottom: 18px !important;
	}

	.f-thumbs {
		--f-thumb-width: 64px !important;
		--f-thumb-height: 48px !important;
		--f-thumb-gap: 8px !important;
	}

	.fancybox__counter {
		right: 16px !important;
		bottom: 82px !important;
		font-size: 12px !important;
	}

	.fancybox__nav .f-button {
		width: 42px !important;
		height: 42px !important;
	}

	.fancybox__toolbar .f-button[data-fancybox-close],
	.fancybox__toolbar .f-button[title="Close"] {
		top: 16px !important;
		right: 16px !important;
		width: 38px !important;
		height: 38px !important;
	}
}

/* Fancybox arrows */
.fancybox__nav button.f-button[data-carousel-next],
.fancybox__nav button.f-button[data-carousel-prev] {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 52px !important;
	height: 52px !important;
	border-radius: 50% !important;
	background: rgba(0, 0, 0, 0.55) !important;
	color: #fff !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	padding: 0;
}

.fancybox__nav button.f-button[data-carousel-next]:hover,
.fancybox__nav button.f-button[data-carousel-prev]:hover {
	background: rgba(0, 0, 0, 0.78) !important;
}

.fancybox__nav button.f-button[data-carousel-next] svg,
.fancybox__nav button.f-button[data-carousel-prev] svg {
	display: block !important;
	width: 22px !important;
	height: 22px !important;
	opacity: 1 !important;
	visibility: visible !important;
	overflow: visible !important;
}

.fancybox__nav button.f-button[data-carousel-next] svg path,
.fancybox__nav button.f-button[data-carousel-prev] svg path {
	fill: none !important;
	stroke: #fff !important;
	stroke-width: 2.5 !important;
	stroke-linecap: round !important;
	stroke-linejoin: round !important;
}

/* ═══════════════════════════════════════════════
   ARCHIVE / TAXONOMY
   ═══════════════════════════════════════════════ */
.project-archive {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px 60px;
}

.project-archive-breadcrumb {
	margin-bottom: 16px;
	font-size: 14px;
}

.project-archive-title {
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
}

.project-archive-desc {
	margin-bottom: 32px;
	color: #666;
	font-size: 15px;
	line-height: 1.6;
}

.project-archive-grid .psc-card {
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.project-archive-pagination {
	text-align: center;
}

.project-archive-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.project-archive-pagination a.page-numbers {
	padding: 8px 14px;
	text-decoration: none;
	color: #334862;
	transition: background 0.2s ease;
}

.project-archive-pagination a.page-numbers:hover {
	background: #f0f0f0;
}

.project-archive-pagination span.page-numbers.current {
	padding: 8px 14px;
	background: #334862;
	color: #fff;
	font-weight: 600;
}

@media (max-width: 849px) {
	.project-content-row {
		display: flex;
		flex-direction: column;
	}
	.project-content-row .col:first-child {
		order: 2;
	}
	.project-content-row .col:last-child {
		order: 1;
	}
	.project-sidebar {
	    margin-bottom: 0 !important;
	}
	.project-detail .tour-gallery-layout {
		margin-bottom: 15px;
	}
}

@media (max-width: 767px) {
	.project-archive {
		padding: 20px 0;
	}

	.project-archive-title {
		font-size: 24px;
	}
	.project-content-row {
		margin-bottom: 0;
	}
}
