/**
 * Custom Keyframe Animations
 * Yicheng Commonweal Theme
 *
 * Brand-specific animations aligned with design system
 */

/* ========================================
   CSS Custom Properties (Variables)
   ======================================== */

:root {
  /* Animation Durations */
  --animation-fast: 200ms;
  --animation-normal: 400ms;
  --animation-slow: 600ms;
  --animation-slower: 800ms;
  --animation-slowest: 1000ms;

  /* Easing Functions */
  --ease-in-out: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0.0, 1, 1);
  --ease-brand: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Stagger Delays */
  --stagger-delay: 100ms;
  --stagger-delay-lg: 150ms;

  /* Transform Values */
  --translate-distance: 30px;
  --translate-distance-lg: 50px;
}

/* ========================================
   Accessibility: Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.reduce-motion * {
  animation: none !important;
  transition: none !important;
}

/* ========================================
   ENTRANCE ANIMATIONS
   ======================================== */

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn var(--animation-normal) var(--ease-out);
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(var(--translate-distance));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp var(--animation-slow) var(--ease-out);
}

/* Fade In Down */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(calc(var(--translate-distance) * -1));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-down {
  animation: fadeInDown var(--animation-slow) var(--ease-out);
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(calc(var(--translate-distance) * -1));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-left {
  animation: fadeInLeft var(--animation-slow) var(--ease-out);
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(var(--translate-distance));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-right {
  animation: fadeInRight var(--animation-slow) var(--ease-out);
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scaleIn var(--animation-normal) var(--ease-out);
}

/* Zoom In */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-zoom-in {
  animation: zoomIn var(--animation-slow) var(--ease-out);
}

/* Slide In Up */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.animate-slide-in-up {
  animation: slideInUp var(--animation-slow) var(--ease-out);
}

/* Slide In Down */
@keyframes slideInDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.animate-slide-in-down {
  animation: slideInDown var(--animation-slow) var(--ease-out);
}

/* ========================================
   EXIT ANIMATIONS
   ======================================== */

/* Fade Out */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.animate-fade-out {
  animation: fadeOut var(--animation-normal) var(--ease-in);
}

/* Fade Out Up */
@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(calc(var(--translate-distance) * -1));
  }
}

.animate-fade-out-up {
  animation: fadeOutUp var(--animation-slow) var(--ease-in);
}

/* Fade Out Down */
@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(var(--translate-distance));
  }
}

.animate-fade-out-down {
  animation: fadeOutDown var(--animation-slow) var(--ease-in);
}

/* Scale Out */
@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.animate-scale-out {
  animation: scaleOut var(--animation-normal) var(--ease-in);
}

/* ========================================
   HOVER & INTERACTION ANIMATIONS
   ======================================== */

/* Float (Lift) */
@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

.hover-float:hover {
  animation: float 0.3s var(--ease-out) forwards;
}

/* Glow */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(239, 204, 100, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(239, 204, 100, 0.8);
  }
}

.hover-glow:hover {
  animation: glow 1.5s var(--ease-in-out) infinite;
}

/* Pulse */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-pulse {
  animation: pulse 2s var(--ease-in-out) infinite;
}

/* Shake */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.animate-shake {
  animation: shake 0.5s var(--ease-in-out);
}

/* Bounce */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-bounce {
  animation: bounce 0.6s var(--ease-in-out);
}

/* Wiggle */
@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

.animate-wiggle {
  animation: wiggle 0.5s var(--ease-in-out);
}

/* ========================================
   BRAND-SPECIFIC ANIMATIONS
   ======================================== */

/* Hero Title Reveal */
@keyframes heroTitleReveal {
  0% {
    opacity: 0;
    transform: translateY(50px);
    letter-spacing: 0.2em;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -2px; /* Matches title-tight */
  }
}

.animate-hero-title {
  animation: heroTitleReveal var(--animation-slower) var(--ease-out);
}

/* Card Flip */
@keyframes cardFlip {
  from {
    transform: perspective(1000px) rotateY(0deg);
  }
  to {
    transform: perspective(1000px) rotateY(180deg);
  }
}

.animate-card-flip {
  animation: cardFlip 0.6s var(--ease-brand);
  transform-style: preserve-3d;
}

/* Gradient Shift (for gradient backgrounds) */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient-shift {
  background-size: 200% 200%;
  animation: gradientShift 5s var(--ease-in-out) infinite;
}

/* Slide Fade Background (for hero slideshow) */
@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-slide-fade-in {
  animation: slideFadeIn 2s var(--ease-out);
}

/* Text Shimmer */
@keyframes textShimmer {
  0% {
    background-position: -500%;
  }
  100% {
    background-position: 500%;
  }
}

.animate-text-shimmer {
  background: linear-gradient(
    90deg,
    #121212 0%,
    #EFCC64 50%,
    #121212 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3s linear infinite;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

/* Spinner */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Dots Loading */
@keyframes dotPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background-color: currentColor;
  border-radius: 50%;
  animation: dotPulse 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

/* Skeleton Loading */
@keyframes skeleton {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }
.delay-900 { animation-delay: 900ms; }
.delay-1000 { animation-delay: 1000ms; }

/* Animation Durations */
.duration-fast { animation-duration: var(--animation-fast); }
.duration-normal { animation-duration: var(--animation-normal); }
.duration-slow { animation-duration: var(--animation-slow); }
.duration-slower { animation-duration: var(--animation-slower); }
.duration-slowest { animation-duration: var(--animation-slowest); }

/* Animation Fill Modes */
.fill-forwards { animation-fill-mode: forwards; }
.fill-backwards { animation-fill-mode: backwards; }
.fill-both { animation-fill-mode: both; }
.fill-none { animation-fill-mode: none; }

/* Animation Iteration */
.iterate-once { animation-iteration-count: 1; }
.iterate-infinite { animation-iteration-count: infinite; }

/* GPU Acceleration Hint */
.will-animate {
  will-change: transform, opacity;
}

.will-animate-complete {
  will-change: auto;
}

/* ========================================
   TRANSITION UTILITIES
   ======================================== */

/* Base Transitions */
.transition-base {
  transition: all var(--animation-normal) var(--ease-brand);
}

.transition-fast {
  transition: all var(--animation-fast) var(--ease-out);
}

.transition-slow {
  transition: all var(--animation-slow) var(--ease-in-out);
}

/* Specific Property Transitions */
.transition-opacity {
  transition: opacity var(--animation-normal) var(--ease-out);
}

.transition-transform {
  transition: transform var(--animation-normal) var(--ease-brand);
}

.transition-colors {
  transition: background-color var(--animation-normal) var(--ease-out),
              border-color var(--animation-normal) var(--ease-out),
              color var(--animation-normal) var(--ease-out);
}

/* ========================================
   SCROLL ANIMATIONS (Work with AOS)
   ======================================== */

/* Base styles for AOS elements */
[data-aos] {
  pointer-events: auto;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

/* Custom AOS animations */
[data-aos="yicheng-fade-up"] {
  opacity: 0;
  transform: translateY(var(--translate-distance));
  transition: opacity var(--animation-slow) var(--ease-out),
              transform var(--animation-slow) var(--ease-out);
}

[data-aos="yicheng-fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="yicheng-scale"] {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--animation-slow) var(--ease-out),
              transform var(--animation-slow) var(--ease-out);
}

[data-aos="yicheng-scale"].aos-animate {
  opacity: 1;
  transform: scale(1);
}

/* ========================================
   COMPONENT-SPECIFIC ANIMATIONS
   ======================================== */

/* Button Animations */
.btn-animate {
  position: relative;
  overflow: hidden;
  transition: all var(--animation-fast) var(--ease-out);
}

.btn-animate::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-animate:hover::before {
  width: 300px;
  height: 300px;
}

.btn-animate:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Entrance Stagger */
.card-grid > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp var(--animation-slow) var(--ease-out) forwards;
}

.card-grid > *:nth-child(1) { animation-delay: 0ms; }
.card-grid > *:nth-child(2) { animation-delay: 100ms; }
.card-grid > *:nth-child(3) { animation-delay: 200ms; }
.card-grid > *:nth-child(4) { animation-delay: 300ms; }
.card-grid > *:nth-child(5) { animation-delay: 400ms; }
.card-grid > *:nth-child(6) { animation-delay: 500ms; }

/* Image Reveal */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform: translateX(-100%);
  animation: imageReveal 1s var(--ease-brand) forwards;
}

@keyframes imageReveal {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ========================================
   SECTION ANIMATIONS (Scroll-triggered)
   ======================================== */

/* Initial state - hidden before animation */
.section-animate-initial {
  opacity: 0;
}

/* Line animation - grows from left to right */
.section-line-animate {
  width: 0 !important;
  opacity: 0;
  transition: width 0.8s cubic-bezier(0.4, 0.0, 0.2, 1),
              opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.section-line-animate:not(.section-animate-initial) {
  width: 2.5rem !important; /* w-10 default */
  opacity: 1;
}

@media (min-width: 768px) {
  .section-line-animate:not(.section-animate-initial) {
    width: 3rem !important; /* md:w-12 */
  }
}

@media (min-width: 1024px) {
  .section-line-animate:not(.section-animate-initial) {
    width: 3.5rem !important; /* lg:w-14 */
  }
}

/* Label animation - words fade in with stagger */
[data-animate="label"] .section-label-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

[data-animate="label"]:not(.section-animate-initial) .section-label-word {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger effect for label words */
[data-animate="label"]:not(.section-animate-initial) .section-label-word:nth-child(1) {
  transition-delay: 0.1s;
}

[data-animate="label"]:not(.section-animate-initial) .section-label-word:nth-child(2) {
  transition-delay: 0.2s;
}

[data-animate="label"]:not(.section-animate-initial) .section-label-word:nth-child(3) {
  transition-delay: 0.3s;
}

[data-animate="label"]:not(.section-animate-initial) .section-label-word:nth-child(4) {
  transition-delay: 0.4s;
}

[data-animate="label"]:not(.section-animate-initial) .section-label-word:nth-child(5) {
  transition-delay: 0.5s;
}

/* Title animation - fade in with slide up */
.section-title-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) 0.3s,
              transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) 0.3s;
}

.section-title-animate:not(.section-animate-initial) {
  opacity: 1;
  transform: translateY(0);
}

/* Title character animation - for creative effect */
[data-animate="title-chars"] .section-title-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.4s cubic-bezier(0.4, 0.0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger effect for title characters */
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(n) {
  transition-delay: calc(0.02s * var(--char-index, 1));
}

/* Generate delays for first 50 characters */
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(1) { transition-delay: 0.02s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(2) { transition-delay: 0.04s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(3) { transition-delay: 0.06s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(4) { transition-delay: 0.08s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(5) { transition-delay: 0.10s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(6) { transition-delay: 0.12s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(7) { transition-delay: 0.14s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(8) { transition-delay: 0.16s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(9) { transition-delay: 0.18s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(10) { transition-delay: 0.20s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(11) { transition-delay: 0.22s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(12) { transition-delay: 0.24s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(13) { transition-delay: 0.26s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(14) { transition-delay: 0.28s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(15) { transition-delay: 0.30s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(16) { transition-delay: 0.32s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(17) { transition-delay: 0.34s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(18) { transition-delay: 0.36s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(19) { transition-delay: 0.38s; }
[data-animate="title-chars"]:not(.section-animate-initial) .section-title-char:nth-child(20) { transition-delay: 0.40s; }

/* Content animation - fade in with slide up */
.section-content-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) 0.5s,
              transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1) 0.5s;
}

.section-content-animate:not(.section-animate-initial) {
  opacity: 1;
  transform: translateY(0);
}

/* Image section animation - scale and fade */
.section-image-animate {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 1s cubic-bezier(0.4, 0.0, 0.2, 1) 0.6s,
              transform 1s cubic-bezier(0.4, 0.0, 0.2, 1) 0.6s;
}

.section-image-animate:not(.section-animate-initial) {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Button animation inside image section */
.section-button-animate {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.8s,
              transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.8s;
}

.section-button-animate:not(.section-animate-initial) {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   STICKY NAVBAR STYLES
   ======================================== */

/* Sticky navbar state - NO padding on wrapper (flush to edges) */
#navbar-wrapper.navbar-sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 9999;
  animation: navbarSlideIn var(--animation-normal) var(--ease-out);
}

/* Hidden state for navbar when mobile menu is open */
#navbar-wrapper.navbar-hidden {
  transform: translateY(-100%);
  transition: transform var(--animation-normal) var(--ease-out);
}

/* Full width state - nav spans full width with enhanced visibility */
#navbar-wrapper.navbar-full-width #main-nav {
  max-width: 100% !important;
  border-radius: 0 !important;
  /* Prominent shadow for depth and visibility */
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15),
              0 8px 10px -6px rgba(0, 0, 0, 0.1);
  /* Subtle bottom border for clear definition */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  /* Solid white background */
  background-color: #ffffff;
}

/* Smooth transitions for sticky navbar */
#navbar-wrapper {
  transition: all var(--animation-normal) var(--ease-out);
}

#main-nav {
  transition: all var(--animation-normal) var(--ease-out),
              padding var(--animation-normal) var(--ease-out),
              box-shadow var(--animation-normal) var(--ease-out),
              border var(--animation-normal) var(--ease-out),
              background-color var(--animation-normal) var(--ease-out);
}

#language-switcher {
  transition: opacity var(--animation-normal) var(--ease-out),
              height var(--animation-normal) var(--ease-out),
              margin var(--animation-normal) var(--ease-out);
}

/* Hidden state for language switcher when sticky */
#navbar-wrapper.navbar-sticky #language-switcher {
  opacity: 0;
  height: 0;
  overflow: hidden;
  margin-bottom: 0;
}

/* Responsive padding adjustments for nav element when sticky */
@media (min-width: 768px) {
  #navbar-wrapper.navbar-sticky #main-nav {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (min-width: 1024px) {
  #navbar-wrapper.navbar-sticky #main-nav {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (min-width: 1280px) {
  #navbar-wrapper.navbar-sticky #main-nav {
    padding-left: 6rem;
    padding-right: 6rem;
  }
}

@media (min-width: 1536px) {
  #navbar-wrapper.navbar-sticky #main-nav {
    padding-left: 8rem;
    padding-right: 8rem;
  }
}

/* Smooth appearance animation */
@keyframes navbarSlideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile adjustments for sticky navbar */
@media (max-width: 767px) {
  #navbar-wrapper.navbar-sticky #main-nav {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

/* ========================================
   ACTIVE MENU ITEM STYLES
   ======================================== */

/* Active/Current menu items - Desktop */
.nav-item.current-menu-item > a,
.nav-item.current-menu-ancestor > a,
.nav-item.current-menu-parent > a,
.nav-item.current_page_item > a,
.nav-item.current_page_ancestor > a {
  color: #EFCC64 !important;
  font-weight: 700 !important;
}

/* Active menu item arrow color - Desktop */
.nav-item.current-menu-item > a .nav-arrow,
.nav-item.current-menu-ancestor > a .nav-arrow,
.nav-item.current-menu-parent > a .nav-arrow,
.nav-item.current_page_item > a .nav-arrow,
.nav-item.current_page_ancestor > a .nav-arrow {
  color: #EFCC64 !important;
}

/* Active menu item underline - Desktop (always visible) */
.nav-item.current-menu-item > a > span:last-child,
.nav-item.current-menu-ancestor > a > span:last-child,
.nav-item.current-menu-parent > a > span:last-child,
.nav-item.current_page_item > a > span:last-child,
.nav-item.current_page_ancestor > a > span:last-child {
  width: calc(100% - 1rem) !important;
}

/* Active/Current menu items - Mobile */
.mobile-menu-item.current-menu-item a,
.mobile-menu-item.current-menu-ancestor button,
.mobile-menu-item.current-menu-parent button,
.mobile-menu-item.current_page_item a,
.mobile-menu-item.current_page_ancestor button,
.menu-item.current-menu-item a,
.menu-item.current-menu-ancestor a,
.menu-item.current-menu-parent a,
.menu-item.current_page_item a,
.menu-item.current_page_ancestor a {
  color: #EFCC64 !important;
  font-weight: 700 !important;
}

/* Active menu item underline - Mobile (always visible) */
.mobile-menu-item.current-menu-item > span:last-child,
.mobile-menu-item.current-menu-ancestor > span:last-child,
.mobile-menu-item.current-menu-parent > span:last-child,
.mobile-menu-item.current_page_item > span:last-child,
.mobile-menu-item.current_page_ancestor > span:last-child {
  width: 100% !important;
}

/* Dropdown active items */
.nav-dropdown .dropdown-item.current-menu-item,
.nav-dropdown .current-menu-item a,
.mobile-nav-dropdown .current-menu-item a {
  color: #EFCC64 !important;
  font-weight: 700 !important;
}

/* Ensure smooth transitions for active states */
.nav-item a,
.mobile-menu-item a,
.mobile-menu-item button {
  transition: color 0.3s ease, font-weight 0.3s ease;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
