/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Custom gradient backgrounds */
.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Glass effect for modern look */
.glass-effect {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Focus styles for accessibility */
/* Focus styles for accessibility - Updated */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}
/* Custom gradient text */
.gradient-text {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Loading state styles */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Mobile menu animation */
#mobile-menu {
  transition: all 0.3s ease;
}

/* Ensure proper spacing for sections */
section {
  scroll-margin-top: 80px;
}

/* Custom button styles for better interaction */
button {
  cursor: pointer;
  user-select: none;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Image loading optimization */
img {
  loading: lazy;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card-hover:hover {
    border: 2px solid #000;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/*back to top button */
/* Back to Top Button Styles */
#backToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 1000;
  background-color: #0099F7;
  color: #fff;
  border: none;
  padding: 14px 18px;
  font-size: 15px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Show button when visible */
#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* Hover Animation */
#backToTopBtn:hover {
  animation: bounce 0.6s;
  background-color: #0077b5;
}

/* Bounce Animation Keyframes */
@keyframes bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-8px); }
  60%  { transform: translateY(4px); }
  100% { transform: translateY(0); }
}

/* Show More Buttons - Futuristic AI Hub Design */
.show-more-btn {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #3b82f6 0%, #1d4ed8 25%, #7c3aed 50%, #1e40af 75%, #3b82f6 100%),
    linear-gradient(45deg, rgba(59, 130, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  background-size: 200% 200%, 100% 100%;
  animation: gradientShift 4s ease infinite;
  box-shadow:
    0 0 30px rgba(59, 130, 246, 0.3),
    0 8px 32px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.4);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-width: 140px;
  padding: 12px 24px;
}

.show-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 20%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.3) 80%,
    transparent 100%);
  transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
}

.show-more-btn:hover::before {
  left: 100%;
}

.show-more-btn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg,
    #3b82f6,
    #7c3aed,
    #ec4899,
    #3b82f6);
  border-radius: 14px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  filter: blur(8px);
}

.show-more-btn:hover::after {
  opacity: 0.7;
}

.show-more-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 0 50px rgba(59, 130, 246, 0.5),
    0 15px 50px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  animation-duration: 2s;
  border-color: rgba(59, 130, 246, 0.6);
}

.show-more-btn:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 40px rgba(59, 130, 246, 0.4),
    0 10px 30px rgba(59, 130, 246, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition-duration: 0.1s;
}

.show-more-btn span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.show-more-btn i {
  font-size: 11px;
  transition: all 0.4s ease;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.show-more-btn:hover i {
  transform: scale(1.2) rotate(5deg);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

/* Dynamic icons with better positioning */
.show-more-btn[data-action="show-more"] span::after {
  content: '▼';
  font-size: 8px;
  margin-left: 6px;
  transition: transform 0.4s ease;
  display: inline-block;
}

.show-more-btn[data-action="show-less"] span::after {
  content: '▲';
  font-size: 8px;
  margin-left: 6px;
  transition: transform 0.4s ease;
  display: inline-block;
}

.show-more-btn:hover[data-action="show-more"] span::after {
  transform: translateY(2px);
}

.show-more-btn:hover[data-action="show-less"] span::after {
  transform: translateY(-2px);
}

/* Pulse effect for extra coolness */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(59, 130, 246, 0.3),
      0 8px 32px rgba(59, 130, 246, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      0 0 40px rgba(59, 130, 246, 0.5),
      0 12px 40px rgba(59, 130, 246, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

.show-more-btn:focus {
  outline: none;
  animation: pulseGlow 2s infinite;
}

/* Smooth reveal animation for new items */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.show-more-reveal {
  animation: slideInUp 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 600px) {
  #backToTopBtn {
    bottom: 20px;
    right: 15px;
    padding: 12px 16px;
    font-size: 18px;
  }

  .show-more-btn {
    font-size: 14px;
    padding: 12px 20px;
  }
}
