/**
 * Efectos 3D / profundidad para el sitio institucional público.
 * Respeta prefers-reduced-motion.
 */

body.eduia-fe-3d {
	--eduia-3d-depth: 36px;
	--eduia-3d-accent: var(--thm-primary, #ea580c);
	--eduia-3d-glow: color-mix(in srgb, var(--eduia-3d-accent) 42%, transparent);
	--eduia-3d-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
	perspective: 1400px;
}

@media (prefers-reduced-motion: reduce) {
	body.eduia-fe-3d *,
	body.eduia-fe-3d *::before,
	body.eduia-fe-3d *::after {
		animation: none !important;
		transition: none !important;
	}
	body.eduia-fe-3d .eduia-fe-3d-stage {
		display: none !important;
	}
}

/* Escenario flotante detrás del hero */
body.eduia-fe-3d .eduia-fe-3d-stage {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
	opacity: 0.55;
}
body.eduia-fe-3d .eduia-fe-3d-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(40px);
	animation: eduiaFeOrbFloat 14s ease-in-out infinite alternate;
	will-change: transform;
}
body.eduia-fe-3d .eduia-fe-3d-orb--a {
	width: min(42vw, 420px);
	height: min(42vw, 420px);
	top: 8%;
	left: -6%;
	background: radial-gradient(circle, var(--eduia-3d-glow), transparent 70%);
}
body.eduia-fe-3d .eduia-fe-3d-orb--b {
	width: min(34vw, 340px);
	height: min(34vw, 340px);
	top: 48%;
	right: -4%;
	background: radial-gradient(circle, rgba(14, 165, 233, 0.35), transparent 70%);
	animation-delay: -4s;
}
body.eduia-fe-3d .eduia-fe-3d-orb--c {
	width: min(28vw, 280px);
	height: min(28vw, 280px);
	bottom: 6%;
	left: 38%;
	background: radial-gradient(circle, rgba(234, 88, 12, 0.28), transparent 70%);
	animation-delay: -8s;
}

body.eduia-fe-3d .header-menu,
body.eduia-fe-3d .main-slider,
body.eduia-fe-3d .main-banner,
body.eduia-fe-3d .main-container,
body.eduia-fe-3d .welcome-area,
body.eduia-fe-3d .featured-doctors,
body.eduia-fe-3d .testimonial-wrapper,
body.eduia-fe-3d .counters-wrapper,
body.eduia-fe-3d .footer {
	position: relative;
	z-index: 1;
}

/* Perspectiva por sección */
body.eduia-fe-3d .main-slider,
body.eduia-fe-3d .main-banner,
body.eduia-fe-3d .welcome-area,
body.eduia-fe-3d .notification-boxes,
body.eduia-fe-3d .featured-doctors,
body.eduia-fe-3d .counters-wrapper,
body.eduia-fe-3d .testimonial-wrapper,
body.eduia-fe-3d .main-container {
	perspective: 1400px;
	transform-style: preserve-3d;
}

/* Slider: capas 3D + brillo */
body.eduia-fe-3d .main-slider {
	isolation: isolate;
}
body.eduia-fe-3d .main-slider .slider-wrapper {
	transform-style: preserve-3d;
}
body.eduia-fe-3d .main-slider .image.eduia-fe-bg-cover {
	transform: translateZ(-40px) scale(1.08);
	filter: saturate(1.08) contrast(1.05);
	transition: transform 0.6s ease;
}
body.eduia-fe-3d .main-slider .owl-item.active .image.eduia-fe-bg-cover {
	transform: translateZ(0) scale(1.02);
}
body.eduia-fe-3d .main-slider .slider-caption .wrap-caption {
	transform: translateZ(56px);
	filter: drop-shadow(0 22px 48px rgba(0, 0, 0, 0.42));
	animation: eduiaFeFloatIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.eduia-fe-3d .main-slider .slider-caption h1 {
	text-shadow:
		0 2px 0 rgba(0, 0, 0, 0.15),
		0 18px 40px rgba(0, 0, 0, 0.45);
	transform: translateZ(18px);
}
body.eduia-fe-3d .main-slider .slider-caption .btn {
	transform: translateZ(28px);
	box-shadow:
		0 14px 32px rgba(0, 0, 0, 0.32),
		0 0 0 1px rgba(255, 255, 255, 0.1) inset;
	transition: transform 0.28s ease, box-shadow 0.28s ease;
}
body.eduia-fe-3d .main-slider .slider-caption .btn:hover {
	transform: translateZ(44px) translateY(-4px) scale(1.05);
	box-shadow:
		0 22px 44px rgba(0, 0, 0, 0.4),
		0 0 36px var(--eduia-3d-glow);
}

/* Banner de página */
body.eduia-fe-3d .main-banner {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
body.eduia-fe-3d .main-banner::before {
	content: "";
	position: absolute;
	inset: -12%;
	background:
		radial-gradient(ellipse 50% 40% at 18% 18%, var(--eduia-3d-glow), transparent 60%),
		radial-gradient(ellipse 42% 48% at 82% 78%, rgba(255, 255, 255, 0.14), transparent 55%);
	pointer-events: none;
	z-index: 1;
	animation: eduiaFeAura 9s ease-in-out infinite alternate;
}
body.eduia-fe-3d .main-banner .container {
	position: relative;
	z-index: 2;
	transform: translateZ(36px);
}
body.eduia-fe-3d .main-banner h2 span {
	display: inline-block;
	backdrop-filter: blur(12px);
	box-shadow:
		0 18px 44px rgba(0, 0, 0, 0.2),
		0 2px 0 rgba(255, 255, 255, 0.65) inset;
	transform: rotateX(8deg) translateZ(24px);
}

/* Cards con volumen 3D */
body.eduia-fe-3d .notification-boxes .box,
body.eduia-fe-3d .bio-box,
body.eduia-fe-3d .event-item,
body.eduia-fe-3d .news-item,
body.eduia-fe-3d .gallery-item,
body.eduia-fe-3d .accordion .card,
body.eduia-fe-3d .contact-info-box .info-box,
body.eduia-fe-3d .single-testimonial-style,
body.eduia-fe-3d .services-item,
body.eduia-fe-3d .service-item {
	position: relative;
	transform-style: preserve-3d;
	transform: translateZ(0) rotateX(4deg);
	transition:
		transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.4s ease,
		border-color 0.4s ease;
	box-shadow:
		0 12px 30px rgba(15, 23, 42, 0.1),
		0 1px 0 rgba(255, 255, 255, 0.7) inset;
	border: 1px solid rgba(15, 23, 42, 0.06);
	will-change: transform;
	background-clip: padding-box;
}
body.eduia-fe-3d .notification-boxes .box::after,
body.eduia-fe-3d .bio-box::after,
body.eduia-fe-3d .single-testimonial-style::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.35), transparent 42%, rgba(15, 23, 42, 0.04));
	opacity: 0.85;
	transform: translateZ(1px);
}
body.eduia-fe-3d .notification-boxes .box:hover,
body.eduia-fe-3d .bio-box:hover,
body.eduia-fe-3d .event-item:hover,
body.eduia-fe-3d .news-item:hover,
body.eduia-fe-3d .gallery-item:hover,
body.eduia-fe-3d .accordion .card:hover,
body.eduia-fe-3d .services-item:hover,
body.eduia-fe-3d .service-item:hover {
	transform: translateY(-14px) rotateX(10deg) rotateY(-8deg) scale(1.035);
	box-shadow:
		var(--eduia-3d-shadow),
		0 0 0 1px color-mix(in srgb, var(--eduia-3d-accent) 35%, transparent),
		0 0 42px var(--eduia-3d-glow);
	z-index: 3;
}

body.eduia-fe-3d .notification-boxes .box .icon {
	transform: translateZ(36px);
	filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.18));
	transition: transform 0.35s ease;
}
body.eduia-fe-3d .notification-boxes .box:hover .icon {
	transform: translateZ(56px) scale(1.16) rotateY(18deg);
}

/* Stats en capas */
body.eduia-fe-3d .counters-wrapper .counter-box,
body.eduia-fe-3d .counters-wrapper .fun-box,
body.eduia-fe-3d .counters-wrapper [class*="col-"] > div {
	transform: rotateX(10deg) translateZ(16px);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}
body.eduia-fe-3d .counters-wrapper [class*="col-"]:hover > div {
	transform: rotateX(0deg) translateZ(40px) scale(1.06);
	box-shadow: 0 28px 56px rgba(0, 0, 0, 0.32), 0 0 28px var(--eduia-3d-glow);
}

/* Welcome / contacto con marco 3D */
body.eduia-fe-3d .welcome-area .wel-img,
body.eduia-fe-3d .welcome-area .wel-img img,
body.eduia-fe-3d .contact-info-box .box-img img {
	border-radius: 20px;
	transform: rotateY(-10deg) rotateX(4deg) translateZ(12px);
	box-shadow:
		24px 28px 56px rgba(15, 23, 42, 0.28),
		-8px -8px 0 color-mix(in srgb, var(--eduia-3d-accent) 60%, white);
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
body.eduia-fe-3d .welcome-area .wel-img:hover img,
body.eduia-fe-3d .contact-info-box .box-img:hover img {
	transform: rotateY(0deg) rotateX(0deg) scale(1.04) translateZ(24px);
	box-shadow: 0 32px 64px rgba(15, 23, 42, 0.32);
}

/* Logo flotante */
body.eduia-fe-3d .navbar-brand img,
body.eduia-fe-3d .footer-logo img {
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.2));
	transition: transform 0.4s ease, filter 0.4s ease;
}
body.eduia-fe-3d .navbar-brand:hover img,
body.eduia-fe-3d .footer-logo:hover img {
	transform: translateY(-3px) rotateY(16deg) scale(1.06);
	filter: drop-shadow(0 16px 28px var(--eduia-3d-glow));
}

/* Menú con profundidad */
body.eduia-fe-3d #nav .nav-item .nav-link {
	transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}
body.eduia-fe-3d #nav .nav-item .nav-link:hover {
	transform: translateY(-3px) translateZ(8px);
	text-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

/* Header glass 3D sutil */
body.eduia-fe-3d .header-menu {
	backdrop-filter: blur(10px);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Reveal al scroll */
body.eduia-fe-3d .eduia-fe-reveal {
	opacity: 0;
	transform: translateY(36px) rotateX(16deg) scale(0.97);
	transform-origin: top center;
	transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
body.eduia-fe-3d .eduia-fe-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* Tilt pointer (JS) */
body.eduia-fe-3d [data-eduia-tilt] {
	transform-style: preserve-3d;
}

@keyframes eduiaFeFloatIn {
	from {
		opacity: 0;
		transform: translateZ(0) translateY(32px) scale(0.94);
	}
	to {
		opacity: 1;
		transform: translateZ(56px) translateY(0) scale(1);
	}
}
@keyframes eduiaFeAura {
	from { transform: translate3d(-3%, -2%, 0) scale(1); opacity: 0.65; }
	to { transform: translate3d(3%, 2%, 0) scale(1.08); opacity: 1; }
}
@keyframes eduiaFeOrbFloat {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to { transform: translate3d(28px, -36px, 0) scale(1.12); }
}

@media (max-width: 767px) {
	body.eduia-fe-3d .notification-boxes .box,
	body.eduia-fe-3d .bio-box,
	body.eduia-fe-3d .welcome-area .wel-img img {
		transform: none;
	}
	body.eduia-fe-3d .eduia-fe-3d-stage {
		opacity: 0.28;
	}
}
