/* ============================================================
   Ameya Pulse — Global Animations
   Scroll-reveal + consistent hover polish
   ============================================================ */

/* ---- Hero Section Entrance Animation ---- */

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

@keyframes heroFadeSlideDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.carousel-item.active .intro-content h2 {
	animation: heroFadeSlideUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.carousel-item.active .intro-content h2 span {
	animation: heroFadeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

.carousel-item.active .intro-content h2 strong {
	animation: heroFadeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) 1s both;
}

/* Logo subtle entrance */
.logo-container img {
	animation: heroFadeSlideDown 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* ---- Scroll-Reveal Base ---- */

.animation-reveal {
	opacity: 0;
	transform: translateY(50px);
	transition:
		opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.animation-reveal.animation-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger delays for grid/list children */
.animation-delay-1 {
	transition-delay: 0.1s;
}
.animation-delay-2 {
	transition-delay: 0.22s;
}
.animation-delay-3 {
	transition-delay: 0.34s;
}
.animation-delay-4 {
	transition-delay: 0.46s;
}
.animation-delay-5 {
	transition-delay: 0.58s;
}
.animation-delay-6 {
	transition-delay: 0.7s;
}

/* Parent class: children animate individually with stagger */
.animation-reveal-children > * {
	opacity: 0;
	transform: translateY(40px);
	transition:
		opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.animation-reveal-children.animation-children-visible > * {
	opacity: 1;
	transform: translateY(0);
}

/* Auto-stagger for children (up to 12 items) */
.animation-reveal-children > *:nth-child(1) {
	transition-delay: 0.05s;
}
.animation-reveal-children > *:nth-child(2) {
	transition-delay: 0.12s;
}
.animation-reveal-children > *:nth-child(3) {
	transition-delay: 0.19s;
}
.animation-reveal-children > *:nth-child(4) {
	transition-delay: 0.26s;
}
.animation-reveal-children > *:nth-child(5) {
	transition-delay: 0.33s;
}
.animation-reveal-children > *:nth-child(6) {
	transition-delay: 0.4s;
}
.animation-reveal-children > *:nth-child(7) {
	transition-delay: 0.47s;
}
.animation-reveal-children > *:nth-child(8) {
	transition-delay: 0.54s;
}
.animation-reveal-children > *:nth-child(9) {
	transition-delay: 0.61s;
}
.animation-reveal-children > *:nth-child(10) {
	transition-delay: 0.68s;
}
.animation-reveal-children > *:nth-child(11) {
	transition-delay: 0.75s;
}
.animation-reveal-children > *:nth-child(12) {
	transition-delay: 0.82s;
}

/* ---- Section Heading Underline Grow ---- */

.about-us-intro h2.style-1::after {
	transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}
.animation-reveal .about-us-intro h2.style-1::after,
.about-us-intro.animation-reveal h2.style-1::after {
	width: 0;
}
.animation-visible .about-us-intro h2.style-1::after,
.about-us-intro.animation-visible h2.style-1::after {
	width: 100px;
}

/* ---- Consistent Card Hover (overrides for uniformity) ---- */

/* Service cards */
.services .service {
	transition:
		transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.25s ease;
}
.services .service:hover,
.services .service:focus-within,
.services .service.show {
	transform: translateY(-10px);
	box-shadow: 0 24px 56px rgba(11, 17, 32, 0.14);
}

/* Mission/Vision cards */
.mv-card {
	transition:
		transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		border-top-color 0.25s ease;
}
.mv-card:hover {
	transform: translateY(-10px) !important;
	box-shadow: 0 28px 60px rgba(11, 17, 32, 0.14) !important;
}

/* Facilities list items */
.facilities-list li {
	transition:
		transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		background-color 0.3s ease;
}
.facilities-list li:hover {
	transform: translateY(-5px);
	box-shadow: 0 14px 36px rgba(26, 77, 126, 0.12);
	background: #e8f4ff;
}

/* Gallery cards */
.gl-card {
	transition:
		transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.gl-card:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 24px 50px rgba(11, 17, 32, 0.16);
}

/* Expertise cards on detail pages */
.ov2-card {
	transition:
		transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ov2-card:hover {
	transform: translateY(-10px);
	box-shadow: 0 24px 50px rgba(12, 24, 40, 0.16);
}

/* ---- Button Hover Glow ---- */

.button,
.btn-default,
.contact-btn button {
	transition:
		transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		background-color 0.3s ease,
		color 0.3s ease;
}
.button:hover,
.btn-default:hover,
.contact-btn button:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(26, 77, 126, 0.35);
}

/* ---- Social Icon Hover ---- */

.social-box a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition:
		transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		color 0.25s ease;
}
.social-box a:hover {
	transform: scale(1.28) translateY(-3px);
}

/* ---- Form Input Focus Glow ---- */

#contact-section .form-control {
	transition:
		border-color 0.3s ease,
		box-shadow 0.3s ease;
}
#contact-section .form-control:focus {
	border-color: rgba(169, 219, 235, 0.9);
	box-shadow: 0 0 0 4px rgba(169, 219, 235, 0.35);
	outline: none;
}

/* ---- Footer Logo Hover ---- */

.footer-brand img {
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-brand img:hover {
	transform: scale(1.08);
}

/* ---- Doctor Image Hover ---- */

.res-css-img img {
	transition:
		transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.res-css-img img:hover {
	transform: scale(1.04);
	box-shadow: 0 20px 50px rgba(26, 77, 126, 0.2);
}

.res-css-img img.filp-img {
	transform: rotateY(180deg);
}
.res-css-img img.filp-img:hover {
	transform: scale(1.04) rotateY(180deg);
}

/* ---- Contact Info Icon Hover ---- */

.rotated-icon {
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.clearfix:hover .rotated-icon {
	transform: scale(1.15);
}

/* ---- Nav Link Underline Effect ---- */

.navbar-nav .nav-link {
	position: relative;
}
.navbar-nav .nav-link::before {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #62c4e2, #1a4d7e);
	transition:
		width 0.35s ease,
		left 0.35s ease;
	border-radius: 2px;
}
.navbar-nav .nav-link:hover::before {
	width: 100%;
	left: 0;
}

/* ---- Gallery Overlay Hover ---- */

.gl-card-thumb {
	overflow: hidden;
}
.gl-card-thumb img {
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.gl-card:hover .gl-card-thumb img {
	transform: scale(1.08);
}
.gl-card-overlay {
	transition: opacity 0.35s ease;
}

/* ---- Expertise Card Image Hover ---- */

.ov2-media img {
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.ov2-card:hover .ov2-media img {
	transform: scale(1.08) !important;
}

/* ---- Accessibility: Respect reduced-motion ---- */

@media (prefers-reduced-motion: reduce) {
	.animation-reveal,
	.animation-reveal-children > * {
		opacity: 1;
		transform: none;
		transition: none;
	}
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
