/* General transition styles */
.transition-all {
  transition: all 0.3s ease;
}

/* Hover effects for cards */
.hover-lift {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border: 1px solid rgba(226, 232, 240, 1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
}

.hover-lift:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Enhanced visibility for community cards */
.community-card {
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.community-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
  transition: opacity 0.5s ease;
  opacity: 0.3;
}

.community-card:hover::before {
  opacity: 1;
}

/* Button hover effects */
.btn-hover-effect {
  transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-hover-effect:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Fade in animation for sections */
.fade-in-section {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 4.8s cubic-bezier(0.22, 0.61, 0.36, 1), transform 4.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
  perspective: 1000px;
  backface-visibility: hidden;
  overflow-x: hidden; /* Prevent horizontal scroll from animations */
  position: relative; /* Ensure overflow is respected */
}

/* Slide-in animations for sections */
.slide-from-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 3s cubic-bezier(0.22, 0.61, 0.36, 1) !important, transform 8s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
  will-change: opacity, transform;
}

.slide-from-right {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 3s cubic-bezier(0.22, 0.61, 0.36, 1) !important, transform 8s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
  will-change: opacity, transform;
}

/* Ensure long transitions are applied when section becomes visible */
@keyframes ltt-slide-in-left {
  0% { opacity: 0; transform: translateX(-120px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes ltt-slide-in-right {
  0% { opacity: 0; transform: translateX(120px); }
  100% { opacity: 1; transform: translateX(0); }
}

.fade-in-section.is-visible .slide-from-left {
  transition: none !important;
  animation: ltt-slide-in-left 6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards !important;
}

.fade-in-section.is-visible .slide-from-right {
  transition: none !important;
  animation: ltt-slide-in-right 6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards !important;
}

/* Subtle stagger when section becomes visible */
.fade-in-section.is-visible .slide-from-left { animation-delay: 0.05s; }
.fade-in-section.is-visible .slide-from-right { animation-delay: 0.25s; }

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .slide-from-left,
  .slide-from-right,
  .fade-in-section {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Default visible sections (first two) */
.section-visible-by-default {
  opacity: 1;
  transform: translateY(0);
}

/* Increased section margins */
section {
  margin-bottom: 2.5rem;
}

/* Staggered list items animation */
.stagger-item {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 1s ease, transform 1s ease;
}

.stagger-list.is-visible .stagger-item {
  opacity: 1;
  transform: translateX(0);
}

.stagger-list.is-visible .stagger-item:nth-child(1) {
  transition-delay: 0.2s;
}

.stagger-list.is-visible .stagger-item:nth-child(2) {
  transition-delay: 0.4s;
}

.stagger-list.is-visible .stagger-item:nth-child(3) {
  transition-delay: 0.6s;
}

.stagger-list.is-visible .stagger-item:nth-child(4) {
  transition-delay: 0.8s;
}

.stagger-list.is-visible .stagger-item:nth-child(5) {
  transition-delay: 1s;
}

.stagger-list.is-visible .stagger-item:nth-child(6) {
  transition-delay: 1.2s;
}

/* Pulse animation for icons */
@keyframes gentle-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.pulse-on-hover:hover {
  animation: gentle-pulse 1s infinite;
}

/* Pricing toggle animation */
.pricing-tab {
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.pricing-tab.active {
  transform: translateY(-2px);
}

/* Form field focus animation */
.form-field-focus {
  transition: border-color 0.3s ease;
}

/* Guiding Principles Section Styling */
.principles-card {
  transition: all 0.4s ease;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.principles-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(22, 82, 240, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.principles-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(59, 130, 246, 0.4);
  background-color: white;
}

/* Unified Card Styling */
.unified-card {
  background-color: white;
  border: 1px solid rgba(229, 231, 235, 1); /* border-gray-200 */
  border-radius: 0.75rem; /* rounded-xl */
  padding: 1.5rem; /* p-6 */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.unified-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  border-color: rgba(59, 130, 246, 0.3); /* lighter blue border */
}

.unified-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(22, 82, 240, 0.03) 0%, rgba(255, 255, 255, 0) 50%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.unified-card:hover::before {
  opacity: 1;
}

/* Extended Card Classes */

/* Stats Card */
.stats-card.unified-card {
  padding: 0.75rem; /* p-3 */
  background-color: rgba(255, 255, 255, 0.7); /* bg-white bg-opacity-70 */
  text-align: center;
}

/* Principles Card */
.principles-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.principles-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.07);
  border-color: rgba(59, 130, 246, 0.4);
}

/* Network Card */
.network-card {
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.network-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Button hover effects */
.btn-hover-effect {
  transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-hover-effect:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Remove unused styles */



.principles-card:hover h3 {
  color: #1652F0;
}

.principles-card h3::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 50%;
  width: 0;
  height: 2px;
  background-color: #1652F0;
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateY(-50%);
}

.principles-card:hover h3::before {
  width: 20px;
  left: -25px;
}

/* Network Journey Section Styling */
.network-card {
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.network-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #1652F0, #3E69D6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.network-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.network-card:hover::after {
  transform: scaleX(1);
}

.network-card h3 {
  transition: color 0.3s ease;
}

.network-card:hover h3 {
  color: #1652F0;
}

.network-card p {
  transition: color 0.3s ease;
}

/* Form field focus animation */
.form-field-focus {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-field-focus:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  outline: none;
}

/* Stats counter animations */
@keyframes highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.stats-highlight {
  animation: highlight-pulse 2s infinite;
}

.stats-card:nth-child(1) {
  animation-delay: 0.5s;
}

.stats-card:nth-child(2) {
  animation-delay: 1s;
}

.stats-card:nth-child(3) {
  animation-delay: 1.5s;
}

.stats-card {
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInUp 0.6s forwards;
}

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

.stats-card:nth-child(1) {
  animation-delay: 0.3s;
}

.stats-card:nth-child(2) {
  animation-delay: 0.5s;
}

.stats-card:nth-child(3) {
  animation-delay: 0.7s;
}

/* Ensure slide-in transition overrides network-card base transitions */
.network-card.slide-from-left,
.network-card.slide-from-right {
  transition-property: opacity, transform !important;
  transition-duration: 3s, 8s !important;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1), cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

/* Faster slide-ins for bottom sections only */
.fade-in-section.-mb-px.is-visible .slide-from-left,
.fade-in-section.-mb-px.is-visible .slide-from-right {
  /* keep same easing, shorten duration */
  animation-duration: 2s !important;
}