/* Custom styles for Sugar on Main */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: #0a1628;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

/* Selection color */
::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #f1f5f9;
}

/* Fade-in animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar solid state */
.navbar-scrolled {
  background: rgba(10, 22, 40, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animations */
.mobile-menu-open #bar1 {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-open #bar2 {
  opacity: 0;
}
.mobile-menu-open #bar3 {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}
.mobile-menu-open #mobile-menu {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Gold shimmer effect on hover */
.gold-shimmer:hover {
  background-image: linear-gradient(
    110deg,
    rgba(245, 158, 11, 0.1) 0%,
    rgba(245, 158, 11, 0.3) 50%,
    rgba(245, 158, 11, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

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

/* Pulse dot animation */
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.pulse-dot {
  animation: pulse-gold 2s infinite;
}

/* Image hover overlay */
.img-hover-overlay {
  position: relative;
  overflow: hidden;
}

.img-hover-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img-hover-overlay:hover::after {
  opacity: 1;
}

/* Glow effects */
.glow-teal {
  box-shadow: 0 0 40px rgba(13, 148, 136, 0.15);
}

.glow-gold {
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.15);
}
