/**
 * Hats Project Showcase Styles
 * Author: Habiburehaman
 * Inspired by Allure Event vertical portfolio showcase
 * Grounded in Hats Studio Brand Typography (Inter & 29LTBukra)
 */

/* ==========================================================================
   Hats Studio Brand Fonts (@font-face declarations)
   ========================================================================== */
@font-face {
	font-family: '29LTBukra';
	font-style: normal;
	font-weight: 300;
	src: url('/hats/wp-content/uploads/2025/06/29LTBukra-Light.otf') format('OpenType'),
		 url('/wp-content/uploads/2025/06/29LTBukra-Light.otf') format('OpenType');
	font-display: swap;
}

@font-face {
	font-family: '29LTBukra';
	font-style: normal;
	font-weight: 400;
	src: url('/hats/wp-content/uploads/2025/06/29LTBukra-Regular.otf') format('OpenType'),
		 url('/wp-content/uploads/2025/06/29LTBukra-Regular.otf') format('OpenType');
	font-display: swap;
}

@font-face {
	font-family: '29LTBukra';
	font-style: normal;
	font-weight: 500;
	src: url('/hats/wp-content/uploads/2025/06/29LTBukra-Medium.otf') format('OpenType'),
		 url('/wp-content/uploads/2025/06/29LTBukra-Medium.otf') format('OpenType');
	font-display: swap;
}

:root {
	--hats-font-latin: "Inter", "29LTBukra", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--hats-font-arabic: "29LTBukra", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   Root Page & Wrapper Resets
   ========================================================================== */
body.page-template-hats-project-showcase-template,
body.hats-showcase-active {
	overflow: hidden !important;
	background-color: #0c0c0c !important;
	font-family: var(--hats-font-latin) !important;
}

/* Hide standard page footer and overlays when showcase is active */
body.page-template-hats-project-showcase-template footer,
body.page-template-hats-project-showcase-template #footer-container,
body.page-template-hats-project-showcase-template .footer-middle,
body.page-template-hats-project-showcase-template .cd-cover-layer,
body.page-template-hats-project-showcase-template .preloader-wrap,
body.hats-showcase-active .preloader-wrap,
body.page-template-hats-project-showcase-template #app,
body.page-template-hats-project-showcase-template #clone-image,
body.page-template-hats-project-showcase-template #rotate-device {
	display: none !important;
	pointer-events: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	z-index: -9999 !important;
}

/* Reset Montoya page containers to full viewport */
.hats-showcase-main,
.hats-showcase-main-content,
.hats-showcase-wrapper-links,
.hats-showcase-items-wrapper {
	position: relative !important;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
	max-width: none !important;
}

/* Neutralize Montoya smooth-scroll containers on showcase page */
body.page-template-hats-project-showcase-template #content-scroll,
body.hats-showcase-active #content-scroll,
.hats-showcase-page #content-scroll {
	position: static !important;
	overflow: visible !important;
	height: 100% !important;
	width: 100% !important;
	max-height: none !important;
	transform: none !important;
}

body.page-template-hats-project-showcase-template .scroll-content,
body.hats-showcase-active .scroll-content,
.hats-showcase-page .scroll-content {
	transform: none !important;
	position: static !important;
	overflow: visible !important;
	height: 100% !important;
	width: 100% !important;
}

/* ==========================================================================
   Montoya Header Integration (Clean & High-Contrast Protection)
   ========================================================================== */
body.page-template-hats-project-showcase-template header,
body.hats-showcase-active header {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 120px !important;
	z-index: 1000 !important;
	pointer-events: none !important;
	background: linear-gradient(180deg, rgba(12, 12, 12, 0.95) 0%, rgba(12, 12, 12, 0.6) 55%, transparent 100%) !important;
	backdrop-filter: blur(8px) !important;
	-webkit-backdrop-filter: blur(8px) !important;
}

body.page-template-hats-project-showcase-template #header-container,
body.hats-showcase-active #header-container {
	box-sizing: border-box !important;
	height: inherit !important;
	padding: 20px 6vw !important;
	margin: 0 auto !important;
	position: relative !important;
	width: 100% !important;
	z-index: 20 !important;
	opacity: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	pointer-events: none !important;
}

body.page-template-hats-project-showcase-template #logo,
body.page-template-hats-project-showcase-template #logo a,
body.page-template-hats-project-showcase-template .button-wrap.menu {
	pointer-events: auto !important;
}

/* Ensure inactive fullscreen nav does NOT intercept screen touches/clicks */
body.page-template-hats-project-showcase-template nav.menu-primary-menu-container,
body.hats-showcase-active nav.menu-primary-menu-container {
	pointer-events: none !important;
}

body.page-template-hats-project-showcase-template nav.menu-primary-menu-container.open,
body.hats-showcase-active nav.menu-primary-menu-container.open {
	pointer-events: auto !important;
}

body.page-template-hats-project-showcase-template nav.menu-primary-menu-container ul.flexnav li a {
	font-family: var(--hats-font-latin) !important;
	font-size: 14px !important;
	letter-spacing: 0.05em !important;
}

/* ==========================================================================
   Vertical Showcase Section
   ========================================================================== */
.hats-showcase-vertical.portfolio-4 {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	background-color: #0c0c0c;
	color: #ffffff;
	z-index: 10;
	font-family: var(--hats-font-latin) !important;
}

.hats-showcase-vertical.portfolio-4 * {
	font-family: var(--hats-font-latin);
}

.hats-showcase-vertical .swiper-container.portfolio-4-activ {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	touch-action: none !important;
	-webkit-overflow-scrolling: touch !important;
	user-select: none !important;
	-webkit-user-select: none !important;
}

.hats-showcase-vertical .slider.swiper-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	touch-action: none !important;
}

/* Individual Slide */
.hats-showcase-vertical .swiper-slide {
	position: relative;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	box-sizing: border-box;
	touch-action: none !important;
}

/* Parallax Media Inner */
.hats-showcase-vertical .slide-inner {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	will-change: transform;
	touch-action: none !important;
}

.hats-showcase-vertical .slide-inner img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
	transform: scale(1.05);
	will-change: transform, filter;
}

/* Luxury Cinematic Gradients Overlay (Subdues bright background poster text) */
.hats-showcase-vertical .slide-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(12, 12, 12, 0.85) 0%, rgba(12, 12, 12, 0.42) 30%, rgba(12, 12, 12, 0.82) 75%, #0c0c0c 100%),
		radial-gradient(circle at 65% 50%, rgba(12, 12, 12, 0.35) 0%, rgba(12, 12, 12, 0.9) 100%);
}

.hats-showcase-vertical .slide-overlay::after {
	content: '';
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.75);
	pointer-events: none;
}

/* ==========================================================================
   Slide Content (Title, Tags, Action)
   ========================================================================== */
.hats-showcase-container {
	position: relative;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 6vw;
	box-sizing: border-box;
	z-index: 20;
	pointer-events: none;
}

.hats-showcase-vertical .portfolio-4__content {
	position: absolute;
	bottom: 135px;
	left: 6vw;
	max-width: 820px;
	z-index: 25;
	pointer-events: auto;
	text-align: left;
}

/* Title Styling with Hats Studio Brand Typography */
.hats-showcase-vertical .portfolio-4__content-title {
	font-family: var(--hats-font-latin) !important;
	font-size: clamp(36px, 5.8vw, 78px);
	font-weight: 700;
	line-height: 1.08;
	margin: 0 0 22px 0;
	letter-spacing: -0.025em;
	color: #ffffff;
	text-transform: capitalize;
	will-change: transform, opacity;
}

.hats-showcase-vertical .portfolio-4__content-title a {
	color: #ffffff;
	text-decoration: none;
	display: inline-block;
	transition: color 0.3s ease, opacity 0.3s ease;
	font-family: inherit !important;
}

.hats-showcase-vertical .portfolio-4__content-title a:hover {
	color: rgba(255, 255, 255, 0.85);
}

/* Tags List */
.hats-showcase-vertical .portfolio-4__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 26px 0;
	padding: 0;
	list-style: none;
	will-change: transform, opacity;
}

.hats-showcase-vertical .tag-pill {
	display: inline-flex;
	align-items: center;
	padding: 8px 18px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.22);
	color: rgba(255, 255, 255, 0.95);
	font-family: var(--hats-font-latin) !important;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: all 0.3s ease;
}

.hats-showcase-vertical .tag-pill:hover {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.4);
}

/* Action Button */
.hats-showcase-vertical .portfolio-4__action {
	will-change: transform, opacity;
}

.hats-showcase-vertical .view-project-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--hats-font-latin) !important;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #ffffff;
	text-decoration: none;
	position: relative;
	padding-bottom: 4px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	transition: all 0.3s ease;
}

.hats-showcase-vertical .view-project-btn .arrow-icon {
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hats-showcase-vertical .view-project-btn:hover {
	color: #ffffff;
	border-bottom-color: #ffffff;
}

.hats-showcase-vertical .view-project-btn:hover .arrow-icon {
	transform: translateX(5px);
}

/* ==========================================================================
   Bottom Navigation Bar
   ========================================================================== */
.hats-showcase-vertical .portfolio-4__bottom-bar {
	position: absolute;
	bottom: 38px;
	left: 0;
	width: 100%;
	padding: 0 6vw;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 500 !important;
	box-sizing: border-box;
	pointer-events: none !important;
	will-change: transform, opacity;
}

/* Counter & Horizontal Pill Bullets */
.hats-showcase-vertical .portfolio-4__meta-wrap {
	display: flex;
	align-items: center;
	gap: 20px;
	pointer-events: auto;
}

.hats-showcase-vertical .portfolio-4-counter {
	font-family: var(--hats-font-latin) !important;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.85);
	font-variant-numeric: tabular-nums;
	user-select: none;
	direction: ltr !important;
	unicode-bidi: isolate !important;
	display: inline-flex !important;
	align-items: center !important;
}

.hats-showcase-vertical .portfolio-4-counter .current-slide {
	display: inline-block;
	min-width: 20px;
}

.hats-showcase-vertical .counter-divider {
	color: rgba(255, 255, 255, 0.3);
	margin: 0 4px;
}

/* Pill Pagination */
.hats-showcase-vertical .portfolio-4-pagination {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 42vw;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 4px 0;
}

.hats-showcase-vertical .portfolio-4-pagination::-webkit-scrollbar {
	display: none;
}

.hats-showcase-vertical .swiper-pagination-bullet {
	position: relative;
	width: 40px;
	height: 4px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.22);
	cursor: pointer;
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	overflow: hidden;
	margin: 0 !important;
	flex-shrink: 0;
}

.hats-showcase-vertical .swiper-pagination-bullet::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 0;
	background: #ffffff;
	border-radius: 4px;
	transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hats-showcase-vertical .swiper-pagination-bullet-active {
	width: 68px;
	background: rgba(255, 255, 255, 0.35);
}

.hats-showcase-vertical .swiper-pagination-bullet-active::after {
	width: 100%;
}

/* Navigation Arrow Buttons */
.hats-showcase-vertical .portfolio-4__slider__arrow {
	display: flex;
	align-items: center;
	gap: 12px;
	pointer-events: auto !important;
	touch-action: manipulation !important;
}

.hats-showcase-vertical .portfolio-4__slider__arrow-prev,
.hats-showcase-vertical .portfolio-4__slider__arrow-next {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.22);
	color: #ffffff;
	padding: 10px 22px;
	border-radius: 999px;
	font-family: var(--hats-font-latin) !important;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	outline: none;
	user-select: none;
	pointer-events: auto !important;
	touch-action: manipulation !important;
	-webkit-tap-highlight-color: transparent !important;
}

.hats-showcase-vertical .portfolio-4__slider__arrow-prev:hover,
.hats-showcase-vertical .portfolio-4__slider__arrow-next:hover {
	background: #ffffff;
	color: #0c0c0c;
	border-color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hats-showcase-vertical .portfolio-4__slider__arrow-prev:active,
.hats-showcase-vertical .portfolio-4__slider__arrow-next:active {
	transform: translateY(0);
}

/* ==========================================================================
   RTL Arabic Adjustments (Using 29LTBukra)
   ========================================================================== */
body.rtl .hats-showcase-vertical,
body.rtl .hats-showcase-vertical *,
html[dir="rtl"] .hats-showcase-vertical,
html[dir="rtl"] .hats-showcase-vertical *,
html[lang="ar"] .hats-showcase-vertical,
html[lang="ar"] .hats-showcase-vertical *,
.hats-showcase-vertical.rtl,
.hats-showcase-vertical.rtl * {
	font-family: var(--hats-font-arabic) !important;
}

/* Counter digits stay tabular numbers in LTR isolate */
.hats-showcase-vertical .portfolio-4-counter,
.hats-showcase-vertical .portfolio-4-counter *,
.hats-showcase-vertical.rtl .portfolio-4-counter,
.hats-showcase-vertical.rtl .portfolio-4-counter *,
body.rtl .hats-showcase-vertical .portfolio-4-counter,
body.rtl .hats-showcase-vertical .portfolio-4-counter * {
	direction: ltr !important;
	unicode-bidi: isolate !important;
	font-family: var(--hats-font-latin) !important;
}

.hats-showcase-vertical.rtl .portfolio-4__content,
body.rtl .hats-showcase-vertical .portfolio-4__content,
html[dir="rtl"] .hats-showcase-vertical .portfolio-4__content {
	left: auto !important;
	right: 6vw !important;
	text-align: right !important;
	direction: rtl !important;
}

.hats-showcase-vertical.rtl .portfolio-4__content-title,
body.rtl .hats-showcase-vertical .portfolio-4__content-title,
html[dir="rtl"] .hats-showcase-vertical .portfolio-4__content-title {
	font-family: var(--hats-font-arabic) !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
}

.hats-showcase-vertical.rtl .portfolio-4__list,
body.rtl .hats-showcase-vertical .portfolio-4__list,
html[dir="rtl"] .hats-showcase-vertical .portfolio-4__list {
	justify-content: flex-start !important;
	direction: rtl !important;
}

.hats-showcase-vertical.rtl .tag-pill,
body.rtl .hats-showcase-vertical .tag-pill,
html[dir="rtl"] .hats-showcase-vertical .tag-pill {
	font-family: var(--hats-font-arabic) !important;
	text-transform: none !important;
	letter-spacing: 0.02em !important;
}

.hats-showcase-vertical.rtl .portfolio-4__action,
body.rtl .hats-showcase-vertical .portfolio-4__action,
html[dir="rtl"] .hats-showcase-vertical .portfolio-4__action {
	display: flex !important;
	justify-content: flex-start !important;
	direction: rtl !important;
}

.hats-showcase-vertical.rtl .view-project-btn,
body.rtl .hats-showcase-vertical .view-project-btn,
html[dir="rtl"] .hats-showcase-vertical .view-project-btn {
	direction: rtl !important;
	gap: 12px !important;
	font-family: var(--hats-font-arabic) !important;
	text-transform: none !important;
	font-weight: 500 !important;
	letter-spacing: normal !important;
}

.hats-showcase-vertical.rtl .view-project-btn:hover .arrow-icon,
body.rtl .hats-showcase-vertical .view-project-btn:hover .arrow-icon,
html[dir="rtl"] .hats-showcase-vertical .view-project-btn:hover .arrow-icon {
	transform: translateX(-5px) !important;
}

.hats-showcase-vertical.rtl .portfolio-4__slider__arrow-prev,
.hats-showcase-vertical.rtl .portfolio-4__slider__arrow-next,
body.rtl .hats-showcase-vertical .portfolio-4__slider__arrow-prev,
body.rtl .hats-showcase-vertical .portfolio-4__slider__arrow-next {
	font-family: var(--hats-font-arabic) !important;
	text-transform: none !important;
	letter-spacing: 0.04em !important;
}

.hats-showcase-vertical.rtl .swiper-pagination-bullet::after,
body.rtl .hats-showcase-vertical .swiper-pagination-bullet::after,
html[dir="rtl"] .hats-showcase-vertical .swiper-pagination-bullet::after {
	left: auto !important;
	right: 0 !important;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
	.hats-showcase-vertical .portfolio-4__content {
		bottom: 110px;
		max-width: 90%;
	}
	.hats-showcase-vertical .portfolio-4-pagination {
		max-width: 35vw;
	}
	.hats-showcase-vertical .swiper-pagination-bullet {
		width: 32px;
	}
	.hats-showcase-vertical .swiper-pagination-bullet-active {
		width: 52px;
	}
}

@media (max-width: 768px) {
	.hats-showcase-vertical .portfolio-4__content {
		bottom: 95px;
		left: 20px;
		right: 20px;
		max-width: calc(100% - 40px);
	}

	.hats-showcase-vertical.rtl .portfolio-4__content,
	body.rtl .hats-showcase-vertical .portfolio-4__content {
		right: 20px;
		left: 20px;
	}

	.hats-showcase-vertical .portfolio-4__content-title {
		font-size: clamp(28px, 8.2vw, 44px);
		margin-bottom: 14px;
	}

	.hats-showcase-vertical .portfolio-4__list {
		gap: 8px;
		margin-bottom: 18px;
	}

	.hats-showcase-vertical .tag-pill {
		padding: 6px 14px;
		font-size: 11px;
	}

	.hats-showcase-vertical .portfolio-4__bottom-bar {
		bottom: 22px;
		padding: 0 20px;
		z-index: 100 !important;
	}

	.hats-showcase-vertical .portfolio-4-pagination {
		max-width: 50vw;
	}

	.hats-showcase-vertical .portfolio-4__slider__arrow {
		gap: 8px;
		pointer-events: auto !important;
		touch-action: manipulation !important;
	}

	.hats-showcase-vertical .portfolio-4__slider__arrow-prev,
	.hats-showcase-vertical .portfolio-4__slider__arrow-next {
		padding: 10px 16px;
		font-size: 12px;
		min-height: 44px;
		min-width: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		pointer-events: auto !important;
		touch-action: manipulation !important;
	}
}

@media (max-width: 480px) {
	.hats-showcase-vertical .portfolio-4-pagination {
		display: none;
	}
}
