/***** section id="construction-progress" ******/

.сarousel-item {
	max-height: 600px !important;
	position: relative;
	background-color: #f0f0f0;
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.3s ease;
}

.сarousel-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.сarousel-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: opacity 0.3s ease-in-out, transform 0.3s ease;
	border-radius: 12px;
}

.сarousel-img:hover {
	transform: scale(1.02);
}

/* Lazy loading styles */
.сarousel-img.lazyload {
	opacity: 0;
}

.сarousel-img.lazyloaded {
	opacity: 1;
}

/* Error placeholder styling */
.сarousel-img.error-placeholder {
	opacity: 0.5;
	background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.сarousel-img.error-placeholder::after {
	content: 'Изображение не загружено';
	font-size: 14px;
	color: #999;
	text-align: center;
	padding: 20px;
}

/* Loading placeholder */
.сarousel-img[data-src] {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.tab.tab-block {
	scrollbar-width: thin;
	scrollbar-color: var(--accent) var(--background);
}

::-webkit-scrollbar {
	width: 5px;
}

::-webkit-scrollbar-track {
	border-radius: 5px;
}

::-webkit-scrollbar-thumb {
	background-color: var(--accent);
	border-radius: 5px;
}


#construction-progress {
	padding: 88px 0 100px 0;
}

.nav.const-progress-nav {
	flex-direction: column;
}

.control-div {
	width: 40px;
	height: 40px;
	background-color: var(--accent);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
}

.control-div:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.construction-progress-row,
.construction-progress-flex {
	display: flex;
	align-items: center;
}

.construction-progress-row h3 {
	color: var(--darkGray);
}

.video-info span svg {
	margin-top: -3px;
}

a.svg-share-small {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 10;
}

.carousel-control-prev-icon {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='11' height='19' viewBox='0 0 11 19' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.70312 1.89185L1.05448 9.67563L9.37048 17.027' stroke='%23F1F2F2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='11' height='19' viewBox='0 0 11 19' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1.29688 1.89185L9.94552 9.67563L1.62952 17.027' stroke='%23F1F2F2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

@media (max-width: 768px) {

	h2.main-h2-color,
	h2.main-name-h2 {
		font-size: 22px;
		line-height: 35px;
	}
}

@media (max-width: 800px) {
	/* On mobile, stack blocks vertically */
	.construction-progress-content {
		display: flex;
		flex-direction: column;
		gap: 20px;
	}

	.construction-progress-left {
		width: 100% !important;
		order: 1;
	}

	.construction-progress-right {
		width: 100% !important;
		order: 2;
	}

	.tab-wrapper {
		flex-direction: column;
		width: 100% !important;
	}

	.tab.tab-block {
		width: 100% !important;
		max-height: 300px;
	}

	h1.main-name-h1,
	.tab-wrapper .tab button,
	.tablinks {
		width: 100% !important;
		text-align: center !important;
	}

	#video-1.tabcontent,
	.tabcontent {
		width: 100% !important;
		margin-top: 20px !important;
		padding: 0 !important;
	}

	.tablinks-new {
		position: static !important;
		width: 100% !important;
		text-align: center !important;
		margin-top: 20px;
	}

	#construction-progress {
		padding: 30px 15px 50px 15px;
	}

	h3.main-name-color {
		text-align: center;
		font-size: 18px;
	}

	.construction-month {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.tabCameras {
		position: static !important;
		top: auto;
		left: auto;
		margin-bottom: 20px;
		justify-content: center;
		width: 100%;
	}
}

/************ .tab.tab-block ***********/
/* Desktop: Two column layout - left (smaller) and right (larger) */
@media (min-width: 801px) {
	.construction-progress-content {
		display: flex;
		flex-direction: row;
		align-items: flex-start;
		gap: 20px;
	}

	/* Left block: buttons and months list (smaller) */
	.construction-progress-left {
		flex-shrink: 0;
		width: 30%;
		min-width: 280px;
	}

	/* Right block: photo carousel (larger) */
	.construction-progress-right {
		flex: 1;
		min-width: 0;
		width: 70%;
	}

	/* On desktop, tab-wrapper should take full width of left block */
	.construction-progress-left .tab-wrapper {
		width: 100%;
	}

	/* On desktop, tab.tab-block should take full width of tab-wrapper */
	.tab-wrapper .tab.tab-block {
		width: 100%;
	}

	/* On desktop, tabcontent should take full width of right block */
	.construction-progress-right .tabcontent {
		width: 100%;
		min-width: 0;
	}
}

.tab-wrapper {
	position: relative;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0;
}

.tab.tab-block {
	border: none;
	background-color: #fff;
	width: 100%;
	max-height: 405px;
	overflow-y: scroll;
	flex-shrink: 0;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 8px;
}

.tab.tab-block::-webkit-scrollbar {
	width: 0;
}

.tab.tab-block {
	-ms-overflow-style: none;
}

/* Style the buttons inside the tab */
.tab button {
	display: block;
	background-color: inherit;
	width: 100%;
	border: none;
	outline: none;
	text-align: left;
	cursor: pointer;
	transition: all 0.3s ease;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 4px;
}

/* Change background color of buttons on hover */
.tab button:hover {
	background-color: #f8f8f8;
	transform: translateX(4px);
}

/* Create an active/current "tab button" class */
.tab button.active {
	background-color: #fff;
	box-shadow: 0 2px 4px rgba(211, 148, 90, 0.2);
}

/* Style the tab content */
.tabcontent {
	position: relative;
	padding: 0px 12px;
	border: none;
	border-left: none;
	width: 100%;
	flex: 1;
	min-width: 0;
	border-radius: 12px;
}

.tabCameras {
	position: absolute;
	top: -40px;
	left: 12px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.tabCameras .button {
	padding: 10px 20px;
	border-radius: 8px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tabCameras .button:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tablinks-new {
	position: absolute;
	bottom: -385px;
	left: 0;
	width: 20%;
	border: none;
	background-color: #fff;
	text-align: left;
	outline: none;
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.tablinks-new:hover {
	opacity: 0.7;
}

button.tablinks-new:focus {
	outline: none;
	outline: none;
}

/* Video Modal - Clean Version */
.video-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
}

.video-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.85);
	cursor: pointer;
	z-index: 1;
}

.video-modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 1200px;
	max-height: 90vh;
	background-color: #000;
	border-radius: 8px;
	overflow: visible;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	z-index: 2;
	pointer-events: none;
}

.video-modal-content > * {
	pointer-events: auto;
}

/* Кнопка закрытия видео: справа сверху страницы, акцентный цвет (поверх шапки) */
.video-modal-close-page {
	position: fixed;
	top: 24px;
	right: 24px;
	width: 48px;
	height: 48px;
	background-color: var(--accent);
	color: #fff;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	z-index: 99999;
	padding: 0;
	margin: 0;
	box-shadow: 0 4px 16px rgba(235, 103, 83, 0.45);
}

.video-modal-close-page:hover {
	background-color: #f07865;
	transform: scale(1.08);
	box-shadow: 0 6px 20px rgba(235, 103, 83, 0.55);
}

.video-modal-close-page:active {
	transform: scale(0.96);
}

.video-modal-close-page:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.video-modal-close-page svg {
	pointer-events: none;
}

.video-modal-body {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	pointer-events: auto;
}

.video-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	pointer-events: auto;
}

.open-modal-btn {
	width: fit-content;
	cursor: pointer;
}

@media(max-width: 768px) {
	.video-modal-content {
		width: 95%;
		max-height: 85vh;
	}
	
	.video-modal-close-page {
		top: 16px;
		right: 16px;
		width: 44px;
		height: 44px;
	}
}

/* Video loading indicator */
.video-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 1;
	color: #fff;
}

.video-loading p {
	margin-top: 20px;
	font-size: 16px;
	color: #fff;
}

.spinner {
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid #D3945A;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@media(max-width: 600px) {
	.tabcontent {
		padding: 0;
	}

	.tab.tab-block {
		max-height: 250px;
	}

	.сarousel-item {
		min-height: 300px;
		max-height: 400px !important;
	}

	.tabCameras .button {
		padding: 8px 16px;
		font-size: 14px;
	}

	.complete-date {
		font-size: 16px;
		margin-top: 15px;
	}

	.construction-progress-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.construction-progress-row .col-lg-6 {
		width: 100%;
		margin-bottom: 20px;
	}
}

.carousel-control-next,
.carousel-control-prev {
	opacity: 1 !important;
	transition: opacity 0.3s ease;
}

.carousel-control-next:hover,
.carousel-control-prev:hover {
	opacity: 0.8 !important;
}

/* Optimize carousel performance */
.carousel-inner {
	will-change: transform;
}

.carousel-item {
	will-change: transform;
	backface-visibility: hidden;
	transform: translateZ(0);
}

/* Improve image loading performance */
.gallery-img {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-img .ico {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.gallery-img:hover .ico {
	opacity: 1;
}

.complete-date {
	font-size: 20px;
	line-height: 110%;
	font-weight: 600;
	padding: 16px;
	background-color: #f8f8f8;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Mode switcher styles */
.mode-switcher {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	width: 100%;
}

.mode-btn {
	padding: 10px 20px;
	border-radius: 8px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	border: 2px solid transparent;
	display: inline-block;
	text-decoration: none;
	text-align: center;
}

.mode-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mode-btn.active {
	background-color: var(--accent);
	color: #fff;
	border-color: var(--accent);
	cursor: default;
}

.mode-btn.active:hover {
	transform: none;
}

@media (max-width: 768px) {
	.mode-switcher {
		justify-content: center;
	}

	.mode-btn {
		font-size: 14px;
		padding: 8px 16px;
	}
}