/* Enhanced Animations CSS for Bunya Digital Partners Website */

/* Data Flow Animation */
.data-flow-container {
  position: relative;
  width: 100%;
  height: 300px;
  margin: 20px 0;
  overflow: visible;
}

.data-flow-svg {
  width: 100%;
  height: 100%;
}

.node-circle {
  transition: all 0.5s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.node:hover .node-circle {
  transform: scale(1.1);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.node-text {
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}

.label-bg {
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
  transition: all 0.3s ease;
}

.label-text {
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
}

.flow-label:hover .label-bg {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Animated paths */
.animated-path {
  stroke-dasharray: 10;
  animation: flowAnimation 30s linear infinite;
}

@keyframes flowAnimation {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Bunya Method Visualization */
.bunya-method-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 20px 0;
  overflow: visible;
}

.bunya-method-svg {
  width: 100%;
  height: 100%;
}

.main-flow-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 3s ease-in-out forwards;
}

@keyframes drawPath {
  to {
    stroke-dashoffset: 0;
  }
}

.method-node {
  transition: all 0.5s ease;
  cursor: pointer;
}

.method-node:hover .phase-circle {
  transform: scale(1.1);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.method-node.active .phase-circle {
  stroke: #ffffff;
  stroke-width: 3px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.feedback-path {
  stroke-dasharray: 5;
  animation: feedbackAnimation 20s linear infinite;
}

@keyframes feedbackAnimation {
  to {
    stroke-dashoffset: -1000;
  }
}

.learning-indicator {
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s ease;
  animation: pulseAnimation 2s ease-in-out infinite;
}

.method-node:hover .learning-indicator {
  opacity: 1;
  transform: scale(1);
}

@keyframes pulseAnimation {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* Hero Section Enhancements */
.hero {
  position: relative;
  overflow: hidden;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url('../images/bunya-artistic-logo.svg');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 50%;
  opacity: 0.1;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Feature Card Animations */
.feature-card {
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

.feature-card:nth-child(1) {
  animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-icon {
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  color: var(--secondary-color);
}

/* Methodology Tab Animations */
.methodology-tab {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.methodology-tab:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.methodology-tab:hover:before {
  opacity: 0.1;
}

.methodology-tab.active:before {
  opacity: 1;
}

.methodology-tab.active {
  color: white;
}

/* Architecture Stage Animations */
.architecture-stage {
  transition: all 0.3s ease;
}

.stage-icon {
  transition: all 0.3s ease;
}

.architecture-stage:hover .stage-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Assessment Option Animations */
.assessment-option label {
  transition: all 0.3s ease;
}

.assessment-option input[type="radio"]:checked + label {
  transform: scale(1.05);
}

/* Testimonial Animation */
.testimonial-content {
  position: relative;
  transition: all 0.3s ease;
}

.testimonial-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* CTA Button Animation */
.cta-button {
  position: relative;
  overflow: hidden;
}

.cta-button:after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.6s ease;
}

.cta-button:hover:after {
  left: 100%;
}

/* Scroll Animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.scroll-animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsiveness for Animations */
@media only screen and (max-width: 768px) {
  .data-flow-container,
  .bunya-method-container {
    height: 250px;
  }
  
  .node-text {
    font-size: 12px;
  }
  
  .label-text {
    font-size: 10px;
  }
  
  .feedback-text {
    display: none;
  }
}

@media only screen and (max-width: 480px) {
  .data-flow-container {
    height: 200px;
  }
  
  .bunya-method-container {
    height: 300px;
  }
}
