/* Always Sticky Header */
.navbar,
.navbar.sticky-top,
nav.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1030 !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(92, 88, 88, 0.1) !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 6px rgba(80, 79, 79, 0.1) !important;
}

/* Add top padding to body to compensate for fixed navbar */
body {
  padding-top: 80px !important;
}

/* Bootstrap Sticky Sidebar Enhancement */
.sticky-top {
  top: 100px !important; /* Account for fixed navbar height */
  z-index: 1020;
  transition: all 0.2s ease;
}

/* Latest Posts Widget - Always Sticky */
.latest-posts-widget {
  position: sticky !important;
  top: 40px !important; /* Account for navbar + some spacing */
  z-index: 1015 !important;
  transition: all 0.3s ease !important;
  max-height: calc(
    100vh - 140px
  ) !important; /* Prevent overflow on small screens */
  overflow-y: auto !important;
}

/* Custom scrollbar for the widget when content overflows */
.latest-posts-widget::-webkit-scrollbar {
  width: 4px;
}

.latest-posts-widget::-webkit-scrollbar-track {
  background: transparent;
}

.latest-posts-widget::-webkit-scrollbar-thumb {
  background: rgba(13, 129, 116, 0.3);
  border-radius: 2px;
}

.latest-posts-widget::-webkit-scrollbar-thumb:hover {
  background: rgba(13, 129, 116, 0.5);
}

/* Enhanced shadow effect when sticky */
.latest-posts-widget.shadow-sm {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Responsive behavior for mobile */
@media (max-width: 991.98px) {
  .sticky-top {
    position: relative !important;
    top: 0 !important;
  }

  .latest-posts-widget {
    position: relative !important;
    top: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* Quick Navigation Sticky Bottom Styles */
.quick-nav-widget.bottom-sticky {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  width: 300px !important;
  z-index: 1025 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(0) !important;
  transition: all 0.3s ease !important;
}

/* Smooth animation for quick nav */
.quick-nav-widget {
  transition: all 0.3s ease;
}

/* Enhanced bottom sticky shadow */
.quick-nav-widget.bottom-sticky {
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px) !important;
}

/* Mobile responsive for bottom sticky */
@media (max-width: 991.98px) {
  .quick-nav-widget.bottom-sticky {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    width: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
    transform: none !important;
    border: 1px solid #f1f3f4 !important;
    background: white !important;
    backdrop-filter: none !important;
  }
}
