		:root {
			--fullGrid: 1 / 1 / -1 / -1;
		}

		.video-header {
			display: grid;
			grid-template-rows: 100vh;
			overflow: hidden;
			box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.5);
		}

		.main .kv {
			height: 100vh !important;
		}

		.video-bg {
			/* Span the full grid */
			grid-area: var(--fullGrid);

			/* Re-size video to cover full screen while maintaining aspect ratio */
			min-width: 100%;
			min-height: 100%;
			object-fit: cover;

			/* Display video below overlay */
			z-index: 1;
		}

		.video-bg::-webkit-media-controls {
			display: none !important;
		}

		.video-overlay {
			/* Span the full grid */
			grid-area: var(--fullGrid);

			/* Center Content */
			display: grid;
			justify-content: center;
			align-content: center;
			text-align: center;

			/* Semi-transparent background */
			background-color: rgba(0, 0, 0, 0.55);
			z-index: 2;
		}

		.hero-slogan-text {
			color: white;
			font-size: 2rem;
			text-shadow: 0 2px 4px rgba(0,0,0,0.5);
			line-height: 5;
			margin: 0;
		}

		@media (max-width: 768px) {
			.hero-slogan-text {
				font-size: 1.3rem;
				line-height: 1.8;
				padding: 30px 30px;
			}
		}

		.wrapper,
		.main {
			overflow-x: clip !important;
			overflow-y: visible !important;
			width: 100%;
			max-width: 100%;
		}

		html,
		body {
			width: 100%;
			max-width: 100vw;
			overflow-x: hidden;
		}

		.header {
			position: -webkit-sticky !important;
			position: sticky !important;
			top: 0 !important;
			z-index: 1000 !important;
		}

		/* 錨點偏移設定，防止被 sticky header 遮擋 */
		[id^="anchor"] {
			scroll-margin-top: 100px;
		}

		.video-header {
			width: 100%;
			max-width: 100%;
		}

		.loading {
			position: fixed !important;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			background-color: #000 !important;
			z-index: 99999 !important;
			overflow: hidden;
			display: flex;
			flex-direction: column;
			justify-content: center;
			opacity: 1;
			visibility: visible;
			transition: transform 1.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 1.5s ease-in-out;
		}

		.loading.loaded {
			transform: scale(1.05) !important;
			opacity: 0 !important;
			visibility: hidden !important;
			transition: opacity 0.8s ease-in-out, transform 0.8s ease-out, visibility 0s linear 0.8s;
		}

		.loader-inner {
			display: flex;
			flex-direction: column;
			width: 100%;
			animation: verticalScroll 12s linear infinite;
			transition: transform 0.8s ease, opacity 0.5s ease;
		}

		.loading.loaded .loader-inner {
			transform: translateY(-100px);
			opacity: 0;
		}

		.loader-row {
			display: flex;
			white-space: nowrap;
			padding: 5px 0;
		}

		.loader-track {
			display: flex;
			align-items: center;
			animation: horizontalScroll 10s linear infinite;
			/* Increased speed */
		}

		.loader-row:nth-child(even) .loader-track {
			animation-direction: reverse;
		}

		.loader-item {
			display: inline-flex;
			align-items: center;
			/*padding: 0 10px;*/
			/* Tightened spacing */
		}

		.loader-item .text {
			font-family: 'Ubuntu', 'Arial Black', 'Impact', 'Noto Sans TC', sans-serif;
			font-weight: 900;
			font-size: 16vh;
			/* Reduced size */
			color: #fff;
			text-transform: uppercase;
			letter-spacing: -2px;
			/* Less cramped */
			line-height: 0.8;
			padding: 0 40px;
		}

		.loader-item .img-box {
			width: 55vh;
			/* Extreme scale images */
			height: 35vh;
			background: #111;
			margin: 0 10px;
			/* Tightened spacing */
			overflow: hidden;
			border-radius: 8px;
		}

		.loader-item .img-box img {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}

		.loader-item.stroke .text {
			-webkit-text-stroke: 0.6px rgba(255, 255, 255, 0.80);
			/* Ultra-fine stroke */
			color: transparent;
		}

		/* Brand Logo Custom Scaling */
		.loader-item.brand-logo .img-box {
			width: 28vh !important;
			/* Smaller width for logos */
			height: 14vh !important;
			/* Matches text height better */
			background: transparent !important;
			margin: 0 50px !important;
			border-radius: 0;
			box-shadow: none;
		}

		.loader-item.brand-logo .img-box img {
			width: 100% !important;
			height: 100% !important;
			object-fit: contain !important;
			padding: 0 !important;
			/* Use container size to control logo scale */
		}

		@keyframes horizontalScroll {
			0% {
				transform: translateX(0);
			}

			100% {
				transform: translateX(-50%);
			}
		}

		/* Milestone Snap Scroll Section */
		/* Behind the Scenes - Horizontal Mouse Follow */
		/* Behind the Scenes - ScrollTrigger (Native Sticky Layout) */
		.bts-scroll-manager {
			position: relative;
			width: 100%;
			height: 650vh;
			/* 生成供使用者往下滾動的物理長度 (增加長度讓操作需多滾動幾下) */
			z-index: 50;
			/* 防止上層文字覆蓋 */
		}

		.behind-scenes-section {
			position: sticky;
			/* 原生鎖住畫面，徹底擺脫 GSAP pin 與父層 overflow 衝突造成的卡死現象 */
			top: 0;
			z-index: 50;
			width: 100%;
			height: 100vh;
			/* 強制此區塊滿版 */
			background: #000;
			margin: 0;
			padding-top: 60px;
			/* 避開上方導覽列 */
			box-sizing: border-box;
			overflow: hidden;
		}

		.bts-sticky-wrapper {
			width: 100%;
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: center;
		}

		.bts-title-box {
			text-align: center;
			padding: 40px 0 20px;
			z-index: 10;
		}

		.bts-title-box h2 {
			color: #ffffff !important;
			font-size: 3rem;
			font-weight: 800;
			letter-spacing: 0.2em;
			text-transform: uppercase;
			margin: 0;
			text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
		}

		.bts-horizontal-container {
			display: flex;
			flex-direction: column;
			gap: 30px;
			padding: 20px 10vw;
			height: calc(100vh - 180px);
			/* 調整高度以容納後續直圖 */
			will-change: transform;
		}

		.bts-row {
			display: flex;
			gap: 25px;
			height: 100%;
			/* 單列佔滿版高度 */
			width: max-content;
			/* 確保容易完整撐開以得到精準計算長度 */
		}



		.scene-item {
			flex: 0 0 550px;
			/* Increased width for more horizontal scroll impact */
			height: 100%;
			/* 動態填滿 Row */
			position: relative;
			overflow: hidden;
			border-radius: 12px;
			background: #111;
			border: 1px solid rgba(255, 255, 255, 0.1);
			transition: border-color 0.3s ease, box-shadow 0.3s ease;
		}

		.scene-item:hover {
			border-color: #00d2ff;
			box-shadow: 0 0 30px rgba(0, 210, 255, 0.2);
		}

		.scene-item img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
			filter: grayscale(0.5) brightness(0.8);
		}

		.scene-item:hover img {
			transform: scale(1.08);
			filter: grayscale(0) brightness(1);
		}

		.scene-info {
			position: absolute;
			bottom: 0;
			left: 0;
			width: 100%;
			padding: 30px 20px;
			background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
			color: #fff;
			z-index: 2;
		}

		.scene-info h4 {
			font-family: 'Noto Sans TC', sans-serif;
			font-weight: 700;
			font-size: 20px;
			margin-bottom: 5px;
			color: #00d2ff !important;
		}

		.scene-info p {
			font-size: 14px;
			line-height: 1.5;
			opacity: 0.8;
			font-weight: 300;
			margin: 0;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			line-clamp: 2;
			/* Compatibility */
			-webkit-box-orient: vertical;
			overflow: hidden;
		}

		@media (max-width: 1024px) {
			.bts-horizontal-container {
				padding: 20px 5vw;
			}

			.scene-item {
				flex: 0 0 320px;
				/* 手機版寬度，保留橫向捲動屬性 */
			}

			.bts-title-box h2 {
				font-size: 2rem;
			}
		}

		.milestone-snap-container {
			width: 100%;
			overflow-x: hidden;
		}

		.milestone-snap-page {
			box-sizing: border-box;
			/* 修正加上 padding 後溢出畫面的寬度問題 */
			height: 100vh;
			width: 100%;
			position: relative;
			background-size: cover;
			background-position: center;
			background-attachment: fixed;
			/* Parallax Effect */
			display: flex;
			align-items: center;
			justify-content: flex-start;
			padding-left: 10%;
			overflow: hidden;
		}

		/* Optional Overlay to increase text readability */
		.milestone-snap-page::before {
			content: '';
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
			z-index: 1;
		}

		.milestone-content-block {
			position: relative;
			z-index: 2;
			max-width: 650px;
			color: #fff;
			opacity: 0;
			transform: translateX(-50px);
			transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
		}

		.milestone-snap-page.is-visible .milestone-content-block {
			opacity: 1;
			transform: translateX(0);
		}

		.milestone-content-block h2 {
			font-size: 3.5rem;
			font-weight: 700;
			margin-bottom: 20px;
			color: #00d2ff !important;
			text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
		}

		.milestone-content-block p {
			font-size: 1.25rem;
			line-height: 1.8;
			color: #e0e0e0;
			text-align: justify;
		}

		.milestone-year {
			font-size: 6rem;
			font-family: 'Ubuntu', sans-serif;
			font-weight: 900;
			opacity: 0.15;
			position: absolute;
			top: 20px;
			right: 40px;
			line-height: 1;
			color: #fff;
		}

		@media (max-width: 768px) {
			.milestone-snap-page {
				padding: 0 40px;
				justify-content: center;
				background-attachment: scroll;
				/* 恢復與桌機相同的固定視差切換 */
			}

			.milestone-snap-page::before {
				background: rgba(0, 0, 0, 0.6);
			}

			.milestone-content-block h2 {
				font-size: 2rem;
			}

			.milestone-content-block p {
				font-size: 1rem;
			}

			.milestone-year {
				font-size: 3rem;
				right: 20px;
			}
		}

		@keyframes verticalScroll {
			0% {
				transform: translateY(0);
			}

			100% {
				transform: translateY(-50%);
			}
		}

		.loading-label {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			background: #fff;
			color: #000;
			padding: 20px 60px;
			font-family: 'Ubuntu', sans-serif;
			font-weight: 900;
			font-size: 24px;
			letter-spacing: 12px;
			z-index: 100;
			box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
			border-radius: 4px;
		}

		/* 40th Majestic Logo - ELITE SPECULAR GLARE SYSTEM */
		.logo-tilt-box {
			position: relative;
			display: inline-block;
			z-index: 9999;
			cursor: pointer;
			pointer-events: auto !important;
			perspective: 1200px;
		}

		/* SEPARATE WRAPPER FOR ENTRANCE - Prevents JS transform conflicts */
		.logo-entrance-wrapper {
			position: relative;
			opacity: 0;
			transform-style: preserve-3d;
		}

		.kv.on .logo-entrance-wrapper {
			animation: logoEliteEntry 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
		}

		@keyframes logoEliteEntry {
			0% {
				transform: scale(3.5) translateZ(-400px) translateY(-40px);
				opacity: 0;
				filter: brightness(2) blur(10px);
			}

			100% {
				transform: scale(1) translateZ(0) translateY(0);
				opacity: 1;
				filter: brightness(1) blur(0);
			}
		}

		.logo-majestic-container {
			position: relative;
			display: block;
			transform-style: preserve-3d;
			/* Anti-blurring optimizations */
			will-change: transform;
			-webkit-backface-visibility: hidden;
			backface-visibility: hidden;
			-webkit-font-smoothing: antialiased;
			-moz-osx-font-smoothing: grayscale;

			/* Transition for return-to-center */
			transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.6s ease;
			padding: 0px 30px;
		}

		.logo-majestic {
			display: block;
			max-width: 100%;
			height: auto;
			position: relative;
			z-index: 10;
			pointer-events: none;
		}

		/* LIGHT GLARE: Dynamic linear-gradient specular reflection */
		.logo-shine-layer {
			position: absolute;
			top: -10%;
			left: -10%;
			width: 120%;
			height: 120%;
			pointer-events: none;
			z-index: 20;
			mix-blend-mode: color-dodge;
			opacity: 0;
			transition: opacity 0.5s ease;

			/* Mask - compatible formats */
			-webkit-mask-image: url('img/40thLOGO.svg');
			mask-image: url('img/40thLOGO.svg');
			-webkit-mask-size: contain;
			mask-size: contain;
			-webkit-mask-repeat: no-repeat;
			mask-repeat: no-repeat;
			-webkit-mask-position: center;
			mask-position: center;

			/* Specular Reflection Effect */
			background: linear-gradient(var(--glare-angle, 0deg),
					rgba(255, 255, 255, 0) 0%,
					rgba(255, 255, 255, var(--glare-opacity, 0)) 50%,
					rgba(255, 255, 255, 0) 100%);
		}

		.logo-tilt-box:hover .logo-shine-layer {
			opacity: 1;
		}

		.logo-tilt-box:hover .logo-majestic-container {
			filter: drop-shadow(0 40px 80px rgba(255, 255, 255, 0.3));
		}

		/* Timeline Fixes - Sync from 40th-p2.html with alignment fixes */
		.swiperStyle6 .timelineCont {
			padding: 40px 0 0px;
			width: 100%;
			max-width: 1200px;
			margin: 0 auto;
			position: relative;
		}

		.swiperStyle6 .swiper-container-wrapper--timeline {
			margin-top: 40px !important;
			position: relative;
		}

		.swiper-timeline-nav {
			width: 100%;
			margin: 0 auto 60px !important;
			overflow: visible !important;
			position: relative;
		}

		.swiper-timeline-nav:before {
			content: "";
			position: absolute;
			top: 0;
			left: -100vw;
			right: -100vw;
			height: 2px;
			background: #E0E0E0;
			z-index: 1;
		}

		.swiper-timeline-nav .swiper-slide {
			height: 60px;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: flex-start;
			cursor: pointer;
			opacity: 0.5;
			transition: all 0.4s ease;
			position: relative;
		}

		.swiper-timeline-nav .swiper-slide-active {
			opacity: 1;
		}

		.swiper-timeline-nav .swiper-slide:after {
			content: "";
			display: block;
			position: absolute;
			top: -6px;
			left: 50%;
			width: 12px;
			height: 12px;
			transform: translateX(-50%);
			background: #C9D6DF;
			border-radius: 50%;
			z-index: 10;
			transition: all 0.4s ease;
		}

		.swiper-timeline-nav .swiper-slide-active:after {
			background: #00d2ff;
			width: 20px;
			height: 20px;
			top: -10px;
			box-shadow: 0 0 20px rgba(0, 210, 255, 0.6);
		}

		.swiper-timeline-nav .switch-title {
			margin-top: 15px;
			font-family: 'Ubuntu', sans-serif;
			font-weight: 500;
			color: #52616B;
			font-size: 14px;
			transition: all 0.4s ease;
			text-align: center;
			width: 100%;
		}

		.swiper-timeline-nav .swiper-slide-active .switch-title {
			color: #00d2ff;
			font-weight: 700;
			font-size: 18px;
			margin-top: 18px;
		}

		.swiperStyle6 .swiper-container--timeline {
			overflow: visible !important;
		}

		.swiperStyle6 .swiper-slide {
			display: flex !important;
			justify-content: center !important;
			align-items: flex-start !important;
			text-align: center;
			padding: 20px 15px;
			opacity: 0.45;
			transform: scale(0.85);
			transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
		}

		.swiperStyle6 .swiper-slide-active {
			opacity: 1;
			transform: scale(1);
		}

		.swiperStyle6 .contBlock {
			width: 100% !important;
			max-width: 500px !important;
			margin: 0 auto !important;
			opacity: 1;
			transform: none;
			transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
			display: block !important;
			visibility: visible !important;
		}

		.swiperStyle6 .contBlock .txt1 b {
			display: block;
			font-size: 2.2rem;
			color: #00d2ff !important;
			margin-bottom: 15px;
			font-family: 'Ubuntu', sans-serif;
			font-weight: 700;
			text-align: center !important;
			/* Force centering to align with years */
		}

		.swiperStyle6 .contBlock .txt1 p {
			font-size: 18px !important;
			line-height: 1.8;
			color: #1E2022 !important;
			/* Force centering to align with years */
			font-weight: 400;
			display: -webkit-box;
			-webkit-line-clamp: 4;
			-webkit-box-orient: vertical;
			overflow: hidden;
		}

		@media (max-width: 768px) {
			.swiper-timeline-nav {
				margin-bottom: 30px !important;
			}

			.swiper-timeline-nav .switch-title {
				font-size: 11px;
				margin-top: 25px;
			}

			.swiperStyle6 .contBlock .txt1 b {
				font-size: 1.5rem;
			}

			.swiperStyle6 .contBlock .txt1 p {
				font-size: 0.95rem;
				-webkit-line-clamp: unset !important;
				max-height: 190px;
				overflow-y: auto;
			}
		}
						.logo-wall-wrapper {
							display: grid;
							grid-template-columns: repeat(4, 1fr);
							gap: 15px;
							margin: 40px auto 0;
							width: 100%;
							max-width: 1100px;
						}

						.logo-item {
							display: flex;
							align-items: center;
							justify-content: center;
							padding: 10px;
							border-radius: 8px;
							text-decoration: none;
							opacity: 0;
							/* Default hidden for animate.css */
						}

						.logo-item img {
							max-width: 100%;
							height: auto;
							max-height: 120px;
							object-fit: contain;
						}

						/* 觸發 animate.css 動畫時強制顯示 */
						.logo-item.animate__animated {
							opacity: 1;
						}

						@media(max-width: 768px) {
							.logo-wall-wrapper {
								grid-template-columns: 1fr;
								gap: 15px;
								width: 80%;
							}

							.logo-item {
								padding: 10px;
							}

							.logo-item img {
								width: 100%;
								max-height: none;
							}
						}

/* ==========================================================================
   Flagship Investigations Grid (Anchor5) Card Style Override
   ========================================================================== */
.main .page .newsCont {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -ms-flex-wrap: wrap !important;
  flex-wrap: wrap !important;
  -webkit-box-pack: center !important;
  -ms-flex-pack: center !important;
  justify-content: center !important;
  gap: 30px !important;
  margin-top: 30px !important;
  width: 100% !important;
}

.main .page .newsCont .box {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: vertical !important;
  -webkit-box-direction: normal !important;
  -ms-flex-direction: column !important;
  flex-direction: column !important;
  width: calc(50% - 15px) !important;
  margin: 0 !important;
  background: #ffffff !important;
  border: 1px solid #eef2f6 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(12, 97, 155, 0.04) !important;
  -webkit-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
}

.main .page .newsCont .box:hover {
  -webkit-transform: translateY(-8px) !important;
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 40px rgba(12, 97, 155, 0.12) !important;
  border-color: rgba(12, 97, 155, 0.2) !important;
}

.main .page .newsCont .box img {
  width: 100% !important;
  height: 370px !important;
  object-fit: cover !important;
  border-bottom: 1px solid #eef2f6 !important;
  -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transition: -webkit-transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), -webkit-transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.main .page .newsCont .box:hover img {
  -webkit-transform: scale(1.03) !important;
  transform: scale(1.03) !important;
}

.main .page .newsCont .box .coverBox {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  -webkit-transform: none !important;
  transform: none !important;
  background: transparent !important;
  padding: 24px !important;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
}

.main .page .newsCont .box .coverBox .txtBox {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  -webkit-transform: none !important;
  transform: none !important;
  padding: 0 !important;
  color: #1e2022 !important;
}

.main .page .newsCont .box .coverBox .txtBox .txt1 p {
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  color: #0c619b !important; /* GVM Brand Blue */
  margin-bottom: 12px !important;
  letter-spacing: 0.5px !important;
  padding: 0 !important;
  text-align: left !important;
}

.main .page .newsCont .box .coverBox .txtBox .txt3 {
  opacity: 1 !important;
  display: block !important;
}

.main .page .newsCont .box .coverBox .txtBox .txt3 p {
  font-size: 1.2rem !important;
  line-height: 1.6 !important;
  color: #1e232f !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

/* Disable old hover animations & states from layout.css */
.main .page .newsCont .box.on .coverBox,
.main .page .newsCont .box.on .coverBox .txtBox,
.main .page .newsCont .box.on .coverBox .txtBox .txt3 {
  height: auto !important;
  top: auto !important;
  opacity: 1 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .main .page .newsCont {
    gap: 20px !important;
    /*padding: 0 15px !important;*/
  }

  .main .page .newsCont .box {
    width: 100% !important;
  }

  .main .page .newsCont .box img {
    height: 180px !important;
  }

  .main .page .newsCont .box .coverBox {
    padding: 20px !important;
  }

  .main .page .newsCont .box .coverBox .txtBox .txt1 p {
    font-size: 1.15rem !important;
    margin-bottom: 8px !important;
  }

  .main .page .newsCont .box .coverBox .txtBox .txt3 p {
    font-size: 0.95rem !important;
  }
}

/* ==========================================================================
   Floating Pop Button & Gallery Popup Style
   ========================================================================== */
.float .float-popBtn {
  position: fixed;
  right: 30px !important;
  bottom: 350px !important;
  display: block;
  width: 100px !important;
  height: auto;
  z-index: 9999;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  text-align: center;
}

.float .float-popBtn.on {
  opacity: 1;
  visibility: visible;
}

.float .float-popBtn:hover {
  transform: translateY(-5px);
}

.float .float-popBtn img {
  width: 100%;
  vertical-align: middle;
}

/* Popup Vertically Centered Layout */
.popup {
  overflow-x: hidden !important; /* Force hide any potential horizontal overflow from absolute elements inside popup */
  z-index: 999999 !important; /* Ensure popup is above right-side floating buttons */
}

.popup .popCont_gallery.on {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100% !important;
  max-width: 100% !important; /* Override layout.css max-width: 800px to allow flex centering across full screen */
  left: 0 !important;
  transform: none !important;
  padding: 0 15px; 
  box-sizing: border-box;
  margin: 0 !important;
}

.popCont_gallery .contBox {
  width: 100%;
  max-width: 1000px;
  max-height: 80vh;
  background: #fff; 
  padding: 40px; 
  border-radius: 12px; 
  position: relative;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.popCont_gallery .pop-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px; /* keep some padding so content doesn't hug the right edge tightly */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.popCont_gallery .pop-scroll-area::-webkit-scrollbar {
  display: none;
}

/* Close Button Overrides for this popup */
.popCont_gallery .btn_close_sty2 {
  position: absolute;
  right: 15px;
  top: 15px;
  z-index: 20;
}

/* Make the cross lines dark because the background is white */
.popCont_gallery .btn_close_sty2::before,
.popCont_gallery .btn_close_sty2::after {
  background: #333 !important;
}

.popCont_gallery .swiper-galleryPop-prev,
.popCont_gallery .swiper-galleryPop-next {
  width: 40px;
  height: 40px;
  background-color: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -20px;
}

.popCont_gallery .swiper-galleryPop-prev::after,
.popCont_gallery .swiper-galleryPop-next::after {
  color: #fff;
  font-size: 18px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

/* Mobile responsive for popup */
@media (max-width: 768px) {
  .float .float-popBtn {
    right: 15px !important;
    bottom: 250px !important; 
    width: 100px !important;
  }
  .popCont_gallery .contBox {
    width: 90% !important; /* using 90% to utilize space better, but user requested 80%. I'll set it to 80% as requested */
    width: 80% !important;
    padding: 35px 20px 20px 20px !important; /* extra top padding to avoid overlap with close button */
  }
  
  .popCont_gallery .swiperStyle-galleryPop {
    padding: 0 !important;
  }
  
  .popCont_gallery .txtBox .pop-title {
    font-size: 1.3rem !important;
  }
  .popCont_gallery .txtBox .pop-desc {
    font-size: 0.95rem !important;
  }
  
  /* Adjust navigation arrows on mobile so they don't break layout */
  .popCont_gallery .swiper-galleryPop-prev,
  .popCont_gallery .swiper-galleryPop-next {
    width: 30px;
    height: 30px;
  }
  .popCont_gallery .swiper-galleryPop-prev {
    left: 5px !important;
  }
  .popCont_gallery .swiper-galleryPop-next {
    right: 5px !important;
  }
  .popCont_gallery .swiper-galleryPop-prev::after,
  .popCont_gallery .swiper-galleryPop-next::after {
    font-size: 14px;
  }
}
