/* ============================================
   BIS Website - Ripple Effects & Enhanced Interactions
   ============================================ */

/* Ripple Effect for Buttons */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced Button Styles */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Navbar Scroll Enhancement */
.navbar.scrolled,
.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

/* Card Glow Effect on Hover */
.card-glow {
  position: relative;
  transition: all 0.3s ease;
}

.card-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #0066cc, #00a8ff, #0066cc);
  border-radius: inherit;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  background-size: 200% 200%;
  animation: gradient-rotate 3s ease infinite;
}

.card-glow:hover::before {
  opacity: 0.3;
}

@keyframes gradient-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Smooth Image Load */
img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img.loaded,
img[src] {
  opacity: 1;
}

/* Link Underline Animation */
a:not(.btn):not(.card) {
  position: relative;
  text-decoration: none;
}

a:not(.btn):not(.card)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

a:not(.btn):not(.card):hover::after {
  width: 100%;
}

/* Section Divider Animation */
.section-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, #0066cc, transparent);
  margin: 3rem 0;
  opacity: 0.3;
}

/* Floating Labels for Forms */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  transition: all 0.3s ease;
  pointer-events: none;
  color: #666;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -0.5rem;
  left: 0.5rem;
  font-size: 0.75rem;
  color: #0066cc;
  background: white;
  padding: 0 0.25rem;
}

/* Progress Bar Animation */
.progress-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(to right, #0066cc, #00a8ff);
  border-radius: 2px;
  transform: translateX(-100%);
  animation: progress-fill 2s ease-out forwards;
}

@keyframes progress-fill {
  to {
    transform: translateX(0);
  }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 0.5rem 0.75rem;
  background: #333;
  color: white;
  font-size: 0.875rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #333;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
}

[data-tooltip]:hover::before {
  transform: translateX(-50%) translateY(-12px);
}

/* Badge Pulse */
.badge-pulse {
  position: relative;
  display: inline-block;
}

.badge-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Sticky Header Enhancement */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

/* Image Zoom on Hover */
.image-zoom {
  overflow: hidden;
  border-radius: 8px;
}

.image-zoom img {
  transition: transform 0.5s ease;
}

.image-zoom:hover img {
  transform: scale(1.15);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, #0066cc, #00a8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated Border */
.animated-border {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(45deg, #0066cc, #00a8ff) border-box;
  border-radius: 8px;
}

/* Stagger Children Animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: stagger-fade-in 0.6s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes stagger-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shine Effect */
.shine {
  position: relative;
  overflow: hidden;
}

.shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.shine:hover::before {
  left: 100%;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .card-glow::before {
    display: none;
  }
  
  [data-tooltip]::before,
  [data-tooltip]::after {
    display: none;
  }
}
