/*
 * Wapty Institute - Animations & Visual Polish
 * GPU-accelerated transitions, scroll reveals, micro-interactions, and attractive UI enhancements.
 */

/* ================== Keyframes ================== */
@keyframes headerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kenBurnsZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.06);
  }
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseSoft {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(6, 159, 118, 0.35);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(6, 159, 118, 0);
  }
}

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

/* ================== Scroll Reveal System ================== */
.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-item.reveal-left {
  transform: translateX(-32px);
}

.reveal-item.reveal-right {
  transform: translateX(32px);
}

.reveal-item.reveal-zoom {
  transform: scale(0.94);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }

/* ================== Hero Carousel & Video Banner ================== */
.slider .carousel-item img {
  transition: transform 8s ease-out;
}

.slider .carousel-item.active img {
  animation: kenBurnsZoom 9s ease-out forwards;
}

.slider .carousel-control-prev,
.slider .carousel-control-next {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 130, 0.45) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: transform 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}

.slider .carousel-control-prev:hover,
.slider .carousel-control-next:hover {
  background: rgba(6, 159, 118, 0.9) !important;
  transform: scale(1.08);
  opacity: 1;
}

.home-banner-video-bg::before {
  background: linear-gradient(135deg, rgba(0, 0, 80, 0.65) 0%, rgba(20, 125, 196, 0.42) 55%, rgba(6, 159, 118, 0.42) 100%) !important;
}

.banner-videocontent h2 {
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  animation: fadeInUpHero 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.banner-videocontent h3 {
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-top: 12px;
}

.banner-videocontent .btn-one-full {
  animation: pulseSoft 2.6s infinite;
}

/* ================== Buttons & Micro-Interactions ================== */
.btnmain,
.btnmainone,
.btn-one,
.btn-one-full,
.btn-two-full,
.contact-form-bg .submit-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s ease,
              background-color 0.28s ease,
              color 0.28s ease,
              border-color 0.28s ease;
}

.btnmain {
  background: linear-gradient(135deg, #069F76 0%, #058a66 100%);
  border: 1px solid #069F76;
  border-radius: 999px;
  padding: 11px 26px;
  box-shadow: 0 6px 18px rgba(6, 159, 118, 0.25);
}

.btnmain:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(6, 159, 118, 0.35);
  background: #ffffff;
  color: #069F76;
  border: 1px solid #069F76;
}

.btnmainone {
  background: linear-gradient(135deg, #147DC4 0%, #000082 100%);
  border: 1px solid #147DC4;
  border-radius: 999px;
  padding: 11px 26px;
  box-shadow: 0 6px 18px rgba(20, 125, 196, 0.25);
}

.btnmainone:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 125, 196, 0.35);
  background: #ffffff;
  color: #147DC4;
  border: 1px solid #147DC4;
}

/* ================== Cards, Images & Sections ================== */
.home-about-bg img,
.home-secound-section img,
.inner-about-bg img,
.knowledge-hub img.brd {
  border-radius: 18px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

.home-about-bg img:hover,
.inner-about-bg img:hover,
.knowledge-hub img.brd:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 16px 36px rgba(0, 0, 130, 0.14);
}

.home-secound-section img {
  animation: floatGentle 6s ease-in-out infinite;
}

/* Stats Boxes */
.home-third-section .stat-item {
  padding: 18px 12px;
  border-radius: 16px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.home-third-section .stat-item:hover {
  transform: translateY(-4px);
  background: rgba(6, 159, 118, 0.05);
}

.home-third-section .headMainOne {
  transition: transform 0.3s ease, color 0.3s ease;
}

.home-third-section .stat-item:hover .headMainOne {
  transform: scale(1.05);
}

/* Course Highlights Cards */
.fourthbox {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.fourthbox img {
  border-radius: 16px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fourthbox:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 60, 0.25);
}

.fourthbox:hover img {
  transform: scale(1.04);
}

/* Blog Cards */
.blog-card {
  border-radius: 20px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  height: 100%;
}

.blog-card img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 130, 0.16);
}

.blog-card:hover img {
  transform: scale(1.05);
}

/* Achiever Cards */
.home-sixth-section .achiveBox {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.home-sixth-section .achiveBox img {
  width: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-sixth-section .achiveBox:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.home-sixth-section .achiveBox:hover img {
  transform: scale(1.05);
}

/* Gallery Hover Zoom */
.home-gallery-section .item img,
.gallery a img {
  border-radius: 16px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.home-gallery-section .item:hover img,
.gallery a:hover img {
  transform: scale(1.04);
  box-shadow: 0 14px 30px rgba(0, 0, 130, 0.18);
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

/* Testimonials */
.home-testi-section .testibox {
  background: #ffffff;
  border: 1px solid rgba(20, 125, 196, 0.16);
  box-shadow: 0 14px 36px rgba(0, 0, 130, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.home-testi-section .testibox:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(0, 0, 130, 0.11);
}

/* Why Choose Wapty Boxes (About Us) */
.home-inner-why-box {
  border-radius: 18px;
  transition: transform 0.35s ease, background-color 0.35s ease;
}

.home-inner-why-box:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.08);
}

.home-inner-why-box i {
  transition: transform 0.4s ease;
}

.home-inner-why-box:hover i {
  transform: scale(1.18) rotate(8deg);
}

/* Enquire CTA Banner */
.footer-top-section .enquirebox {
  background: linear-gradient(135deg, #069F76 0%, #147DC4 100%) !important;
  box-shadow: 0 18px 40px rgba(6, 159, 118, 0.25);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.footer-top-section .enquirebox:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(6, 159, 118, 0.32);
}

.footer-top-section p a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px !important;
  margin: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.footer-top-section p a:hover {
  background: rgba(255, 255, 255, 0.26);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Inner Banner Top Gradient */
.inner-banner-top::after {
  background: linear-gradient(135deg, #000082 0%, #147DC4 62%, #069F76 100%) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 130, 0.2);
}

/* Back-to-top modern styling */
.back-to-top {
  mix-blend-mode: normal !important;
  background: linear-gradient(135deg, #147DC4, #000082) !important;
  color: #ffffff !important;
  display: none;
  align-items: center;
  justify-content: center;
  bottom: 26px !important;
  right: 22px !important;
  left: auto !important;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(0, 0, 130, 0.28) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.back-to-top:hover {
  background: linear-gradient(135deg, #069F76, #147DC4) !important;
  color: #ffffff !important;
  transform: translateY(-4px);
}

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

  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }
}
