/**
 * UI Effects - Modern Premium Effects for Tabcom Group
 * 
 * Global animations, transitions, and visual effects
 * 
 * @package TabcomGroup
 */

/* ============================================
   REVEAL ANIMATION (Scroll-triggered)
   ============================================ */

.reveal {
	opacity: 0;
	-webkit-transform: translateY(40px);
	-moz-transform: translateY(40px);
	-ms-transform: translateY(40px);
	transform: translateY(40px);
	-webkit-transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	-moz-transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: opacity, transform;
}

.reveal.active {
	opacity: 1;
	-webkit-transform: translateY(0);
	-moz-transform: translateY(0);
	-ms-transform: translateY(0);
	transform: translateY(0);
}

/* Stagger delay for child elements */
.reveal.active .reveal-child {
	-webkit-animation: fadeUpStagger 0.6s ease forwards;
	-moz-animation: fadeUpStagger 0.6s ease forwards;
	animation: fadeUpStagger 0.6s ease forwards;
}

.reveal-child:nth-child(1) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; }
.reveal-child:nth-child(2) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; }
.reveal-child:nth-child(3) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s; }
.reveal-child:nth-child(4) { -webkit-animation-delay: 0.4s; animation-delay: 0.4s; }
.reveal-child:nth-child(5) { -webkit-animation-delay: 0.5s; animation-delay: 0.5s; }
.reveal-child:nth-child(6) { -webkit-animation-delay: 0.6s; animation-delay: 0.6s; }

@-webkit-keyframes fadeUpStagger {
	from {
		opacity: 0;
		-webkit-transform: translateY(20px);
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		-webkit-transform: translateY(0);
		transform: translateY(0);
	}
}

@-moz-keyframes fadeUpStagger {
	from {
		opacity: 0;
		-moz-transform: translateY(20px);
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		-moz-transform: translateY(0);
		transform: translateY(0);
	}
}

@keyframes fadeUpStagger {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */

/* Base card style */
.card,
[class*="__card"],
[class*="-card"]:not(.blog-card):not(.blog-featured__card) {
	-webkit-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	-moz-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	border-radius: 20px;
	/* overflow: hidden; */
}

/* Hover lift effect */
.card:hover,
[class*="__card"]:hover,
[class*="-card"]:not(.blog-card):not(.blog-featured__card):hover {
	-webkit-transform: translateY(-8px);
	-moz-transform: translateY(-8px);
	-ms-transform: translateY(-8px);
	transform: translateY(-8px);
	-webkit-box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* ============================================
   GRADIENT ACCENTS
   ============================================ */

.gradient-accent {
	background: linear-gradient(135deg, #0e28c5 0%, #122298 50%, #6b75ff 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.gradient-bg {
	background: linear-gradient(135deg, #0e28c5 0%, #122298 100%);
}

.gradient-border {
	position: relative;
	border-radius: 20px;
	padding: 2px;
	background: linear-gradient(135deg, #0e28c5, #6b75ff);
}

.gradient-border > * {
	border-radius: 18px;
	background: #fff;
}

/* ============================================
   GLASSMORPHISM
   ============================================ */

.glass {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 20px;
}

.glass-dark {
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   BORDER RADIUS LARGE
   ============================================ */

.rounded-large {
	border-radius: 24px;
}

.rounded-xl {
	border-radius: 20px;
}

.rounded-lg {
	border-radius: 16px;
}

/* ============================================
   IMAGE PLACEHOLDERS
   ============================================ */

.img-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #eef1ff 0%, #f6f8ff 100%);
	border: 1px dashed rgba(14, 40, 197, 0.2);
	border-radius: 16px;
	color: #6b75ff;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.img-placeholder::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 10px,
		rgba(255, 255, 255, 0.3) 10px,
		rgba(255, 255, 255, 0.3) 20px
	);
	opacity: 0.5;
}

.img-placeholder > * {
	position: relative;
	z-index: 1;
}

/* Hero Image Placeholder - 1200x700 */
.img-placeholder.img-hero,
.img-placeholder.img-1200x700 {
	width: 100%;
	max-width: 1200px;
	aspect-ratio: 1200 / 700;
	border-radius: 24px;
}

/* About Image Placeholder - 600x500 */
.img-placeholder.img-about,
.img-placeholder.img-600x500 {
	width: 100%;
	max-width: 600px;
	aspect-ratio: 6 / 5;
	border-radius: 20px;
}

/* Service Image Placeholder - 400x300 */
.img-placeholder.img-service,
.img-placeholder.img-400x300 {
	width: 100%;
	max-width: 400px;
	aspect-ratio: 4 / 3;
	border-radius: 20px;
}

/* Ecosystem Image Placeholder - 500x400 */
.img-placeholder.img-ecosystem,
.img-placeholder.img-500x400 {
	width: 100%;
	max-width: 500px;
	aspect-ratio: 5 / 4;
	border-radius: 16px;
}

/* Team Avatar Placeholder - 300x300 */
.img-placeholder.img-avatar,
.img-placeholder.img-300x300 {
	width: 300px;
	height: 300px;
	border-radius: 50%;
}

/* Blog Thumbnail Placeholder - 400x250 */
.img-placeholder.img-blog,
.img-placeholder.img-400x250 {
	width: 100%;
	max-width: 400px;
	aspect-ratio: 8 / 5;
	border-radius: 16px;
}

/* Specific size placeholders */
.img-placeholder.img-200x60 {
	width: 200px;
	height: 60px;
	min-height: 60px;
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	
	.reveal,
	.card,
	[class*="__card"],
	[class*="-card"] {
		transition: none;
	}
}

/* ============================================
   GLOW EFFECTS
   ============================================ */

.glow {
	position: relative;
}

.glow::before {
	content: '';
	position: absolute;
	inset: -4px;
	background: linear-gradient(135deg, #0e28c5, #6b75ff);
	border-radius: inherit;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: -1;
	filter: blur(8px);
}

.glow:hover::before {
	opacity: 0.3;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

.btn,
.button,
[class*="button"],
[class*="btn"] {
	position: relative;
/*	overflow: hidden;*/
	transition: all 0.3s ease;
	border-radius: 12px;
}

.btn::before,
.button::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

.btn:hover::before,
.button:hover::before {
	width: 300px;
	height: 300px;
}

/* ============================================
   LINK HOVER EFFECTS
   ============================================ */

.link-hover {
	position: relative;
	display: inline-block;
	transition: all 0.3s ease;
}

.link-hover::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #0e28c5, #6b75ff);
	transition: width 0.3s ease;
}

.link-hover:hover::after {
	width: 100%;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* GPU acceleration for transforms */
.reveal,
.card,
[class*="__card"]:not(.blog-featured__card),
[class*="-card"]:not(.blog-card),
.btn,
.button {
	transform: translateZ(0);
	-webkit-transform: translateZ(0);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		-webkit-animation-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		-webkit-animation-iteration-count: 1 !important;
		animation-iteration-count: 1 !important;
		-webkit-transition-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ============================================
   FALLBACK FOR OLD BROWSERS
   ============================================ */

/* If CSS animations not supported, show content immediately */
@supports not (animation: fadeUpStagger 0.6s ease forwards) {
	.reveal {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* No-JS fallback - show all content */
.no-js .reveal,
.no-js .reveal-child {
	opacity: 1 !important;
	-webkit-transform: none !important;
	transform: none !important;
}

/* Ultimate fallback after page load */
body.loaded .reveal {
	opacity: 1;
	-webkit-transform: translateY(0);
	transform: translateY(0);
}

