/*! ======================== KEYFRAMES ======================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*! ======================== HERO ANIMATIONS ======================== */
/* Hero animations now handled by WOW.js */

/*! ======================== SHOW REEL SECTION ======================== */
.showreel-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 3rem;
}

.showreel-btn {
  padding: 12px 24px 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 60px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.3s ease, background 0.3s ease;
  position: relative;
  z-index: 10;
}

.showreel-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.video-circle {
  position: relative;
  flex-shrink: 0;
  height: 40px;
  width: 40px;
  z-index: 1;
}

.showreel-btn:hover .preview-video {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  transform: scale(1.25);
}

.preview-video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-sizing: border-box;
}

.btn-text {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

/*! ======================== VIDEO MODAL ======================== */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  pointer-events: all;
}

.expanding-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  clip-path: circle(20px at var(--click-x, 50%) var(--click-y, 50%));
  transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease;
}

.video-modal.active .expanding-video {
  opacity: 1;
  pointer-events: all;
  clip-path: circle(150% at var(--click-x, 50%) var(--click-y, 50%));
}

.video-close-btn {
  position: fixed;
  top: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.video-modal.active .video-close-btn {
  opacity: 1;
  pointer-events: all;
}

.video-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: rotate(90deg);
}

.video-close-btn svg {
  width: 20px;
  height: 20px;
}

/*! ======================== COUNTER SECTION ======================== */
#counter-section {
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
}
/* 3D Counter animations - GSAP controls initial state and animation */
.counter-section-3d {
  perspective: 1000px;
}
.counter-item {
  transform-origin: top center;
  transform-style: preserve-3d;
}
/* 3D card with depth */
.counter-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}
.counter-item:hover .counter-card {
  transform: translateZ(20px) rotateX(5deg);
}
/* Number floats above */
.counter-number {
  transform: translateZ(40px);
  transition: transform 0.4s ease;
}
.counter-item:hover .counter-number {
  transform: translateZ(60px) scale(1.05);
}
/* Odometer styling */
.odometer.odometer-auto-theme {
  font-family: inherit;
}
/*! ======================== ENHANCED WOW ANIMATIONS ======================== */
/* Smooth hover transitions for portfolio items */
.grid-item {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Service cards smooth transitions */
.group {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

/* Smooth image zoom on hover */
.grid-item img,
.group img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-item:hover img,
.group:hover img {
  transform: scale(1.05);
}

/* Button hover animations */
a[class*="inline-flex"] {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

a[class*="inline-flex"]:hover {
  transform: scale(1.05);
}

/* Counter animation enhancement */
.odometer {
  transition: opacity 0.3s ease;
}

/* Scroll indicator pulse */
#scrollToPortfolio {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.8;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -5px);
  }
}

/* Section animations handled by WOW.js */

/* Stagger animation for service items */
.group[data-wow-delay] {
  opacity: 0;
}

.group.wow.animated {
  opacity: 1;
}

/*! ======================== SERVICES SLIDER ======================== */
.services-slider {
  overflow: visible !important;
}
.services-slider .slick-list {
  overflow: visible;
  padding: 20px 0 40px !important;
}
.services-slider .slick-track {
  display: flex !important;
}
.services-slider .slick-slide {
  height: inherit !important;
  padding: 0 12px;
}
.services-slider .slick-slide > div {
  height: 100%;
}

/*! ======================== RESPONSIVE ======================== */
@media screen and (max-width: 768px) {
  .services-slider .slick-list {
    overflow: visible;
    padding: 0px !important;
  }
  .showreel-btn {
    padding: 10px 20px 10px 14px;
    font-size: 14px;
    gap: 12px;
  }

  .video-circle {
    width: 36px;
    height: 36px;
  }

  .showreel-btn:hover .video-circle {
    width: 48px;
    height: 48px;
  }

  .video-close-btn {
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .video-close-btn svg {
    width: 18px;
    height: 18px;
  }
}

@media screen and (max-width: 480px) {
  .showreel-wrapper {
    margin-top: 2rem;
  }

  .showreel-btn {
    padding: 8px 18px 8px 12px;
    font-size: 13px;
    gap: 10px;
  }

  .video-circle {
    width: 32px;
    height: 32px;
  }

  .showreel-btn:hover .video-circle {
    width: 42px;
    height: 42px;
  }

  .video-close-btn {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .video-close-btn svg {
    width: 16px;
    height: 16px;
  }
}
